PageSourceSearch

https://riege.de/9089.ef195f7b1d693327.js

js riege.de collected 2026-10-07 15:25:00 UTC 323,841 bytes, 1 lines download raw bytes

1(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[9089],{65091(ee,D,l){"use strict";l.d(D,{advancedRoutes:()=>wd});var p=l(85802),M=l(59882),o=l(89417),c=l(97201),N=l(4499),e=l(35547);let F=(()=>{class i extends N.d{getE164Settings(t,r="body"){const n=t?.$select,s=t?.$expand;let a=new c.rx(this.encoder);a=this.addToHttpParams(a,"$select",n,c.l2.Form,!1),a=this.addToHttpParams(a,"$expand",s,c.l2.Form,!1);let m=this.defaultHeaders;m=this.configuration.addCredentialToHeaders("Application","Authorization",m,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(m=m.set("Accept",h));let b="json";h&&(b=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${k}/E164Settings`,{params:a.toHttpParams(),responseType:b,...y?{withCredentials:y}:{},headers:m,observe:r})}getE164SettingsQuery(t,r="body",n=!1,s){const a=t.$select,m=t.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$select",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",m,c.l2.Form,!1),"/E164Settings?"+h.toString()}updateE164Settings(t,r="body"){const n=t?.pbxE164Settings;let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("patch",`${k}/E164Settings`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateE164SettingsQuery(t,r="body",n=!1,s){return"/E164Settings"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var _=l(25558),B=l(36392),C=l(96354),A=l(45054),x=l(19781),V=l(66300),G=l(24708),X=l(84460),W=l(49769),Y=l(56998),K=l(89079);let ue=(()=>{class i{route=(0,p.WQX)(M.nX);countries=(0,p.WQX)(B.C);e164SettingsApiService=(0,p.WQX)(F);destroy$=(0,p.WQX)(p.abz);e164Settings=this.route.snapshot.data.e164Settings??{};countryOptions$;form=new o.gE({Enabled:new o.MJ(!!this.e164Settings.Enabled),AreaCode:new o.MJ(this.e164Settings.AreaCode),CountryName:new o.MJ(this.e164Settings.CountryName,o.k0.required),InternationalCode:new o.MJ(this.e164Settings.InternationalCode,o.k0.required),NationalCode:new o.MJ(this.e164Settings.NationalCode),Prefix:new o.MJ(this.e164Settings.Prefix),RemoveAreaCode:new o.MJ(!!this.e164Settings.RemoveAreaCode),RemoveCountryCode:new o.MJ(!!this.e164Settings.RemoveCountryCode)});constructor(){this.countryOptions$=this.countries.countries$.pipe((0,C.T)(r=>r.filter(n=>n.ErpCode).map(n=>({value:n.Name,label:n.Name+" (+"+n.CountryCode+")"})))),(0,Y.XP)(this.f.Enabled).pipe((0,K.pQ)(this.destroy$)).subscribe({next:r=>{(0,Y.TZ)(this.f.AreaCode,r),(0,Y.TZ)(this.f.CountryName,r),(0,Y.TZ)(this.f.InternationalCode,r),(0,Y.TZ)(this.f.NationalCode,r),(0,Y.TZ)(this.f.Prefix,r),(0,Y.TZ)(this.f.RemoveAreaCode,r),(0,Y.TZ)(this.f.RemoveCountryCode,r)}})}get f(){return this.form.controls}save$=()=>{const{value:t}=this.form;return this.countries.countries$.pipe((0,_.n)(r=>this.e164SettingsApiService.updateE164Settings({pbxE164Settings:{...t,CountryCode:t.CountryName?r.find(n=>n.Name===t.CountryName).CountryCode:void 0}})))};static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:18,vars:11,consts:[["header","_i18n.E164ProcessingSettings","helpUrl","_i18n.AdvancedUri",3,"formGroup","save$"],["formControlName","Enabled","data-qa","enabled","label","_i18n.ProcessE164Numbers"],["data-qa","fields",1,"row",3,"disabled"],[1,"col-lg-6"],["data-qa","country","label","_i18n.SelectCountry","formControlName","CountryName",3,"options","searchable"],["controlName","CountryName"],["formControlName","RemoveCountryCode","data-qa","remove-country-code","label","_i18n.RemoveIfSameCountry"],["data-qa","international-code","formControlName","InternationalCode","label","_i18n.InternationalDialCode",1,"col-lg-6",3,"maxlength"],["controlName","InternationalCode"],["data-qa","area-code","formControlName","AreaCode","label","_i18n.AreaCode",3,"maxlength"],["controlName","AreaCode"],["formControlName","RemoveAreaCode","data-qa","remove-area-code","label","_i18n.RemoveIfSameAreaCode"],["data-qa","national-code","formControlName","NationalCode","label","_i18n.NationalCode",1,"col-lg-6",3,"maxlength"],["controlName","NationalCode"],["data-qa","add-prefix","formControlName","Prefix","label","_i18n.AddPrefix",1,"col-lg-6",3,"maxlength"],["controlName","Prefix"]],template:function(r,n){1&r&&(e.j41(0,"edit-panel",0),e.nrm(1,"field-checkbox",1),e.j41(2,"fieldset",2)(3,"div",3)(4,"field-select",4),e.nI1(5,"async"),e.nrm(6,"val-errors",5),e.k0s(),e.nrm(7,"field-checkbox",6),e.k0s(),e.j41(8,"field-input",7),e.nrm(9,"val-errors",8),e.k0s(),e.j41(10,"div",3)(11,"field-input",9),e.nrm(12,"val-errors",10),e.k0s(),e.nrm(13,"field-checkbox",11),e.k0s(),e.j41(14,"field-input",12),e.nrm(15,"val-errors",13),e.k0s(),e.j41(16,"field-input",14),e.nrm(17,"val-errors",15),e.k0s()()()),2&r&&(e.Y8G("formGroup",n.form)("save$",n.save$),e.R7$(2),e.Y8G("disabled",!n.form.value.Enabled),e.R7$(2),e.Y8G("options",e.bMT(5,9,n.countryOptions$))("searchable",!0),e.R7$(4),e.Y8G("maxlength",50),e.R7$(3),e.Y8G("maxlength",50),e.R7$(3),e.Y8G("maxlength",50),e.R7$(2),e.Y8G("maxlength",50))},dependencies:[A.Q,o.X1,o.BC,o.cb,o.tU,o.j4,o.JD,x.t,V.q,G.IH,X.m,W.Jj],encapsulation:2,changeDetection:0})}return i})();var ae=l(87018);let I=(()=>{class i{advancedMenu=[{routeLabel:"_i18n.BlacklistIp",routeLink:"blacklist-ip"},{routeLabel:"_i18n.AntiHacking",routeLink:"anti-hacking"},{routeLabel:"_i18n.ConsoleRestrictions",routeLink:"console-restr
1ictions"},{routeLabel:"_i18n.Network",routeLink:"network"},{routeLabel:"_i18n.AllowedCountryCodes",routeLink:"allowed-country-codes"},{routeLabel:"_i18n.CIDRules",routeLink:"cid-rules"},{routeLabel:"_i18n.BlacklistNumbers",routeLink:"blacklist-numbers"},{routeLabel:"_i18n.SecureSip",routeLink:"security-sip"},{routeLabel:"_i18n.Codecs",routeLink:"codecs"},{routeLabel:"_i18n.Parameters",routeLink:"parameters"},{routeLabel:"_i18n.Templates",routeLink:"templates"},{routeLabel:"_i18n.Fax",routeLink:"fax"},{routeLabel:"_i18n.E164",routeLink:"e-164"},{routeLabel:"_i18n.CDRSettings",routeLink:"cdr"}];static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-advanced-main"]],decls:2,vars:1,consts:[[3,"menuItems"]],template:function(r,n){1&r&&(e.j41(0,"app-layout-with-sidebar",0),e.nrm(1,"router-outlet"),e.k0s()),2&r&&e.Y8G("menuItems",n.advancedMenu)},dependencies:[ae.I,M.n3],encapsulation:2})}return i})();var g=l(19037),P=l(99437);let w=(()=>{class i extends N.d{getSecureSipSettings(t,r="body"){const n=t?.$select,s=t?.$expand;let a=new c.rx(this.encoder);a=this.addToHttpParams(a,"$select",n,c.l2.Form,!1),a=this.addToHttpParams(a,"$expand",s,c.l2.Form,!1);let m=this.defaultHeaders;m=this.configuration.addCredentialToHeaders("Application","Authorization",m,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(m=m.set("Accept",h));let b="json";h&&(b=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${k}/SecureSipSettings`,{params:a.toHttpParams(),responseType:b,...y?{withCredentials:y}:{},headers:m,observe:r})}getSecureSipSettingsQuery(t,r="body",n=!1,s){const a=t.$select,m=t.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$select",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",m,c.l2.Form,!1),"/SecureSipSettings?"+h.toString()}updateSecureSipSettings(t,r="body"){const n=t?.pbxSecureSipSettings;let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("patch",`${k}/SecureSipSettings`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateSecureSipSettingsQuery(t,r="body",n=!1,s){return"/SecureSipSettings"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var L=l(38601),Z=l(52101),oe=l(13372),O=l(88141),q=l(7673),z=l(6139),me=l(43218);let Ce=(()=>{class i{sipSettingsApi=(0,p.WQX)(w);modalService=(0,p.WQX)(L.B);systemParams=(0,p.WQX)(z.B);form;constructor(){const t=(0,p.WQX)(M.nX),r=(0,p.WQX)(p.abz),n=t.snapshot.data.securitySipSettings,{Certificate:s,PrivateKey:a}=n;this.form=new o.gE({Enabled:new o.MJ(!(!s||!a),{nonNullable:!0}),Certificate:new o.MJ((0,oe.s)(s),o.k0.required),PrivateKey:new o.MJ((0,oe.s)(a),o.k0.required)}),(0,Y.XP)(this.f.Enabled).pipe((0,K.pQ)(r)).subscribe(m=>{(0,Y.sS)([this.f.Certificate,this.f.PrivateKey],m)}),this.systemParams.systemParams$.pipe((0,K.pQ)(r)).subscribe({next:m=>{m.Is3CXFQDN&&this.form.disable()}})}get f(){return this.form.controls}save$=()=>{const{Enabled:t,Certificate:r,PrivateKey:n}=this.form.value;return this.sipSettingsApi.updateSecureSipSettings({pbxSecureSipSettings:{Certificate:t?(0,oe.W)(r):{Name:"",Contents:""},PrivateKey:t?(0,oe.W)(n):{Name:"",Contents:""}}}).pipe((0,O.M)(()=>{t||(0,Z.fb)(this.modalService)}),(0,_.n)(s=>this.sipSettingsApi.getSecureSipSettings({}).pipe((0,C.T)(({Certificate:a,PrivateKey:m})=>(this.form.setValue({Enabled:!(!a||!m),Certificate:(0,oe.s)(a),PrivateKey:(0,oe.s)(m)}),s)),(0,P.W)(a=>(0,q.of)(s)))))};static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-security-sip"]],decls:8,vars:9,consts:[["header","_i18n.SecureSip",3,"helpUrl","save$","formGroup"],["data-qa","enable-secure-sip","label","_i18n.EnableSecureSIP","formControlName","Enabled"],[1,"row"],[1,"col-xl-6"],["data-qa","certificate","label","_i18n.Certificate","accept",".pem",3,"readContent","formControl"],[3,"control"],["data-qa","private-key","label","_i18n.PrivateKey","accept",".pem",3,"readContent","formControl"]],template:function(r,n){1&r&&(e.j41(0,"edit-panel",0),e.nrm(1,"field-checkbox",1),e.j41(2,"div",2)(3,"div",3)(4,"field-input-file",4),e.nrm(5,"val-errors",5),e.k0s(),e.j41(6,"field-input-file",6),e.nrm(7,"val-errors",5),e.k0s()()()()),2&r&&(e.Y8G("helpUrl","_i18n.AdvancedUri")("save$",n.save$)("formGroup",n.form),e.R7$(4),e.Y8G("readContent",!0)("formControl",n.f.Certificate),e.R7$(),e.Y8G("control",n.f.Certificate),e.R7$(),e.Y8G("readContent",!0)("formControl",n.f.PrivateKey),e.R7$(),e.Y8G("control",n.f.PrivateKey))},dependencies:[A.Q,o.X1,o.BC,o.cb,o.l_,o.j4,o.JD,x.t,me.y,G.IH],encapsulation:2,changeDetection:0})}return i})(),et=(()=>{class i extends N.d{getCountryCodes(t,r="body"){const n=t?.$select,s=t?.$expand;let a=new c.rx(this.encoder);a=this.addToHttpParams(a,"$select",n,c.l2.Form,!1),a=this.addToHttpParams(a,"$expand",s,c.l2.Form,!1);let m=this.defaultHeaders;m=this.configuration.addCredentialToHeaders("Application","Authorization",m,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(m=m.set("Accept",h));let b="json";h&&(b=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${k}/CountryCodes`,{params:a.toHttpParams(),responseType:b,...y?{withCredentials:y}:{},headers:m,observe:r})}getCountryCodesQuery(t,r="body",n=!1,s){const a=t.$select,m=t.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$select",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",m,c.l2.Form,!1),"/CountryCodes?"+h.toString()}updateCountryCodes(t,r="body"){const n=t?.pbxCountryCodes;let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("patch",`${k}/CountryCodes`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateCountryCodesQuery(t,r="body",n=!1,s){return"/CountryCodes"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ve=l(83188),It=l(94304),Ut=l(72009),ze=l(7707);function Jt(i,v){if(1&i){const t=e.RV6();e.j41(0,"div",9)(1,"app-checker",10),e.mxI("ngModelChange",function(n){const s=p.eBV(t).$implicit;return e.DH7(s.IsEnabled,n)||(s.IsEnabled=n),p.Njj(n)}),e.bIt("ngModelChange",function(n){const s=p.eBV(t).$implicit,a=e.XpG(2);return a.updateCountrySelection(s),p.Njj(a.valueChanged(n))})("click",function(n){return n.stopPropagation()}),e.k0s(),e.j41(2,"span"),e.EFF(3),e.k0s()()}if(2&i){const t=v.$implicit,r=v.$index;e.R7$(),e.Y8G("id","item_"+r),e.R50("ngModel",t.IsEnabled),e.R7$(2),e.JRh(t.Name+"("+t.Id+")")}}function Yt(i,v){if(1&i){const t=e.RV6();e.j41(0,"accordion-group",2)(1,"div",3)(2,"field-checkbox",4),e.mxI("ngModelChange",function(n){const s=p.eBV(t).$implicit;return e.DH7(s.IsEnabled,n)||(s.IsEnabled=n),p.Njj(n)}),e.bIt("ngModelChange",function(n){p.eBV(t);const s=e.XpG();return p.Njj(s.valueChanged(n))}),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"span",5),e.nrm(6,"span",6),e.k0s()(),e.j41(7,"div",7)(8,"div",8),e.Z7z(9,Jt,4,3,"div",9,e.fX1),e.k0s()()()}if(2&i){const t=v.$implicit;e.R7$(2),e.R50("ngModel",t.IsEnabled),e.R7$(2),e.JRh(t.Name),e.R7$(5),e.Dyx(t.Countries)}}let zt=(()=>{class i{route=(0,p.WQX)(M.nX);modalService=(0,p.WQX)(L.B);countryCodesApiService=(0,p.WQX)(et);data;
1constructor(){const r=this.route.snapshot.data.disabledCountryCodes;this.data=r?.reduce((n,s)=>{const a=n.find(m=>m.Name===s.Continent);return a?a.Countries.push(s):n.push({Name:s.Continent,Countries:[s],get IsEnabled(){return this.Countries.some(m=>m.IsEnabled)},set IsEnabled(m){this.Countries=this.Countries.map(h=>(h.IsEnabled=m,h))}}),n},[])||[]}get disallowedIds(){return[...new Set(this.data.map(t=>t.Countries.filter(r=>!r.IsEnabled).map(r=>r.Id)).flat())]}updateCountrySelection(t){this.data.map(r=>r.Countries).flat().filter(r=>r.Id===t.Id).forEach(r=>{r.IsEnabled=t.IsEnabled})}valueChanged(t){this.countryCodesApiService.updateCountryCodes({pbxCountryCodes:{CountryCodes:this.disallowedIds}}).subscribe({error:r=>this.modalService.error(r)})}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-allowed-country-codes"]],decls:4,vars:2,consts:[["header","_i18n.AllowedCountryCodes",3,"helpUrl"],[3,"isAnimated"],["panelClass","no-border border-bottom mb-1 pt-2"],["accordion-heading","",1,"d-flex","flex-row","align-content-center","gap-2"],[1,"d-flex","align-items-center","mb-1",3,"ngModelChange","ngModel"],[1,"ms-auto"],["app-chevron-down-solid-icon","",1,"customSVGIcons","svg-xs","chevron"],[1,"ms-4","mt-2"],[1,"d-flex","flex-column"],[1,"d-flex","gap-2","flex-row","my-1"],[3,"ngModelChange","click","id","ngModel"]],template:function(r,n){1&r&&(e.j41(0,"app-page",0)(1,"accordion",1),e.Z7z(2,Yt,11,2,"accordion-group",2,e.fX1),e.k0s()()),2&r&&(e.Y8G("helpUrl","_i18n.AdvancedUri"),e.R7$(),e.Y8G("isAnimated",!0),e.R7$(),e.Dyx(n.data))},dependencies:[ve.H,It.Mj,It.kt,x.t,o.X1,o.BC,o.YN,o.vS,Ut.z,ze.$],encapsulation:2})}return i})();var ke=l(84572);function Ft(i,v,t){return{Continent:i.Continent,Name:i.Name,Id:v,IsEnabled:!t.CountryCodes?.includes(v)}}let Rt=(()=>{class i extends N.d{getCodecsSettings(t,r="body"){const n=t?.$select,s=t?.$expand;let a=new c.rx(this.encoder);a=this.addToHttpParams(a,"$select",n,c.l2.Form,!1),a=this.addToHttpParams(a,"$expand",s,c.l2.Form,!1);let m=this.defaultHeaders;m=this.configuration.addCredentialToHeaders("Application","Authorization",m,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(m=m.set("Accept",h));let b="json";h&&(b=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${k}/CodecsSettings`,{params:a.toHttpParams(),responseType:b,...y?{withCredentials:y}:{},headers:m,observe:r})}getCodecsSettingsQuery(t,r="body",n=!1,s){const a=t.$select,m=t.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$select",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",m,c.l2.Form,!1),"/CodecsSettings?"+h.toString()}updateCodecsSettings(t,r="body"){const n=t?.pbxCodecsSettings;let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("patch",`${k}/CodecsSettings`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateCodecsSettingsQuery(t,r="body",n=!1,s){return"/CodecsSettings"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var tt=l(60053),qt=l(99172),fe=l(59053),je=l(95604),Ke=l(72788),se=l(68018);function en(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.InvalidIpAddress"))}let tn=(()=>{class i{activatedRoute=(0,p.WQX)(M.nX);networkSettingsApi=(0,p.WQX)(tt.j);data=this.activatedRoute.snapshot.data.network||{};settings=this.data.settings||{};form=new o.gE({PublicInterface:new o.MJ(this.settings.PublicInterface??"",{nonNullable:!0}),IpV6BindingEnabled:new o.MJ(this.settings.IpV6BindingEnabled??!1,{nonNullable:!0}),StunDisabled:new o.MJ(this.settings.StunDisabled??!0,{nonNullable:!0}),PublicStaticIP:new o.MJ(this.settings.PublicStaticIP??"",{nonNullable:!0,validators:fe.Ct}),StunPrimaryHost:new o.MJ(this.settings.StunPrimaryHost??"",{nonNullable:!0}),StunPrimaryPort:new o.MJ(this.settings.StunPrimaryPort??3478,{nonNullable:!0}),StunSecondaryHost:new o.MJ(this.settings.StunSecondaryHost??"",{nonNullable:!0}),StunSecondaryPort:new o.MJ(this.settings.StunSecondaryPort??3478,{nonNullable:!0}),StunThirdHost:new o.MJ(this.settings.StunThirdHost??"",{nonNullable:!0}),StunThirdPort:new o.MJ(this.settings.StunThirdPort??3478,{nonNullable:!0}),StunQuery:new o.MJ(this.settings.StunQuery??1200,{nonNullable:!0})});constructor(){const t=(0,p.WQX)(p.abz);this.f.StunDisabled.valueChanges.pipe((0,qt.Z)(this.f.StunDisabled.value),(0,K.pQ)(t)).subscribe(r=>{this.setDisabledFields(r)})}get f(){return this.form.controls}setDisabledFields(t){(0,Y.TZ)(this.f.PublicStaticIP,t),(0,Y.TZ)(this.f.StunPrimaryHost,!t),(0,Y.TZ)(this.f.StunPrimaryPort,!t),(0,Y.TZ)(this.f.StunSecondaryHost,!t),(0,Y.TZ)(this.f.StunSecondaryPort,!t),(0,Y.TZ)(this.f.StunThirdHost,!t),(0,Y.TZ)(this.f.StunThirdPort,!t),(0,Y.TZ)(this.f.StunQuery,!t)}save$=()=>this.networkSettingsApi.updateNetworkSettings({pbxNetworkSettings:this.form.value});static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:50,vars:35,consts:[["header","_i18n.Network","helpUrl","_i18n.AdvancedUri",3,"formGroup","save$"],[1,"row"],[1,"col","col-lg-10","col-xl-8","col-xxl-6"],["label","_i18n.ChooseDefaultIPInternet",3,"formControl","searchable","options"],[1,"col-12"],["label","_i18n.AutomaticallyBindIPv6Adapters","description","_i18n.AutomaticallyBindIPv6AdaptersDescription",3,"formControl"],[1,"form-check"],["type","radio","id","staticPublicIP","data-qa","static-public-ip","formControlName","StunDisabled","role","button",1,"form-check-input",3,"value"],["for","staticPublicIP",1,"form-check-label","ms-2"],["label","_i18n.EnterStaticPublicIP",1,"mt-3",3,"formControl"],[3,"control"],["valError","invali
1d"],["type","radio","id","dynamicPublicIP","data-qa","dynamic-public-ip","formControlName","StunDisabled","role","button",1,"form-check-input",3,"value"],["for","dynamicPublicIP",1,"form-check-label","ms-2"],["label","_i18n.PrimarySTUNserver",1,"mt-3"],[1,"col-md-10"],[3,"formControl"],[1,"col-md-2"],[3,"formControl","min","max"],["label","_i18n.SecondarySTUNserver",1,"mt-3"],["label","_i18n.ThirdSTUNserver",1,"mt-3"],["label","_i18n.QuerySTUNserver",3,"formControl"]],template:function(r,n){1&r&&(e.j41(0,"edit-panel",0)(1,"fieldset")(2,"legend"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"div",1)(6,"div",2),e.nrm(7,"field-select",3),e.k0s(),e.j41(8,"div",4),e.nrm(9,"field-checkbox",5),e.k0s()()(),e.j41(10,"fieldset")(11,"legend"),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"div",1)(15,"div",2)(16,"div",6),e.nrm(17,"input",7),e.j41(18,"label",8),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.j41(21,"field-input",9)(22,"val-errors",10),e.DNE(23,en,2,3,"ng-template",11),e.k0s()()(),e.j41(24,"div",6),e.nrm(25,"input",12),e.j41(26,"label",13),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"field-wrapper",14)(30,"div",1)(31,"div",15),e.nrm(32,"field-input",16),e.k0s(),e.j41(33,"div",17),e.nrm(34,"field-input-number",18),e.k0s()()(),e.j41(35,"field-wrapper",19)(36,"div",1)(37,"div",15),e.nrm(38,"field-input",16),e.k0s(),e.j41(39,"div",17),e.nrm(40,"field-input-number",18),e.k0s()()(),e.j41(41,"field-wrapper",20)(42,"div",1)(43,"div",15),e.nrm(44,"field-input",16),e.k0s(),e.j41(45,"div",17),e.nrm(46,"field-input-number",18),e.k0s()()(),e.j41(47,"div",1)(48,"div",15),e.nrm(49,"field-input-number",21),e.k0s()()()()()()()),2&r&&(e.Y8G("formGroup",n.form)("save$",n.save$),e.R7$(3),e.JRh(e.bMT(4,27,"_i18n.SelectNetworkCardInterface")),e.R7$(4),e.Y8G("formControl",n.form.controls.PublicInterface)("searchable",!0)("options",n.data.ifaces),e.R7$(2),e.Y8G("formControl",n.form.controls.IpV6BindingEnabled),e.R7$(3),e.JRh(e.bMT(13,29,"_i18n.ExternalIPConfiguration")),e.R7$(5),e.Y8G("value",!0),e.R7$(2),e.JRh(e.bMT(20,31,"_i18n.StaticPublicIP")),e.R7$(2),e.Y8G("formControl",n.form.controls.PublicStaticIP),e.R7$(),e.Y8G("control",n.form.controls.PublicStaticIP),e.R7$(3),e.Y8G("value",!1),e.R7$(2),e.JRh(e.bMT(28,33,"_i18n.DynamicPublicIP")),e.R7$(5),e.Y8G("formControl",n.form.controls.StunPrimaryHost),e.R7$(2),e.Y8G("formControl",n.form.controls.StunPrimaryPort)("min",0)("max",65535),e.R7$(4),e.Y8G("formControl",n.form.controls.StunSecondaryHost),e.R7$(2),e.Y8G("formControl",n.form.controls.StunSecondaryPort)("min",0)("max",65535),e.R7$(4),e.Y8G("formControl",n.form.controls.StunThirdHost),e.R7$(2),e.Y8G("formControl",n.form.controls.StunThirdPort)("min",0)("max",65535),e.R7$(3),e.Y8G("formControl",n.form.controls.StunQuery))},dependencies:[A.Q,o.X1,o.me,o.Fm,o.BC,o.cb,o.l_,o.j4,o.JD,V.q,x.t,X.m,G.IH,G.VI,je.z,Ke.B,se.D9],encapsulation:2})}return i})();var Ze=l(27468),rn=l(93785),an=l(80939);let on=(()=>{class i{route=(0,p.WQX)(M.nX);codecsSettingsApi=(0,p.WQX)(Rt);codecsSettings=this.route.snapshot.data.codecsSettings||{};form=new o.gE({ExternalCodecList:this.createCodecsArray(this.codecsSettings.ExternalCodecList??[]),LocalCodecList:this.createCodecsArray(this.codecsSettings.LocalCodecList??[])});createCodecsArray(t){return new o.Yp(t.map(r=>new o.MJ(r,{nonNullable:!0})),{validators:[o.k0.required]})}save$=()=>this.codecsSettingsApi.updateCodecsSettings({pbxCodecsSettings:{LocalCodecList:this.form.value.LocalCodecList,ExternalCodecList:this.form.value.ExternalCodecList}});static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:15,vars:14,consts:[["header","_i18n.Codecs","helpUrl","_i18n.AdvancedUri",3,"formGroup","save$"],[1,"row"],[1,"col-lg-6"],[1,"mb-3"],["formArrayName","LocalCodecList"],[3,"codecs","allowAdd","allowDelete"],["formArrayName","ExternalCodecList"]],template:function(r,n){1&r&&(e.j41(0,"edit-panel",0)(1,"div",1)(2,"div",2)(3,"fieldset",3)(4,"p"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.qex(7,4),e.nrm(8,"app-codecs",5),e.bVm(),e.k0s(),e.j41(9,"fieldset",3)(10,"p"),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.qex(13,6),e.nrm(14,"app-codecs",5),e.bVm(),e.k0s()()()()),2&r&&(e.Y8G("formGroup",n.form)("save$",n.save$),e.R7$(5),e.JRh(e.bMT(6,10,"_i18n.LocalCodecsHeader")),e.R7$(3),e.Y8G("codecs",n.form.controls.LocalCodecList)("allowAdd",!1)("allowDelete",!1),e.R7$(3),e.JRh(e.bMT(12,12,"_i18n.ExternalCodecsHeader")),e.R7$(3),e.Y8G("codecs",n.form.controls.ExternalCodecList)("allowAdd",!1)("allowDelete",!1))},dependencies:[A.Q,o.X1,o.cb,o.j4,o.v8,an.V,se.D9],styles:[".codec-grid[_ngcontent-%COMP%]{display:grid;
1grid-template-columns:55px minmax(0,1fr);grid-gap:16px;padding:8px 0}.codec-grid[_ngcontent-%COMP%]:nth-child(2n){background:var(--bg-primary-darken)}"]})}return i})(),At=(()=>{class i extends N.d{getAntiHackingSettings(t,r="body"){const n=t?.$select,s=t?.$expand;let a=new c.rx(this.encoder);a=this.addToHttpParams(a,"$select",n,c.l2.Form,!1),a=this.addToHttpParams(a,"$expand",s,c.l2.Form,!1);let m=this.defaultHeaders;m=this.configuration.addCredentialToHeaders("Application","Authorization",m,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(m=m.set("Accept",h));let b="json";h&&(b=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${k}/AntiHackingSettings`,{params:a.toHttpParams(),responseType:b,...y?{withCredentials:y}:{},headers:m,observe:r})}getAntiHackingSettingsQuery(t,r="body",n=!1,s){const a=t.$select,m=t.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$select",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",m,c.l2.Form,!1),"/AntiHackingSettings?"+h.toString()}updateAntiHackingSettings(t,r="body"){const n=t?.pbxAntiHackingSettings;let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("patch",`${k}/AntiHackingSettings`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateAntiHackingSettingsQuery(t,r="body",n=!1,s){return"/AntiHackingSettings"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),sn=(()=>{class i{route=(0,p.WQX)(M.nX);antiHackingSettingsApiService=(0,p.WQX)(At);antiHackingSettings=this.route.snapshot.data.antiHackingSettings??{};numericMinValue=0;numericMaxValue=1e9;form=new o.gE({SecurityDefenseProgram:new o.MJ(!!this.antiHackingSettings.SecurityDefenseProgram),HackAuthRequests:new o.MJ(this.antiHackingSettings.HackAuthRequests,o.k0.required),HackChallengeRequests:new o.MJ(this.antiHackingSettings.HackChallengeRequests,o.k0.required),HackBlacklistDuration:new o.MJ(this.antiHackingSettings.HackBlacklistDuration,o.k0.required),HackBarrierGreen:new o.MJ(this.antiHackingSettings.HackBarrierGreen,o.k0.required),HackBarrierAmber:new o.MJ(this.antiHackingSettings.HackBarrierAmber,o.k0.required),HackBarrierRed:new o.MJ(this.antiHackingSettings.HackBarrierRed,o.k0.required),MaxRequestPerPeriod:new o.MJ(this.antiHackingSettings.MaxRequestPerPeriod,o.k0.required),ThrottlePeriodLength:new o.MJ(this.antiHackingSettings.ThrottlePeriodLength,o.k0.required)});save$=()=>this.antiHackingSettingsApiService.updateAntiHackingSettings({pbxAntiHackingSettings:this.form.value});static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:32,vars:35,consts:[["header","_i18n.AntiHacking","helpUrl","_i18n.AdvancedUri",3,"formGroup","save$"],["data-qa","fields"],[1,"row"],["formControlName","HackAuthRequests","label","_i18n.FailedAuthProtection","description","_i18n.AmountOfFailedAuthentications","data-qa","amount-of-failed-auth",1,"col-lg-6",3,"integer","min","max"],["controlName","HackAuthRequests"],["formControlName","HackChallengeRequests","label","_i18n.FailedChallengeRequests","description","_i18n.AmountOfDos","data-qa","amount-of-dos",1,"col-lg-6",3,"integer","min","max"],["controlName","HackChallengeRequests"],["formControlName","HackBlacklistDuration","label","_i18n.BlacklistTimeInterval","description","_i18n.BlacklistTimeIntervalSeconds","data-qa","blacklist-time-interval",1,"col-lg-6",3,"integer","min","max"],["controlName","HackBlacklistDuration"],["formControlName","HackBarrierGreen","label","_i18n.SecurityBarrierGreen","de
1scription","_i18n.SecurityBarrierGreenInterval","data-qa","hack-barrier-green",1,"col-lg-6",3,"integer","min","max"],["controlName","HackBarrierGreen"],["formControlName","HackBarrierAmber","label","_i18n.SecurityBarrierAmber","description","_i18n.SecurityBarrierAmberInterval","data-qa","hack-barrier-amber",1,"col-lg-6",3,"integer","min","max"],["controlName","HackBarrierAmber"],["formControlName","HackBarrierRed","label","_i18n.SecurityBarrierRed","description","_i18n.SecurityBarrierRedInterval","data-qa","hack-barrier-red",1,"col-lg-6",3,"integer","min","max"],["controlName","HackBarrierRed"],["data-qa","live-chat-fields"],["formControlName","MaxRequestPerPeriod","label","_i18n.LiveChatsMaxAllowedRequests","description","_i18n.LiveChatsOffendingRequestsBlacklisted","data-qa","live-chats-max-allowed-requests",1,"col-lg-6",3,"integer","min","max"],["controlName","MaxRequestPerPeriod"],["formControlName","ThrottlePeriodLength","label","_i18n.LiveChatsRequestsRateDuration","description","_i18n.LiveChatsConfigureThrottlePeriod","data-qa","live-chats-requests_rate_duration",1,"col-lg-6",3,"integer","min","max"],["controlName","ThrottlePeriodLength"],["data-qa","global-ip-blacklist-fields",1,""],["formControlName","SecurityDefenseProgram","label","_i18n.EnableExchangeData","data-qa","enable-exchange-data"]],template:function(r,n){1&r&&(e.j41(0,"edit-panel",0)(1,"fieldset",1)(2,"legend"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"div",2)(6,"field-input-number",3),e.nrm(7,"val-errors",4),e.k0s(),e.j41(8,"field-input-number",5),e.nrm(9,"val-errors",6),e.k0s(),e.j41(10,"field-input-number",7),e.nrm(11,"val-errors",8),e.k0s(),e.j41(12,"field-input-number",9),e.nrm(13,"val-errors",10),e.k0s(),e.j41(14,"field-input-number",11),e.nrm(15,"val-errors",12),e.k0s(),e.j41(16,"field-input-number",13),e.nrm(17,"val-errors",14),e.k0s()()(),e.j41(18,"fieldset",15)(19,"legend"),e.EFF(20),e.nI1(21,"translate"),e.k0s(),e.j41(22,"div",2)(23,"field-input-number",16),e.nrm(24,"val-errors",17),e.k0s(),e.j41(25,"field-input-number",18),e.nrm(26,"val-errors",19),e.k0s()()(),e.j41(27,"fieldset",20)(28,"legend"),e.EFF(29),e.nI1(30,"translate"),e.k0s(),e.nrm(31,"field-checkbox",21),e.k0s()()),2&r&&(e.Y8G("formGroup",n.form)("save$",n.save$),e.R7$(3),e.JRh(e.bMT(4,29,"_i18n.SipAntiHackingProtection")),e.R7$(3),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(2),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(2),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(2),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(2),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(2),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(4),e.JRh(e.bMT(21,31,"_i18n.LiveChatsRequestProtection")),e.R7$(3),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(2),e.Y8G("integer",!0)("min",n.numericMinValue)("max",n.numericMaxValue),e.R7$(4),e.JRh(e.bMT(30,33,"_i18n.AutomaticGlobalIpBlacklist")))},dependencies:[A.Q,o.X1,o.BC,o.cb,o.j4,o.JD,Ke.B,G.IH,x.t,se.D9],encapsulation:2})}return i})(),pt=(()=>{class i extends N.d{bulkIpsDelete(t,r="body"){const n=t?.blocklistBulkIpsDeleteRequestBody;if(null==n)throw new Error("Required parameter blocklistBulkIpsDeleteRequestBody was null or undefined when calling bulkIpsDelete.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/Blocklist/Pbx.BulkIpsDelete`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}bulkIpsDeleteQuery(t,r="body",n=!1,s){if(null==t.blocklistBulkIpsDeleteRequestBody)throw new Error("Required parameter blocklistBulkIpsDeleteRequestBody was null or undefined when calling bulkIpsDelete.");return"/Blocklist/Pbx.BulkIpsDelete"}createBlocklistAddr(t,r="body"){const n=t?.pbxBlocklistAddr;if(null==n)throw new Error("Required parameter pbxBlocklistAddr was null or undefined when calling createBlocklistAddr.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/Blocklist`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}
1createBlocklistAddrQuery(t,r="body",n=!1,s){if(null==t.pbxBlocklistAddr)throw new Error("Required parameter pbxBlocklistAddr was null or undefined when calling createBlocklistAddr.");return"/Blocklist"}deleteBlocklistAddr(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling deleteBlocklistAddr.");const s=t?.ifMatch;let a=this.defaultHeaders;null!=s&&(a=a.set("If-Match",String(s))),a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let b=`/Blocklist(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:$,withCredentials:k}=this.configuration;return this.httpClient.request("delete",`${$}${b}`,{responseType:h,...k?{withCredentials:k}:{},headers:a,observe:r})}deleteBlocklistAddrQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling deleteBlocklistAddr.");return`/Blocklist(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}getBlocklistAddr(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling getBlocklistAddr.");const s=t?.$select,a=t?.$expand;let m=new c.rx(this.encoder);m=this.addToHttpParams(m,"$select",s,c.l2.Form,!1),m=this.addToHttpParams(m,"$expand",a,c.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const b=this.configuration.selectHeaderAccept(["application/json"]);void 0!==b&&(h=h.set("Accept",b));let $="json";b&&($=b.startsWith("text")?"text":this.configuration.isJsonMime(b)?"json":"blob");let k=`/Blocklist(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${y}${k}`,{params:m.toHttpParams(),responseType:$,...E?{withCredentials:E}:{},headers:h,observe:r})}getBlocklistAddrQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling getBlocklistAddr.");const m=t.$select,h=t.$expand;let b=new c.rx(this.encoder);return b=this.addToHttpParams(b,"$select",m,c.l2.Form,!1),b=this.addToHttpParams(b,"$expand",h,c.l2.Form,!1),`/Blocklist(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+b.toString()}listBlocklistAddr(t,r="body"){const n=t?.$top,s=t?.$skip,a=t?.$search,m=t?.$filter,h=t?.$count,b=t?.$orderby,$=t?.$select,k=t?.$expand;let y=new c.rx(this.encoder);y=this.addToHttpParams(y,"$top",n,c.l2.Form,!1),y=this.addToHttpParams(y,"$skip",s,c.l2.Form,!1),y=this.addToHttpParams(y,"$search",a,c.l2.Form,!1),y=this.addToHttpParams(y,"$filter",m,c.l2.Form,!1),y=this.addToHttpParams(y,"$count",h,c.l2.Form,!1),y=this.addToHttpParams(y,"$orderby",b,c.l2.Form,!1),y=this.addToHttpParams(y,"$select",$,c.l2.Form,!1),y=this.addToHttpParams(y,"$expand",k,c.l2.Form,!1);let E=this.defaultHeaders;E=this.configuration.addCredentialToHeaders("Application","Authorization",E,"Bearer ");const S=this.configuration.selectHeaderAccept(["application/json"]);void 0!==S&&(E=E.set("Accept",S));let J="json";S&&(J=S.startsWith("text")?"text":this.configuration.isJsonMime(S)?"json":"blob");const{basePath:le,withCredentials:de}=this.configuration;return this.httpClient.request("get",`${le}/Blocklist`,{params:y.toHttpParams(),responseType:J,...de?{withCredentials:de}:{},headers:E,observe:r})}listBlocklistAddrQuery(t,r="body",n=!1,s){const a=t.$top,m=t.$skip,h=t.$search,b=t.$filter,$=t.$count,k=t.$orderby,y=t.$select,E=t.$expand;let S=new c.rx(this.encoder);return S=this.addToHttpParams(S,"$top",a,c.l2.Form,!1),S=this.addToHttpParams(S,"$skip",m,c.l2.Form,!1),S=this.addToHttpParams(S,"$search",h,c.l2.Form,!1),S=this.addToHttpParams(S,"$filter",b,c.l2.Form,!1),S=this.addToHttpParams(S,"$count",$,c.l2.Form,!1),S=this.addToHttpParams(S,"$orderby",k,c.l2.Form,!1),S=this.addToHttpParams(S,"$select",y,c.l2.Form,!1),S=this.addToHttpParams(S,"$expand",E,c.l2.Form,!1),"/Blocklist?"+S.toString()}updateBlocklistAddr(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling updateBlocklistAddr.");const s=t?.pbxBlocklistAddr;let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));const b=this.configuration.selectHeaderContentType(["application/json"]);void 0!==b&&(a=a.set("Content-Type",b));let $="json";m&&($=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let k=`/Blocklist(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("patch",`${y}${k}`,{body:s,responseType:$,...E?{withCredentials:E}:{},headers:a,observe:r})}updateBlocklistAddrQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling updateBlocklistAddr.");return`/Blocklist(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var xe=l(87019),Ne=l(38357);let kt=(()=>{class i{blockListApiService=(0,p.WQX)(pt);resolveData(t=1,r=xe.z9,n=""){return this.blockListApiService.listBlocklistAddr({$count:!0,$filter:"(AddedBy eq 'Manual') or (AddedBy eq 'Whitelist')",$search:(0,Ne.Bj)(n),$skip:(t-1)*r,$to
1p:r}).pipe((0,C.T)(s=>({value:s.value?.map(a=>({...a,IPAddrMask:a.IPAddrMask&&ut(a.IPAddrMask),isSelected:!1})),totalItems:s["@odata.count"]})))}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ut(i){const v=i?/^::(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(i):null;if(!v)return i;const t=[];for(let r=1;r<=4;r++){const n=Number(v[r]).toString(16);switch(n.length){case 1:t.push("0"+n);break;case 2:t.push(n);break;default:return i}}return"::"+(t[0]+t[1]).replace(/^0+/,"")+":"+(t[2]+t[3]).replace(/^0+/,"")}let nt=(()=>{class i extends N.d{bulkNumbersDelete(t,r="body"){const n=t?.blackListNumbersBulkNumbersDeleteRequestBody;if(null==n)throw new Error("Required parameter blackListNumbersBulkNumbersDeleteRequestBody was null or undefined when calling bulkNumbersDelete.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/BlackListNumbers/Pbx.BulkNumbersDelete`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}bulkNumbersDeleteQuery(t,r="body",n=!1,s){if(null==t.blackListNumbersBulkNumbersDeleteRequestBody)throw new Error("Required parameter blackListNumbersBulkNumbersDeleteRequestBody was null or undefined when calling bulkNumbersDelete.");return"/BlackListNumbers/Pbx.BulkNumbersDelete"}createBlackListNumber(t,r="body"){const n=t?.pbxBlackListNumber;if(null==n)throw new Error("Required parameter pbxBlackListNumber was null or undefined when calling createBlackListNumber.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/BlackListNumbers`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}createBlackListNumberQuery(t,r="body",n=!1,s){if(null==t.pbxBlackListNumber)throw new Error("Required parameter pbxBlackListNumber was null or undefined when calling createBlackListNumber.");return"/BlackListNumbers"}deleteBlackListNumber(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling deleteBlackListNumber.");const s=t?.ifMatch;let a=this.defaultHeaders;null!=s&&(a=a.set("If-Match",String(s))),a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let b=`/BlackListNumbers(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:$,withCredentials:k}=this.configuration;return this.httpClient.request("delete",`${$}${b}`,{responseType:h,...k?{withCredentials:k}:{},headers:a,observe:r})}deleteBlackListNumberQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling deleteBlackListNumber.");return`/BlackListNumbers(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}getBlackListNumber(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling getBlackListNumber.");const s=t?.$select,a=t?.$expand;let m=new c.rx(this.encoder);m=this.addToHttpParams(m,"$select",s,c.l2.Form,!1),m=this.addToHttpParams(m,"$expand",a,c.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const b=this.configuration.selectHeaderAccept(["application/json"]);void 0!==b&&(h=h.set("Accept",b));let $="json";b&&($=b.startsWith("text")?"text":this.configuration.isJsonMime(b)?"json":"blob");let k=`/BlackListNumbers(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${y}${k}`,{params:m.toHttpParams(),responseType:$,...E?{withCredentials:E}:{},headers:h,observe:r})}getBlackListNumberQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling getBlackListNumber.");const m=t.$select,h=t.$expand;let b=new c.rx(this.encoder);return b=this.addToHttpParams(b,"$select",m,c.l2.Form,!1),b=this.addToHttpParams(b,"$expand",h,c.l2.Form,!1),`/BlackListNumbers(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+b.toString()}listBlackListNumber(t,r="body"){const n=t?.$top,s=t?.$skip,a=t?.$search,m=t?.$filter,h=t?.$count,b=t?.$orderby,$=t?.$select,k=t?.$expand;let y=new c.rx(this.encoder);y=this.addToHttpParams(y,"$top",n,c.l2.Form,!1),y=this.addToHttpParams(y,"$skip",s,c.l2.Form,!1),y=this.addToHttpParams(y,"$search",a,c.l2.Form,!1),y=this.addToHttpParams(y,"$filter",m,c.l2.Form,!1),y=this.addToHttpParams(y,"$count",h,c.l2.Form,!1),y=this.addToHttpParams(y,"$orderby",b,c.l2.Form,!1),y=this.addToHttpParams(y,"$select",$,c.l2.Form,!1),y=this.addToHttpParams(y,"$expand",k,c.l2.Form,!1);let E=this.defaultHeaders;E=this.configuration.addCredentialToHeaders("Application","Authorization",E,"Bearer ");const S=this.configuration.selectHeaderAccept(["application/json"]);void 0!==S&&(E=E.set("Accept",S));let J="json";S&&(J=S.startsWith("text")?"text":this.configuration.isJsonMime(S)?"json":"blob");const{basePath:le,withCredentials:de}=this.configuration;return this.httpClient.request("get",`${le}
1/BlackListNumbers`,{params:y.toHttpParams(),responseType:J,...de?{withCredentials:de}:{},headers:E,observe:r})}listBlackListNumberQuery(t,r="body",n=!1,s){const a=t.$top,m=t.$skip,h=t.$search,b=t.$filter,$=t.$count,k=t.$orderby,y=t.$select,E=t.$expand;let S=new c.rx(this.encoder);return S=this.addToHttpParams(S,"$top",a,c.l2.Form,!1),S=this.addToHttpParams(S,"$skip",m,c.l2.Form,!1),S=this.addToHttpParams(S,"$search",h,c.l2.Form,!1),S=this.addToHttpParams(S,"$filter",b,c.l2.Form,!1),S=this.addToHttpParams(S,"$count",$,c.l2.Form,!1),S=this.addToHttpParams(S,"$orderby",k,c.l2.Form,!1),S=this.addToHttpParams(S,"$select",y,c.l2.Form,!1),S=this.addToHttpParams(S,"$expand",E,c.l2.Form,!1),"/BlackListNumbers?"+S.toString()}updateBlackListNumber(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling updateBlackListNumber.");const s=t?.pbxBlackListNumber;if(null==s)throw new Error("Required parameter pbxBlackListNumber was null or undefined when calling updateBlackListNumber.");let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));const b=this.configuration.selectHeaderContentType(["application/json"]);void 0!==b&&(a=a.set("Content-Type",b));let $="json";m&&($=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let k=`/BlackListNumbers(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("patch",`${y}${k}`,{body:s,responseType:$,...E?{withCredentials:E}:{},headers:a,observe:r})}updateBlackListNumberQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling updateBlackListNumber.");if(null==t.pbxBlackListNumber)throw new Error("Required parameter pbxBlackListNumber was null or undefined when calling updateBlackListNumber.");return`/BlackListNumbers(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Et=(()=>{class i{blackListNumbersApiService=(0,p.WQX)(nt);resolveData(t,r,n){return this.blackListNumbersApiService.listBlackListNumber({$count:!0,$search:(0,Ne.Bj)(n),$skip:(t-1)*r,$top:r}).pipe((0,C.T)(s=>({value:s.value?.map(a=>({...a,isSelected:!1})),totalItems:s["@odata.count"]})))}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Dt=(()=>{class i extends N.d{getCDRSettings(t,r="body"){const n=t?.$select,s=t?.$expand;let a=new c.rx(this.encoder);a=this.addToHttpParams(a,"$select",n,c.l2.Form,!1),a=this.addToHttpParams(a,"$expand",s,c.l2.Form,!1);let m=this.defaultHeaders;m=this.configuration.addCredentialToHeaders("Application","Authorization",m,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(m=m.set("Accept",h));let b="json";h&&(b=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${k}/CDRSettings`,{params:a.toHttpParams(),responseType:b,...y?{withCredentials:y}:{},headers:m,observe:r})}getCDRSettingsQuery(t,r="body",n=!1,s){const a=t.$select,m=t.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$select",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",m,c.l2.Form,!1),"/CDRSettings?"+h.toString()}updateCDRSettings(t,r="body"){const n=t?.pbxCDRSettings;let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("patch",`${k}/CDRSettings`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateCDRSettingsQuery(t,r="body",n=!1,s){return"/CDRSettings"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Le=(()=>{class i extends N.d{bulkInboundRulesDelete(t,r="body"){const n=t?.inboundRulesBulkInboundRulesDeleteRequestBody;if(null==n)throw new Error("Required parameter inboundRulesBulkInboundRulesDeleteRequestBody was null or undefined when calling bulkInboundRulesDelete.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/InboundRules/Pbx.BulkInboundRulesDelete`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}
1bulkInboundRulesDeleteQuery(t,r="body",n=!1,s){if(null==t.inboundRulesBulkInboundRulesDeleteRequestBody)throw new Error("Required parameter inboundRulesBulkInboundRulesDeleteRequestBody was null or undefined when calling bulkInboundRulesDelete.");return"/InboundRules/Pbx.BulkInboundRulesDelete"}createInboundRule(t,r="body"){const n=t?.pbxInboundRule;if(null==n)throw new Error("Required parameter pbxInboundRule was null or undefined when calling createInboundRule.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/InboundRules`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}createInboundRuleQuery(t,r="body",n=!1,s){if(null==t.pbxInboundRule)throw new Error("Required parameter pbxInboundRule was null or undefined when calling createInboundRule.");return"/InboundRules"}deleteInboundRule(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling deleteInboundRule.");const s=t?.ifMatch;let a=this.defaultHeaders;null!=s&&(a=a.set("If-Match",String(s))),a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let b=`/InboundRules(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:$,withCredentials:k}=this.configuration;return this.httpClient.request("delete",`${$}${b}`,{responseType:h,...k?{withCredentials:k}:{},headers:a,observe:r})}deleteInboundRuleQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling deleteInboundRule.");return`/InboundRules(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}exportCallerIdRules(t,r="body"){const n=t?.$top,s=t?.$skip,a=t?.$search,m=t?.$filter,h=t?.$count,b=t?.$select,$=t?.$orderby,k=t?.$expand;let y=new c.rx(this.encoder);y=this.addToHttpParams(y,"$top",n,c.l2.Form,!1),y=this.addToHttpParams(y,"$skip",s,c.l2.Form,!1),y=this.addToHttpParams(y,"$search",a,c.l2.Form,!1),y=this.addToHttpParams(y,"$filter",m,c.l2.Form,!1),y=this.addToHttpParams(y,"$count",h,c.l2.Form,!1),y=this.addToHttpParams(y,"$select",b,c.l2.Form,!1),y=this.addToHttpParams(y,"$orderby",$,c.l2.Form,!1),y=this.addToHttpParams(y,"$expand",k,c.l2.Form,!1);let E=this.defaultHeaders;E=this.configuration.addCredentialToHeaders("Application","Authorization",E,"Bearer ");const S=this.configuration.selectHeaderAccept(["application/json"]);void 0!==S&&(E=E.set("Accept",S));let J="json";S&&(J=S.startsWith("text")?"text":this.configuration.isJsonMime(S)?"json":"blob");const{basePath:le,withCredentials:de}=this.configuration;return this.httpClient.request("get",`${le}/InboundRules/Pbx.ExportCallerIdRules()`,{params:y.toHttpParams(),responseType:J,...de?{withCredentials:de}:{},headers:E,observe:r})}exportCallerIdRulesQuery(t,r="body",n=!1,s){const a=t.$top,m=t.$skip,h=t.$search,b=t.$filter,$=t.$count,k=t.$select,y=t.$orderby,E=t.$expand;let S=new c.rx(this.encoder);return S=this.addToHttpParams(S,"$top",a,c.l2.Form,!1),S=this.addToHttpParams(S,"$skip",m,c.l2.Form,!1),S=this.addToHttpParams(S,"$search",h,c.l2.Form,!1),S=this.addToHttpParams(S,"$filter",b,c.l2.Form,!1),S=this.addToHttpParams(S,"$count",$,c.l2.Form,!1),S=this.addToHttpParams(S,"$select",k,c.l2.Form,!1),S=this.addToHttpParams(S,"$orderby",y,c.l2.Form,!1),S=this.addToHttpParams(S,"$expand",E,c.l2.Form,!1),"/InboundRules/Pbx.ExportCallerIdRules()?"+S.toString()}getInboundRule(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling getInboundRule.");const s=t?.$select,a=t?.$expand;let m=new c.rx(this.encoder);m=this.addToHttpParams(m,"$select",s,c.l2.Form,!1),m=this.addToHttpParams(m,"$expand",a,c.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const b=this.configuration.selectHeaderAccept(["application/json"]);void 0!==b&&(h=h.set("Accept",b));let $="json";b&&($=b.startsWith("text")?"text":this.configuration.isJsonMime(b)?"json":"blob");let k=`/InboundRules(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${y}${k}`,{params:m.toHttpParams(),responseType:$,...E?{withCredentials:E}:{},headers:h,observe:r})}getInboundRuleQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling getInboundRule.");const m=t.$select,h=t.$expand;let b=new c.rx(this.encoder);return b=this.addToHttpParams(b,"$select",m,c.l2.Form,!1),b=this.addToHttpParams(b,"$expand",h,c.l2.Form,!1),`/InboundRules(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+b.toString()}listInboundRule(t,r="body"){const n=t?.$top,s=t?.$skip,a=t?.$search,m=t?.$filter,h=t?.$count,b=t?.$orderby,$=t?.$select,k=t?.$expand;let y=new c.rx(this.encoder);y=this.addToHttpParams(y,"$top",n,c.l2.Form,!1),y=this.addToHttpParams(y,"$skip",s,c.l2.Form,!1),y=this.addToHttpParams(y,"$search",a,c.l2.Form,!1),y=this.addToHttpParams(y,"$filter",m,c.l2.Form,!1),y=this.addToHttpParams(y,"$count",h,c.l2.Form,!1),y=this.addToHttpParams(y,"$orderby",b,c.l2.Form,!1),y=this.addToHttpParams(y,"$select",$,c.l2.Form,!1),y=this.addToHttpParams(y,"$expand",k,c.l2.Form,!1);let E=this.defaultHeaders;E=this.configuration.addCredentialToHeaders("Application","Authorization",E,"Bearer ");const S=this.configuration.selectHeaderAccept(["application/json"]);void 0!==S&&(E=E.set("Accept",S));let J="json";S&&(J=S.startsWith("text")?"text":this.configuration.isJsonMime(S)?"json":"blob");const{basePath:le,withCredentials:de}=this.configuration;return this.httpClient.request("get",`${le}/InboundRules`,{params:y.toHttpParams(),responseType:J,...de?{withCredentials:de}:{},headers:E,observe:r})}listInboundRuleQuery(t,r="body",n=!1,s){const a=t.$top,m=t.$skip,h=t.$search,b=t.$filter,$=t.$count,k=t.$orderby,y=t.$select,E=t.$expand;let S=new c.rx(this.encoder);return S=this.addToHttpParams(S,"$top",a,c.l2.Form,!1),S=this.addToHttpParams(S,"$skip",m,c.l2.Form,!1),S=this.addToHttpParams(S,"$search",h,c.l2.Form,!1),S=this.addToHttpParams(S,"$filter",b,c.l2.Form,!1),S=this.addToHttpParams(S,"$count",$,c.l2.Form,!1),S=this.addToHttpParams(S,"$orderby",k,c.l2.Form,!1),S=this.addToHttpParams(S,"$select",y,c.l2.Form,!1),S=this.addToHttpParams(S,"$expand",E,c.l2.Form,!1),"/InboundRules?"+S.toString()}updateInboundRule(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling updateInboundRule.");const s=t?.pbxInboundRule;let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));const b=this.configuration.selectHeaderContentType(["application/json"]);void 0!==b&&(a=a.set("Content-Type",b));let $="json";m&&($=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let k=`/InboundRules(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("patch",`${y}${k}`,{body:s,responseType:$,...E?{withCredentials:E}:{},headers:a,observe:r})}updateInboundRuleQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling updateInboundRule.");return`/InboundRules(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var mt=l(64385);let Bt=(()=>
1{class i{inboundRulesApiService=(0,p.WQX)(Le);get filter(){return`Condition eq '${mt.c.BasedOnCallerId}'`}resolveData(t=1,r=xe.z9,n=""){return this.inboundRulesApiService.listInboundRule({$count:!0,$filter:this.filter,$search:(0,Ne.Bj)(n),$expand:["TrunkDN"],$skip:(t-1)*r,$top:r}).pipe((0,C.T)(s=>({value:s.value??[],totalItems:s["@odata.count"]})))}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var wt=l(81783);let jt=(()=>{class i extends N.d{getConsoleRestrictions(t,r="body"){const n=t?.$select,s=t?.$expand;let a=new c.rx(this.encoder);a=this.addToHttpParams(a,"$select",n,c.l2.Form,!1),a=this.addToHttpParams(a,"$expand",s,c.l2.Form,!1);let m=this.defaultHeaders;m=this.configuration.addCredentialToHeaders("Application","Authorization",m,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(m=m.set("Accept",h));let b="json";h&&(b=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${k}/ConsoleRestrictions`,{params:a.toHttpParams(),responseType:b,...y?{withCredentials:y}:{},headers:m,observe:r})}getConsoleRestrictionsQuery(t,r="body",n=!1,s){const a=t.$select,m=t.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$select",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",m,c.l2.Form,!1),"/ConsoleRestrictions?"+h.toString()}updateConsoleRestrictions(t,r="body"){const n=t?.pbxConsoleRestrictions;let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("patch",`${k}/ConsoleRestrictions`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateConsoleRestrictionsQuery(t,r="body",n=!1,s){return"/ConsoleRestrictions"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ft=(()=>{class i extends N.d{createParameter(t,r="body"){const n=t?.pbxParameter;if(null==n)throw new Error("Required parameter pbxParameter was null or undefined when calling createParameter.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/Parameters`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}createParameterQuery(t,r="body",n=!1,s){if(null==t.pbxParameter)throw new Error("Required parameter pbxParameter was null or undefined when calling createParameter.");return"/Parameters"}deleteParameter(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling deleteParameter.");const s=t?.ifMatch;let a=this.defaultHeaders;null!=s&&(a=a.set("If-Match",String(s))),a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let b=`/Parameters(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:$,withCredentials:k}=this.configuration;return this.httpClient.request("delete",`${$}${b}`,{responseType:h,...k?{withCredentials:k}:{},headers:a,observe:r})}deleteParameterQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling deleteParameter.");return`/Parameters(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}getParameter(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling getParameter.");const s=t?.$select,a=t?.$expand;let m=new c.rx(this.encoder);m=this.addToHttpParams(m,"$select",s,c.l2.Form,!1),m=this.addToHttpParams(m,"$expand",a,c.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const b=this.configuration.selectHeaderAccept(["application/json"]);void 0!==b&&(h=h.set("Accept",b));let $="json";b&&($=b.startsWith("text")?"text":this.configuration.isJsonMime(b)?"json":"blob");let k=`/Parameters(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${y}${k}`,{params:m.toHttpParams(),responseType:$,...E?{withCredentials:E}:{},headers:h,observe:r})}getParameterQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling getParameter.");const m=t.$select,h=t.$expand;let b=new c.rx(this.encoder);return b=this.addToHttpParams(b,"$select",m,c.l2.Form,!1),b=this.addToHttpParams(b,"$expand",h,c.l2.Form,!1),`/Parameters(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+b.toString()}getParameterByName(t,r="body"){const n=t?.name;if(null==n)throw new Error("Required parameter name was null or undefined when calling getParameterByName.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));let m="json";a&&(m=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");let h=`/Parameters/Pbx.GetParameterByName(name=${this.configuration.encodeParam({name:"name",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:b,withCredentials:$}=this.configuration;return this.httpClient.request("get",`${b}${h}`,{responseType:m,...$?{withCredentials:$}:{},headers:s,observe:r})}getParameterByNameQuery(t,r="body",n=!1,s){const a=t.name;if(null==a)throw new Error("Required parameter name was null or undefined when calling getParameterByName.");return`/Parameters/Pbx.GetParameterByName(name=${this.configuration.encodeParam({name:"name",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}listParameter(t,r="body"){const n=t?.$top,s=t?.$skip,a=t?.$search,m=t?.$filter,h=t?.$count,b=t?.$orderby,$=t?.$select,k=t?.$expand;let y=new c.rx(this.encoder);y=this.addToHttpParams(y,"$top",n,c.l2.Form,!1),y=this.addToHttpParams(y,"$skip",s,c.l2.Form,!1),y=this.addToHttpParams(y,"$search",a,c.l2.Form,!1),y=this.addToHttpParams(y,"$filter",m,c.l2.Form,!1),y=this.addToHttpParams(y,"$count",h,c.l2.Form,!1),y=this.addToHttpParams(y,"$orderby",b,c.l2.Form,!1),y=this.addToHttpParams(y,"$select",$,c.l2.Form,!1),y=this.addToHttpParams(y,"$expand",k,c.l2.Form,!1);let E=this.defaultHeaders;E=this.configuration.addCredentialToHeaders("Application","Authorization",E,"Bearer ");const S=this.configuration.selectHeaderAccept(["application/json"]);void 0!==S&&(E=E.set("Accept",S));let J="json";S&&(J=S.startsWith("text")?"text":this.configuration.isJsonMime(S)?"json":"blob");const{basePath:le,withCredentials:de}=this.configuration;return this.httpClient.request("get",`${le}/Parameters`,{params:y.toHttpParams(),responseType:J,...de?{withCredentials:de}:{},headers:E,observe:r})}listParameterQuery(t,r="body",n=!1,s){const a=t.$top,m=t.$skip,h=t.$search,b=t.$filter,$=t.$count,k=t.$orderby,y=t.$select,E=t.$expand;let S=new c.rx(this.encoder);return S=this.addToHttpParams(S,"$top",a,c.l2.Form,!1),S=this.addToHttpParams(S,"$skip",m,c.l2.Form,!1),S=this.addToHttpParams(S,"$search",h,c.l2.Form,!1),S=this.addToHttpParams(S,"$filter",b,c.l2.Form,!1),S=this.addToHttpParams(S,"$count",$,c.l2.Form,!1),S=this.addToHttpParams(S,"$orderby",k,c.l2.Form,!1),S=this.addToHttpParams(S,"$select",y,c.l2.Form,!1),S=this.addToHttpParams(S,"$expand",E,c.l2.Form,!1),"/Parameters?"+S.toString()}updateParameter(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling updateParameter.");const s=t?.pbxParameter;let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));const b=this.configuration.selectHeaderContentType(["application/json"]);void 0!==b&&(a=a.set("Content-Type",b));let $="json";m&&($=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let k=`/Parameters(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("patch",`${y}${k}`,{body:s,responseType:$,...E?{withCredentials:E}:{},headers:a,observe:r})}updateParameterQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling updateParameter.");return`/Parameters(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Nt=l(50942),mn=l(92996),bn=l(30689),re=l(17705);var Be=l(41029),Se=l(22972),he=l(54999),$e=l(40953),Re=function(i){return i.Single="Single",i.Range="Range",i}(Re||{}),He=l(98352),rt=l(59030),gn=l(65245),vn=l(27994),Oe=l.n(vn);const bt="Wrong address/mask";function Ot(i){if((0,fe.qu)(i))return i;try{const v=new(Oe())(i),t=v.addressStart.correctForm(),r=v.addressEnd.correctForm();return t===r?t:`${t} - ${r}`}catch{return bt}}let Ve=(()=>{class i{transform(t){return Ot(t)}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=e.EJ8({name:"IpRangeCidr",type:i,pure:!0})}return i})();const yn=[[["a"]],[["val-errors"]]],Cn=["a","val-errors"];function _n(i,v){1&i&&(e.qex(0,3),e.SdG(1,1),e.bVm())}function Tn(i,v){if(1&i&&e.nrm(0,"val-errors",4),2&i){const t=e.XpG();e.Y8G("control",t.f.NetworkAddress)}}function xn(i,v){if(1&i&&(e.nrm(0,"field-select",5),e.nI1(1,"async"),e.nrm(2,"field-input",6)),2&i){const t=e.XpG();e.Y8G("options",e.bMT(1,4,t.maskOptions$))("formControl",t.f.SubnetMask),e.R7$(2),e.Y8G("ngModel",t.range)("disabled",!0)}}function Pn(i){return i.v4&&32===i.subnetMask||!i.v4&&128===i.subnetMask}let Gt=(()=>{class i extends He.z{fb=(0,p.WQX)(o.Qk);blockRangeOptions=[{value:Re.Single,label:"_i18n.AddSingleAddress"},{value:Re.Range,label:"_i18n.AddRangeAddress"}];BlockRange=Re;form=this.fb.group({Type:this.fb.control(Re.Single,o.k0.required),SubnetMask:this.fb.control(32,o.k0.required),NetworkAddress:this.fb.control("",{updateOn:"blur",validators:[fe.Ct,o.k0.required]})});label;maskOptions$;ngOnInit(){const t=this.destroyRef;this.maskOptions$=(0,rt.v)(()=>(0,ke.z)([(0,Y.XP)(this.f.NetworkAddress),(0,Y.XP)(this.f.Type)])).pipe((0,C.T)(([r,n])=>function $n(i,v){if(!(0,fe.qu)(i))return[];const t=Oe().createAddress(i);return v?function Sn(i,v){return new Array(v-i).fill(1).map((t,r)=>r+i)}(t.binaryZeroPad().lastIndexOf("1")+1,t.subnetMask+1):[t.subnetMask]}(r,n===Re.Range)),(0,C.T)(r=>r.map(n=>({value:n,label:"/"+n})))),this.maskOptions$.pipe((0,gn.i)(1),(0,K.pQ)(t)).subscribe({next:r=>{const n=this.form.controls.SubnetMask.value;r.length>0&&(!n||!r.find(s=>
1s.value===n))&&this.form.controls.SubnetMask.setValue(r[0].value)}}),this.form.valueChanges.pipe((0,K.pQ)(t)).subscribe(r=>{if(this.form.valid){const n=Oe().createAddress(r.NetworkAddress),s=r.Type===Re.Single||n.v4&&32===r.SubnetMask||!n.v4&&128===r.SubnetMask,a=`${n.correctForm()}${s?"":"/"+r.SubnetMask}`;this.valueChanged(a)}else this.valueChanged("")}),this.syncControlState(this.form,this.f.NetworkAddress)}validate(t){const r=t.value;return r?Oe().isValidAddress(r)?null:{invalidIPAddress:!0}:{required:!0}}get range(){const{value:t}=this.form;return t.Type===Re.Range&&this.f.NetworkAddress.valid?Ot(function be(i){return`${i.NetworkAddress}${void 0!==i.SubnetMask?"/"+i.SubnetMask:""}`}(t)):""}get f(){return this.form.controls}writeValue(t){super.writeValue(t);try{const r=Oe().createAddress(t);this.form.setValue({Type:Pn(r)?Re.Single:Re.Range,SubnetMask:r.subnetMask,NetworkAddress:r.addressMinusSuffix},{emitEvent:!1})}catch{this.form.setValue({Type:Re.Single,SubnetMask:32,NetworkAddress:""},{emitEvent:!1})}}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-cidr-input"]],inputs:{label:"label"},features:[e.Jv_([{provide:o.cz,multi:!0,useExisting:i},{provide:o.kq,multi:!0,useExisting:i}]),e.Vt3],ngContentSelectors:Cn,decls:7,vars:6,consts:[["data-qa","block-options","description","true",3,"label","options","formControl"],["description",""],["label","_i18n.NetworkAddress","data-qa","network-address",1,"validation-target",3,"formControl"],["ngProjectAs","val-errors",5,["val-errors"]],[3,"control"],["data-qa","subnet-mask","label","_i18n.SubnetMask",3,"options","formControl"],["data-qa","ip-address-range","label","_i18n.IpAddressRange",3,"ngModel","disabled"]],template:function(r,n){1&r&&(e.NAR(yn),e.j41(0,"field-select",0),e.qex(1,1),e.SdG(2),e.bVm(),e.k0s(),e.j41(3,"field-input",2),e.nVh(4,_n,2,0,"ng-container",3)(5,Tn,1,1,"val-errors",4),e.k0s(),e.nVh(6,xn,3,6)),2&r&&(e.Y8G("label",n.label)("options",n.blockRangeOptions)("formControl",n.f.Type),e.R7$(3),e.Y8G("formControl",n.f.NetworkAddress),e.R7$(),e.vxM(n.f.NetworkAddress.valid?4:5),e.R7$(2),e.vxM(n.f.Type.value===n.BlockRange.Range?6:-1))},dependencies:[o.X1,o.BC,o.l_,o.YN,o.vS,X.m,V.q,G.N4,G.IH,W.Jj],encapsulation:2,changeDetection:0})}return i})();var In=l(31143),te=l(96106);function _e(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.IpAddressDuplicatedGlobal"))}let ce=(()=>{class i extends Se.m{blockListApiService=(0,p.WQX)(pt);xapiErrorService=(0,p.WQX)(Be.Ko);cd=(0,p.WQX)(re.gRc);data;buttons=he.P.OkCancel;blockTypeOptions=[{value:"Block",label:"_i18n.Deny"},{value:"Allow",label:"_i18n.Allow"}];minExpiresAt=new Date;form=new o.gE({IPAddrMask:new o.MJ("",{validators:o.k0.required}),Action:new o.MJ("Block",{nonNullable:!0}),ExpiresAt:new o.MJ(this.futureDate,{nonNullable:!0}),Description:new o.MJ("",{nonNullable:!0,validators:o.k0.maxLength(255)})});validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);get futureDate(){const t=new Date;return t.setFullYear((new Date).getFullYear()+20),t}ngOnInit(){this.form.setValue({IPAddrMask:this.data?.IPAddrMask??"",Action:this.data?.BlockType??"Block",ExpiresAt:new Date(this.data?.ExpiresAt??this.futureDate),Description:this.data?.Description??""},{emitEvent:!1})}submit$=()=>{const t={AddedBy:"Manual",BlockType:this.form.value.Action,Description:this.form.value.Description,ExpiresAt:this.form.value.ExpiresAt?.toISOString(),IPAddrMask:this.form.value.IPAddrMask};return(this.data?.Id?this.blockListApiService.updateBlocklistAddr({id:this.data.Id,pbxBlocklistAddr:t}).pipe((0,te.Pr)("_i18n.IpBlacklistNotFoundErrorMessage",t.IPAddrMask)):this.blockListApiService.createBlocklistAddr({pbxBlocklistAddr:t})).pipe(this.handleError(this.xapiErrorService,this.cd,this.form))};get f(){return this.form.controls}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-blacklist-ip-modal"]],hostAttrs:[1,"modal-lg"],inputs:{data:"data"},features:[e.Vt3],decls:13,vars:17,consts:[["header","_i18n.BlacklistIpModalHeader",3,"submitted","buttons","validateBeforeSubmit","submit$"],["label","_i18n.SpecifyIPoRange",3,"formControl"],["rel","noopener","href","https://www.3cx.com/docs/allow-deny-ip-addresses/","target","_blank",1,"link"],[3,"control"],["valError","duplicate"],["data-qa","block-type-actions","label","_i18n.Action",3,"options","formControl"],["label","_i18n.Description","data-qa","description"],[1,"form-control",3,"keydown.enter","formControl","maxlength"],["label","_i18n.ExpirationDate","data-qa","single-date",3,"inlineLabel","minDate","formControl"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"app-cidr-input",1)(2,"a",2),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"val-errors",3),e.DNE(6,_e,2,3,"ng-template",4),e.k0s()(),e.nrm(7,"field-select",5),e.j41(8,"field-wrapper",6)(9,"textarea",7),e.bIt("keydown.enter",function(a){return a.stopPropagation()}),e.k0s(),e.nrm(10,"val-errors",3),e.k0s(),e.j41(11,"app-date-time-picker",8),e.nrm(12,"val-errors",3),e.k0s()()),2&r&&(e.Y8G("buttons",n.buttons)("validateBeforeSubmit",n.validateBeforeSubmit)("submit$",n.submit$),e.R7$(),e.Y8G("formControl",n.f.IPAddrMask),e.R7$(2),e.JRh(e.bMT(4,15,"_i18n.MoreInfo")),e.R7$(2),e.Y8G("control",n.f.IPAddrMask),e.R7$(2),e.Y8G("options",n.blockTypeOptions)("formControl",n.f.Action),e.R7$(2),e.Y8G("formControl",n.f.Description)("maxlength",255),e.R7$(),e.Y8G("control",n.f.Description),e.R7$(),e.Y8G("inlineLabel",!0)("minDate",n.minExpiresAt)("formControl",n.f.ExpiresAt),e.R7$(),e.Y8G("control",n.f.ExpiresAt))},dependencies:[$e.p,Gt,o.X1,o.me,o.BC,o.tU,o.l_,G.IH,G.VI,V.q,je.z,In.T,se.D9],encapsulation:2,changeDetection:0})}return i})();var We=l(4801),gt=l(33971),ye=l(91413),vt=l(56344);let Lt=(()=>{class i{httpClient=(0,p.WQX)(ye.Qq);import(t){return this.httpClient.post(`${vt.H}/Blocklist/Import`,t)}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var yt=l(97519),at=l(62049),Qe=l(49371),Xe=l(25244),De=l(38969),Ct=l(86740),_t=l(36623),Ue=l(47305),d=l(68845),u=l(29325),f=l(62382),T=l(64631);let H=(()=>{class i{transform(t){return function j(i){if((0,fe.qu)(i))return i;try{return new(Oe())(i).address.addressMinusSuffix}catch{return bt}}(t)}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=e.EJ8({name:"Ipaddr",type:i,pure:!0})}return i})(),U=(()=>{class i{transform(t){const r=function Q(i){if(!(0,fe.qu)(i))try{return new(Oe())(i).address.subnetMask.toString()}catch{return bt}return""}(t);return r?`/${r}`:""}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=e.EJ8({name:"Cidr",type:i,pure:!0})}return i})();function ne(i,v){if(1&i){const t=e.RV6();e.j41(0,"row-action-button")(1,"li",25)(2,"button",26),e.bIt("click",function(){p.eBV(t);const n=e.XpG().$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"li",25)(6,"button",27),e.bIt("click",function(){p.eBV(t);const n=e.XpG().$implicit,s=e.XpG();return p.Njj(s.delete(n))}),e.EFF(7),e.nI1(8,"translate"),e.k0s()()()}2&i&&(e.R7$(3),e.SpI(" ",e.bMT(4,2,"_i18n.Edit")," "),e.R7$(4),e.SpI(" ",e.bMT(8,4,"_i18n.Remove")," "))}function pe(i,v){if(1&i){const t=e.RV6();e.j41(0,"tr",19),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.j41(1,"td",10)(2,"app-checker",20),e.bIt("ngModelChange",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.setSelected(s,n))})("checkerClick",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.handleCheckerClick(s,n))}),e.k0s()(),e.j41(3,"td",21),e.EFF(4),e.nI1(5,"Ipaddr"),e.k0s(),e.j41(6,"td",22),e.EFF(7),e.nI1(8,"Cidr"),e.k0s(),e.j41(9,"td",22),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"td",22),e.EFF(13),e.nI1(14,"amLocal"),e.nI1(15,"amDateFormat"),e.k0s(),e.j41(16,"td",23),e.EFF(17),e.nI1(18,"IpRangeCidr"),e.k0s(),e.j41(19,"td",12)(20,"span",24),e.EFF(21),e.k0s()(),e.j41(22,"td",15),e.nVh(23,ne,9,6,"row-action-button"),e.k0s()()}if(2&i){const t=v.$implicit,r=e.XpG();e.R7$(2),e.Y8G("ngModel",r.selector.isRowSelected(t)),e.R7$(2),e.JRh(e.bMT(5,8,t.IPAddrMask)),e.R7$(3),e.JRh(e.bMT(8,10,t.IPAddrMask)),e.R7$(3),e.JRh(e.bMT(11,12,r.getBlockTypeTranslate(t.BlockType))),e.R7$(3),e.JRh(e.i5U(15,16,e.bMT(14,14,t.ExpiresAt),"L LT")),e.R7$(4),e.JRh(e.bMT(18,19,t.IPAddrMask)),e.R7$(4),e.JRh(t.Description),e.R7$(2),e.vxM(r.canBeDeletedOrEdited(t)?23:-1)}}let Pe=(()=>{class i{modalService=(0,p.WQX)(L.B);blockListApiService=(0,p.WQX)(pt);route=(0,p.WQX)(M.nX);cd=(0,p.WQX)(re.gRc);resolver=(0,p.WQX)(kt);blacklistIpImportService=(0,p.WQX)(Lt);destroy$=(0,p.WQX)(p.abz);pager;data=[];selector;constructor(){const t=this.modalService,s=this.resolver,a=this.destroy$,m=this.route.
1snapshot.data;this.selector=new at.a({cd:this.cd,keySelector:h=>h.Id}),this.pager=new We.f(a,s,m.blacklistIps),this.pager.pagedItems$.pipe((0,K.pQ)(this.destroy$)).subscribe({next:h=>{this.updateItems(h)},error:h=>t.error(h)})}updateItems(t){this.selector.onDataChanged(t.value||[]),this.data=t.value||[],this.cd.markForCheck()}add(){this.modalService.showComponent(ce).pipe(te.nx).subscribe(()=>{this.pager.refresh$.next()})}canBeDeletedOrEdited(t){return"Whitelist"!==t?.AddedBy}allCantBeDeleted(t){return t.every(r=>!this.canBeDeletedOrEdited(r))}edit(t){const r=t||this.selector.firstSelected;!r||!this.canBeDeletedOrEdited(r)||this.modalService.showComponent(ce,{initialState:{data:r}}).pipe(te.nx).subscribe(()=>{this.pager.refresh$.next()})}delete(t){if(t&&!this.canBeDeletedOrEdited(t))return;const r=t?[t.Id]:this.selector.selectedValues.filter(n=>this.canBeDeletedOrEdited(n)).map(n=>n.Id);(0,Z.zq)(this.modalService).pipe((0,_.n)(n=>this.blockListApiService.bulkIpsDelete({blocklistBulkIpsDeleteRequestBody:{ids:r}}))).subscribe({next:()=>{t?this.selector.resetSingle(t.Id):this.selector.resetAll(),this.pager.refresh$.next()},error:n=>this.modalService.error(n)})}import(t){const r=t.item(0);if(r){const n=new FormData;
1n.append("file",r,r.name),this.blacklistIpImportService.import(n).pipe((0,yt.U)(this.modalService)).subscribe(s=>{s.importCount&&this.pager.refresh$.next()})}}getBlockTypeTranslate(t){return"Allow"===t?"_i18n.Allow":"_i18n.Deny"}export(){this.blockListApiService.listBlocklistAddr({$filter:"(AddedBy eq 'Manual')",$select:["IPAddrMask","BlockType","ExpiresAt","Description"]}).pipe((0,C.T)(t=>t.value?.map(r=>({ip:r.IPAddrMask,blockType:"Allow"===r.BlockType?1:0,expirationDate:r.ExpiresAt,description:r.Description}))??[])).subscribe({next:t=>{(0,gt.mq)(JSON.stringify(t),"ip_blacklist.json")},error:t=>this.modalService.error(t)})}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-blacklist-ip"]],decls:62,vars:50,consts:[["header","_i18n.BlacklistIp",3,"helpUrl"],["top-bar","",1,"button-group"],["data-qa","add-blacklist-ip","type","button",1,"btn","btn-primary",3,"click"],["data-qa","edit-blacklist-ip","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","delete-blacklist-ip","type","button",1,"btn","btn-primary",3,"click","disabled"],["id","btnImportBlacklistIp","data-qa","import-blacklist-ip","accept",".json",3,"files"],["app-upload-solid-icon",""],["data-qa","export-blacklist-ip","type","button",1,"btn","btn-primary",3,"click","disabled"],["top-bar","",3,"formControl"],["full-width","",1,"scrollable-table"],[1,"checker"],[3,"ngModelChange","ngModel"],[1,"md-visible"],[1,"xl-visible"],[1,"md-visible","minw-px-100"],[1,"actions"],[1,"clickable"],["colspan","8"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],[1,"clickable",3,"click"],[3,"ngModelChange","checkerClick","ngModel"],["nowrap",""],["nowrap","",1,"md-visible"],["nowrap","",1,"xl-visible"],[1,"line-clamp-1"],["role","menuitem"],["type","button","data-qa","edit-blacklist-ip",1,"dropdown-item",3,"click"],["type","button","data-qa","delete-blacklist-ip",1,"dropdown-item",3,"click"]],template:function(r,n){1&r&&(e.j41(0,"app-page",0)(1,"div",1)(2,"button",2),e.bIt("click",function(){return n.add()}),e.nrm(3,"app-plus-solid-icon"),e.j41(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"button",3),e.bIt("click",function(){return n.edit()}),e.nrm(8,"app-pencil-solid-icon"),e.j41(9,"span"),e.EFF(10),e.nI1(11,"translate"),e.k0s()(),e.j41(12,"button",4),e.bIt("click",function(){return n.delete()}),e.nrm(13,"app-trash-alt-solid-icon"),e.j41(14,"span"),e.EFF(15),e.nI1(16,"translate"),e.k0s()(),e.j41(17,"app-select-file-button",5),e.bIt("files",function(a){return n.import(a)}),e.nrm(18,"span",6),e.j41(19,"span"),e.EFF(20),e.nI1(21,"translate"),e.k0s()(),e.j41(22,"button",7),e.bIt("click",function(){return n.export()}),e.nrm(23,"app-download-solid-icon"),e.j41(24,"span"),e.EFF(25),e.nI1(26,"translate"),e.k0s()()(),e.nrm(27,"search-bar",8),e.j41(28,"table",9)(29,"thead")(30,"tr")(31,"th",10)(32,"app-checker",11),e.bIt("ngModelChange",function(a){return n.selector.setSelectAll(a)}),e.k0s()(),e.j41(33,"th"),e.EFF(34),e.nI1(35,"translate"),e.k0s(),e.j41(36,"th",12),e.EFF(37),e.nI1(38,"translate"),e.k0s(),e.j41(39,"th",12),e.EFF(40),e.nI1(41,"translate"),e.k0s(),e.j41(42,"th",12),e.EFF(43),e.nI1(44,"translate"),e.k0s(),e.j41(45,"th",13),e.EFF(46),e.nI1(47,"translate"),e.k0s(),e.j41(48,"th",14),e.EFF(49),e.nI1(50,"translate"),e.k0s(),e.nrm(51,"th",15),e.k0s()(),e.j41(52,"tbody"),e.Z7z(53,pe,24,21,"tr",16,e.fX1),e.k0s(),e.j41(55,"tfoot")(56,"tr")(57,"td",17)(58,"app-paging",18),e.nI1(59,"async"),e.nI1(60,"async"),e.nI1(61,"async"),e.bIt("pageChanged",function(a){return n.pager.pageChanged(a)}),e.k0s()()()()()()),2&r&&(e.Y8G("helpUrl","_i18n.AdvancedUri"),e.R7$(5),e.JRh(e.bMT(6,22,"_i18n.Add")),e.R7$(2),e.Y8G("disabled",!n.selector.isOneSelected||!n.canBeDeletedOrEdited(n.selector.firstSelected)),e.R7$(3),e.JRh(e.bMT(11,24,"_i18n.Edit")),e.R7$(2),e.Y8G("disabled",!n.selector.isAnySelected||n.allCantBeDeleted(n.selector.selectedValues)),e.R7$(3),e.Lme("",e.bMT(16,26,"_i18n.Delete"),"",n.selector.selectedCountLabel),e.R7$(5),e.JRh(e.bMT(21,28,"_i18n.Import")),e.R7$(2),e.Y8G("disabled",0===n.data.length),e.R7$(3),e.JRh(e.bMT(26,30,"_i18n.Export")),e.R7$(2),e.Y8G("formControl",n.pager.search),e.R7$(5),e.Y8G("ngModel",n.selector.isAnySelected),e.R7$(2),e.JRh(e.bMT(35,32,"_i18n.IpAddress")),e.R7$(3),e.JRh(e.bMT(38,34,"_i18n.SubnetMask")),e.R7$(3),e.JRh(e.bMT(41,36,"_i18n.Action")),e.R7$(3),e.JRh(e.bMT(44,38,"_i18n.ExpirationDate")),e.R7$(3),e.JRh(e.bMT(47,40,"_i18n.IpAddressRange")),e.R7$(3),e.JRh(e.bMT(50,42,"_i18n.Description")),e.R7$(4),e.Dyx(n.data),e.R7$(5),e.Y8G("currentPage",e.bMT(59,44,n.pager.currentPage$))("itemsPerPage",e.bMT(60,46,n.pager.pageSize$))("totalItems",e.bMT(61,48,n.pager.totalCount$))("showBoundaryLinks",!0))},dependencies:[ve.H,Qe.K,Xe.T,De.d,Ue.O,Ct.P,_t.e,d.L,o.X1,o.BC,o.l_,ze.$,o.YN,o.vS,u.I,xe.u4,W.Jj,se.D9,f.a,T.h,H,U,Ve],encapsulation:2})}return i})();var Te=l(52808),Ee=l(16444),ot=l(83185),ge=l(45317);const Ie={AlterDestinationDuringHolidays:!1,RuleName:"",CustomData:"",OfficeHoursDestination:{To:ge.h.None},OutOfOfficeHoursDestination:{To:ge.h.None},HolidaysDestination:{To:ge.h.None},AlterDestinationDuringOutOfOfficeHours:!0,CallType:"AllCalls",Condition:"BasedOnCallerID",Data:""};function we(i){return i?{Id:i.Id,Gateway:{Name:i.Name}}:null}var Tt=l(31899),Cr=l(24112);function _r(i,v){if(1&i&&(e.j41(0,"app-trunk-select",4),e.nrm(1,"val-errors",7),e.k0s()),2&i){const t=e.XpG();e.Y8G("isNew",t.isNew)("isClearable",!1)}}function Tr(i,v){if(1&i&&(e.j41(0,"field-wrapper",5)(1,"label",8),e.EFF(2),e.k0s()()),2&i){const t=e.XpG();e.R7$(2),e.JRh((null==t.cidRule?null:t.cidRule.TrunkDN.Name)??"")}}let xr=(()=>{class i extends Se.m{inboundRulesApiService=(0,p.WQX)(Le);myPhoneService=(0,p.WQX)(Ee.gx);xapiErrorService=(0,p.WQX)(Be.Ko);cd=(0,p.WQX)(re.gRc);form;cidRule=Ie;buttons=he.P.OkCancel;isMcmMode$=(0,ot.D8)(this.myPhoneService);validateBeforeSubmit;ngOnInit(){this.form=new o.gE({RuleName:new o.MJ(this.cidRule?.RuleName??"",{nonNullable:!0}),Data:new o.MJ(this.cidRule?.Data??"",{validators:[o.k0.required],nonNullable:!0}),Trunk:new o.MJ(we(this.cidRule.TrunkDN),{validators:[o.k0.required],nonNullable:!0}),OfficeHoursDestination:new o.MJ(this.cidRule.OfficeHoursDestination,{nonNullable:!0})}),this.validateBeforeSubmit=this.createDialogValidate(this.form,this.cd)}get isNew(){return void 0===this.cidRule.Id}submit$=()=>{const t=function st(i,v){return{Id:i,AlterDestinationDuringHolidays:!1,RuleName:v.RuleName,CustomData:"",OfficeHoursDestination:v.OfficeHoursDestination,OutOfOfficeHoursDestination:v.OfficeHoursDestination,HolidaysDestination:v.OfficeHoursDestination,AlterDestinationDuringOutOfOfficeHours:!0,CallType:"AllCalls",Condition:"BasedOnCallerID",Data:v.Data,TrunkDN:{Id:v.Trunk?.Id}}}(this.cidRule.Id,this.form.value);return(this.isNew?this.inboundRulesApiService.createInboundRule({pbxInboundRule:t}):this.inboundRulesApiService.updateInboundRule({id:this.cidRule.Id,pbxInboundRule:t})).pipe((0,te.Pr)("_i18n.CIDRuleNotFoundErrorMessage",t.RuleName),this.handleError(this.xapiErrorService,this.cd,this.form))};static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],features:[e.Vt3],decls:9,vars:11,consts:[[3,"submitted","header","formGroup","submit$","validateBeforeSubmit","buttons"],["formControlName","RuleName","label","_i18n.Name","data-qa","name",3,"maxlength"],["formControlName","Data","label","_i18n.CallerID","data-qa","caller-id",3,"maxlength"],["controlName","Data"],["label","_i18n.ChooseSipTrunkForInboundRule","data-qa","trunk","formControlName","Trunk",3,"isNew","isClearable"],["label","_i18n.ChooseSipTrunkForInboundRule","data-qa","trunk-name"],["label","_i18n.RouteCallsTo","formControlName","OfficeHoursDestination","data-qa","route-calls-to",3,"externalNumberEnabled"],["controlName","Trunk"],[1,"form-control","disabled"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"fieldset"),e.nrm(2,"field-input",1),e.j41(3,"field-input",2),e.nrm(4,"val-errors",3),e.k0s(),e.nVh(5,_r,2,2,"app-trunk-select",4)(6,Tr,3,1,"field-wrapper",5),e.nrm(7,"app-call-forwarding",6),e.nI1(8,"async"),e.k0s()()),2&r&&(e.Y8G("header",n.isNew?"_i18n.CreateCallerIdRule":"_i18n.EditCallerIdRule")("formGroup",n.form)("submit$",n.submit$)("validateBeforeSubmit",n.validateBeforeSubmit)("buttons",n.buttons),e.R7$(2),e.Y8G("maxlength",50),e.R7$(),e.Y8G("maxlength",50),e.R7$(2),e.vxM(n.isNew?5:6),e.R7$(2),e.Y8G("externalNumberEnabled",!e.bMT(8,9,n.isMcmMode$)))},dependencies:[$e.p,o.X1,o.BC,o.cb,o.tU,o.j4,o.JD,X.m,G.IH,Tt.w,je.z,Cr.R,W.Jj],encapsulation:2})}return i})();var Sr=l(48643),$r=l(25843),Nn=l(90776),Pr=l(3817);const Ir=i=>({count:i});function Fr(i,v){if(1&i){const t=e.RV6();e.j41(0,"button",20),e.bIt("click",function(){p.eBV(t);const n=e.XpG();return p.Njj(n.export())}),e.nrm(1,"app-download-solid-icon"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&i){const t=v,r=e.XpG();e.Y8G("disabled",!(t.count>0||r.selector.isAnySelected)),e.R7$(3),e.Lme(" ",e.bMT(4,3,"_i18n.Export")," ",r.selector.selectedCountLabel||(t.count>0?" ("+t.count+")":"")," ")}}function Rr(i,v){if(1&i){const t=e.RV6();e.j41(0,"tr",21),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.j41(1,"td",10)(2,"app-checker",22),e.bIt("ngModelChange",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.setSelected(s,n))})("checkerClick",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.handleCheckerClick(s,n))}),e.k0s()(),e.j41(3,"td",23),e.EFF(4),e.k0s(),e.j41(5,"td",24),e.EFF(6),e.k0s(),e.j41(7,"td",25),e.EFF(8),e.k0s(),e.j41(9,"td",26),e.nrm(10,"app-route-dest",27),e.k0s(),e.j41(11,"td",16)(12,"row-action-button")(13,"li",28)(14,"button",29),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.EFF(15),e.nI1(16,"translate"),e.k0s()(),e.j41(17,"li",28)(18,"button",30),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.deleteRule(n))}),e.EFF(19),e.nI1(20,"translate"),e.k0s()()()()()}if(2&i){const t=v.$implicit,r=e.XpG();e.R7$(2),e.Y8G("ngModel",r.selector.isRowSelected(t)),e.R7$(2),e.JRh(t.RuleName),e.R7$(2),e.SpI(" ",(null==t.TrunkDN?null:t.TrunkDN.Name)??""," "),e.R7$(2),e.SpI(" ",t.Data," "),e.R7$(2),e.Y8G("dest",r.cidRuleDestination(t)),e.R7$(5),e.SpI(" ",e.bMT(16,7,"_i18n.Edit")," "),e.R7$(4),e.SpI(" ",e.bMT(20,9,"_i18n.Remove")," ")}}let Ar=(()=>{class i{modalService=(0,p.WQX)(L.B);route=(0,p.WQX)(M.nX);cd=(0,p.WQX)(re.gRc);inboundRulesApiService=(0,p.WQX)(Le);resolver=(0,p.WQX)(Bt);fileDownloadService=(0,p.WQX)(Sr.y);httpClient=(0,p.WQX)(ye.Qq);destroy$=(0,p.WQX)(p.abz);selector;pager;trunksGroups;fileImporting=!1;cidRules=[];constructor(){const t=this.modalService,n=this.cd,s=this.resolver,a=this.destroy$;this.trunksGroups=(0,wt.Pw)(this.route),this.selector=new at.a({cd:n,keySelector:m=>m.Id}
1),this.pager=new We.f(a,s,this.route.snapshot.data.cidRules),this.pager.pagedItems$.pipe((0,K.pQ)(this.destroy$)).subscribe({next:m=>{this.updateItems(m)},error:m=>t.error(m)})}updateItems(t){this.selector.onDataChanged(t.value||[]),this.cidRules=t.value||[],this.cd.markForCheck()}add(){this.showEditCidRuleDialog(Ie)}edit(t){const r=t||this.selector.firstSelected;!r||!r.Id||this.showEditCidRuleDialog(r)}showEditCidRuleDialog(t){this.modalService.showComponent(xr,{initialState:{cidRule:t??{}},ignoreBackdropClick:!0}).subscribe({next:r=>{r.decision===he.R.Ok&&this.pager.refresh$.next()},error:r=>this.modalService.error(r)})}cidRuleDestination(t){const r=t?.OfficeHoursDestination;return r?(0,Te.bx)(r,this.trunksGroups):void 0}export(){if(this.selector.isAnySelected){const r=new FormData;for(const n of this.selector.selectedKeys)r.append("ids",String(n));return void this.fileDownloadService.downloadWithPost("/InboundRules/ExportSelectedCallerIdRules",r)}const t=this.inboundRulesApiService.exportCallerIdRulesQuery({$search:(0,Ne.Bj)(this.pager.search.value),$filter:this.resolver.filter});this.fileDownloadService.download(t)}import(t){if(!t||!t.length)return;const r=t[0],n=(0,fe.j$)(r,{maxSizeMb:$r.uS,incorrectExtensionText:"_i18n.IncorrectCsvFormat",allowedExtensions:["csv"]});n?this.modalService.error(n):this.uploadFile(r)}uploadFile(t){this.fileImporting=!0,this.cd.markForCheck();const r=new FormData;r.append("file",t,t.name),this.httpClient.post("/xapi/v1/InboundRules/ImportCallerIdRules",r).pipe((0,yt.U)(this.modalService)).subscribe(n=>{n.importCount&&this.pager.refresh$.next(),this.fileImporting=!1,this.cd.markForCheck()})}deleteRule(t){!t||!t.Id||this.delete(t.Id)}delete(t){t&&this.modalService.confirmDeletion("_i18n.AreYouSureYouWantToDeleteCallerIdRule").pipe((0,_.n)(()=>this.inboundRulesApiService.deleteInboundRule({id:t})),(0,te.Y$)()).subscribe({next:()=>{t?this.selector.resetSingle(t):this.selector.resetAll(),this.pager.refresh$.next()},error:r=>this.modalService.error(r)})}batchDelete(){const t=this.selector.selectedValues.map(r=>r.Id);1!==t.length?t.length>0&&(0,Z.zq)(this.modalService).pipe((0,_.n)(()=>this.inboundRulesApiService.bulkInboundRulesDelete({inboundRulesBulkInboundRulesDeleteRequestBody:{ids:t}}))).subscribe({next:()=>{this.selector.resetAll(),this.pager.refresh$.next()},error:r=>this.modalService.error(r)}):this.delete(t[0])}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:49,vars:44,consts:[[3,"header","helpUrl"],["top-bar","",1,"button-group"],["text","_i18n.Add","data-qa","add-cid-rule",3,"click"],["data-qa","edit-cid-rule","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","batch-delete-cid-rules","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","export-cid-rules","accept",".csv",3,"files","disabled"],["app-upload-solid-icon",""],["data-qa","export-cid-rules","type","button",1,"btn","btn-primary",3,"disabled"],["top-bar","",3,"formControl"],["full-width","",1,"scrollable-table"],[1,"checker"],[3,"ngModelChange","ngModel"],[1,"col-size-300"],[1,"col-size-200","md-visible"],[1,"col-size-200"],[1,"xl-visible","w-50"],[1,"actions"],[1,"clickable"],["colspan","5"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],["data-qa","export-cid-rules","type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"clickable",3,"click"],[3,"ngModelChange","checkerClick","ngModel"],[1,"text-lg-nowrap"],[1,"md-visible","text-md-nowrap"],["nowrap",""],[1,"xl-visible"],[3,"dest"],["role","menuitem"],["type","button","data-qa","edit-cid-rule",1,"dropdown-item",3,"click"],["type","button","data-qa","delete-cid-rule",1,"dropdown-item",3,"click"]],template:function(r,n){if(1&r&&(e.j41(0,"app-page",0)(1,"div",1)(2,"app-button-add",2),e.bIt("click",function(){return n.add()}),e.k0s(),e.j41(3,"button",3),e.bIt("click",function(){return n.edit()}),e.nrm(4,"app-pencil-solid-icon"),e.j41(5,"span"),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.j41(8,"button",4),e.bIt("click",function(){return n.batchDelete()}),e.nrm(9,"app-trash-alt-solid-icon"),e.j41(10,"span"),e.EFF(11),e.nI1(12,"translate"),e.k0s()(),e.j41(13,"app-select-file-button",5),e.bIt("files",function(a){return n.import(a)}),e.nrm(14,"span",6),e.j41(15,"span"),e.EFF(16),e.nI1(17,"translate"),e.k0s()(),e.nVh(18,Fr,5,5,"button",7),e.nI1(19,"async"),e.k0s(),e.nrm(20,"search-bar",8),e.j41(21,"table",9)(22,"thead")(23,"tr")(24,"th",10)(25,"app-checker",11),e.bIt("ngModelChange",function(a){return n.selector.setSelectAll(a)}),e.k0s()(),e.j41(26,"th",12),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"th",13),e.EFF(30),e.nI1(31,"translate"),e.k0s(),e.j41(32,"th",14),e.EFF(33),e.nI1(34,"translate"),e.k0s(),e.j41(35,"th",15),e.EFF(36),e.nI1(37,"translate"),e.k0s(),e.nrm(38,"th",16),e.k0s()(),e.j41(39,"tbody"),e.Z7z(40,Rr,21,11,"tr",17,e.fX1),e.k0s(),e.j41(42,"tfoot")(43,"tr")(44,"td",18)(45,"app-paging",19),e.nI1(46,"async"),e.nI1(47,"async"),e.nI1(48,"async"),e.bIt("pageChanged",function(a){return n.pager.pageChanged(a)}),e.k0s()()()()()()),2&r){let s;e.Y8G("header","_i18n.CIDRules")("helpUrl","_i18n.AdvancedUri"),e.R7$(3),e.Y8G("disabled",!n.selector.isOneSelected),e.R7$(3),e.JRh(e.bMT(7,20,"_i18n.Edit")),e.R7$(2),e.Y8G("disabled",!n.selector.isAnySelected),e.R7$(3),e.Lme("",e.bMT(12,22,"_i18n.Delete"),"",n.selector.selectedCountLabel),e.R7$(2),e.Y8G("disabled",n.fileImporting),e.R7$(3),e.JRh(e.bMT(17,24,"_i18n.Import")),e.R7$(2),e.vxM((s=e.eq3(42,Ir,e.bMT(19,26,n.pager.totalCount$)))?18:-1,s),e.R7$(2),e.Y8G("formControl",n.pager.search),e.R7$(5),e.Y8G("ngModel",n.selector.isAnySelected),e.R7$(2),e.JRh(e.bMT(28,28,"_i18n.Name")),e.R7$(3),e.JRh(e.bMT(31,30,"_i18n.Trunk")),e.R7$(3),e.JRh(e.bMT(34,32,"_i18n.CallerID")),e.R7$(3),e.JRh(e.bMT(37,34,"_i18n.RouteTo")),e.R7$(4),e.Dyx(n.cidRules),e.R7$(5),e.Y8G("currentPage",e.bMT(46,36,n.pager.currentPage$))("itemsPerPage",e.bMT(47,38,n.pager.pageSize$))("totalItems",e.bMT(48,40,n.pager.totalCount$))("showBoundaryLinks",!0)}},dependencies:[ve.H,Nn.j,Xe.T,De.d,Ue.O,Ct.P,_t.e,d.L,o.X1,o.BC,o.l_,ze.$,o.YN,o.vS,Pr.F,u.I,xe.u4,W.Jj,se.D9],encapsulation:2})}return i})();var Fn=l(983);let kr=(()=>{class i extends Se.m{api=(0,p.WQX)(nt);xapiErrorService=(0,p.WQX)(Be.Ko);cd=(0,p.WQX)(re.gRc);buttons=he.P.OkCancel;data;form=new o.gE({Id:new o.MJ("",{nonNullable:!0}),CallerId:new o.MJ("",{validators:o.k0.required,nonNullable:!0}),Description:new o.MJ("")});validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);ngOnInit(){this.data&&this.form.patchValue(this.data)}submit$=()=>{const t=this.form.value;return(t.Id?this.api.updateBlackListNumber({id:t.Id,pbxBlackListNumber:t}).pipe((0,te.Pr)("_i18n.CIDBlackListNotFoundErrorMessage",t.CallerId)):this.api.createBlackListNumber({pbxBlackListNumber:t})).pipe((0,P.W)(n=>{if(!this.xapiErrorService.error(this.cd,n,this.form,!1,!1))throw n;return Fn.w}))};static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-blacklisted-numbers-modal"]],inputs:{data:"data"},features:[e.Vt3],decls:6,vars:7,consts:[[3,"submitted","buttons","header","formGroup","validateBeforeSubmit","submit$"],["formControlName","CallerId","label","_i18n.IncomingCallerIdToBlocked",3,"maxlength"],["controlName","CallerId"],["label","_i18n.Description"],["formControlName","Description",1,"form-control","h100",3,"keydown.enter","maxlength"],["controlName","Description"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"field-input",1),e.nrm(2,"val-errors",2),e.k0s(),e.j41(3,"field-wrapper",3)(4,"textarea",4),e.bIt("keydown.enter",function(a){return a.stopPropagation()}),e.k0s(),e.nrm(5,"val-errors",5),e.k0s()()),2&r&&(e.Y8G("buttons",n.buttons)("header",n.data?"_i18n.EditBlacklistNumber":"_i18n.AddNewBlacklistNumber")("formGroup",n.form)("validateBeforeSubmit",n.validateBeforeSubmit)("submit$",n.submit$),e.R7$(),e.Y8G("maxlength",50),e.R7$(3),e.Y8G("maxlength",255))},dependencies:[$e.p,o.X1,o.me,o.BC,o.cb,o.tU,o.j4,o.JD,X.m,G.IH,je.z],encapsulation:2,changeDetection:0})}return i})(),Er=(()=>{class i{httpClient=(0,p.WQX)(ye.Qq);import(t){return this.httpClient.post(`${vt.H}/BlackListNumbers/Import`,t)}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Mr(i,v){if(1&i){const t=e.RV6();e.j41(0,"tr",15),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.j41(1,"td",8)(2,"app-checker",16),e.bIt("ngModelChange",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.setSelected(s,n))})("checkerClick",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.handleCheckerClick(s,n))}),e.k0s()(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td",17)(6,"span",18),e.EFF(7),e.k0s()(),e.j41(8,"td",11)(9,"row-action-button")(10,"li",19)(11,"button",20),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.EFF(12),e.nI1(13,"translate"),e.k0s()(),e.j41(14,"li",19)(15,"button",21),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.delete(n))}),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()()()}if(2&i){const t=v.$implicit,r=e.XpG();e.R7$(2),e.Y8G("ngModel",r.selector.isRowSelected(t)),e.R7$(2),e.JRh(t.CallerId),e.R7$(3),e.JRh(t.Description),e.R7$(5),e.SpI(" ",e.bMT(13,5,"_i18n.Edit")," "),e.R7$(4),e.SpI(" ",e.bMT(17,7,"_i18n.Remove")," ")}}let Dr=(()=>{class i{modalService=(0,p.WQX)(L.B);route=(0,p.WQX)(M.nX);blackListNumbersApiService=(0,p.WQX)(nt);blacklistNumbersImportService=(0,p.WQX)(Er);resolver=(0,p.WQX)(Et);cd=(0,p.WQX)(re.gRc);destroy$=(0,p.WQX)(p.abz);pager;selector;data=[];constructor(){const r=this.resolver,s=this.destroy$,a=this.route.
1snapshot.data;this.selector=new at.a({cd:this.cd,keySelector:m=>m.Id,notKeepSelectedOnDataChange:!0}),this.pager=new We.f(s,r,a.blacklistedNumbers,xe.z9),this.pager.pagedItems$.pipe((0,K.pQ)(this.destroy$)).subscribe({next:m=>{this.updateItems(m)}})}updateItems(t){this.selector.onDataChanged(t.value||[]),this.data=t.value||[],this.cd.markForCheck()}add(){this.edit({})}edit(t=this.selector.firstSelected){this.modalService.showDialog(kr,{data:t}).pipe(te.nx).subscribe(()=>this.pager.refresh$.next())}delete(t){const r=t?[t.Id]:this.selector.selectedKeys;(0,Z.zq)(this.modalService).pipe((0,_.n)(n=>this.blackListNumbersApiService.bulkNumbersDelete({blackListNumbersBulkNumbersDeleteRequestBody:{ids:r}}))).subscribe({next:()=>{t?this.selector.resetSingle(t.Id):this.selector.resetAll(),this.pager.refresh$.next()},error:n=>this.modalService.error(n)})}import(t){const r=t.item(0);if(r){const n=new FormData;n.append("file",r,r.name),this.blacklistNumbersImportService.import(n).pipe((0,yt.U)(this.modalService)).subscribe(s=>{s.importCount&&this.pager.refresh$.next()})}}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-blacklist-numbers"]],decls:45,vars:34,consts:[["header","_i18n.BlacklistNumbers",3,"helpUrl"],["top-bar","",1,"button-group"],["data-qa","add-blacklist-number","type","button",1,"btn","btn-primary",3,"click"],["data-qa","edit-blacklist-number","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","delete-blacklist-number","type","button",1,"btn","btn-primary",3,"click","disabled"],["id","btnImportBlacklistedNumbers","data-qa","import-blacklisted-number","accept",".csv",3,"files"],["top-bar","",3,"formControl"],["full-width","",1,"scrollable-table"],[1,"checker"],[3,"ngModelChange","ngModel"],[1,"md-visible","w-75"],[1,"actions"],[1,"clickable"],["colspan","7"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],[1,"clickable",3,"click"],[3,"ngModelChange","checkerClick","ngModel"],[1,"md-visible"],[1,"line-clamp-1"],["role","menuitem"],["type","button","data-qa","edit-blacklisted-number",1,"dropdown-item",3,"click"],["type","button","data-qa","delete-blacklisted-number",1,"dropdown-item",3,"click"]],template:function(r,n){1&r&&(e.j41(0,"app-page",0)(1,"div",1)(2,"button",2),e.bIt("click",function(){return n.add()}),e.nrm(3,"app-plus-solid-icon"),e.j41(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"button",3),e.bIt("click",function(){return n.edit()}),e.nrm(8,"app-pencil-solid-icon"),e.j41(9,"span"),e.EFF(10),e.nI1(11,"translate"),e.k0s()(),e.j41(12,"button",4),e.bIt("click",function(){return n.delete()}),e.nrm(13,"app-trash-alt-solid-icon"),e.j41(14,"span"),e.EFF(15),e.nI1(16,"translate"),e.k0s()(),e.j41(17,"app-select-file-button",5),e.bIt("files",function(a){return n.import(a)}),e.nrm(18,"app-upload-solid-icon"),e.j41(19,"span"),e.EFF(20),e.nI1(21,"translate"),e.k0s()()(),e.nrm(22,"search-bar",6),e.j41(23,"table",7)(24,"thead")(25,"tr")(26,"th",8)(27,"app-checker",9),e.bIt("ngModelChange",function(a){return n.selector.setSelectAll(a)}),e.k0s()(),e.j41(28,"th"),e.EFF(29),e.nI1(30,"translate"),e.k0s(),e.j41(31,"th",10),e.EFF(32),e.nI1(33,"translate"),e.k0s(),e.nrm(34,"th",11),e.k0s()(),e.j41(35,"tbody"),e.Z7z(36,Mr,18,9,"tr",12,e.fX1),e.k0s(),e.j41(38,"tfoot")(39,"tr")(40,"td",13)(41,"app-paging",14),e.nI1(42,"async"),e.nI1(43,"async"),e.nI1(44,"async"),e.bIt("pageChanged",function(a){return n.pager.pageChanged(a)}),e.k0s()()()()()()),2&r&&(e.Y8G("helpUrl","_i18n.AdvancedUri"),e.R7$(5),e.JRh(e.bMT(6,16,"_i18n.Add")),e.R7$(2),e.Y8G("disabled",!n.selector.isOneSelected),e.R7$(3),e.JRh(e.bMT(11,18,"_i18n.Edit")),e.R7$(2),e.Y8G("disabled",!n.selector.isAnySelected),e.R7$(3),e.Lme("",e.bMT(16,20,"_i18n.Delete"),"",n.selector.selectedCountLabel),e.R7$(5),e.JRh(e.bMT(21,22,"_i18n.Import")),e.R7$(2),e.Y8G("formControl",n.pager.search),e.R7$(5),e.Y8G("ngModel",n.selector.isAnySelected),e.R7$(2),e.JRh(e.bMT(30,24,"_i18n.BlacklistedCallerID")),e.R7$(3),e.JRh(e.bMT(33,26,"_i18n.Description")),e.R7$(4),e.Dyx(n.data),e.R7$(5),e.Y8G("currentPage",e.bMT(42,28,n.pager.currentPage$))("itemsPerPage",e.bMT(43,30,n.pager.pageSize$))("totalItems",e.bMT(44,32,n.pager.totalCount$))("showBoundaryLinks",!0))},dependencies:[ve.H,Qe.K,Xe.T,De.d,Ue.O,Ct.P,d.L,o.X1,o.BC,o.l_,ze.$,o.YN,o.vS,u.I,xe.u4,se.D9,W.Jj],encapsulation:2,changeDetection:0})}return i})();function Br(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.IpAddressDuplicated"))}let wr=(()=>{class i extends Se.m{cd=(0,p.WQX)(re.gRc);buttons=he.P.OkCancel;whiteLists;additionalIpList;form=new o.MJ("",[o.k0.required,t=>{const r=t.value;return r&&(this.whiteLists?.includes(r)||this.additionalIpList?.includes(r))?{duplicate:!0}:null}]);validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);getPayload(){return this.form.value}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-add-restriction-modal"]],inputs:{whiteLists:"whiteLists",additionalIpList:"additionalIpList"},features:[e.Vt3],decls:4,vars:4,consts:[["header","_i18n.AddRestriction",3,"submitted","buttons","validateBeforeSubmit"],["label","_i18n.SpecifyIpOrRange",3,"formControl"],[3,"control"],["valError","duplicate"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"app-cidr-input",1)(2,"val-errors",2),e.DNE(3,Br,2,3,"ng-template",3),e.k0s()()()),2&r&&(e.Y8G("buttons",n.buttons)("validateBeforeSubmit",n.validateBeforeSubmit),e.R7$(),e.Y8G("formControl",n.form),e.R7$(),e.Y8G("control",n.form))},dependencies:[$e.p,Gt,o.X1,o.BC,o.l_,G.IH,G.VI,se.D9],encapsulation:2})}return i})();var jr=l(9625),Nr=l.n(jr);const{parse:Hn,parseCIDR:Hr,subnetMatch:Or}=Nr();let Rn=(()=>{class i{transform(t,r,n){return function Vr(i,v,t){if(!t)return{ipAddress:"",isAllowed:!1};try{const r=Hn(t),n=r.range();return null==v||v?"loopback"===n||"linkLocal"===n||"private"===n?{ipAddress:t,range:n,isAllowed:!0}:{isAllowed:i.some(s=>{if((0,fe.qu)(s))return r.toString()===Hn(s).toString();const a=Hr(s);return"target"===Or(r,{target:a})}),ipAddress:t,range:n}:{ipAddress:t,range:n,isAllowed:!0}}catch{return{ipAddress:t,isAllowed:!1}}}(r??[],n,t)}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=e.EJ8({name:"MyIpAddressPipe",type:i,pure:!0})}return i})();var Gr=l(60240),An=l(85260);const Lr=(i,v)=>({address:i,range:v}),Wr=i=>({address:i});function Qr(i,v){if(1&i&&(e.j41(0,"alert",5),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.SpI(" ",e.i5U(2,1,"_i18n.CurrentIpAddressIsAllowed",e.l_i(4,Lr,t.ipAddress,t.range))," ")}}function Xr(i,v){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI("(",t.range,")")}}function Ur(i,v){if(1&i&&(e.j41(0,"alert",6),e.EFF(1),e.nI1(2,"translate"),e.nV
1h(3,Xr,2,1,"span"),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.SpI(" ",e.i5U(2,2,"_i18n.CurrentIpAddressIsNotAllowed",e.eq3(5,Wr,t.ipAddress))," "),e.R7$(2),e.vxM(t.range?3:-1)}}function Jr(i,v){1&i&&e.nVh(0,Qr,3,7,"alert",5)(1,Ur,4,7,"alert",6),2&i&&e.vxM(v.isAllowed?0:1)}function Yr(i,v){if(1&i){const t=e.RV6();e.j41(0,"tr")(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td",4)(4,"button",7)(5,"app-trash-alt-solid-icon",8),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.removeIp(n))}),e.k0s()()()()}if(2&i){const t=v.$implicit;e.R7$(2),e.JRh(t)}}function zr(i,v){if(1&i&&(e.j41(0,"tr")(1,"td"),e.EFF(2),e.k0s(),e.nrm(3,"td",4),e.k0s()),2&i){const t=v.$implicit;e.R7$(2),e.JRh(t)}}var Je=function(i){return i[i.Everywhere=0]="Everywhere",i[i.Specific=1]="Specific",i}(Je||{});let Kr=(()=>{class i{modalService=(0,p.WQX)(L.B);route=(0,p.WQX)(M.nX);destroy$=(0,p.WQX)(p.abz);cd=(0,p.WQX)(re.gRc);consoleRestrictionsApiService=(0,p.WQX)(jt);fb=(0,p.WQX)(o.ok);ipAddressPipe=(0,p.WQX)(Rn);myPhoneService=(0,p.WQX)(Ee.gx);restrictions;form;checkBoxOptions=[{label:"_i18n.AllowAccessEverywhere",value:Je.Everywhere},{label:"_i18n.AllowAccessSpecificAddresses",value:Je.Specific}];additionalIp=["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","169.254.0.0/16","fe80::/10"];get enabledButton(){return this.form.value.AccessRestricted!==Je.Specific}constructor(){const t=this.fb;this.route.data.pipe((0,K.pQ)(this.destroy$)).subscribe(r=>{this.restrictions=r.consoleRestrictions,this.form=t.group({AccessRestricted:t.control(this.restrictions.AccessRestricted?Je.Specific:Je.Everywhere),IpWhiteList:t.control(this.restrictions.IpWhitelist??[])}),this.cd.markForCheck()})}add(){this.modalService.showComponent(wr,{initialState:{whiteLists:this.form.controls.IpWhiteList?.value??[],additionalIpList:this.additionalIp}}).subscribe({next:t=>{if(t.decision===he.R.Ok&&t.payload){const r=t.payload;r&&(this.form.controls.IpWhiteList?.patchValue([...this.form.controls.IpWhiteList.value??[],r],{emitEvent:!1}),this.form.markAsDirty(),this.cd.markForCheck())}}})}removeIp(t){const r=this.form.controls.IpWhiteList?.value?.filter(n=>n!==t);this.form.controls.IpWhiteList?.patchValue(r),this.form.markAsDirty()}updateConsoleRestrictions$(){return this.consoleRestrictionsApiService.updateConsoleRestrictions({pbxConsoleRestrictions:{AccessRestricted:this.form.value.AccessRestricted===Je.Specific,IpWhitelist:this.form.value.IpWhiteList??void 0}})}save$=()=>this.ipAddressPipe.transform(this.restrictions.MyIpAddress,this.form.value.IpWhiteList??void 0,this.form.value.AccessRestricted===Je.Specific).isAllowed?this.updateConsoleRestrictions$():this.modalService.confirmation("_i18n.UpdateConsoleRestrictionsWarning","_i18n.UpdateConsoleRestrictionsWarningHeader",{ip:this.restrictions.MyIpAddress}).pipe((0,_.n)(()=>this.updateConsoleRestrictions$()),(0,O.M)(()=>{this.myPhoneService.logout()}));static \u0275fac=function(r){return new(r||i)};
1static \u0275cmp=e.VBU({type:i,selectors:[["app-console-restriction"]],features:[e.Jv_([Rn])],decls:26,vars:21,consts:[["header","_i18n.ConsoleRestrictions","helpUrl","_i18n.AdvancedUri",3,"formGroup","save$"],["data-qa","phone-type","formControlName","AccessRestricted",3,"options"],["data-qa","add-btn","type","button",1,"btn","btn-primary","mb-3",3,"click","disabled"],[1,"scrollable-table"],[1,"actions"],["type","info",1,"fixed-width","d-block"],["type","danger",1,"fixed-width","d-block"],["type","button",1,"btn","btn-plain-sm","p-0","h-100"],[3,"click"]],template:function(r,n){if(1&r&&(e.j41(0,"edit-panel",0)(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"field-radio-group",1),e.nVh(5,Jr,2,1),e.nI1(6,"MyIpAddressPipe"),e.j41(7,"p"),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"button",2),e.bIt("click",function(){return n.add()}),e.nrm(11,"app-plus-solid-icon"),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"table",3)(15,"thead")(16,"tr")(17,"th"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.nrm(20,"th",4),e.k0s()(),e.j41(21,"tbody"),e.Z7z(22,Yr,6,1,"tr",null,e.fX1),e.Z7z(24,zr,4,1,"tr",null,e.fX1),e.k0s()()()),2&r){let s;e.Y8G("formGroup",n.form)("save$",n.save$),e.R7$(2),e.JRh(e.bMT(3,9,"_i18n.ConsoleRestrictionsDescription1")),e.R7$(2),e.Y8G("options",n.checkBoxOptions),e.R7$(),e.vxM((s=e.brH(6,11,n.restrictions.MyIpAddress,null==n.form.value?null:n.form.value.IpWhiteList,null==n.form.value?null:n.form.value.AccessRestricted))?5:-1,s),e.R7$(3),e.JRh(e.bMT(9,15,"_i18n.ConsoleRestrictionsDescription2")),e.R7$(2),e.Y8G("disabled",n.enabledButton),e.R7$(2),e.SpI(" ",e.bMT(13,17,"_i18n.Add")," "),e.R7$(6),e.JRh(e.bMT(19,19,"_i18n.IpMask")),e.R7$(4),e.Dyx(n.form.value.IpWhiteList),e.R7$(2),e.Dyx(n.additionalIp)}},dependencies:[A.Q,o.X1,o.BC,o.cb,o.j4,o.JD,Gr.u,An.Cy,Qe.K,De.d,se.D9,Rn],styles:[".fixed-width[_ngcontent-%COMP%]{max-width:500px}table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(odd){background:var(--bg-primary-darken)}"]})}return i})(),On=(()=>{class i extends N.d{createDNProperty(t,r="body"){const n=t?.dNPropertiesCreateDNPropertyRequestBody;if(null==n)throw new Error("Required parameter dNPropertiesCreateDNPropertyRequestBody was null or undefined when calling createDNProperty.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/DNProperties/Pbx.CreateDNProperty`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}createDNPropertyQuery(t,r="body",n=!1,s){if(null==t.dNPropertiesCreateDNPropertyRequestBody)throw new Error("Required parameter dNPropertiesCreateDNPropertyRequestBody was null or undefined when calling createDNProperty.");return"/DNProperties/Pbx.CreateDNProperty"}deleteDNProperty(t,r="body"){const n=t?.dNPropertiesDeleteDNPropertyRequestBody;if(null==n)throw new Error("Required parameter dNPropertiesDeleteDNPropertyRequestBody was null or undefined when calling deleteDNProperty.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/DNProperties/Pbx.DeleteDNProperty`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}deleteDNPropertyQuery(t,r="body",n=!1,s){if(null==t.dNPropertiesDeleteDNPropertyRequestBody)throw new Error("Required parameter dNPropertiesDeleteDNPropertyRequestBody was null or undefined when calling deleteDNProperty.");return"/DNProperties/Pbx.DeleteDNProperty"}getDNPropertyByName(t,r="body"){const n=t?.dnNumber;if(null==n)throw new Error("Required parameter dnNumber was null or undefined when calling getDNPropertyByName.");const s=t?.name;if(null==s)throw new Error("Required parameter name was null or undefined when calling getDNPropertyByName.");let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let b=`/DNProperties/Pbx.GetDNPropertyByName(dnNumber=${this.configuration.encodeParam({name:"dnNumber",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},name=${this.configuration.encodeParam({name:"name",value:s,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:$,withCredentials:k}=this.configuration;return this.httpClient.request("get",`${$}${b}`,{responseType:h,...k?{withCredentials:k}:{},headers:a,observe:r})}getDNPropertyByNameQuery(t,r="body",n=!1,s){const a=t.dnNumber;if(null==a)throw new Error("Required parameter dnNumber was null or undefined when calling getDNPropertyByName.");const m=t.name;if(null==m)throw new Error("Required parameter name was null or undefined when calling getDNPropertyByName.");return`/DNProperties/Pbx.GetDNPropertyByName(dnNumber=${this.configuration.encodeParam({name:"dnNumber",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},name=${this.configuration.encodeParam({name:"name",value:m,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}getPropertiesByDn(t,r="body"){const n=t?.dnNumber;if(null==n)throw new Error("Required parameter dnNumber was null or undefined when calling getPropertiesByDn.");const s=t?.$top,a=t?.$skip,m=t?.$search,h=t?.$filter,b=t?.$count,$=t?.$select,k=t?.$orderby,y=t?.$expand;let E=new c.rx(this.encoder);E=this.addToHttpParams(E,"$top",s,c.l2.Form,!1),E=this.addToHttpParams(E,"$skip",a,c.l2.Form,!1),E=this.addToHttpParams(E,"$search",m,c.l2.Form,!1),E=this.addToHttpParams(E,"$filter",h,c.l2.Form,!1),E=this.addToHttpParams(E,"$count",b,c.l2.Form,!1),E=this.addToHttpParams(E,"$select",$,c.l2.Form,!1),E=this.addToHttpParams(E,"$orderby",k,c.l2.Form,!1),E=this.addToHttpParams(E,"$expand",y,c.l2.Form,!1);let S=this.defaultHeaders;S=this.configuration.addCredentialToHeaders("Application","Authorization",S,"Bearer ");const J=this.configuration.selectHeaderAccept(["application/json"]);void 0!==J&&(S=S.set("Accept",J));let ie="json";J&&(ie=J.startsWith("text")?"text":this.configuration.isJsonMime(J)?"json":"blob");let le=`/DNProperties/Pbx.GetPropertiesByDn(dnNumber=${this.configuration.encodeParam({name:"dnNumber",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:de,withCredentials:yr}=this.configuration;return this.httpClient.request("get",`${de}${le}`,{params:E.toHttpParams(),responseType:ie,...yr?{withCredentials:yr}:{},headers:S,observe:r})}getPropertiesByDnQuery(t,r="body",n=!1,s){const a=t.dnNumber;if(null==a)throw new Error("Required parameter dnNumber was null or undefined when calling getPropertiesByDn.");
1const m=t.$top,h=t.$skip,b=t.$search,$=t.$filter,k=t.$count,y=t.$select,E=t.$orderby,S=t.$expand;let J=new c.rx(this.encoder);return J=this.addToHttpParams(J,"$top",m,c.l2.Form,!1),J=this.addToHttpParams(J,"$skip",h,c.l2.Form,!1),J=this.addToHttpParams(J,"$search",b,c.l2.Form,!1),J=this.addToHttpParams(J,"$filter",$,c.l2.Form,!1),J=this.addToHttpParams(J,"$count",k,c.l2.Form,!1),J=this.addToHttpParams(J,"$select",y,c.l2.Form,!1),J=this.addToHttpParams(J,"$orderby",E,c.l2.Form,!1),J=this.addToHttpParams(J,"$expand",S,c.l2.Form,!1),`/DNProperties/Pbx.GetPropertiesByDn(dnNumber=${this.configuration.encodeParam({name:"dnNumber",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+J.toString()}updateDNProperty(t,r="body"){const n=t?.dNPropertiesUpdateDNPropertyRequestBody;if(null==n)throw new Error("Required parameter dNPropertiesUpdateDNPropertyRequestBody was null or undefined when calling updateDNProperty.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/DNProperties/Pbx.UpdateDNProperty`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}updateDNPropertyQuery(t,r="body",n=!1,s){if(null==t.dNPropertiesUpdateDNPropertyRequestBody)throw new Error("Required parameter dNPropertiesUpdateDNPropertyRequestBody was null or undefined when calling updateDNProperty.");return"/DNProperties/Pbx.UpdateDNProperty"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Vn=l(18810),Gn=l(93049);let Zr=(()=>{class i extends Se.m{cd=(0,p.WQX)(re.gRc);xapiError=(0,p.WQX)(Be.Ko);parameter;saveParameter$;buttons=he.P.OkCancel;form=new o.gE({Name:new o.MJ("",{nonNullable:!0,validators:o.k0.required}),Description:new o.MJ("",{nonNullable:!0}),Value:new o.MJ("",{nonNullable:!0})});validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);get isNew(){return void 0===this.parameter?.Id}ngOnInit(){this.parameter&&this.form.setValue({Name:this.parameter.Name||"",Description:this.parameter.Description||"",Value:this.parameter.Value||""}),(0,Y.TZ)(this.form.controls.Name,!this.parameter?.Name)}submit$=()=>this.saveParameter$({Id:this.parameter.Id,...this.form.value,Name:this.form.controls.Name.value}).pipe((0,te.Pr)("_i18n.ParameterNotFoundErrorMessage",this.form.controls.Name.value),(0,P.W)(t=>{if(!this.xapiError.error(this.cd,t,this.form,!1,!1))throw t;return Fn.w}));static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-add-edit-parameter"]],inputs:{parameter:"parameter",saveParameter$:"saveParameter$"},features:[e.Vt3],decls:8,vars:6,consts:[[3,"submitted","buttons","header","formGroup","validateBeforeSubmit","submit$"],["label","_i18n.Name","formControlName","Name","data-qa","parameter-name"],["controlName","Name"],["label","_i18n.Description","formControlName","Description","data-qa","parameter-description"],["controlName","Description"],["label","_i18n.Value"],["formControlName","Value","data-qa","parameter-value",1,"form-control",3,"keydown.enter","maxlength"],["controlName","Value"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"field-input",1),e.nrm(2,"val-errors",2),e.k0s(),e.j41(3,"field-input",3),e.nrm(4,"val-errors",4),e.k0s(),e.j41(5,"field-wrapper",5)(6,"textarea",6),e.bIt("keydown.enter",function(a){return a.stopPropagation()}),e.k0s(),e.nrm(7,"val-errors",7),e.k0s()()),2&r&&(e.Y8G("buttons",n.buttons)("header",n.isNew?"_i18n.AddCustomParameter":"_i18n.EditCustomParameter")("formGroup",n.form)("validateBeforeSubmit",n.validateBeforeSubmit)("submit$",n.submit$),e.R7$(6),e.Y8G("maxlength",131072))},dependencies:[$e.p,o.X1,o.me,o.BC,o.cb,o.tU,o.j4,o.JD,X.m,G.IH,je.z],encapsulation:2})}return i})();var qr=l(2275);const ei=["*"];function ti(i,v){if(1&i){const t=e.RV6();e.j41(0,"tr",10),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG(3);return p.Njj(s.edit(n))}),e.j41(1,"td")(2,"span",11),e.EFF(3),e.k0s()(),e.j41(4,"td",12)(5,"span",11),e.EFF(6),e.k0s()(),e.j41(7,"td",12)(8,"app-simple-copy",13)(9,"span",11),e.EFF(10),e.k0s()()(),e.j41(11,"td",6)(12,"button",14),e.bIt("click",function(n){const s=p.eBV(t).$implicit,a=e.XpG(3);return n.stopPropagation(),p.Njj(a.delete(s))}),e.nrm(13,"app-trash-alt-solid-icon"),e.k0s()()()}if(2&i){const t=v.$implicit;e.R7$(3),e.JRh(t.Name),e.R7$(3),e.JRh(t.Description),e.R7$(2),e.Y8G("source",t.Value)("iconFirst",!0),e.R7$(2),e.JRh(t.Value)}}function ni(i,v){1&i&&(e.j41(0,"tbody"),e.Z7z(1,ti,14,5,"tr",9,e.fX1),e.k0s()),2&i&&(e.R7$(),e.Dyx(v.value))}function ri(i,v){if(1&i){const t=e.RV6();e.j41(0,"div",0)(1,"table",1)(2,"thead")(3,"tr")(4,"th",2),e.SdG(5),e.nrm(6,"search-bar",3),e.k0s()(),e.j41(7,"tr")(8,"th",4),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.j41(11,"th",5),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"th",5),e.EFF(15),e.nI1(16,"translate"),e.k0s(),e.nrm(17,"th",6),e.k0s()(),e.nVh(18,ni,3,0,"tbody"),e.nI1(19,"async"),e.j41(20,"tfoot")(21,"tr")(22,"td",7)(23,"app-paging",8),e.nI1(24,"async"),e.nI1(25,"async"),e.nI1(26,"async"),e.bIt("pageChanged",function(n){p.eBV(t);const s=e.XpG();return p.Njj(s.pager.pageChanged(n))}),e.k0s()()()()()()}if(2&i){let t;const r=e.XpG();e.R7$(6),e.Y8G("formControl",r.pager.search),e.R7$(3),e.JRh(e.bMT(10,9,"_i18n.Name")),e.R7$(3),e.JRh(e.bMT(13,11,"_i18n.Description")),e.R7$(3),e.JRh(e.bMT(16,13,"_i18n.Value")),e.R7$(3),e.vxM((t=e.bMT(19,15,r.pager.pagedItems$))?18:-1,t),e.R7$(5),e.Y8G("currentPage",e.bMT(24,17,r.pager.currentPage$))("itemsPerPage",e.bMT(25,19,r.pager.pageSize$))("totalItems",e.bMT(26,21,r.pager.totalCount$))("showBoundaryLinks",!0)}}let ii=(()=>{class i{modalService=(0,p.WQX)(L.B);pager;saveParameter$;deleteParameter$;add(){this.edit({Name:"",Description:"",Value:""})}edit(t){this.modalService.showDialog(Zr,{parameter:t,saveParameter$:this.saveParameter$}).pipe(te.nx).subscribe(()=>this.pager.refresh$.next())}delete(t){(0,Z.qq)(this.modalService).pipe((0,_.n)(()=>this.deleteParameter$(t)),(0,te.Tg)(this.modalService)).subscribe(()=>this.pager.refresh$.next())}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-parameter-properties"]
1],inputs:{pager:"pager",saveParameter$:"saveParameter$",deleteParameter$:"deleteParameter$"},ngContentSelectors:ei,decls:1,vars:1,consts:[[1,"h-100","scrollable"],[1,"scrollable-table"],["colspan","4",1,"fw-normal","py-0"],[1,"border-0",3,"formControl"],[1,"col-size-md-300"],[1,"md-visible","minw-px-100"],[1,"actions"],["colspan","4"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],[1,"clickable"],[1,"clickable",3,"click"],[1,"line-clamp-1"],[1,"md-visible"],["tooltipContainer","body",3,"source","iconFirst"],["type","button",1,"btn","btn-plain-sm",3,"click"]],template:function(r,n){1&r&&(e.NAR(),e.nVh(0,ri,27,23,"div",0)),2&r&&e.vxM(n.pager?0:-1)},dependencies:[d.L,o.X1,o.BC,o.l_,qr.T,De.d,xe.u4,se.D9,W.Jj],styles:["search-bar[_ngcontent-%COMP%]{height:calc(var(--aside-folded-nav-height) - 1px)}"]})}return i})(),Wn=(()=>{class i{parametersApiService=(0,p.WQX)(ft);resolveData(t=1,r=100,n=""){return this.parametersApiService.listParameter({$count:!0,$search:(0,Ne.Bj)(n),$skip:(t-1)*r,$top:r}).pipe((0,C.T)(s=>({value:s.value?.map(a=>({...a,isSelected:!1})),totalItems:s["@odata.count"]})))}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac})}return i})(),Xn=(()=>{class i{dnPropertiesApiService=(0,p.WQX)(On);resolveData(t=1,r=100,n="",s=""){return s?this.dnPropertiesApiService.getPropertiesByDn({dnNumber:s,$count:!0,$search:(0,Ne.Bj)(n),$skip:(t-1)*r,$top:r}).pipe((0,C.T)(a=>({value:a.value?.map(m=>({...m,isSelected:!1})),totalItems:a["@odata.count"]}))):(0,q.of)({value:[],totalItems:0})}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac})}return i})();var ai=l(70152),oi=l(79737);let si=(()=>{class i{static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-trademark-solid-icon"],["","app-trademark-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 640 512"],["d","M345.6 108.8c-8.3-11-22.7-15.5-35.7-11.2S288 114.2 288 128V384c0 17.7 14.3 32 32 32s32-14.3 32-32V224l86.4 115.2c6 8.1 15.5 12.8 25.6 12.8s19.6-4.7 25.6-12.8L576 224V384c0 17.7 14.3 32 32 32s32-14.3 32-32V128c0-13.8-8.8-26-21.9-30.4s-27.5 .1-35.7 11.2L464 266.7 345.6 108.8zM0 128c0 17.7 14.3 32 32 32H96V384c0 17.7 14.3 32 32 32s32-14.3 32-32V160h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32C14.3 96 0 110.3 0 128z"]],template:function(r,n){1&r&&(p.qSk(),e.rj2(0,"svg",0),e.Hgh(1,"path",1),e.eux())},encapsulation:2})}return i})();var lt=l(13816),Un=l(12678),li=l(61851);const di=["customProperties"],ci=["dnProperties"];function pi(i,v){1&i&&(e.j41(0,"button",4),e.nrm(1,"app-trademark-solid-icon"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&i&&(e.R7$(3),e.JRh(e.bMT(4,1,"_i18n.Credits")))}function ui(i,v){1&i&&e.nrm(0,"app-tab-heading",10)}function mi(i,v){1&i&&e.nrm(0,"app-tab-heading",14)}function fi(i,v){if(1&i){const t=e.RV6();e.j41(0,"tab",11),e.bIt("selectTab",function(){p.eBV(t);const n=e.XpG();return p.Njj(n.selectTab("dn"))}),e.DNE(1,mi,1,0,"ng-template",7),e.j41(2,"app-parameter-properties",8,1)(4,"div",12),e.nrm(5,"app-dn-select",13),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(2),e.Y8G("pager",t.dnPropertiesPager)("saveParameter$",t.saveDnProperty$)("deleteParameter$",t.deleteDnProperty$),e.R7$(3),e.Y8G("hideHotdesking",!1)("autoOpen",!0)("searchDnTypes",t.searchDnTypes)("formControl",t.dnPropertiesDn)}}let hi=(()=>{class i{parametersApiService=(0,p.WQX)(ft);dnPropertiesApiService=(0,p.WQX)(On);cd=(0,p.WQX)(re.gRc);activeTab="custom";isMCM=!1;customPropertiesPager;firstDn;isExtraParamsAccessible;dnPropertiesDn;dnPropertiesPager;searchDnTypes;customProperties;dnProperties;constructor(){const t=(0,p.WQX)(Wn,{self:!0}),r=(0,p.WQX)(Xn,{self:!0}),n=(0,p.WQX)(M.nX),s=(0,p.WQX)(p.abz),a=(i=>i.snapshot.data.data)(n);this.firstDn=a.firstDn,this.isExtraParamsAccessible=a.isExtraParamsAccessible,this.dnPropertiesDn=new o.MJ(this.firstDn||null),this.customPropertiesPager=new We.f(s,t,void 0,100),this.dnPropertiesPager=new We.f(s,r,void 0,100,this.firstDn?.Number??void 0),this.dnPropertiesDn.valueChanges.pipe((0,ai.B)(700),(0,K.pQ)(s)).subscribe(m=>{m&&this.dnPropertiesPager.filterChanged(m.Number)}),this.isMCM=n.snapshot.data.isMultiCompanyMode&&(0,oi.Th)(a.myToken.myRole)}get dnNumber(){return this.dnPropertiesDn.value?.Number}selectTab(t){this.activeTab=t,this.cd.markForCheck()}addParameter(){("custom"===this.activeTab?this.customProperties:this.dnProperties).add()}saveCustomParameter$=t=>void 0!==t.Id?this.parametersApiService.updateParameter({id:t.Id,pbxParameter:t}):this.parametersApiService.createParameter({pbxParameter:t});saveDnProperty$=t=>this.dnNumber?void 0!==t.Id?this.dnPropertiesApiService.updateDNProperty({dNPropertiesUpdateDNPropertyRequestBody:{dnNumber:this.dnNumber,property:t}}):this.dnPropertiesApiService.createDNProperty({dNPropertiesCreateDNPropertyRequestBody:{dnNumber:this.dnNumber,property:t}}):(0,Vn.$)(()=>new Error("No DN selected"));deleteCustomParameter$=t=>this.parametersApiService.deleteParameter({id:t.Id}).pipe((0,te.Y$)());deleteDnProperty$=t=>this.dnNumber?this.dnPropertiesApiService.deleteDNProperty({dNPropertiesDeleteDNPropertyRequestBody:{dnNumber:this.dnNumber,propertyName:t.Name}}):(0,Vn.$)(()=>new Error("No DN selected"));static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-parameters"]],viewQuery:function(r,n){if(1&r&&e.GBs(di,5)(ci,5),2&r){let s;e.mGM(s=e.lsd())&&(n.customProperties=s.first),e.mGM(s=e.lsd())&&(n.dnProperties=s.first)}},features:[e.Jv_([Wn,Xn])],decls:9,vars:6,consts:[["customProperties",""],["dnProperties",""],["header","_i18n.Parameters",3,"helpUrl"],["header","","text","_i18n.Add",3,"click"],["help","","data-qa","credits","type","button","routerLink","../credits",1,"btn","btn-primary","help-btn"],[1,"scrollable"],["id","custom-parameters",3,"selectTab"],["tabHeading",""],[3,"pager","saveParameter$","deleteParameter$"],["id","dn-properties"],["label","_i18n.CustomParameters"],["id","dn-properties",3,"selectTab"],[1,"mt-2"],["data-qa","search-member","placeholder","_i18n.EnterNameExtensionQueue",3,"hideHotdesking","autoOpen","searchDnTypes","formControl"],["label","_i18n.DnProperties"]
1],template:function(r,n){1&r&&(e.j41(0,"app-page",2)(1,"app-button-add",3),e.bIt("click",function(){return n.addParameter()}),e.k0s(),e.nVh(2,pi,5,3,"button",4),e.j41(3,"tabset",5)(4,"tab",6),e.bIt("selectTab",function(){return n.selectTab("custom")}),e.DNE(5,ui,1,0,"ng-template",7),e.nrm(6,"app-parameter-properties",8,0),e.k0s(),e.nVh(8,fi,6,7,"tab",9),e.k0s()()),2&r&&(e.Y8G("helpUrl","_i18n.AdvancedUri"),e.R7$(2),e.vxM(n.isMCM?-1:2),e.R7$(4),e.Y8G("pager",n.customPropertiesPager)("saveParameter$",n.saveCustomParameter$)("deleteParameter$",n.deleteCustomParameter$),e.R7$(2),e.vxM(n.isExtraParamsAccessible?8:-1))},dependencies:[ve.H,Nn.j,Gn.Wk,si,lt.fw,lt.V6,lt.Bh,Un.b,ii,li.A,o.X1,o.BC,o.l_,se.D9],styles:[".value[_ngcontent-%COMP%]{color:var(--text-primary);background-color:var(--background);width:100%;padding:.375rem .75rem}tabset[_ngcontent-%COMP%]{display:flex;flex-direction:column}tabset[_ngcontent-%COMP%]     .nav-tabs{padding:0 var(--spacer);margin:0}tabset[_ngcontent-%COMP%]     .tab-content, tabset[_ngcontent-%COMP%]   tab.active[_ngcontent-%COMP%], tabset[_ngcontent-%COMP%]   app-parameter-properties[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}"],changeDetection:0})}return i})();const bi=(i,v)=>v.id;function gi(i,v){if(1&i&&e.nrm(0,"app-tab-heading",4),2&i){const t=e.XpG().$implicit;e.Y8G("label",t.header)}}function vi(i,v){if(1&i){const t=e.RV6();e.SS7(0),e.j41(1,"tab",2),e.bIt("selectTab",function(){const n=p.eBV(t).$implicit,s=e.r8f(0),a=e.XpG();return p.Njj(a.navigate(n.id,s()))}),e.DNE(2,gi,1,1,"ng-template",3),e.k0s()}if(2&i){const t=v.$implicit,r=e.bH3(e.XpG().makeForTab(t.id));e.R7$(),e.Y8G("active",r())}}let yi=(()=>{class i{tabs=[{id:"phone",header:"_i18n.PhoneTemplates"},{id:"fxs",header:"_i18n.Category.fxs"},{id:"provider",header:"_i18n.ProviderTemplates"},{id:"gateway",header:"_i18n.GatewayTemplates"},{id:"email",header:"_i18n.EmailTemplates"}];router=(0,p.WQX)(M.Ix);route=(0,p.WQX)(M.nX);makeForTab(t){const r=this.router.createUrlTree([t],{relativeTo:this.route});return(0,M.$m)(r,this.router,{paths:"subset",queryParams:"ignored",matrixParams:"ignored",fragment:"ignored"})}navigate(t,r){r||this.router.navigate([t],{relativeTo:this.route})}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-templates-main"]],decls:5,vars:1,consts:[["header","_i18n.Templates",3,"helpUrl"],["id","phone",3,"active"],["id","phone",3,"selectTab","active"],["tabHeading",""],[3,"label"]],template:function(r,n){1&r&&(e.j41(0,"app-page",0)(1,"tabset"),e.Z7z(2,vi,3,2,"tab",1,bi),e.k0s(),e.nrm(4,"router-outlet"),e.k0s()),2&r&&(e.Y8G("helpUrl","_i18n.AdvancedUri"),e.R7$(2),e.Dyx(n.tabs))},dependencies:[ve.H,lt.fw,lt.V6,lt.Bh,Un.b,M.n3],encapsulation:2,changeDetection:0})}return i})(),Jn=(()=>{class i extends N.d{getEmailTemplate(t,r="body"){const n=t?.templatePath;if(null==n)throw new Error("Required parameter templatePath was null or undefined when calling getEmailTemplate.");const s=t?.$select,a=t?.$expand;let m=new c.rx(this.encoder);m=this.addToHttpParams(m,"$select",s,c.l2.Form,!1),m=this.addToHttpParams(m,"$expand",a,c.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const b=this.configuration.selectHeaderAccept(["application/json"]);void 0!==b&&(h=h.set("Accept",b));let $="json";b&&($=b.startsWith("text")?"text":this.configuration.isJsonMime(b)?"json":"blob");let k=`/EmailTemplate(${this.configuration.encodeParam({name:"templatePath",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${y}${k}`,{params:m.toHttpParams(),responseType:$,...E?{withCredentials:E}:{},headers:h,observe:r})}getEmailTemplateQuery(t,r="body",n=!1,s){const a=t.templatePath;if(null==a)throw new Error("Required parameter templatePath was null or undefined when calling getEmailTemplate.");const m=t.$select,h=t.$expand;let b=new c.rx(this.encoder);return b=this.addToHttpParams(b,"$select",m,c.l2.Form,!1),b=this.addToHttpParams(b,"$expand",h,c.l2.Form,!1),`/EmailTemplate(${this.configuration.encodeParam({name:"templatePath",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+b.toString()}listEmailTemplate(t,r="body"){const n=t?.$top,s=t?.$skip,a=t?.$search,m=t?.$filter,h=t?.$count,b=t?.$orderby,$=t?.$select,k=t?.$expand;let y=new c.rx(this.encoder);y=this.addToHttpParams(y,"$top",n,c.l2.Form,!1),y=this.addToHttpParams(y,"$skip",s,c.l2.Form,!1),y=this.addToHttpParams(y,"$search",a,c.l2.Form,!1),y=this.addToHttpParams(y,"$filter",m,c.l2.Form,!1),y=this.addToHttpParams(y,"$count",h,c.l2.Form,!1),y=this.addToHttpParams(y,"$orderby",b,c.l2.Form,!1),y=this.addToHttpParams(y,"$select",$,c.l2.Form,!1),y=this.addToHttpParams(y,"$expand",k,c.l2.Form,!1);let E=this.defaultHeaders;E=this.configuration.addCredentialToHeaders("Application","Authorization",E,"Bearer ");const S=this.configuration.selectHeaderAccept(["application/json"]);void 0!==S&&(E=E.set("Accept",S));let J="json";S&&(J=S.startsWith("text")?"text":this.configuration.isJsonMime(S)?"json":"blob");const{basePath:le,withCredentials:de}=this.configuration;return this.httpClient.request("get",`${le}/EmailTemplate`,{params:y.toHttpParams(),responseType:J,...de?{withCredentials:de}:{},headers:E,observe:r})}listEmailTemplateQuery(t,r="body",n=!1,s){const a=t.$top,m=t.$skip,h=t.$search,b=t.$filter,$=t.$count,k=t.$orderby,y=t.$select,E=t.$expand;let S=new c.rx(this.encoder);return S=this.addToHttpParams(S,"$top",a,c.l2.Form,!1),S=this.addToHttpParams(S,"$skip",m,c.l2.Form,!1),S=this.addToHttpParams(S,"$search",h,c.l2.Form,!1),S=this.addToHttpParams(S,"$filter",b,c.l2.Form,!1),S=this.addToHttpParams(S,"$count",$,c.l2.Form,!1),S=this.addToHttpParams(S,"$orderby",k,c.l2.Form,!1),S=this.addToHttpParams(S,"$select",y,c.l2.Form,!1),S=this.addToHttpParams(S,"$expand",E,c.l2.Form,!1),"/EmailTemplate?"+S.toString()}setDefault(t,r="body"){const n=t?.templatePath;if(null==n)throw new Error("Required parameter templatePath was null or undefined when calling setDefault.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));let m="json";a&&(m=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");let h=`/EmailTemplate(${this.configuration.encodeParam({name:"templatePath",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})/Pbx.SetDefault`;const{basePath:b,withCredentials:$}=this.configuration;return this.httpClient.request("post",`${b}${h}`,{responseType:m,...$?{withCredentials:$}:{},headers:s,observe:r})}setDefaultQuery(t,r="body",n=!1,s){const a=t.templatePath;if(null==a)throw new Error("Required parameter templatePath was null or undefined when calling setDefault.");return`/EmailTemplate(${this.configuration.encodeParam({name:"templatePath",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})/Pbx.SetDefault`}updateEmailTemplate(t,r="body"){const n=t?.templatePath;if(null==n)throw new Error("Required parameter templatePath was null or undefined when calling updateEmailTemplate.");const s=t?.pbxEmailTemplate;if(null==s)throw new Error("Required parameter pbxEmailTemplate was null or undefined when calling updateEmailTemplate.");let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));const b=this.configuration.selectHeaderContentType(["application/json"]);void 0!==b&&(a=a.set("Content-Type",b));let $="json";m&&($=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let k=`/EmailTemplate(${this.configuration.encodeParam({name:"templatePath",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("patch",`${y}${k}`,{body:s,responseType:$,...E?{withCredentials:E}:{},headers:a,observe:r})}updateEmailTemplateQuery(t,r="body",n=!1,s){const a=t.templatePath;if(null==a)throw new Error("Required parameter templatePath was null or undefined when calling updateEmailTemplate.");if(null==t.pbxEmailTemplate)throw new Error("Required parameter pbxEmailTemplate was null or undefined when calling updateEmailTemplate.");return`/EmailTemplate(${this.configuration.encodeParam({name:"templatePath",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Yn=l(18530),kn=l(70980),En=l(50644),Me=l(72510),zn=l(85968),Kn=l(56699),Ci=l(23773);function _i(i,v){1&i&&(e.j41(0,"span"),e.EFF(1,"[custom]"),e.k0s())}function Ti(i,v){if(1&i&&(e.EFF(0),e.nVh(1,_i,2,0,"span")),2&i){const t=v.item,r=e.XpG();e.SpI(" ",r.getTemplateName(t)," "),e.R7$(),e.vxM(t.IsDefault?-1:1)}}function xi(i,v){1&i&&e.nrm(0,"field-input",6),2&i&&e.Y8G("maxlength",50)}let Si=(()=>{class i{emailTemplateService=(0,p.WQX)(Jn);xapiErrorService=(0,p.WQX)(Be.Ko);cd=(0,p.WQX)(re.gRc);modalService=(0,p.WQX)(L.B);fb=(0,p.WQX)(o.ok);isLab=(0,Ci.D)();templates;saving=!1;template=new o.MJ(null);templateForm=this.fb.group({IsDefault:this.fb.control(!1),Body:this.fb.control("",[o.k0.required]),From:this.fb.control(""),Subject:this.fb.control("")});reload$=new Yn.B;constructor(){const t=this.emailTemplateService,r=(0,p.WQX)(M.nX),n=this.cd,s=(0,p.WQX)(p.abz);this.templates=r.snapshot.data.emailTemplates??[],this.isLab()||(this.templates=this.templates.filter(a=>"MAILTEMPLATE_AUTOLOGOUT"!==a.TemplatePath)),this.template.valueChanges.pipe((0,En.lc)(this.reload$),(0,_.n)(a=>a?t.getEmailTemplate({templatePath:a.TemplatePath}).pipe((0,P.W)(()=>(0,q.of)(null))):(0,q.of)(null)),(0,K.pQ)(s)).subscribe({next:a=>{n.markForCheck(),a&&(this.setDefaultForListTpl(!!a.IsDefault,a.TemplatePath),this.templateForm.setValue({IsDefault:a.IsDefault??!0,Body:a.Body??null,From:a.From??null,Subject:a.Subject??null}),this.templateForm.markAsPristine())}}),this.template.setValue(this.templates[0])}templateSearch=(t,r)=>this.getTemplateName(r).toLowerCase().includes(t.toLowerCase());getTemplateName(t){return t.Name??t.TemplatePath??"N/A"}get isWebmeetingTemplate(){return!!this.template.value?.IsConference}setSaving(t){this.cd.markForCheck(),this.saving=t}reset(){const t=this.template.value;this.templateForm.value.IsDefault||!t||this.saving||(this.setSaving(!0),this.emailTemplateService.setDefault({templatePath:t.TemplatePath}).pipe((0,kn.j)(()=>this.setSaving(!1))).subscribe({next:()=>this.reload$.next(),error:r=>this.modalService.error(r)}))}save(){const t=this.template.value;
1if(this.templateForm.pristine||this.templateForm.invalid||this.saving||!t)return;const r=this.templateForm.value;this.setSaving(!0),this.emailTemplateService.updateEmailTemplate({templatePath:t.TemplatePath,pbxEmailTemplate:{Subject:r.Subject,From:r.From,Body:r.Body}}).pipe((0,kn.j)(()=>this.setSaving(!1))).subscribe({next:()=>{this.setDefaultForListTpl(!1,t.TemplatePath),this.templateForm.patchValue({IsDefault:!1}),this.templateForm.markAsPristine()},error:n=>this.xapiErrorService.error(this.cd,n,this.templateForm,!1)})}setDefaultForListTpl(t,r){const n=this.templates.find(s=>s.TemplatePath===r);n&&(n.IsDefault=t)}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-email-templates"]],decls:17,vars:18,consts:[[1,"mb-2",3,"formControl","items","searchFn","clearable"],["ng-label-tmp","","ng-option-tmp",""],["data-qa","email",3,"ngSubmit","formGroup"],[1,"d-flex","flex-wrap","pt-2","pb-2","gap-2"],["id","btnSave","data-qa","save","type","submit",1,"btn","btn-primary",3,"disabled"],["data-qa","reset","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","from","label","_i18n.EmailFrom","formControlName","From",3,"maxlength"],["data-qa","subject","formControlName","Subject",3,"label"],["data-qa","body","formControlName","Body",3,"label","mode","readOnly"]],template:function(r,n){1&r&&(e.j41(0,"ng-select",0),e.DNE(1,Ti,2,2,"ng-template",1),e.k0s(),e.j41(2,"form",2),e.bIt("ngSubmit",function(){return n.save()}),e.j41(3,"div",3)(4,"button",4),e.nrm(5,"app-save-solid-icon"),e.j41(6,"span"),e.EFF(7),e.nI1(8,"translate"),e.k0s()(),e.j41(9,"button",5),e.bIt("click",function(){return n.reset()}),e.nrm(10,"app-trash-alt-solid-icon"),e.j41(11,"span"),e.EFF(12),e.nI1(13,"translate"),e.k0s()()(),e.nVh(14,xi,1,1,"field-input",6),e.nrm(15,"field-input",7)(16,"app-ace",8),e.k0s()),2&r&&(e.Y8G("formControl",n.template)("items",n.templates)("searchFn",n.templateSearch)("clearable",!1),e.R7$(2),e.Y8G("formGroup",n.templateForm),e.R7$(2),e.Y8G("disabled",n.templateForm.pristine||n.templateForm.invalid),e.R7$(3),e.JRh(e.bMT(8,14,"_i18n.Save")),e.R7$(2),e.Y8G("disabled",n.templateForm.value.IsDefault),e.R7$(3),e.JRh(e.bMT(13,16,"_i18n.Reset")),e.R7$(2),e.vxM(n.isWebmeetingTemplate?-1:14),e.R7$(),e.Y8G("label","_i18n.Subject"),e.R7$(),e.Y8G("label","_i18n.Body")("mode","html")("readOnly",!1))},dependencies:[Me.vr,o.X1,o.qT,o.BC,o.cb,o.tU,o.l_,o.j4,o.JD,Me.ZZ,Me.Uq,zn.x,De.d,X.m,Kn.x,se.D9],encapsulation:2,changeDetection:0})}return i})();var Zn=l(7881),Mn=l(23994),qn=l(59549),Ii=l(82971),Fi=l(19724),er=l(28793),tr=l(96697),nr=l(77780),Ri=l(34101),xt=l(53909),Ai=l(6581);let rr=(()=>{class i extends He.z{langService=(0,p.WQX)(Ai.m);parse(t){return t?.split(",").map(r=>r.trim()).filter(r=>r)??[]}format(t){return t.join(",")}countryOptions;ngOnInit(){const t=this.langService.getSelectedLanguage(this.langService.localStorageLang()).id;this.countryOptions=[...Object.entries(Ri.h).map(([r,n])=>({id:r,name:n[t]??n.en})),{id:xt.n6,name:"Worldwide"}]}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-template-country-visibility"]],features:[e.Jv_([{provide:o.kq,multi:!0,useExisting:i}]),e.Vt3],decls:8,vars:13,consts:[[3,"ngModelChange","items","bindValue","bindLabel","multiple","hideSelected","closeOnSelect","ngModel"]],template:function(r,n){1&r&&(e.j41(0,"legend"),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.j41(3,"p"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"field-wrapper")(7,"ng-select",0),e.bIt("ngModelChange",function(a){return n.valueChanged(a)}),e.k0s()()),2&r&&(e.R7$(),e.JRh(e.bMT(2,9,"_i18n.RegionalCountryVisibility")),e.R7$(3),e.JRh(e.bMT(5,11,"_i18n.RegionalCountryVisibilityDesc")),e.R7$(3),e.Y8G("items",n.countryOptions)("bindValue","id")("bindLabel","name")("multiple",!0)("hideSelected",!0)("closeOnSelect",!1)("ngModel",n.value))},dependencies:[o.YN,o.BC,o.vS,Me.vr,je.z,se.D9],encapsulation:2,changeDetection:0})}return i})();const ki=i=>({p1:i});function Ei(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.SpI("",e.bMT(1,1,"_i18n.OnlyAlphanumericDotAndUnderscoreAllowedAndDot")," ")}
1function Mi(i,v){1&i&&e.nrm(0,"app-template-country-visibility",4)(1,"app-template-configuration-options",5)}function Di(i,v){if(1&i&&(e.j41(0,"legend"),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.nrm(3,"field-checkbox",6),e.nI1(4,"translate")),2&i){const t=e.XpG();e.R7$(),e.JRh(e.bMT(2,3,"_i18n.TemplateMigration")),e.R7$(2),e.Y8G("label",e.i5U(4,5,"_i18n.SwitchTrunksToCustomTemplate",e.eq3(8,ki,t.usedTrunksCount)))("description","_i18n.SwitchTrunksToCustomTemplateDesc")}}let Bi=(()=>{class i extends Se.m{cd=(0,p.WQX)(re.gRc);xapiErrorService=(0,p.WQX)(Be.Ko);fb=(0,p.WQX)(o.ok);country;tags;usedTrunksCount;provider;header;originalName="";usedIds;saveAction$;buttons=he.P.OkCancel;form=this.fb.nonNullable.group({Id:this.fb.nonNullable.control("",[o.k0.required,fe.XD,t=>this.usedIds?.includes(t.value)?{duplicate:!0}:null]),Tags:this.fb.nonNullable.control(""),Country:this.fb.nonNullable.control(""),SwitchItems:this.fb.nonNullable.control(!0)});get switchTemplateVisible(){return this.provider&&this.usedTrunksCount>0}ngOnInit(){this.form.setValue({Id:this.originalName,Tags:this.tags,Country:this.country,SwitchItems:!0}),this.provider||(this.form.controls.Country.disable(),this.form.controls.Tags.disable()),this.switchTemplateVisible||this.form.controls.SwitchItems.disable()}validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);getPayload(){const t=this.form.value;return{name:t.Id,switchItems:t.SwitchItems,tags:t.Tags}}submit$=()=>this.saveAction$({id:this.form.value.Id,tags:this.form.value.Tags,country:this.form.value.Country}).pipe((0,P.W)(t=>{if(this.xapiErrorService.error(this.cd,t,this.form,!1,!1))return Fn.w;throw t}));static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-copy-template"]],features:[e.Vt3],decls:6,vars:9,consts:[[3,"submitted","buttons","header","submit$","formGroup","okText","validateBeforeSubmit"],["label","_i18n.TemplateName","formControlName","Id",3,"maxlength"],["controlName","Id","label","_i18n.Name"],["valError","invalidChars"],["formControlName","Country"],["formControlName","Tags"],["formControlName","SwitchItems",3,"label","description"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"field-input",1)(2,"val-errors",2),e.DNE(3,Ei,2,3,"ng-template",3),e.k0s()(),e.nVh(4,Mi,2,0),e.nVh(5,Di,5,10),e.k0s()),2&r&&(e.Y8G("buttons",n.buttons)("header",n.header)("submit$",n.submit$)("formGroup",n.form)("okText","_i18n.Create")("validateBeforeSubmit",n.validateBeforeSubmit),e.R7$(),e.Y8G("maxlength",50),e.R7$(3),e.vxM(n.provider?4:-1),e.R7$(),e.vxM(n.switchTemplateVisible?5:-1))},dependencies:[$e.p,o.X1,o.BC,o.cb,o.tU,o.j4,o.JD,X.m,G.IH,G.VI,x.t,nr.r,rr,se.D9],encapsulation:2,changeDetection:0})}return i})();const ir={validate:l(76592).t},dt=new p.nKC("TemplateService");var ji=l(74536);let Ni=(()=>{class i{static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-lock-keyhole-solid-icon"],["","app-lock-keyhole-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 640 640"],["fill","currentColor","d","M320 96C355.3 96 384 124.7 384 160L384 224L256 224L256 160C256 124.7 284.7 96 320 96zM192 160L192 224C156.7 224 128 252.7 128 288L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 288C512 252.7 483.3 224 448 224L448 160C448 89.3 390.7 32 320 32C249.3 32 192 89.3 192 160zM344 360L344 440C344 453.3 333.3 464 320 464C306.7 464 296 453.3 296 440L296 360C296 346.7 306.7 336 320 336C333.3 336 344 346.7 344 360z"]],template:function(r,n){1&r&&(p.qSk(),e.rj2(0,"svg",0),e.Hgh(1,"path",1),e.eux())},encapsulation:2})}return i})();var Dn=l(14176),Hi=l(43123),Fe=l(11041);function ar(i,v){for(;;){const t=v.findIndex(r=>r.$name?.toUpperCase()===i.toUpperCase());if(!(t>=0))break;v.splice(t,1)}}function or(i,v,t){Object.entries(t).forEach(([r,n])=>{const s=i.findIndex(a=>a.$name===v&&a.$parameter?.toUpperCase()===r.toUpperCase());s>=0?n?i[s][Fe.ZW]=n:i.splice(s,1):n&&i.push({$name:v,$parameter:r,$custom:"",[Fe.ZW]:n,..."Source"===v?{$status:"readonly"}:void 0})})}const Ye=i=>v=>or(v,"ParameterOut",{"P-AssertedIdentityUserPart":null,"P-AssertedIdentityHostPart":null,"P-AssertedIdentityDisplayName":null,"P-PreferredIdentityDisplayName":null,RemotePartyIDCallingPartyDisplayName:null,RemotePartyIDCallingPartyUserPart:null,RemotePartyIDCallingPartyHostPart:null,"P-PreferredIdentityUserPart":null,"P-PreferredIdentityHostPart":null,FromUserPart:"$OutboundCallerId",FromDisplayName:"$OutboundCallerId",FromHostPart:"$GWHostPort",...i}),sr=i=>v=>
1Object.entries(i).forEach(([t,r])=>{const n=v.findIndex(s=>"ParameterIn"===s.$name&&s[Fe.ZW].toUpperCase()===t.toUpperCase());n>=0?v[n].$parameter=r:v.push({$name:"ParameterIn",$parameter:r,$custom:"",[Fe.ZW]:t})}),Oi=[{label:"Use P-Asserted-Identity (PAI) with user Caller ID",hint:"In outbound calls, the user Caller ID will be put in the P-Asserted-Identity header. Example: P-Asserted-Identity: <sip:[email protected]>",apply:Ye({"P-AssertedIdentityUserPart":"$OutboundCallerId","P-AssertedIdentityHostPart":"$GWHostPort"})},{label:"Use P-Asserted-Identity with main trunk number",hint:"In outbound calls, including anonymous ones, the Main Trunk Number will be put in the P-Asserted-Identity header",apply:Ye({"P-AssertedIdentityUserPart":"$LineNumber","P-AssertedIdentityHostPart":"$GWHostPort"})},{label:"Use P-Asserted-Identity with external Caller ID",hint:"In outbound calls, the external Caller ID will be put in the P-Asserted-Identity header. Example: P-Asserted-Identity: <sip:[email protected]>",apply:Ye({"P-AssertedIdentityUserPart":"$OriginatorCallerId","P-AssertedIdentityHostPart":"$GWHostPort"})},{label:"Use Remote-Party-ID with user Caller ID",hint:"In outbound calls, the user Caller ID will be put in the Remote-Party ID header. Example: Remote-Party-ID: <sip:[email protected]>;party=calling",apply:Ye({RemotePartyIDCallingPartyUserPart:"$OutboundCallerId",RemotePartyIDCallingPartyHostPart:"$GWHostPort"})},{label:"Use Remote-Party-ID with external Caller ID",hint:"In outbound calls, the external Caller ID will be put in the Remote-Party ID header. Example: Remote-Party-ID: <sip:[email protected]>;party=calling",apply:Ye({RemotePartyIDCallingPartyUserPart:"$OriginatorCallerId",RemotePartyIDCallingPartyHostPart:"$GWHostPort"})},{label:"Use P-Preferred-Identity with user Caller ID",hint:"In outbound calls, the user Caller ID will be put in the P-Preferred-Identity header. Example: P-Preferred-Identity: <sip:[email protected]>",apply:Ye({"P-PreferredIdentityUserPart":"$OutboundCallerId","P-PreferredIdentityHostPart":"$GWHostPort"})},{label:"Use P-Preferred-Identity with external Caller ID",hint:"In outbound calls, the external Caller ID will be put in the P-Preferred-Identity header. Example: P-Preferred-Identity: <sip:[email protected]>",apply:Ye({"P-PreferredIdentityUserPart":"$OriginatorCallerId","P-PreferredIdentityHostPart":"$GWHostPort"})},{label:"Send caller ID in From header (CLIP No Screening)",hint:'In outbound calls where the caller is external, the original calling number will be put in the From header. Example: From: "+16801234567" <sip:[email protected]>',apply:Ye({FromUserPart:"$OriginatorCallerId",FromDisplayName:"$OriginatorCallerId",FromHostPart:"$GWHostPort"})}],Vi=[{label:"Use caller number from SIP user part (recommended)",hint:' Displays the caller number using the SIP From user part as display name. Example: From: "+16801234567" <sip:[email protected]>',apply:sr({$CallerName:"FromUserPart"})},{label:"Use caller name from SIP display name",hint:'Displays the caller name using the SIP From display name when provided. Example: From: "John Smith" <sip:[email protected]>',apply:sr({$CallerName:"FromDisplayName"})}],Gi=[{label:"Automatic (recommended)",hint:"3CX automatically identifies inbound calls using registration data and provider information. Example: Contact: <sip:[email protected]>;rinstance=abcdef123456",apply:i=>{ar("MatchStrategy",i),ar("Source",i)}},{label:"Identify inbound calls by provider host",hint:"Matches inbound calls based on the SIP host address of the provider. Example: Contact: <sip:[email protected]:5060>",apply:i=>{const v=i.find(t=>"MatchStrategy"===t.$name);v?v[Fe.ZW]="0":i.push({$name:"MatchStrategy",$status:"readonly",[Fe.ZW]:"0"}),or(i,"Source",{ContactHost:"$GWHostPort"})}}];function Wi(i,v){if(1&i){const t=e.RV6();e.j41(0,"field-checkbox",2),e.bIt("ngModelChange",function(n){const s=p.eBV(t).$implicit,a=e.XpG().$implicit;return p.Njj(a.selectedOption=n?s:void 0)}),e.k0s()}if(2&i){const t=v.$implicit,r=e.XpG().$implicit,n=e.XpG();e.Y8G("label",t.label)("hint",n.escapeHtml(t.hint))("ngModel",r.selectedOption===t)}}function Qi(i,v){if(1&i&&(e.j41(0,"fieldset")(1,"legend"),e.EFF(2),e.k0s(),e.Z7z(3,Wi,1,3,"field-checkbox",1,e.Vm6),e.k0s()),2&i){const t=v.$implicit;e.R7$(2),e.JRh(t.title),e.R7$(),e.Dyx(t.options)}}
1let Xi=(()=>{class i extends Se.m{template;setOptions=(()=>[{title:"Outbound Caller ID Handling",options:Oi},{title:"Inbound Caller Name Handling",options:Vi},{title:"Inbound Call Identification",options:Gi}])();escapeHtml=Hi.Z;buttons=he.P.OkCancel;anySelected(){return this.setOptions.some(t=>t.selectedOption)}getPayload(){const t=this.template?.doc?.data?.device?.field;if(t)for(const r of this.setOptions)r.selectedOption&&r.selectedOption.apply(t);return this.template}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],features:[e.Vt3],decls:5,vars:3,consts:[[3,"submitted","header","buttons","okDisabled"],[3,"label","hint","ngModel"],[3,"ngModelChange","label","hint","ngModel"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"p"),e.EFF(2,"Change these options only if required by the provider."),e.k0s(),e.Z7z(3,Qi,5,1,"fieldset",null,e.Vm6),e.k0s()),2&r&&(e.Y8G("header","_i18n.ProviderCompatibilityOptions")("buttons",n.buttons)("okDisabled",!n.anySelected()),e.R7$(3),e.Dyx(n.setOptions))},dependencies:[$e.p,x.t,o.YN,o.BC,o.vS],encapsulation:2,changeDetection:0})}return i})();var Ui=l(61461),Ji=l(21310),Yi=l(51432),lr=l(534),zi=l(85343),Bn=l(94943),Ki=l(24144),dr=l(91968);function Zi(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.ProviderTemplateNotSupported"))}function qi(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.ProviderTemplateInvalid"))}function ea(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.ProviderTemplateInvalidFilename"))}function ta(i,v){if(1&i&&(e.j41(0,"div"),e.EFF(1),e.nrm(2,"app-server-error",7),e.k0s()),2&i){const t=v.$implicit;e.R7$(),e.SpI("",t.target," - "),e.R7$(),e.Y8G("message",t.message)}}function na(i,v){if(1&i&&(e.j41(0,"alert",6),e.Z7z(1,ta,3,2,"div",null,e.fX1),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Dyx(t.parseErrors)}}let ra=(()=>{class i extends Se.m{cd=(0,p.WQX)(re.gRc);trunkTemplateApi=(0,p.WQX)(Bn.L);router=(0,p.WQX)(M.Ix);route;parametersValue=[];parameters=[];buttons=he.P.OkCancel;providerTemplateFile=new o.MJ(null,{validators:[o.k0.required,t=>this.validateProviderTemplate(t)],asyncValidators:()=>this.validateTrunkTemplate$()});validateBeforeSubmit=this.createDialogValidate(this.providerTemplateFile,this.cd);trunkTemplateId;providerTemplate;parseErrors;constructor(){const t=(0,p.WQX)(p.abz);super(),this.providerTemplateFile.valueChanges.pipe((0,K.pQ)(t)).subscribe(()=>{this.trunkTemplateId=void 0})}submitDisabled(){const t=null!==this.providerTemplateFile.errors;return!this.providerTemplate||!!this.parseErrors?.length||t}onSubmit(){!this.providerTemplate||!this.trunkTemplateId||this.router.navigate([this.route,"trunk","new",this.trunkTemplateId],{state:{importProviderTemplate:this.providerTemplate}}).catch(zi.l)}validateProviderTemplate(t){const r=t.value;if(!r)return this.providerTemplate=void 0,null;const n=(0,Ki.xz)(r.content||"",this.parametersValue,this.parameters);return this.providerTemplate=n.template,this.parseErrors=n.errors,this.providerTemplate?null:{[n.validationKey||"invalid"]:!0}}validateTrunkTemplate$(){const t=this.providerTemplate?.Gateway?.TemplateFilename;return t?this.trunkTemplateApi.getTrunkTemplate({id:t,$select:["Id"]}).pipe((0,P.W)(()=>(0,q.of)(void 0)),(0,C.T)(r=>(this.trunkTemplateId=r?.Id,r?null:{invalidTemplateFilename:!0}))):(this.trunkTemplateId=void 0,(0,q.of)(null))}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-import-trunk-dialog"]],inputs:{route:"route",parametersValue:"parametersValue",parameters:"parameters"},features:[e.Vt3],decls:10,vars:12,consts:[["header","_i18n.ImportProvider","okText","_i18n.Import",3,"submitted","buttons","validateBeforeSubmit","okDisabled"],["data-qa","provider-file","accept",".xml","uploadBtnText","_i18n.SelectFile",3,"formControl","hideClear","btnIcons","readContent"],[3,"control"],["valError","notSupported"],["valError","invalid"],["valError","invali
1dTemplateFilename"],["type","danger"],[3,"message"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"p"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"field-input-file",1)(5,"val-errors",2),e.DNE(6,Zi,2,3,"ng-template",3)(7,qi,2,3,"ng-template",4)(8,ea,2,3,"ng-template",5),e.k0s()(),e.nVh(9,na,3,0,"alert",6),e.k0s()),2&r&&(e.Y8G("buttons",n.buttons)("validateBeforeSubmit",n.validateBeforeSubmit)("okDisabled",n.submitDisabled()),e.R7$(2),e.JRh(e.bMT(3,10,"_i18n.ImportProviderMessage")),e.R7$(2),e.Y8G("formControl",n.providerTemplateFile)("hideClear",!0)("btnIcons",!1)("readContent",!0),e.R7$(),e.Y8G("control",n.providerTemplateFile),e.R7$(4),e.vxM(null!=n.parseErrors&&n.parseErrors.length?9:-1))},dependencies:[$e.p,me.y,An.Cy,dr.J,G.N4,G.IH,G.VI,o.X1,o.BC,o.l_,se.D9],encapsulation:2,changeDetection:0})}return i})();var wn=l(68580);let ia=(()=>{class i extends Se.m{tags;country;template;buttons=he.P.OkCancel;ngOnInit(){this.tags=this.template.doc?.header?.tags??"",this.country=this.template.doc?.header?.description??""}getPayload(){return(0,Fe.I)(this.template,this.tags,this.country),this.template}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],features:[e.Vt3],decls:3,vars:4,consts:[[3,"submitted","header","buttons"],[3,"ngModelChange","ngModel"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"app-template-country-visibility",1),e.mxI("ngModelChange",function(a){return e.DH7(n.country,a)||(n.country=a),a}),e.k0s(),e.j41(2,"app-template-configuration-options",1),e.mxI("ngModelChange",function(a){return e.DH7(n.tags,a)||(n.tags=a),a}),e.k0s()()),2&r&&(e.Y8G("header","_i18n.TrunkConfigurationOptions")("buttons",n.buttons),e.R7$(),e.R50("ngModel",n.country),e.R7$(),e.R50("ngModel",n.tags))},dependencies:[$e.p,o.YN,o.BC,o.vS,nr.r,rr],encapsulation:2,changeDetection:0})}return i})();const aa=i=>({p1:i});function oa(i,v){if(1&i&&(e.j41(0,"span",9),e.EFF(1),e.nI1(2,"appTemplateType"),e.nI1(3,"translate"),e.k0s()),2&i){const t=v.item,r=e.XpG();e.R7$(),e.JRh(e.bMT(3,4,e.i5U(2,1,t,r.provider()?"provider":"vendor")))}}function sa(i,v){1&i&&(e.j41(0,"span"),e.EFF(1,"[custom]"),e.k0s())}function la(i,v){if(1&i&&(e.EFF(0),e.nVh(1,sa,2,0,"span")),2&i){const t=v.item;e.SpI(" ",t.Id," "),e.R7$(),e.vxM(t.IsCustom?1:-1)}}function da(i,v){if(1&i){const t=e.RV6();e.j41(0,"button",10),e.bIt("click",function(){p.eBV(t);const n=e.XpG();return p.Njj(n.importProvider())}),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()}2&i&&(e.R7$(2),e.JRh(e.bMT(3,1,"_i18n.Import")))}function ca(i,v){if(1&i){const t=e.RV6();e.j41(0,"ul",19)(1,"li",20)(2,"button",21),e.bIt("click",function(){p.eBV(t);const n=e.XpG(4);return p.Njj(n.compatOptions())}),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"li",20)(6,"button",21),e.bIt("click",function(){p.eBV(t);const n=e.XpG(4);return p.Njj(n.sipOptions())}),e.EFF(7),e.nI1(8,"translate"),e.k0s()()()}2&i&&(e.R7$(3),e.SpI(" ",e.bMT(4,2,"_i18n.ProviderCompatibilityOptions")," "),e.R7$(4),e.SpI(" ",e.bMT(8,4,"_i18n.TrunkConfigurationOptions")," "))}function pa(i,v){if(1&i&&(e.j41(0,"span",14),e.nI1(1,"translate"),e.j41(2,"div",16)(3,"button",17),e.nrm(4,"app-cog-solid-icon"),e.j41(5,"span"),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.DNE(8,ca,9,6,"ul",18),e.k0s()()),2&i){const t=e.XpG(3);e.Y8G("tooltip",e.bMT(1,4,"_i18n.AvailableForCustomOnly"))("isDisabled",t.isCustom),e.R7$(2),e.Y8G("isDisabled",t.invalidOrSaving()||!t.isCustom),e.R7$(4),e.JRh(e.bMT(7,6,"_i18n.Tune"))}}function ua(i,v){if(1&i){const t=e.RV6();e.j41(0,"span",14),e.nI1(1,"translate"),e.j41(2,"button",22),e.bIt("click",function(){p.eBV(t);const n=e.XpG(3);return p.Njj(n.delete())}),e.nrm(3,"app-trash-alt-solid-icon"),e.j41(4,"span"),e.EFF(5),e.nI1(6,"translate"),e.k0s()()(),e.j41(7,"button",23),e.bIt("click",function(){p.eBV(t);const n=e.XpG(3);return p.Njj(n.save())}),e.nrm(8,"app-save-solid-icon"),e.j41(9,"span"),e.EFF(10),e.nI1(11,"translate"),e.k0s()()}if(2&i){e.XpG(2);const t=e.r8f(10),r=e.XpG(),n=0===t.length;e.Y8G("tooltip",e.bMT(1,6,"_i18n.TemplateInUse"))("isDisabled",n),e.R7$(2),e.Y8G("disabled",!n),e.R7$(3),e.JRh(e.bMT(6,8,"_i18n.Delete")),e.R7$(2),e.Y8G("disabled",r.invalidOrSaving()||r.templateForm.pristine),e.R7$(3),e.JRh(e.bMT(11,10,"_i18n.Save"))}}function ma(i,v){if(1&i){const t=e.RV6();e.j41(0,"app-button-copy",24),e.bIt("click",function(){p.eBV(t);const n=e.XpG(3);return p.Njj(n.copy())}),e.k0s()}2&i&&e.Y8G("text","_i18n.CreateCopy")}function fa(i,v){if(1&i&&(e.nVh(0,pa,9,8,"span",14),e.nVh(1,ua,12,12)(2,ma,1,1,"app-button-copy",15)),2&i){const t=e.XpG(2);e.vxM(t.provider()?0:-1),e.R7$(),e.vxM(t.isCustom?1:2)}}function ha(i,v){if(1&i){const t=e.RV6();e.j41(0,"button",25),e.bIt("click",function(){p.eBV(t);const n=e.XpG(2);return p.Njj(n.applyToTrunks())}),e.nrm(1,"app-save-solid-icon"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&i){e.XpG();const t=e.r8f(10),r=e.XpG();e.Y8G("disabled",r.invalidOrSaving()||r.templateForm.dirty),e.R7$(3),e.JRh(e.i5U(4,2,"_i18n.ApplyTo",e.eq3(5,aa,t.length)))}}function ba(i,v){if(1&i){const t=e.RV6();e.j41(0,"app-select-file-button",11),e.bIt("files",function(n){p.eBV(t);const s=e.XpG();return p.Njj(s.add(n))}),e.nrm(1,"app-plus-solid-icon"),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"button",12),e.bIt("click",function(){p.eBV(t);const n=e.XpG();return p.Njj(n.export())}),e.nrm(6,"app-download-solid-icon"),e.j41(7,"span"),e.EFF(8),e.nI1(9,"translate"),e.k0s()(),e.SS7(10),e.nVh(11,fa,3,2),e.nVh(12,ha,5,7,"button",13)}if(2&i){const t=e.XpG();e.R7$(3),e.JRh(e.bMT(4,5,"_i18n.Add")),e.R7$(2),e.Y8G("disabled",t.invalidOrSaving()),e.R7$(3),e.JRh(e.bMT(9,7,"_i18n.Export")),e.R7$(2);const r=e.bH3(t.usage());e.R7$(),e.vxM((null==t.template.value?null:t.template.value.TemplateType)!==t.PbxTemplateType.Unknown?11:-1),e.R7$(),e.vxM(t.provider()&&r.length>0?12:-1)}}function ga(i,v){1&i&&(e.j41(0,"div",5),e.nrm(1,"app-lock-keyhole-solid-icon",26)(2,"p",27),e.nI1(3,"translate"),e.k0s()),2&i&&(e.R7$(2),e.Y8G("innerHTML",e.bMT(3,1,"_i18n.GenuineTemplateDisclaimer"),e.npT))}
1function va(i,v){1&i&&(e.j41(0,"alert",8),e.EFF(1),e.k0s()),2&i&&(e.R7$(),e.SpI(" ",v.message," "))}const ya=i=>{const v=!i.value||ir.validate(i.value);return!0===v?null:{invalidXml:{message:`Line ${v.err.line}: ${v.err.msg}`}}};let Ca=(()=>{class i{router=(0,p.WQX)(M.Ix);modalService=(0,p.WQX)(L.B);fileTemplatesService=(0,p.WQX)(dt);cd=(0,p.WQX)(re.gRc);fb=(0,p.WQX)(o.ok);xapiErrorService=(0,p.WQX)(Be.Ko);gatewayParamsService=(0,p.WQX)(Ji.o);trunksApiService=(0,p.WQX)(Mn.T);groupByFn=Dn.E;template=new o.MJ(null);templates;templateForm=this.fb.group({Content:this.fb.control("",[o.k0.required,ya])});templateType=re.hFB.required();provider=re.hFB.required();content=re.hFB.required();usage=re.hFB.required();saving=(0,p.vPA)(!1);constructor(){const t=(0,p.WQX)(M.nX);this.templates=t.snapshot.data.templates??[];const r=t.snapshot.params.id,n=r===xt.MR.providerId?{Id:xt.MR.providerId,IsCustom:!1,TemplateType:qn.V.Unknown}:this.templates.find(s=>s.Id===r);n&&this.template.setValue(n),this.template.valueChanges.pipe((0,_.n)(s=>(0,Fi.H)(this.router.navigate([s?.Id],{relativeTo:t.parent})).pipe((0,te.Tg)(this.modalService))),(0,K.pQ)()).subscribe(),(0,p.QZP)(()=>{this.templateForm.setValue({Content:this.content()}),this.templateForm.markAsPristine()})}invalidOrSaving(){return this.templateForm.invalid||this.saving()}templateSearch=(t,r)=>r.Id.toLowerCase().includes(t.toLowerCase());add(t){const r=t.item(0);if(!r)return;if(!r.name.endsWith(".xml"))return void this.modalService.error("_i18n.IncorrectFileFormatXml");const n=new FileReader;n.onload=()=>{if(!0===ir.validate(n.result)){let a=r.name,m=!1;do{m=!1;for(const h of[".fxs",".ph",".pv",".gw",".xml"])a.endsWith(h)&&(m=!0,a=a.slice(void 0,-h.length))}while(m);this.copyFile("_i18n.AddTemplate",a,{content:n.result,usage:[]})}else this.modalService.error("_i18n.IncorrectFileFormatXml")},n.readAsText(r)}delete(){const t=this.template.value;!t||!t.IsCustom||this.modalService.confirmDangerAction("_i18n.ConfirmDeleteTemplate","_i18n.DeleteTemplate",void 0,"_i18n.Delete").pipe((0,_.n)(()=>this.fileTemplatesService.deleteTemplate(t.Id)),(0,te.Y$)(),(0,_.n)(()=>this.fileTemplatesService.listTemplates())).subscribe({next:r=>{this.templates=r.value,this.template.setValue(this.templates[0])},error:r=>this.modalService.error(r)})}export(){const t=this.template.value?.Id,r=this.templateForm.controls.Content.value;t&&r&&(0,gt.mq)(r,t,"text/xml")}getValidIdForSave(){const t=this.template.value;if(!this.templateForm.invalid&&!this.saving()&&t&&t.IsCustom)return t.Id}save(){const t=this.getValidIdForSave();t&&(this.saving.set(!0),(0,rt.v)(()=>{let r;if(this.canRebuildTemplate){const n=(0,Fe.QC)(this.templateForm.value.Content);r=(0,Fe.Z)(n,this.templateType())}else r=this.templateForm.value.Content;return this.templateForm.setValue({Content:r}),this.fileTemplatesService.updateTemplate(t,r)}).pipe((0,kn.j)(()=>{this.saving.set(!1)})).subscribe({next:()=>{this.templateForm.markAsPristine(),this.applyToTrunks()},error:r=>{this.xapiErrorService.error(this.cd,r,this.templateForm,!1)}}))}copy(){const t=this.template.value;!t||t.IsCustom||this.copyFile("_i18n.CreateCopy",t.Id,{content:this.templateForm.value.Content,usage:this.usage()})}get canRebuildTemplate(){return"gateway-template"===this.templateType()}groupValueFn(t,r){return(0,Dn.E)(r[0])}copyFile(t,r,n){const{content:s,usage:a}=n,m=(0,Fe.QC)(s),h=this.templates.map(E=>E.Id.replace(this.fileTemplatesService.extension,"")),b=r.replace(this.fileTemplatesService.extension,"");let $=b,k=1;for(;h.includes($);)$=b+k,k+=1;const y=this.provider();this.modalService.showComponent(Bi,{initialState:{header:t,country:m.doc?.header?.description??"",tags:m.doc?.header?.tags??"",usedTrunksCount:a.length,provider:y,originalName:$,usedIds:h,saveAction$:({id:E,tags:S,country:J})=>this.fileTemplatesService.createTemplate(E+this.fileTemplatesService.extension,this.canRebuildTemplate?(0,Fe.Z)((0,Fe.I)(m,S,J),this.templateType()):s).pipe((0,P.W)(ie=>{const le=(0,Zn.PE)(ie);throw le.includes("Content:")&&le.includes(Ii.g.Invalid)?new Error("_i18n.ProviderTemplateInvalid"):ie}))}}).pipe((0,te.Sf)(),(0,_.n)(({name:E,switchItems:S})=>{const J=E+this.fileTemplatesService.extension;let ie=(0,q.of)(!0);return y&&S&&a.length>0&&(ie=(0,er.x)(...a.map(le=>this.trunksApiService.updateTrunk({id:le,pbxTrunk:{Gateway:{TemplateFilename:J}}})))),ie.pipe((0,_.n)(()=>this.fileTemplatesService.listTemplates()),(0,C.T)(le=>({id:J,templates:le.value})))})).subscribe({next:({id:E,templates:S})=>{this.templates=S;const J=this.templates.find(ie=>ie.Id===E);J&&this.template.setValue(J)},error:E=>{this.modalService.error(E instanceof ye.yz&&400===E.status&&"Content"===E.error.error.details?.[0].target?"_i18n.IncorrectFileFormatXml":E)}})}get isCustom(){return this.template.value?.IsCustom}tuneTemplate(t){const r=this.templateForm.value.Content;r&&(0,rt.v)(()=>this.modalService.showDialog(t,{template:(0,Fe.QC)(r)})).pipe((0,te.Sf)()).subscribe({next:n=>{const s=(0,Fe.Z)(n,this.templateType());this.templateForm.setValue({Content:s}),this.templateForm.markAsDirty()},error:n=>this.modalService.error(n)})}compatOptions(){this.tuneTemplate(Xi)}sipOptions(){this.tuneTemplate(ia)}applyToTrunks(){const t=this.usage();0!==t.length&&this.modalService.confirmation("_i18n.ApplyToText","_i18n.ApplyTemplateChanges",{p1:t.length},"_i18n.Apply").pipe((0,_.n)(()=>(0,Ui.vY)({Id:this.template.value.Id,Content:this.templateForm.value.Content},this.gatewayParamsService)),(0,_.n)(r=>(0,er.x)(...t.map(n=>this.trunksApiService.updateTrunk({id:n,pbxTrunk:r}))))).subscribe({error:r=>this.modalService.error(r)})}importProvider(){this.gatewayParamsService.paramsAndValues$.pipe((0,tr.s)(1)).subscribe({next:({params:t,values:r})=>{this.modalService.showComponent(ra,{initialState:{parameters:t,parametersValue:r,route:"/office/voice-and-ch
1at/"}})},error:t=>this.modalService.error(t)})}GatewayProviderId=xt.MR.providerId;PbxTemplateType=qn.V;static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],inputs:{templateType:[1,"templateType"],provider:[1,"provider"],content:[1,"content"],usage:[1,"usage"]},decls:10,vars:11,consts:[[1,"mb-2",3,"formControl","items","searchFn","groupBy","groupValue","clearable"],["ng-optgroup-tmp",""],["ng-label-tmp","","ng-option-tmp",""],[1,"d-flex","flex-wrap","pt-2","pb-2","gap-2"],["type","button","data-qa","import-trunk",1,"btn","btn-primary"],[1,"d-flex","gap-1"],[3,"formGroup"],["formControlName","Content",3,"readOnly"],["type","danger",1,"mb-3"],[1,"ng-option"],["type","button","data-qa","import-trunk",1,"btn","btn-primary",3,"click"],["data-qa","add-template","accept",".xml",3,"files"],["id","btnExport","data-qa","export-template","type","button",1,"btn","btn-primary",3,"click","disabled"],["id","btnApply","data-qa","apply","type","button",1,"btn","btn-primary",3,"disabled"],[3,"tooltip","isDisabled"],["data-qa","copy-template",3,"text"],["container","body","dropdown","",1,"dropdown",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-primary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],["type","button",1,"dropdown-item",3,"click"],["data-qa","delete-template","type","button",1,"btn","btn-primary",3,"click","disabled"],["id","btnSave","data-qa","save-template","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","copy-template",3,"click","text"],["id","btnApply","data-qa","apply","type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"customSVGIcons","svg-md"],[3,"innerHTML"]],template:function(r,n){if(1&r&&(e.j41(0,"ng-select",0),e.DNE(1,oa,4,6,"ng-template",1)(2,la,2,2,"ng-template",2),e.k0s(),e.j41(3,"div",3),e.nVh(4,da,4,3,"button",4)(5,ba,13,10),e.k0s(),e.nVh(6,ga,4,3,"div",5),e.qex(7,6),e.nrm(8,"app-ace",7),e.nVh(9,va,2,1,"alert",8),e.bVm()),2&r){let s;e.Y8G("formControl",n.template)("items",n.templates)("searchFn",n.templateSearch)("groupBy",n.groupByFn)("groupValue",n.groupValueFn)("clearable",!1),e.R7$(4),e.vxM((null==n.template.value?null:n.template.value.Id)===n.GatewayProviderId?4:5),e.R7$(2),e.vxM(n.isCustom?-1:6),e.R7$(),e.Y8G("formGroup",n.templateForm),e.R7$(),e.Y8G("readOnly",!n.isCustom),e.R7$(),e.vxM((s=n.templateForm.getError("invalidXml","Content"))?9:-1,s)}},dependencies:[Me.vr,o.X1,o.BC,o.cb,o.l_,o.j4,o.JD,Me.bh,Me.ZZ,Me.Uq,Ue.O,Qe.K,Yi.H,De.d,zn.x,Kn.x,An.Cy,_t.e,ji.Z,lr.dg,Ni,wn.Kk,wn.UL,wn.hs,se.D9,Dn.n],encapsulation:2,changeDetection:0})}return i})();const _a=i=>{const v=(0,p.WQX)(dt);return!!i.firstChild||v.listTemplates(1).pipe((0,C.T)(t=>!!(t&&t.value&&t.value.length>0)&&(0,M.Wj)(i,[t.value[0].Id])))},Ta=i=>{const v=(0,p.WQX)(dt),t=(0,p.WQX)(g.s);return v.listTemplates().pipe((0,C.T)(r=>r.value),(0,P.W)(r=>t.handleError(r)))};var xa=l(13313),$a=l(32338),Ia=l(29279);const Ra=(i,v)=>{const t=(0,p.WQX)(g.s),r=(0,p.WQX)(dt);return i.params.id?r.getTemplateContent(i.params.id).pipe((0,C.T)(n=>n.Content),(0,P.W)(n=>t.handleError(n))):""},Aa=i=>{const v=(0,p.WQX)(g.s),t=(0,p.WQX)(dt);return i.params.id?t.usage(i.params.id).pipe((0,P.W)(r=>v.handleError(r))):[]},Wt=(i,v,t,r=!1)=>({path:i,canActivate:[_a],providers:[{provide:dt,useClass:t}],resolve:{templates:Ta},children:[{path:":id",component:Ca,data:{templateType:v,provider:r},resolve:{usage:Aa,content:Ra}}]}),Ea=[{path:"",component:yi,children:[{path:"",redirectTo:"phone",pathMatch:"full"},Wt("phone","phone-template",class Sa{usage(v){return(0,q.of)([])}phonesService=(0,p.WQX)(xa.X);extension=".ph.xml";listTemplates=v=>this.phonesService.listPhoneTemplate({$select:["Id","TemplateType","IsCustom"],$orderby:["IsCustom, TemplateType"],$filter:"TemplateType ne 'Deleted'",$top:v});getTemplateContent=v=>this.phonesService.getPhoneTemplate({id:v,$select:["Content"]});deleteTemplate=v=>this.phonesService.deletePhoneTemplate({id:v});createTemplate=(v,t)=>this.phonesService.createPhoneTemplate({pbxPhoneTemplate:{Id:v,Content:t}});updateTemplate=(v,t)=>
1this.phonesService.updatePhoneTemplate({id:v,pbxPhoneTemplate:{Content:t}})}),{path:"email",component:Si,resolve:{emailTemplates:()=>{const i=(0,p.WQX)(Jn),v=(0,p.WQX)(g.s);return(i=>i.listEmailTemplate({}).pipe((0,C.T)(v=>v.value)))(i).pipe((0,P.W)(t=>v.handleError(t)))}}},Wt("fxs","fxs-template",class Pa{fxsTemplates=(0,p.WQX)($a.Q);extension=".fxs.xml";usage(v){return(0,q.of)([])}createTemplate=(v,t)=>this.fxsTemplates.createFxsTemplate({pbxFxsTemplate:{Id:v,Content:t}});deleteTemplate=v=>this.fxsTemplates.deleteFxsTemplate({id:v});getTemplateContent=v=>this.fxsTemplates.getFxsTemplate({id:v,$select:["Content"]});listTemplates=v=>this.fxsTemplates.listFxsTemplate({$select:["Id","TemplateType","IsCustom"],$orderby:["IsCustom, TemplateType"],$filter:"TemplateType ne 'Deleted'",$top:v});updateTemplate=(v,t)=>this.fxsTemplates.updateFxsTemplate({id:v,pbxFxsTemplate:{Content:t}})}),Wt("gateway","gateway-template",class ka{trunksApiService=(0,p.WQX)(Mn.T);templatesApiService=(0,p.WQX)(Bn.L);extension=".gw.xml";usage(v){return this.trunksApiService.listTrunk({$select:["Id"],$filter:`Gateway/TemplateFilename eq '${v}'`}).pipe((0,C.T)(t=>t.value?.map(r=>r.Id)??[]))}listTemplates=v=>(0,q.of)({value:[{Id:xt.MR.providerId,TemplateType:"Supported",IsCustom:!1}]});getTemplateContent=v=>this.templatesApiService.getTrunkTemplate({id:v,$select:["Content"]});deleteTemplate=v=>this.templatesApiService.deleteTrunkTemplate({id:v});createTemplate=(v,t)=>this.templatesApiService.createTrunkTemplate({pbxTrunkTemplate:{Id:v,Content:t}});updateTemplate=(v,t)=>this.templatesApiService.updateTrunkTemplate({id:v,pbxTrunkTemplate:{Content:t}})}),Wt("provider","gateway-template",class Fa{trunksApiService=(0,p.WQX)(Mn.T);templatesApiService=(0,p.WQX)(Bn.L);extension=".pv.xml";usage(v){return this.trunksApiService.listTrunk({$select:["Id"],$filter:`Gateway/TemplateFilename eq '${v}'`}).pipe((0,C.T)(t=>t.value?.map(r=>r.Id)??[]))}listTemplates=v=>this.templatesApiService.listTrunkTemplate({$select:["Id","TemplateType","IsCustom"],$orderby:["IsCustom","TemplateType"],$filter:"TemplateType ne 'Deleted'",$top:v}).pipe((0,C.T)(t=>({value:(0,Ia.D)(t.value??[])})));getTemplateContent=v=>this.templatesApiService.getTrunkTemplate({id:v,$select:["Content"]});deleteTemplate=v=>this.templatesApiService.deleteTrunkTemplate({id:v});createTemplate=(v,t)=>this.templatesApiService.createTrunkTemplate({pbxTrunkTemplate:{Id:v,Content:t}});updateTemplate=(v,t)=>this.templatesApiService.updateTrunkTemplate({id:v,pbxTrunkTemplate:{Content:t}})},!0)],data:{title:"_i18n.Templates",navTitle:"_i18n.Templates"}}];var cr=l(61142),St=l(87960),$t=l(84412),Ma=l(5595),Da=l(74743),Ba=l(62564);function wa(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.DoubleQuotesOrSpacesNotAllowed"))}function ja(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.PasswordWeak"))}function Na(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.InvalidEmail"))}function Ha(i,v){if(1&i){const t=e.RV6();e.j41(0,"span",24),e.EFF(1),e.nI1(2,"fileSize"),e.k0s(),e.j41(3,"button",25),e.bIt("click",function(){p.eBV(t);const n=e.XpG();return p.Njj(n.cleanupFax())}),e.nrm(4,"app-trash-alt-solid-icon"),e.j41(5,"span"),e.EFF(6),e.nI1(7,"translate"),e.k0s()()}if(2&i){const t=v;e.R7$(),e.JRh(e.brH(2,3,t.value,2,"0.00")),e.R7$(2),e.Y8G("disabled",!t.value),e.R7$(3),e.JRh(e.bMT(7,7,"_i18n.Purge"))}}function Oa(i,v){1&i&&e.nrm(0,"span",17)}function Va(i,v){1&i&&(e.j41(0,"p",18),e.nrm(1,"app-server-error",26),e.k0s()),2&i&&(e.R7$(),e.Y8G("message",v))}let Ga=(()=>{class i{route=(0,p.WQX)(M.nX);faxServerSettingsApiService=(0,p.WQX)(cr.V);peersApiService=(0,p.WQX)(Nt.L);modalService=(0,p.WQX)(L.B);destroy$=(0,p.WQX)(p.abz);didSelect;resolvedData=this.route.snapshot.data;pbxFaxServerSettings=this.resolvedData.faxServerSettingsModel.faxServerSettings;didNumbers=this.resolvedData.faxServerSettingsModel.didNumbers;form=new o.gE({AuthId:new o.MJ(this.pbxFaxServerSettings.AuthId??"",{validators:[o.k0.required,fe.sw],nonNullable:!0}),AuthPassword:new o.MJ(this.pbxFaxServerSettings.AuthPassword??{Value:""},{validators:fe.ln.map(fe.ys),nonNullable:!0}),Number:new o.MJ({value:this.pbxFaxServerSettings.Number??"",disabled:!0},{nonNullable:!0}),Email:new o.MJ(this.pbxFaxServerSettings.Email??"",{nonNullable:!0,validators:[o.k0.email]}),G711ToT38Fallback:new o.MJ(!!this.pbxFaxServerSettings.G711ToT38Fallback,{nonNullable:!0}),AutoCleanup:new o.MJ({value:!!this.pbxFaxServerSettings.AutoCleanup,disabled:!!this.pbxFaxServerSettings.RemoteStorageEnabled}
1),MaxAge:new o.MJ({value:this.pbxFaxServerSettings.MaxAge,disabled:!this.pbxFaxServerSettings.AutoCleanup||!!this.pbxFaxServerSettings.RemoteStorageEnabled})});didNumbersCtrl=new o.MJ(this.didNumbers);refreshFaxSize$=new $t.t(!0);faxFilesSize$=this.refreshFaxSize$.pipe((0,_.n)(()=>this.faxServerSettingsApiService.getFaxFilesSize().pipe((0,P.W)(()=>(0,q.of)({value:0})))));cleanUpFaxError$=new Yn.B;constructor(){this.pbxFaxServerSettings.RemoteStorageEnabled||this.form.controls.AutoCleanup.valueChanges.pipe((0,K.pQ)(this.destroy$)).subscribe(t=>{(0,Y.TZ)(this.form.controls.MaxAge,t)})}get pristine(){return this.form.pristine&&this.didNumbersCtrl.pristine}get hasFaxServer(){return this.pbxFaxServerSettings.FaxServerId}save$=()=>{const{AuthId:t,AuthPassword:r,G711ToT38Fallback:n,Email:s,AutoCleanup:a,MaxAge:m}=this.form.value;return this.faxServerSettingsApiService.updateFaxServerSettings({pbxFaxServerSettings:{AuthId:t,AuthPassword:r,G711ToT38Fallback:n,Email:s,Number:this.pbxFaxServerSettings.Number,AutoCleanup:a,MaxAge:m}}).pipe((0,_.n)(()=>this.pbxFaxServerSettings.FaxServerId?(0,q.of)(this.pbxFaxServerSettings.FaxServerId):this.peersApiService.getPeerByNumber({number:this.pbxFaxServerSettings.Number}).pipe((0,C.T)(b=>b.Id))),(0,O.M)(b=>{this.pbxFaxServerSettings.FaxServerId=b,this.didSelect.save(b),this.didNumbersCtrl.markAsPristine()}))};cleanupFax(){this.modalService.confirmDangerAction("_i18n.CleanupFaxConfirmation","_i18n.Cleanup").pipe((0,_.n)(()=>this.faxServerSettingsApiService.cleanUpFax())).subscribe({next:()=>{this.refreshFaxSize$.next(!0),this.cleanUpFaxError$.next("")},error:t=>{this.cleanUpFaxError$.next((0,Zn.PE)(t))}})}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-fax-server-settings"]],viewQuery:function(r,n){if(1&r&&e.GBs(St.K,5),2&r){let s;e.mGM(s=e.lsd())&&(n.didSelect=s.first)}},decls:35,vars:29,consts:[["backRouterLink","..","helpUrl","_i18n.FAXEditorUri",3,"header","pristine","isNewEntity","save$","formGroup"],[3,"formGroup"],[1,"row"],["label","_i18n.FaxExtensionNumber","formControlName","Number","data-qa","number",1,"col-lg-6"],["data-qa","didNumbers",1,"col-lg-6",3,"formControl","dn"],["label","_i18n.FaxExtensionAuthId","formControlName","AuthId","data-qa","auth-id",1,"col-lg-6",3,"maxlength"],["controlName","AuthId"],["valError","authenticationId"],["label","_i18n.FaxExtensionAuthPassword","formControlName","AuthPassword","data-qa","auth-password",1,"col-lg-6",3,"maxlength"],["controlName","AuthPassword"],["valError","pattern"],["label","_i18n.FaxExtensionEmail","description","_i18n.FaxExtensionEmailDescription","formControlName","Email","data-qa","email",1,"col-lg-6"],["controlName","Email"],["valError","invalid"],[1,"col-lg-6","align-self-start","pt-lg-5"],["label","_i18n.FaxExtensionG711ToT38Fallback","formControlName","G711ToT38Fallback","data-qa","g711-to-t38-fallback"],[1,"d-flex","align-items-center","gap-2"],["data-qa","loader","app-spinner-regular-icon","",1,"customSVGIcons","svg-md"],["data-qa","purge-fax-error",1,"error","val-errors"],[1,"col-md-6","d-flex","flex-column","gap-2","mt-3"],[1,"d-flex","align-items-center","gap-2",3,"tooltip"],["label","_i18n.AutoCleanupFaxesOlderThan","formControlName","AutoCleanup","data-qa","auto-cleanup",1,"mb-0"],["formControlName","MaxAge","data-qa","cleanup-max-age","units","_i18n.DaysLowercase",1,"mb-0",3,"hideAsterisk","min","max"],["data-qa","cleanup-max-age-validation",3,"control"],["data-qa","used-space"],["type","button","data-qa","purge-fax",1,"btn","btn-primary",3,"click","disabled"],[3,"message"]],template:function(r,n){if(1&r&&(e.j41(0,"edit-panel",0)(1,"fieldset",1)(2,"div",2),e.nrm(3,"field-input",3)(4,"app-did-number-select",4),e.j41(5,"field-input",5)(6,"val-errors",6),e.DNE(7,wa,2,3,"ng-template",7),e.k0s()(),e.j41(8,"field-input-concealed-password",8)(9,"val-errors",9),e.DNE(10,ja,2,3,"ng-template",10),e.k0s()(),e.j41(11,"field-input",11)(12,"val-errors",12),e.DNE(13,Na,2,3,"ng-template",13),e.k0s()(),e.j41(14,"div",14),e.nrm(15,"field-checkbox",15),e.k0s()()(),e.j41(16,"fieldset")(17,"legend"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.j41(20,"div",16)(21,"span"),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.nVh(24,Ha,8,9),e.nI1(25,"async"),e.vZN(26,Oa,1,0,"span",17),e.k0s(),e.nVh(27,Va,2,1,"p",18),e.nI1(28,"async"),e.j41(29,"div",19)(30,"div",20),e.nI1(31,"translate"),e.nrm(32,"field-checkbox",21)(33,"field-input-number",22),e.k0s(),e.nrm(34,"val-errors",23),e.k0s()()()),2&r){let s,a;e.Y8G("header","_i18n.FaxServer")("pristine",n.pristine)("isNewEntity",!n.hasFaxServer)("save$",n.save$)("formGroup",n.form),e.R7$(),e.Y8G("formGroup",n.form),e.R7$(3),e.Y8G("formControl",n.didNumbersCtrl)("dn",n.pbxFaxServerSettings.Number),e.R7$(),e.Y8G("maxlength",50),e.R7$(3),e.Y8G("maxlength",50),e.R7$(10),e.JRh(e.bMT(19,19,"_i18n.CleanupFax")),e.R7$(4),e.JRh(e.bMT(23,21,"_i18n.UsedSpaceVm")),e.R7$(2),e.vxM((s=e.bMT(25,23,n.faxFilesSize$))?24:26,s),e.R7$(3),e.vxM((a=e.bMT(28,25,n.cleanUpFaxError$))?27:-1,a),e.R7$(3),e.Y8G("tooltip",n.pbxFaxServerSettings.RemoteStorageEnabled?e.bMT(31,27,"_i18n.RemoteArchivingConfigured"):""),e.R7$(3),e.Y8G("hideAsterisk",!0)("min",1)("max",365),e.R7$(),e.Y8G("control",n.form.controls.MaxAge)}},dependencies:[A.Q,o.X1,o.BC,o.cb,o.tU,o.l_,o.j4,o.JD,X.m,St.K,G.IH,G.VI,Ma.p,x.t,De.d,lr.dg,Ke.B,Da.a,dr.J,Ba.s,se.D9,W.Jj],encapsulation:2,changeDetection:0})}return i})(),jn=(()=>{class i extends N.d{bulkFaxDelete(t,r="body"){const n=t?.faxBulkFaxDeleteRequestBody;if(null==n)throw new Error("Required parameter faxBulkFaxDeleteRequestBody was null or undefined when calling bulkFaxDelete.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/Fax/Pbx.BulkFaxDelete`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}
1bulkFaxDeleteQuery(t,r="body",n=!1,s){if(null==t.faxBulkFaxDeleteRequestBody)throw new Error("Required parameter faxBulkFaxDeleteRequestBody was null or undefined when calling bulkFaxDelete.");return"/Fax/Pbx.BulkFaxDelete"}createFax(t,r="body"){const n=t?.pbxFax;if(null==n)throw new Error("Required parameter pbxFax was null or undefined when calling createFax.");let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(s=s.set("Accept",a));const h=this.configuration.selectHeaderContentType(["application/json"]);void 0!==h&&(s=s.set("Content-Type",h));let b="json";a&&(b=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");const{basePath:k,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${k}/Fax`,{body:n,responseType:b,...y?{withCredentials:y}:{},headers:s,observe:r})}createFaxQuery(t,r="body",n=!1,s){if(null==t.pbxFax)throw new Error("Required parameter pbxFax was null or undefined when calling createFax.");return"/Fax"}deleteFax(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling deleteFax.");const s=t?.ifMatch;let a=this.defaultHeaders;null!=s&&(a=a.set("If-Match",String(s))),a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));let h="json";m&&(h=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let b=`/Fax(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:$,withCredentials:k}=this.configuration;return this.httpClient.request("delete",`${$}${b}`,{responseType:h,...k?{withCredentials:k}:{},headers:a,observe:r})}deleteFaxQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling deleteFax.");return`/Fax(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}getFax(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling getFax.");const s=t?.$select,a=t?.$expand;let m=new c.rx(this.encoder);m=this.addToHttpParams(m,"$select",s,c.l2.Form,!1),m=this.addToHttpParams(m,"$expand",a,c.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const b=this.configuration.selectHeaderAccept(["application/json"]);void 0!==b&&(h=h.set("Accept",b));let $="json";b&&($=b.startsWith("text")?"text":this.configuration.isJsonMime(b)?"json":"blob");let k=`/Fax(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${y}${k}`,{params:m.toHttpParams(),responseType:$,...E?{withCredentials:E}:{},headers:h,observe:r})}getFaxQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling getFax.");const m=t.$select,h=t.$expand;let b=new c.rx(this.encoder);return b=this.addToHttpParams(b,"$select",m,c.l2.Form,!1),b=this.addToHttpParams(b,"$expand",h,c.l2.Form,!1),`/Fax(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+b.toString()}getFaxByNumber(t,r="body"){const n=t?.number;if(null==n)throw new Error("Required parameter number was null or undefined when calling getFaxByNumber.");const s=t?.$select,a=t?.$expand;let m=new c.rx(this.encoder);m=this.addToHttpParams(m,"$select",s,c.l2.Form,!1),m=this.addToHttpParams(m,"$expand",a,c.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const b=this.configuration.selectHeaderAccept(["application/json"]);void 0!==b&&(h=h.set("Accept",b));let $="json";b&&($=b.startsWith("text")?"text":this.configuration.isJsonMime(b)?"json":"blob");let k=`/Fax(Number=${this.configuration.encodeParam({name:"number",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${y}${k}`,{params:m.toHttpParams(),responseType:$,...E?{withCredentials:E}:{},headers:h,observe:r})}getFaxByNumberQuery(t,r="body",n=!1,s){const a=t.number;if(null==a)throw new Error("Required parameter number was null or undefined when calling getFaxByNumber.");const m=t.$select,h=t.$expand;let b=new c.rx(this.encoder);return b=this.addToHttpParams(b,"$select",m,c.l2.Form,!1),b=this.addToHttpParams(b,"$expand",h,c.l2.Form,!1),`/Fax(Number=${this.configuration.encodeParam({name:"number",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+b.toString()}initFax(t="body"){let r=this.defaultHeaders;r=this.configuration.addCredentialToHeaders("Application","Authorization",r,"Bearer ");const n=this.configuration.selectHeaderAccept(["application/json"]);void 0!==n&&(r=r.set("Accept",n));let s="json";n&&(s=n.startsWith("text")?"text":this.configuration.isJsonMime(n)?"json":"blob");const{basePath:m,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${m}/Fax/Pbx.InitFax()`,{responseType:s,...h?{withCredentials:h}:{},headers:r,observe:t})}initFaxQuery(t="body",r=!1,n){return"/Fax/Pbx.InitFax()"}listFax(t,r="body"){const n=t?.$top,s=t?.$skip,a=t?.$search,m=t?.$filter,h=t?.$count,b=t?.$orderby,$=t?.$select,k=t?.$expand;let y=new c.rx(this.encoder);y=this.addToHttpParams(y,"$top",n,c.l2.Form,!1),y=this.addToHttpParams(y,"$skip",s,c.l2.Form,!1),y=this.addToHttpParams(y,"$search",a,c.l2.Form,!1),y=this.addToHttpParams(y,"$filter",m,c.l2.Form,!1),y=this.addToHttpParams(y,"$count",h,c.l2.Form,!1),y=this.addToHttpParams(y,"$orderby",b,c.l2.Form,!1),y=this.addToHttpParams(y,"$select",$,c.l2.Form,!1),y=this.addToHttpParams(y,"$expand",k,c.l2.Form,!1);let E=this.defaultHeaders;E=this.configuration.addCredentialToHeaders("Application","Authorization",E,"Bearer ");const S=this.configuration.selectHeaderAccept(["application/json"]);void 0!==S&&(E=E.set("Accept",S));let J="json";S&&(J=S.startsWith("text")?"text":this.configuration.isJsonMime(S)?"json":"blob");const{basePath:le,withCredentials:de}=this.configuration;return this.httpClient.request("get",`${le}/Fax`,{params:y.toHttpParams(),responseType:J,...de?{withCredentials:de}:{},headers:E,observe:r})}listFaxQuery(t,r="body",n=!1,s){const a=t.$top,m=t.$skip,h=t.$search,b=t.$filter,$=t.$count,k=t.$orderby,y=t.$select,E=t.$expand;let S=new c.rx(this.encoder);return S=this.addToHttpParams(S,"$top",a,c.l2.Form,!1),S=this.addToHttpParams(S,"$skip",m,c.l2.Form,!1),S=this.addToHttpParams(S,"$search",h,c.l2.Form,!1),S=this.addToHttpParams(S,"$filter",b,c.l2.Form,!1),S=this.addToHttpParams(S,"$count",$,c.l2.Form,!1),S=this.addToHttpParams(S,"$orderby",k,c.l2.Form,!1),S=this.addToHttpParams(S,"$select",y,c.l2.Form,!1),S=this.addToHttpParams(S,"$expand",E,c.l2.Form,!1),"/Fax?"+S.toString()}updateFax(t,r="body"){const n=t?.id;if(null==n)throw new Error("Required parameter id was null or undefined when calling updateFax.");const s=t?.pbxFax;let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const m=this.configuration.selectHeaderAccept(["application/json"]);void 0!==m&&(a=a.set("Accept",m));const b=this.configuration.selectHeaderContentType(["application/json"]);void 0!==b&&(a=a.set("Content-Type",b));let $="json";m&&($=m.startsWith("text")?"text":this.configuration.isJsonMime(m)?"json":"blob");let k=`/Fax(${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:y,withCredentials:E}=this.configuration;return this.httpClient.request("patch",`${y}${k}`,{body:s,responseType:$,...E?{withCredentials:E}:{},headers:a,observe:r})}updateFaxQuery(t,r="body",n=!1,s){const a=t.id;if(null==a)throw new Error("Required parameter id was null or undefined when calling updateFax.");return`/Fax(${this.configuration.encodeParam({name:"id",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var La=l(54381),pr=l(71747),ur=l(63144);function mr(i){return i.Extension?.Number??i.Forward?.OfficeHoursDestination?.Number??"ZZZ"}function Qa(i,v){return mr(i).localeCompare(mr(v))}let fr=(()=>{class i{faxApi=(0,p.WQX)(jn);defsApi=(0,p.WQX)(La.G);
1inboundRulesApi=(0,p.WQX)(Le);refresh$=new $t.t(void 0);allFaxExtensions$=this.refresh$.pipe((0,_.n)(()=>this.faxApi.listFax({$filter:"FaxServer ne true"})),(0,_.n)(t=>{const r=t.value??[],n=r.map(a=>a.Id);return(0===n.length?(0,q.of)([]):this.defsApi.getRoutes({defsGetRoutesRequestBody:{ids:n}}).pipe((0,C.T)(a=>a.value))).pipe((0,C.T)(a=>function Wa(i,v){const t=v.reduce((r,n)=>Object.assign(r,{[n.Id]:n}),{});return i.map(r=>({Extension:{...r,Dids:(0,ur.O)(t[r.Id])}}))}(r,a)))}));allFaxForwards$=this.refresh$.pipe((0,_.n)(()=>this.inboundRulesApi.listInboundRule({$filter:[`Condition eq '${mt.c.BasedOnDid}'`,`OfficeHoursDestination/To eq '${ge.h.Fax}'`,`OfficeHoursDestination/Type eq '${pr.J.Extension}'`].join(" and "),$select:["Id","OfficeHoursDestination","Data","RuleName","TrunkDN"],$expand:["TrunkDN($select=Id)"]})),(0,C.T)(({value:t})=>(t??[]).map(r=>({Forward:r}))));allFaxEntities$=(0,ke.z)([this.allFaxExtensions$,this.allFaxForwards$]).pipe((0,C.T)(([t,r])=>[...t,...r].sort(Qa)),(0,En.H9)());resolveData(t=1,r=xe.z9,n=""){return this.allFaxEntities$.pipe((0,tr.s)(1),(0,C.T)(s=>s.filter(a=>function Xa(i,v){return!i||[v.Extension?.Number,...(v.Extension?.Dids??[]).flatMap(t=>[t.DisplayName,t.Number]),v.Forward?.Data,v.Forward?.RuleName,v.Forward?.OfficeHoursDestination?.Number].some(t=>t?.includes(i))}(n,a))),(0,C.T)(s=>({value:s.slice((t-1)*r,t*r),totalItems:s.length})))}static \u0275fac=function(r){return new(r||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ja=l(49764);function Ya(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.DoubleQuotesOrSpacesNotAllowed"))}function za(i,v){1&i&&(e.EFF(0),e.nI1(1,"translate")),2&i&&e.JRh(e.bMT(1,1,"_i18n.PasswordWeak"))}let Ka=(()=>{class i extends Se.m{faxApiService=(0,p.WQX)(jn);xapiErrorService=(0,p.WQX)(Be.Ko);cd=(0,p.WQX)(re.gRc);didSelect;form;fax={};extensionNumberLength;validateBeforeSubmit;buttons=he.P.OkCancel;didNumbersFormControl=new o.MJ([]);ngOnInit(){this.form=new o.gE({Number:new o.MJ({value:this.fax.Number??"",disabled:!this.isNew},{validators:[o.k0.required,(0,fe.nU)(this.extensionNumberLength)],nonNullable:!0}),AuthID:new o.MJ(this.fax.AuthID??"",{validators:[o.k0.required,fe.sw],nonNullable:!0}),AuthPassword:new o.MJ(this.fax.AuthPassword??"",{validators:fe.ln,nonNullable:!0}),OutboundCallerId:new o.MJ(this.fax.OutboundCallerId??"",{nonNullable:!0})}),this.validateBeforeSubmit=this.createDialogValidate(this.form,this.cd)}ngAfterViewInit(){this.didNumbersFormControl.setValue(this.fax.Dids??[])}get isNew(){return void 0===this.fax.Id}submit$=()=>{const t=this.fax?.Id,r=this.form.value;return(t?this.faxApiService.updateFax({id:t,pbxFax:r}).pipe((0,C.T)(()=>t)).pipe((0,te.Pr)("_i18n.FaxNotFoundEditErrorMessage")):this.faxApiService.createFax({pbxFax:r}).pipe((0,C.T)(s=>s.Id))).pipe(this.handleError(this.xapiErrorService,this.cd,this.form),(0,O.M)(s=>this.didSelect.save(s)))};static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],viewQuery:function(r,n){if(1&r&&e.GBs(St.K,5),2&r){let s;e.mGM(s=e.lsd())&&(n.didSelect=s.first)}},inputs:{fax:"fax",extensionNumberLength:"extensionNumberLength"},features:[e.Vt3],decls:13,vars:11,consts:[[3,"submitted","header","formGroup","submit$","validateBeforeSubmit","buttons"],["formControlName","Number","label","_i18n.FaxExtensionNumber","data-qa","number",3,"maxlength"],["controlName","Number"],["formControlName","AuthID","label","_i18n.FaxExtensionAuthId","data-qa","auth-id",3,"maxlength"],["controlName","AuthID"],["valError","authenticationId"],["formControlName","AuthPassword","label","_i18n.FaxExtensionAuthPassword","data-qa","auth-password",3,"maxlength"],["controlName","AuthPassword"],["valError","pattern"],["formControlName","OutboundCallerId","label","_i18n.DefaultCallerId","data-qa","outbound-caller-id",3,"maxlength"],["controlName","OutboundCallerId"],["data-qa","didNumbers",3,"dn","formControl"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"fieldset")(2,"field-input",1),e.nrm(3,"val-errors",2),e.k0s(),e.j41(4,"field-input",3)(5,"val-errors",4),e.DNE(6,Ya,2,3,"ng-template",5),e.k0s()(),e.j41(7,"field-input-password",6)(8,"val-errors",7),e.DNE(9,za,2,3,"ng-template",8),e.k0s()(),e.j41(10,"field-input",9),e.nrm(11,"val-errors",10),e.k0s(),e.nrm(12,"app-did-number-select",11),e.k0s()()),2&r&&(e.Y8G("header",n.isNew?"_i18n.CreateFaxExtension":"_i18n.EditFaxExtension")("formGroup",n.form)("submit$",n.submit$)("validateBeforeSubmit",n.validateBeforeSubmit)("buttons",n.buttons),e.R7$(2),e.Y8G("maxlength",50),e.R7$(2),e.Y8G("maxlength",50),e.R7$(3),e.Y8G("maxlength",50),e.R7$(3),e.Y8G("maxlength",50),e.R7$(2),e.Y8G("dn",n.fax.Number)("formControl",n.didNumbersFormControl))},dependencies:[$e.p,o.X1,o.BC,o.cb,o.tU,o.l_,o.j4,o.JD,X.m,G.IH,G.VI,Ja.$,St.K,se.D9],encapsulation:2})}return i})();var hr=l(81753),br=l(95847),Za=l(12239),qa=l(21599),eo=l(94979),to=l(23294);const no=[[["val-errors"]]],ro=["val-errors"];function io(i,v){if(1&i&&(e.j41(0,"div",4)(1,"span",5),e.EFF(2),e.k0s(),e.j41(3,"span",6),e.EFF(4),e.k0s()()),2&i){const t=v.item;e.R7$(2),e.Lme("",t.Number," ",t.DisplayName),e.R7$(2),e.JRh(t.EmailAddress)}}let ao=(()=>{class i extends He.z{usersApi=(0,p.WQX)(br.u);label="";placeholder="_i18n.EnterNameOrEmail";serverFilter;clearable=!1;itemsPerPage=xe.tn[0];loading$=new $t.t(!1);requestMore$=new $t.t(void 0);search$=new $t.t("");formControl=new o.MJ(null,{nonNullable:!0});items$=this.search$.pipe((0,te.Or)(),(0,C.T)(t=>t.trim()),(0,to.F)(),(0,_.n)(t=>this.requestMore$.pipe((0,O.M)(()=>this.loading$.next(!0)),(0,eo.m)(r=>r.total>0&&r.items.length>=r.total?(0,q.of)(r):this.getPagedResponse(t,r.page+1).pipe((0,C.T)(n=>({items:r.items.concat(n.value||[]),total:n.totalItems,page:r.page+1}))),{items:[],total:-1,page:-1}),(0,O.M)(()=>this.loading$.next(!1)),(0,C.T)(r=>r.items))),(0,En.H9)());skipFrontSearch=()=>!0;ngOnInit(){this.syncControlState(this.formControl),this.formControl.valueChanges.pipe((0,K.pQ)(this.destroyRef)).subscribe(t=>this.valueChanged(t))}writeValue(t){super.writeValue(t),this.formControl.setValue(t,{emitEvent:!1})}setDisabledState(t){super.setDisabledState(t),(0,Y.TZ)(this.formControl,!t)}get required(){return this.formControl.hasValidator(o.k0.required)}getPagedResponse(t,r){const n={$filter:"not startsWith(Number,'HD')",$select:["Id","Number","DisplayName","EmailAddress"],$orderby:["Number"],$count:!0,$top:this.itemsPerPage,$skip:r*this.itemsPerPage};return t&&(n.$search=(0,Ne.Bj)(t)),this.serverFilter&&(n.$filter+=" and "+this.serverFilter),this.usersApi.listUser(n).pipe((0,C.T)(s=>({value:s.value||[],totalItems:s["@odata.count"]})),(0,P.W)(()=>(0,q.of)({value:[],totalItems:0})))}close(){this.search$.next(""),this.markAsTouched()}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-user-select"]],inputs:{label:"label",placeholder:"placeholder",serverFilter:"serverFilter",clearable:"clearable"},features:[e.Jv_([{provide:o.kq,multi:!0,useExisting:i}]),e.Vt3],ngContentSelectors:ro,decls:8,vars:18,consts:[["data-qa","user-select",3,"label","disabled","required"],["data-qa","select",3,"search","close","clear","scrollToEnd","items","required","placeholder","clearable","searchable","loading","searchFn","virtualScroll","formControl"],["ng-label-tmp","","ng-option-tmp",""],["ngProjectAs","val-errors",5,["val-errors"]],[1,"flex-grow-1","d-flex","align-items-center","justify-content-between"],[1,"text-truncate"],[1,"ng-secondary-text","text-truncate"]],template:function(r,n){1&r&&(e.NAR(no),e.j41(0,"field-wrapper",0)(1,"ng-select",1),e.nI1(2,"async"),e.nI1(3,"translate"),e.nI1(4,"async"),e.bIt("search",function(a){return n.search$.next(a.term)})("close",function(){return n.close()})("clear",function(){return n.search$.next("")})("scrollToEnd",function(){return n.requestMore$.next()}),e.DNE(5,io,5,3,"ng-template",2),e.k0s(),e.qex(6,3),e.SdG(7),e.bVm(),e.k0s()),2&r&&(e.Y8G("label",n.label)("disabled",n.disabled)("required",n.required&&!n.disabled),e.R7$(),e.Y8G("items",e.bMT(2,12,n.items$))("required",n.required)("placeholder",n.value?"":e.bMT(3,14,n.placeholder)+"...")("clearable",n.clearable)("searchable",!0)("loading",e.bMT(4,16,n.loading$)??!1)("searchFn",n.skipFrontSearch)("virtualScroll",!0)("formControl",n.formControl))},dependencies:[o.X1,o.BC,o.YS,o.l_,Me.MQ,Me.vr,Me.Uq,Me.ZZ,je.z,W.Jj,se.D9],encapsulation:2,changeDetection:0})}return i})(),oo=(()=>{class i extends Se.m{inboundRulesApi=(0,p.WQX)(Le);usersApi=(0,p.WQX)(br.u);cd=(0,p.WQX)(re.gRc);buttons=he.P.OkCancel;form=new o.gE({name:new o.MJ("",{nonNullable:!0}),didNumbers:new o.MJ([],{validators:o.k0.required,nonNullable:!0}
1),faxAddressee:new o.MJ(null,o.k0.required)});validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);rule;get f(){return this.form.controls}ngOnInit(){this.rule&&(this.form.patchValue({name:this.rule.RuleName||"",didNumbers:[{Number:this.rule.Data,IsLocal:!0,DisplayName:this.rule.RuleName,TrunkId:this.rule.TrunkDN.Id}],faxAddressee:{Number:this.rule.OfficeHoursDestination?.Number,DisplayName:this.rule.OfficeHoursDestination?.Name}},{emitEvent:!1}),this.usersApi.listUser({$filter:`Number eq '${this.rule.OfficeHoursDestination?.Number}'`,$select:["Id","Number","DisplayName","EmailAddress"],$top:1}).subscribe(t=>{const r=t.value?.[0];r&&this.form.patchValue({faxAddressee:{Number:r.Number,DisplayName:r.DisplayName,EmailAddress:r.EmailAddress,Id:r.Id}},{emitEvent:!1})}))}get isNew(){return!this.rule}submit$=()=>{const{name:t,didNumbers:r,faxAddressee:n}=this.form.value,s=r[0],a={Type:pr.J.Extension,Number:n.Number,To:ge.h.Fax,Name:n.DisplayName,External:""},m={Id:void 0,TrunkDN:{Id:s.TrunkId},CallType:Za.n.AllCalls,Condition:mt.c.BasedOnDid,Data:s.Number,CustomData:"",RuleName:t,OfficeHoursDestination:a,HolidaysDestination:a,AlterDestinationDuringHolidays:!1,AlterDestinationDuringOutOfOfficeHours:!1,OutOfOfficeHoursDestination:a,Hours:{Type:qa.m.AllHours,IgnoreHolidays:!0,Periods:[]}};return(this.rule&&this.rule.Data===m.Data?(0,q.of)(this.rule.Id):this.inboundRulesApi.listInboundRule({$filter:`Condition eq '${m.Condition}' and Data eq '${m.Data}'`,$select:["Id"]}).pipe((0,C.T)(({value:b})=>b?.[0]?.Id))).pipe((0,_.n)(b=>b?this.inboundRulesApi.updateInboundRule({id:b,pbxInboundRule:m}):this.inboundRulesApi.createInboundRule({pbxInboundRule:m})),(0,_.n)(()=>this.rule&&this.rule.Data!==m.Data?this.inboundRulesApi.deleteInboundRule({id:this.rule.Id}):(0,q.of)(void 0)),(0,te.Pr)("_i18n.FaxForwardNotFoundEditErrorMessage"))};static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-fax-forward-edit-dialog"]],inputs:{rule:"rule"},features:[e.Vt3],decls:7,vars:16,consts:[[3,"submitted","header","formGroup","submit$","validateBeforeSubmit","buttons"],["label","_i18n.Name","data-qa","name",3,"formControl","maxlength"],[3,"control"],["data-qa","didNumbers","label","_i18n.DidNumber",3,"formControl","showAsterisk","multiple","clearable"],["label","_i18n.FaxForwardEmail","data-qa","email","serverFilter","EmailAddress ne ''",3,"formControl","clearable"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"field-input",1),e.nrm(2,"val-errors",2),e.k0s(),e.j41(3,"app-did-number-select",3),e.nrm(4,"val-errors",2),e.k0s(),e.j41(5,"app-user-select",4),e.nrm(6,"val-errors",2),e.k0s()()),2&r&&(e.Y8G("header",n.isNew?"_i18n.CreateFaxForward":"_i18n.EditFaxForward")("formGroup",n.form)("submit$",n.submit$)("validateBeforeSubmit",n.validateBeforeSubmit)("buttons",n.buttons),e.R7$(),e.Y8G("formControl",n.f.name)("maxlength",50),e.R7$(),e.Y8G("control",n.f.name),e.R7$(),e.Y8G("formControl",n.f.didNumbers)("showAsterisk",!0)("multiple",!1)("clearable",!1),e.R7$(),e.Y8G("control",n.f.didNumbers),e.R7$(),e.Y8G("formControl",n.f.faxAddressee)("clearable",!1),e.R7$(),e.Y8G("control",n.f.faxAddressee))},dependencies:[$e.p,o.X1,o.BC,o.cb,o.tU,o.l_,o.j4,X.m,G.IH,St.K,ao],encapsulation:2,changeDetection:0})}return i})();var so=l(81789);let lo=(()=>{class i{static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-fax-solid-icon"],["","app-fax-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M480 160V77.25a32 32 0 0 0-9.38-22.63L425.37 9.37A32 32 0 0 0 402.75 0H160a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32h320a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM288 432a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm128 128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-128a16 16 0 0 1-16 16h-32a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h32a16 16 0 0 1 16 16zm0-112H192V64h160v48a16 16 0 0 0 16 16h48zM64 128H32a32 32 0 0 0-32 32v320a32 32 0 0 0 32 32h32a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32z"]],template:function(r,n){1&r&&(p.qSk(),e.rj2(0,"svg",0),e.Hgh(1,"path",1),e.eux())},encapsulation:2})}return i})();function co(i,v){1&i&&(e.j41(0,"span",23),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&i&&(e.R7$(),e.SpI(" ",v.join(", ")||e.bMT(2,1,"_i18n.NotConfigured")," "))}function po(i,v){if(1&i){const t=e.RV6();e.j41(0,"tr",19),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.j41(1,"td",11)(2,"app-checker",20),e.bIt("ngModelChange",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.setSelected(s,n))})("checkerClick",function(n){const s=p.eBV(t).$implicit,a=e.XpG();return p.Njj(a.selector.handleCheckerClick(s,n))}),e.k0s()(),e.j41(3,"td",21)(4,"span"),e.EFF(5),e.k0s(),e.EFF(6,"\xa0 "),e.j41(7,"small"),e.EFF(8),e.nI1(9,"translate"),e.k0s()(),e.j41(10,"td",22),e.nVh(11,co,3,3,"span",23),e.k0s(),e.j41(12,"td",24),e.EFF(13),e.k0s(),e.j41(14,"td",25)(15,"row-action-button")(16,"li",26)(17,"button",27),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.edit(n))}),e.EFF(18),e.nI1(19,"translate"),e.k0s()(),e.j41(20,"li",26)(21,"button",28),e.bIt("click",function(){const n=p.eBV(t).$implicit,s=e.XpG();return p.Njj(s.delete(n))}),e.EFF(22),e.nI1(23,"translate"),e.k0s()()()()()}if(2&i){let t;const r=v.$implicit,n=e.XpG();e.R7$(2),e.Y8G("ngModel",n.selector.isRowSelected(r)),e.R7$(3),e.JRh(n.getNumber(r)),e.R7$(3),e.SpI("(",e.bMT(9,7,r.Extension?"_i18n.FaxExtension":"_i18n.FaxForward"),")"),e.R7$(3),e.vxM((t=n.getDidNumbers(r))?11:-1,t),e.R7$(2),e.JRh(n.getDefaultCallerId(r)),e.R7$(5),e.SpI(" ",e.bMT(19,9,"_i18n.Edit")," "),e.R7$(4),e.SpI(" ",e.bMT(23,11,"_i18n.Remove")," ")}}const ho=[{path:"",component:(()=>{class i{modalService=(0,p.WQX)(L.B);faxApiService=(0,p.WQX)(jn);inboundRulesApi=(0,p.WQX)(Le);resolver=(0,p.WQX)(fr);route=(0,p.WQX)(M.nX);cd=(0,p.WQX)(re.gRc);destroy$=(0,p.WQX)(p.abz);
1resolvedData=this.route.snapshot.data;pager;faxList=[];selector;myPhoneParams=re.hFB.required();constructor(){this.selector=new at.a({cd:this.cd,keySelector:i.getId}),this.pager=new We.f(this.destroy$,this.resolver,this.resolvedData.faxList),this.pager.pagedItems$.pipe((0,te.Tg)(this.modalService),(0,K.pQ)(this.destroy$)).subscribe(t=>this.updateItems(t))}updateItems(t){this.selector.onDataChanged(t.value||[]),this.faxList=t.value||[],this.cd.markForCheck()}static getId(t){return t.Extension?t.Extension.Id:t.Forward.Id}getNumber(t){return t.Extension?t.Extension.Number:t.Forward.OfficeHoursDestination.Number}getDefaultCallerId(t){return t.Extension?.OutboundCallerId||""}addFaxExtension(){this.faxApiService.initFax().pipe((0,te.Tg)(this.modalService)).subscribe(t=>this.showEditFaxDialog({Extension:t}))}addFaxForward(){this.showEditFaxDialog({})}edit(t){this.showEditFaxDialog(t||this.selector.firstSelected)}getDidNumbers(t){return t.Extension?(t.Extension.Dids??[]).map(r=>(0,hr.fE)(r.Number,r.DisplayName)):[(0,hr.fE)(t.Forward.Data,t.Forward.RuleName)]}showEditFaxDialog(t){t&&(t.Extension?this.modalService.showDialog(Ka,{fax:t.Extension,extensionNumberLength:this.myPhoneParams().ENL}):this.modalService.showDialog(oo,{rule:t.Forward})).pipe(te.nx).subscribe(()=>this.pager.refresh$.next())}delete(t){let r;if(t.Extension)r=this.modalService.confirmDeletion("_i18n.AreYouSureYouWantToDeleteFaxExtension").pipe((0,_.n)(()=>this.faxApiService.deleteFax({id:t.Extension.Id})),(0,te.Y$)());else{if(!t.Forward)return;r=this.modalService.confirmDeletion("_i18n.AreYouSureYouWantToDeleteFaxForward").pipe((0,_.n)(()=>this.inboundRulesApi.deleteInboundRule({id:t.Forward.Id})),(0,te.Y$)())}r.subscribe({next:()=>{this.selector.resetSingle(i.getId(t)),this.pager.refresh$.next()},error:n=>this.modalService.error(n)})}batchDelete(){const t=this.selector.selectedValues;t.length>0&&(0,Z.zq)(this.modalService).pipe((0,_.n)(()=>{const r=t.map(({Extension:m})=>m?.Id).filter(Boolean),n=t.map(({Forward:m})=>m?.Id).filter(Boolean),s=r.length?this.faxApiService.bulkFaxDelete({faxBulkFaxDeleteRequestBody:{ids:r}}):(0,q.of)(void 0),a=n.length?this.inboundRulesApi.bulkInboundRulesDelete({inboundRulesBulkInboundRulesDeleteRequestBody:{ids:n}}):(0,q.of)(void 0);return(0,Ze.p)([s,a])})).subscribe({next:()=>{this.selector.resetAll(),this.pager.refresh$.next()},error:r=>this.modalService.error(r)})}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-fax-list"]],inputs:{myPhoneParams:[1,"myPhoneParams"]},decls:51,vars:39,consts:[["header","_i18n.Fax","helpUrl","_i18n.FAXEditorUri"],["top-bar","",1,"button-group"],["data-qa","add-fax","theme","btn-primary","text","_i18n.Add","alignment","left"],["icon",""],["dropdown-item","","data-qa","add-fax-extension",3,"click"],["dropdown-item","","data-qa","add-fax-forward",3,"click"],["data-qa","edit-fax","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","batch-delete-fax","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","fax-server","routerLink","server",1,"btn","btn-primary"],["top-bar","",3,"formControl"],["full-width","",1,"scrollable-table"],[1,"checker"],["data-qa","select-all",3,"ngModelChange","ngModel"],[1,"col-size-200"],[1,"xl-visible"],[1,"actions"],["data-qa","fax-row",1,"clickable"],["colspan","5"],[3,"pageChanged","currentPage","itemsPerPage","totalItems","showBoundaryLinks"],["data-qa","fax-row",1,"clickable",3,"click"],["data-qa","checker",3,"ngModelChange","checkerClick","ngModel"],["data-qa","description"],["data-qa","did-numbers",1,"xl-visible"],[1,"line-clamp-1"],["nowrap","","data-qa","default-caller-id"],["data-qa","actions",1,"actions"],["role","menuitem"],["type","button","data-qa","edit-fax",1,"dropdown-item",3,"click"],["type","button","data-qa","delete-fax",1,"dropdown-item",3,"click"]],template:function(r,n){1&r&&(e.j41(0,"app-page",0)(1,"div",1)(2,"app-button-with-dropdown",2),e.nrm(3,"app-plus-solid-icon",3),e.j41(4,"div",4),e.bIt("click",function(){return n.addFaxExtension()}),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"div",5),e.bIt("click",function(){return n.addFaxForward()}),e.EFF(8),e.nI1(9,"translate"),e.k0s()(),e.j41(10,"button",6),e.bIt("click",function(){return n.edit()}),e.nrm(11,"app-pencil-solid-icon"),e.j41(12,"span"),e.EFF(13),e.nI1(14,"translate"),e.k0s()(),e.j41(15,"button",7),e.bIt("click",function(){return n.batchDelete()}),e.nrm(16,"app-trash-alt-solid-icon"),e.j41(17,"span"),e.EFF(18),e.nI1(19,"translate"),e.k0s()(),e.j41(20,"a",8),e.nrm(21,"app-fax-solid-icon"),e.j41(22,"span"),e.EFF(23),e.nI1(24,"translate"),e.k0s()()(),e.nrm(25,"search-bar",9),e.j41(26,"table",10)(27,"thead")(28,"tr")(29,"th",11)(30,"app-checker",12),e.bIt("ngModelChange",function(a){return n.selector.setSelectAll(a)}),e.k0s()(),e.j41(31,"th",13),e.EFF(32),e.nI1(33,"translate"),e.k0s(),e.j41(34,"th",14),e.EFF(35),e.nI1(36,"translate"),e.k0s(),e.j41(37,"th"),e.EFF(38),e.nI1(39,"translate"),e.k0s(),e.nrm(40,"th",15),e.k0s()(),e.j41(41,"tbody"),e.Z7z(42,po,24,13,"tr",16,e.fX1),e.k0s(),e.j41(44,"tfoot")(45,"tr")(46,"td",17)(47,"app-paging",18),e.nI1(48,"async"),e.nI1(49,"async"),e.nI1(50,"async"),e.bIt("pageChanged",function(a){return n.pager.pageChanged(a)}),e.k0s()()()()()()),2&r&&(e.R7$(5),e.SpI(" ",e.bMT(6,17,"_i18n.AddFaxExtension")," "),e.R7$(3),e.SpI(" ",e.bMT(9,19,"_i18n.AddFaxForward")," "),e.R7$(2),e.Y8G("disabled",!n.selector.isOneSelected),e.R7$(3),e.JRh(e.bMT(14,21,"_i18n.Edit")),e.R7$(2),e.Y8G("disabled",!n.selector.isAnySelected),e.R7$(3),e.Lme("",e.bMT(19,23,"_i18n.Delete"),"",n.selector.selectedCountLabel),e.R7$(5),e.JRh(e.bMT(24,25,"_i18n.FaxServer")),e.R7$(2),e.Y8G("formControl",n.pager.search),e.R7$(5),e.Y8G("ngModel",n.selector.isAnySelected),e.R7$(2),e.JRh(e.bMT(33,27,"_i18n.Extension")),e.R7$(3),e.JRh(e.bMT(36,29,"_i18n.DIDSTableTitle")),e.R7$(3),e.JRh(e.bMT(39,31,"_i18n.DefaultCallerId")),e.R7$(4),e.Dyx(n.faxList),e.R7$(5),e.Y8G("currentPage",e.bMT(48,33,n.pager.currentPage$))("itemsPerPage",e.bMT(49,35,n.pager.pageSize$))("totalItems",e.bMT(50,37,n.pager.totalCount$))("showBoundaryLinks",!0))},dependencies:[ve.H,so.b,Qe.K,Xe.T,De.d,Gn.Wk,lo,d.L,o.X1,o.BC,o.l_,ze.$,o.YN,o.vS,u.I,xe.u4,se.D9,W.Jj],encapsulation:2})}return i})(),resolve:{faxList:()=>{const i=(0,p.WQX)(g.s);return(0,p.WQX)(fr).resolveData().pipe((0,P.W)(t=>i.handleError(t)))},myPhoneParams:l(48244).M},data:{title:"_i18n.Fax",navTitle:"_i18n.Fax"}},{path:"server",component:Ga,resolve:{faxServerSettingsModel:()=>{const i=(0,p.WQX)(cr.V),v=(0,p.WQX)(ur.Q),t=(0,p.WQX)(g.s);return i.getFaxServerSettings({}).pipe((0,_.n)(r=>(r.FaxServerId?v.getDids$(r.FaxServerId):(0,q.of)([])).pipe((0,C.T)(s=>({faxServerSettings:r,didNumbers:s})))),(0,P.W)(r=>t.handleError(r)))}}
1,data:{title:"_i18n.FaxServer",navTitle:"_i18n.FaxServer"}}],Ae={SingleFileForAllCalls:"SingleFileForAllCalls",SingleFileForEachCall:"SingleFileForEachCall",PassiveSocket:"PassiveSocket",ActiveSocket:"ActiveSocket"};var bo=l(67290);function go(i,v){if(1&i){const t=e.RV6();e.j41(0,"field-checkbox-group",3),e.mxI("ngModelChange",function(n){const s=p.eBV(t).$implicit;return e.DH7(s.value,n)||(s.value=n),p.Njj(n)}),e.k0s()}if(2&i){const t=v.$implicit;e.R50("ngModel",t.value),e.Y8G("options",t.options)}}let vo=(()=>{class i extends Se.m{buttons=he.P.OkCancel;possibleFields=[];activeFields=[];columnsCount=3;columns=[];ngOnInit(){const t=Math.ceil(this.possibleFields.length/this.columnsCount),r=this.activeFields.map(n=>n.Name);for(let n=0;n<this.columnsCount;n++){const s=this.possibleFields.slice(n*t,(n+1)*t).map(m=>({label:m,value:m})),a=r.filter(m=>s.some(h=>h.value===m));this.columns.push({value:a,options:s})}}getPayload(){return[].concat(...this.columns.map(t=>t.value))}static \u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(i)))(n||i)}})();static \u0275cmp=e.VBU({type:i,selectors:[["app-cdr-possible-fields-table"]],hostVars:2,hostBindings:function(r,n){2&r&&e.AVh("modal-lg",!0)},inputs:{possibleFields:"possibleFields",activeFields:"activeFields"},features:[e.Vt3],decls:4,vars:1,consts:[["header","_i18n.ManageCDROutputFields",3,"submitted","buttons"],[1,"d-md-flex","column-gap-5"],[1,"flex-grow-1",3,"ngModel","options"],[1,"flex-grow-1",3,"ngModelChange","ngModel","options"]],template:function(r,n){1&r&&(e.j41(0,"app-modal-dialog",0),e.bIt("submitted",function(){return n.onSubmit()}),e.j41(1,"div",1),e.Z7z(2,go,1,2,"field-checkbox-group",2,e.fX1),e.k0s()()),2&r&&(e.Y8G("buttons",n.buttons),e.R7$(2),e.Dyx(n.columns))},dependencies:[$e.p,bo.c,o.X1,o.BC,o.YN,o.vS],encapsulation:2,changeDetection:0})}return i})();var yo=l(5964),Co=l(30646),Qt=l(61811),_o=l(8470),To=l(35606);function xo(i,v){if(1&i){const t=e.RV6();e.j41(0,"field-input-number",12),e.bIt("focusout",function(){p.eBV(t);const n=e.XpG(3);return p.Njj(n.saveField())}),e.nrm(1,"val-errors",13),e.k0s()}if(2&i){const t=e.XpG(3);e.Y8G("min",0)("max",999)("formControl",null==t.editableField?null:t.editableField.controls.Length),e.R7$(),e.Y8G("control",null==t.editableField?null:t.editableField.controls.Length)}}function So(i,v){1&i&&(e.j41(0,"span"),e.EFF(1,"dynamic"),e.k0s())}function $o(i,v){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI("fixed (",t.Length," characters)")}}function Po(i,v){if(1&i){const t=e.RV6();e.j41(0,"span",14),e.bIt("click",function(){p.eBV(t);const n=e.XpG(2).$implicit,s=e.XpG();return p.Njj(s.editField(n))}),e.nVh(1,So,2,0,"span"),e.nVh(2,$o,2,1,"span"),e.k0s()}if(2&i){const t=e.XpG();e.R7$(),e.vxM(0===t.Length?1:-1),e.R7$(),e.vxM(t.Length>0?2:-1)}}function Io(i,v){if(1&i&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.SpI(" ",t.Name," ")}}function Fo(i,v){if(1&i&&(e.j41(0,"tr",4)(1,"td",5),e.nI1(2,"translate"),e.nrm(3,"i",6),e.j41(4,"span",7),e.EFF(5),e.k0s()(),e.j41(6,"td",8),e.EFF(7),e.k0s(),e.j41(8,"td"),e.nVh(9,xo,2,4,"field-input-number",9)(10,Po,3,2,"span",10),e.k0s(),e.DNE(11,Io,2,1,"div",11),e.k0s()),2&i){const t=v,r=e.XpG().$index,n=e.XpG();e.R7$(),e.Y8G("title",e.mNQ(e.bMT(2,5,"_i18n.MoveCodec"))),e.R7$(4),e.JRh(r+1),e.R7$(2),e.SpI(" ",t.Name," "),e.R7$(2),e.vxM((null==n.editableField?null:n.editableField.value.Name)===t.Name?9:10)}}function Ro(i,v){if(1&i&&e.nVh(0,Fo,12,7,"tr",4),2&i){let t;e.vxM((t=v.$implicit.value)?0:-1,t)}}let Ao=(()=>{class i{cd=(0,p.WQX)(re.gRc);destroy$=(0,p.WQX)(p.abz);fieldsArray;editableField=null;ngOnInit(){this.fieldsArray.valueChanges.pipe((0,K.pQ)(this.destroy$)).subscribe(()=>{this.cd.markForCheck()})}editField(t){this.editableField?.invalid||(this.editableField=t,this.cd.markForCheck())}saveField(){this.editableField&&this.editableField.valid&&(this.editableField.markAsDirty(),this.editableField=null,this.cd.markForCheck())}dropField(t,r){(0,Y.jc)(r,t.previousIndex,t.currentIndex),r.markAsDirty()}static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-cdr-fields-table"]],inputs:{fieldsArray:"fieldsArray"},decls:14,vars:9,consts:[["cdkDropList","",1,"cdrFieldsList","fields-table","scrollable-table",3,"cdkDropListDropped"],[1,"codec-grid","fw-bold","border-bottom"],[1,"checker"],[1,"col-size-200"],["data-qa","cdr-row","cdkDrag","","cdkDragBoundary",".cdrFieldsList","cdkDragLockAxis","y"],["cdkDragHandle","","data-qa","move-handle",1,"align-items-center","cursor-move","text-nowrap",3,"title"],["app-ellipsis-v-regular-icon","",1,"checker","customSVGIcons","svg-md"],[1,"fw-bold"],["data-qa","name"],["wcAutofocus","","data-qa","field-length",1,"field-length-input",3,"min","max","formControl"],["data-qa","length",1,"field-link"],["class","dragdrop-placeholder",4,"cdkDragPreview"],["wcAutofocus","","data-qa","field-length",1,"field-length-input",3,"focusout","min","max","formControl"],[3,"control"],["data-qa","length",1,"field-link",3,"click"],[1,"dragdrop-placeholder"]],template:function(r,n){1&r&&(e.j41(0,"table",0),e.bIt("cdkDropListDropped",function(a){return n.dropField(a,n.fieldsArray)}),e.j41(1,"thead",1)(2,"tr")(3,"th",2),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"th"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"th",3),e.
1EFF(10),e.nI1(11,"translate"),e.k0s()()(),e.Z7z(12,Ro,1,1,null,null,e.fX1),e.k0s()),2&r&&(e.R7$(4),e.JRh(e.bMT(5,3,"_i18n.Priority")),e.R7$(3),e.JRh(e.bMT(8,5,"_i18n.Name")),e.R7$(3),e.JRh(e.bMT(11,7,"_i18n.Length")),e.R7$(2),e.Dyx(n.fieldsArray.controls))},dependencies:[Qt.O7,Qt.T1,Qt.Fb,_o.Y,Ke.B,To.J,o.X1,o.BC,o.l_,G.IH,Qt.r0,se.D9],styles:[".fields-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:nth-child(2n){background:var(--bg-primary-darken)}.field-length-input[_ngcontent-%COMP%]{width:55px;margin-bottom:0}.field-length-input[_ngcontent-%COMP%]     input{height:18px}.field-length-input[_ngcontent-%COMP%]     .input-group{height:auto}.field-link[_ngcontent-%COMP%]{cursor:pointer;color:var(--bg-secondary);-webkit-text-decoration:var(--bg-secondary) dotted underline;text-decoration:var(--bg-secondary) dotted underline}"],changeDetection:0})}return i})();function ko(i,v){if(1&i&&(e.j41(0,"field-input-number",4),e.nrm(1,"val-errors",11),e.k0s()),2&i){const t=e.XpG();e.Y8G("min",1)("max",1024)("formControl",t.f.LogSize),e.R7$(),e.Y8G("control",t.f.LogSize)}}function Eo(i,v){if(1&i&&(e.j41(0,"field-input",5),e.nrm(1,"val-errors",11),e.k0s()),2&i){const t=e.XpG();e.Y8G("formControl",t.f.SocketIpAddress),e.R7$(),e.Y8G("control",t.f.SocketIpAddress)}}function Mo(i,v){if(1&i&&(e.j41(0,"field-select",6),e.nrm(1,"val-errors",11),e.k0s()),2&i){const t=e.XpG();e.Y8G("options",t.networkInterfacesOptions)("formControl",t.f.SocketIpAddress),e.R7$(),e.Y8G("control",t.f.SocketIpAddress)}}function Do(i,v){if(1&i&&(e.j41(0,"field-input-number",7),e.nrm(1,"val-errors",11),e.k0s()),2&i){const t=e.XpG();e.Y8G("min",0)("max",65535)("formControl",t.f.SocketPort),e.R7$(),e.Y8G("control",t.f.SocketPort)}}let Bo=(()=>{class i{route=(0,p.WQX)(M.nX);modalService=(0,p.WQX)(L.B);cd=(0,p.WQX)(re.gRc);cdrSettingsApiService=(0,p.WQX)(Dt);networkSettingsApiService=(0,p.WQX)(tt.j);destroy$=(0,p.WQX)(p.abz);cdrSettings;form;networkInterfacesOptions;logTypeOptions=[{label:"_i18n.CDRLogTypeSingleFileForAllCalls",value:Ae.SingleFileForAllCalls},{label:"_i18n.CDRLogTypeSingleFileForEachCall",value:Ae.SingleFileForEachCall},{label:"_i18n.CDRLogTypeActiveSocket",value:Ae.ActiveSocket},{label:"_i18n.CDRLogTypePassiveSocket",value:Ae.PassiveSocket}];get f(){return this.form.controls}constructor(){this.cdrSettings=this.route.snapshot.data.cdr.cdrSettings??{},this.networkInterfacesOptions=(this.route.snapshot.data.cdr.networkInterfaces??[]).map(t=>({label:t,value:t})),this.form=new o.gE({Enabled:new o.MJ(!!this.cdrSettings.Enabled,{nonNullable:!0}),LogType:new o.MJ(this.cdrSettings.LogType,{nonNullable:!0}),LogSize:new o.MJ(this.cdrSettings.LogSize,o.k0.required),SocketIpAddress:new o.MJ(this.cdrSettings.SocketIpAddress,[o.k0.required,fe.Ct]),SocketPort:new o.MJ(this.cdrSettings.SocketPort,o.k0.required),RemoveCommaDelimiters:new o.MJ(this.cdrSettings.RemoveCommaDelimiters),EnabledFields:this.createEnabledFieldsFormArray(this.cdrSettings.EnabledFields)})}ngOnInit(){this.form.controls.LogType.valueChanges.pipe((0,K.pQ)(this.destroy$)).subscribe(t=>{t===Ae.ActiveSocket?this.f.SocketIpAddress.setValue(this.cdrSettings?.SocketIpAddress??""):t===Ae.PassiveSocket&&this.f.SocketIpAddress.setValue(this.networkInterfacesOptions[0]?.value??""),(0,Y.TZ)(this.f.LogSize,t===Ae.SingleFileForAllCalls),this.cd.markForCheck()}),(0,ke.z)([(0,Y.XP)(this.f.Enabled),(0,Y.XP)(this.f.LogType)]).pipe((0,K.pQ)(this.destroy$)).subscribe({next:([t,r])=>{(0,Y.TZ)(this.f.LogType,t),(0,Y.TZ)(this.f.LogSize,t&&r===Ae.SingleFileForAllCalls),(0,Y.TZ)(this.f.SocketIpAddress,t&&(r===Ae.ActiveSocket||r===Ae.PassiveSocket)),(0,Y.TZ)(this.f.SocketPort,t&&(r===Ae.ActiveSocket||r===Ae.PassiveSocket)),(0,Y.TZ)(this.f.RemoveCommaDelimiters,t),(0,Y.TZ)(this.f.EnabledFields,t)}})}createEnabledFieldsFormArray(t){return new o.Yp(t?t.map(r=>this.createFieldFromObj(r)):[])}createFieldFromObj(t){return new o.gE({Length:new o.MJ(t.Length,{nonNullable:!0,validators:[o.k0.required,o.k0.min(0),o.k0.max(999)]}),Name:new o.MJ(t.Name)})}save$=()=>this.cdrSettingsApiService.updateCDRSettings({pbxCDRSettings:this.form.value}).pipe((0,_.n)(()=>(0,Ze.p)([this.cdrSettingsApiService.getCDRSettings({}),this.networkSettingsApiService.getIfaces({})]).pipe((0,C.T)(([t,r])=>({cdrSettings:t,networkInterfaces:r.value})))),(0,O.M)(t=>{this.cdrSettings=t.cdrSettings??{},this.networkInterfacesOptions=(t.networkInterfaces??[]).map(r=>({label:r,value:r}))}));manageCDRActiveFields(){this.modalService.showComponent(vo,{initialState:{possibleFields:this.cdrSettings.PossibleFields,activeFields:this.form.value.EnabledFields}}).pipe((0,C.T)(t=>t.decision===he.R.Ok?t.payload:null),(0,yo.p)(t=>null!==t)).subscribe({next:t=>{const r=this.form.value.EnabledFields;for(const n of t)-1===r.findIndex(s=>s.Name===n)&&this.form.controls.EnabledFields.push(this.createFieldFromObj({Name:n,Length:0}));for(let n=r.length-1;n>=0;n--)-1===t.findIndex(s=>s===r[n].Name)&&this.form.controls.EnabledFields.removeAt(n);this.form.updateValueAndValidity(),this.form.markAsDirty(),this.cd.markForCheck()},error:t=>this.modalService.error(t)})}PbxTypeOfCDRLog=Ae;static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-cdr-settings"]],decls:19,vars:19,consts:[["header","_i18n.CallDataRecords","helpUrl","_i18n.AdvancedUri",3,"formGroup","save$"],["data-qa","enabled","label","_i18n.EnableCDR",3,"formControl"],[1,"d-flex","flex-column","flex-lg-row","column-gap-4"],["data-qa","log-type","label","_i18n.CDRLogType",3,"options","formControl"],["data-qa","log-size","label","_i18n.CDRFileSize",3,"min","max","formControl"],["data-qa","ip-address","label","_i18n.CDRSocketIpAddress",3,"formControl"],["data-qa","ip-address","label","_i18n.CDRSocketIpAddress",3,"options","formControl"],["data-qa","port","label","_i18n.CDRSocketPort",3,"min","max","formControl"],["label","_i18n.CDRRemoveCommaDelimiters","data-qa","remove-comma-delimiters",3,"formControl"],["data-qa","manage-cdr-output","type","button",1,"btn","btn-primary","mb-4",3,"click"],[3,"fieldsArray"],[3,"control"]],template:function(r,n){1&r&&(e.j41(0,"edit-panel",0),e.nrm(1,"field-checkbox",1),e.j41(2,"fieldset")(3,"div",2),e.nrm(4,"field-select",3),e.nVh(5,ko,2,4,"field-input-number",4),e.nV
1h(6,Eo,2,2,"field-input",5),e.nVh(7,Mo,2,3,"field-select",6),e.nVh(8,Do,2,4,"field-input-number",7),e.k0s(),e.nrm(9,"field-checkbox",8),e.k0s(),e.j41(10,"fieldset")(11,"legend"),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"button",9),e.bIt("click",function(){return n.manageCDRActiveFields()}),e.nrm(15,"app-gear-solid-icon"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.nrm(18,"app-cdr-fields-table",10),e.k0s()()),2&r&&(e.Y8G("formGroup",n.form)("save$",n.save$),e.R7$(),e.Y8G("formControl",n.f.Enabled),e.R7$(3),e.Y8G("options",n.logTypeOptions)("formControl",n.f.LogType),e.R7$(),e.vxM(n.form.value.LogType===n.PbxTypeOfCDRLog.SingleFileForAllCalls?5:-1),e.R7$(),e.vxM(n.form.value.LogType===n.PbxTypeOfCDRLog.ActiveSocket?6:-1),e.R7$(),e.vxM(n.form.value.LogType===n.PbxTypeOfCDRLog.PassiveSocket?7:-1),e.R7$(),e.vxM(n.form.value.LogType===n.PbxTypeOfCDRLog.ActiveSocket||n.form.value.LogType===n.PbxTypeOfCDRLog.PassiveSocket?8:-1),e.R7$(),e.Y8G("formControl",n.f.RemoveCommaDelimiters),e.R7$(),e.AVh("d-none",!n.form.value.Enabled),e.R7$(2),e.JRh(e.bMT(13,15,"_i18n.ConfigureCDROutputFields")),e.R7$(4),e.SpI(" ",e.bMT(17,17,"_i18n.ManageCDROutputFields")," "),e.R7$(2),e.Y8G("fieldsArray",n.f.EnabledFields))},dependencies:[A.Q,o.X1,o.BC,o.cb,o.l_,o.j4,x.t,V.q,Ke.B,G.IH,X.m,Co.n,Ao,se.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}}@media(min-width:992px){field-select[_ngcontent-%COMP%], field-input[_ngcontent-%COMP%], field-input-number[_ngcontent-%COMP%]{flex-basis:300px}}"]})}return i})();var jo=l.t(l.p+"media/FreeImage_0-a61c39d8.txt"),Ho=l.t(l.p+"media/Freepik_0-19b55ec6.txt"),Vo=l.t(l.p+"media/LibJXR_0-b65e2989.txt"),Lo=l.t(l.p+"media/LibOpenJPEG_0-dfe36fc3.txt"),Qo=l.t(l.p+"media/LibPNG_0-3fbc1ca6.txt"),Uo=l.t(l.p+"media/LibRawLite_0-bc2dcc0d.txt"),Yo=l.t(l.p+"media/LibTIFF4_0-b53866bc.txt"),Ko=l.t(l.p+"media/LibWebP_0-2fca3d51.txt"),qo=l.t(l.p+"media/Libjpeg_0-086b6c53.txt"),ts=l.t(l.p+"media/Nginx_0-f053470c.txt"),rs=l.t(l.p+"media/OpenEXR_0-ff0bcd28.txt"),as=l.t(l.p+"media/OpenSSL_0-effdde22.txt"),ss=l.t(l.p+"media/Opus_0-064180da.txt"),ds=l.t(l.p+"media/PostgreSQL_0-0006a21b.txt"),ps=l.t(l.p+"media/SpanDSP_0-adcee447.txt"),ms=l.t(l.p+"media/Speex_0-dbf19c91.txt"),hs=l.t(l.p+"media/Windows.Service.Wrapper_0-41f6514b.txt"),gs=l.t(l.p+"media/ilmbase_0-ff0bcd28.txt"),ys=l.t(l.p+"media/libSRTP_0-c2a070f2.txt"),_s=l.t(l.p+"media/libgsm_0-ca857819.txt"),xs=l.t(l.p+"media/libpqxx_0-7e749aa7.txt"),$s=l.t(l.p+"media/reSIProcate_0-b7c2ff5a.txt"),Is=l.t(l.p+"media/zlib_0-f9058a1c.txt");const As=[l.t(l.p+"media/TimescaleDB-29b01d1d.txt"),jo,Ho,Vo,Lo,Qo,Uo,Yo,Ko,qo,ts,rs,as,ss,ds,ps,ms,hs,gs,ys,_s,xs,$s,Is];var gr=l.t(l.p+"media/AWSSDK.Core_3.7.400.48-fe920bbb.txt"),Ds=l.t(l.p+"media/Autofac.Extensions.DependencyInjection_10.0.0-8fdaaebb.txt"),ws=l.t(l.p+"media/Autofac_8.1.1-d55cdf7a.txt"),Ns=l.t(l.p+"media/Azure.Core_1.28.0-b2c8932c.txt"),Os=l.t(l.p+"media/BitMiracle.LibTiff.NET_2.4.649-95b281e5.txt"),Gs=l.t(l.p+"media/BouncyCastle.Cryptography_2.4.0-eec31058.txt"),Ws=l.t(l.p+"media/CsvHelper_33.0.1-ee66ecd4.txt"),Xs=l.t(l.p+"media/Dapper_2.1.35-aaab8e1d.txt"),Js=l.t(l.p+"media/DnsClient_1.8.0-3d021b64.txt"),zs=l.t(l.p+"media/EmailValidation_1.2.0-9aa2154e.txt"),Zs=l.t(l.p+"media/FirebaseAdmin_3.1.0-08622a8f.txt"),el=l.t(l.p+"media/FluentFTP_51.1.0-063370f1.txt"),nl=l.t(l.p+"media/FreeImage.Standard_4.3.8-12-d7f2a9db.txt"),qe=l.t(l.p+"media/Google.Api.CommonProtos_2.7.0-2d8d2fcb.txt"),Xt=l.t(l.p+"media/Google.Apis_1.60.0-1e70d4c2.txt"),Ge=l.t(l.p+"media/Google.Cloud.Speech.V1_3.4.0-c03e84e3.txt"),sl=l.t(l.p+"media/Google.Protobuf_3.21.0-845c09a2.txt"),dl=l.t(l.p+"media/Grpc.Core_2.46.6-d06b87db.txt"),pl=l.t(l.p+"media/HtmlAgilityPack_1.11.71-cd7a1090.txt"),ml=l.t(l.p+"media/IniFileParser.Core_2.3.0-65091fb2.txt"),hl=l.t(l.p+"media/MailKit_4.8.0-e6835f2c.txt"),gl=l.t(l.p+"media/MediaInfo.Wrapper.Core_21.9.2-25-7f975793.txt"),yl=l.t(l.p+"media/Microsoft.Data.SqlClient_5.2.2-e5c655b8.txt"),_l=l.t(l.p+"media/Microsoft.Graph.Core_0-84f98475.txt"),xl=l.t(l.p+"media/Microsoft.Graph_0-84f98475.txt"),$l=l.t(l.p+"media/Microsoft.Identity.Web_7-d85e7147.txt"),Il=l.t(l.p+"media/MimeKit_4.8.0-9d9f1e41.txt"),Rl=l.t(l.p+"media/MongoDB.Driver_3.0-18c977b5.txt"),kl=l.t(l.p+"media/Mono.Options_6.12.0.148-38821606.txt"),Ml=l.t(l.p+"media/MySqlConnector_2.4.0-d0618553.txt"),Bl=l.t(l.p+"media/NSwag_0-e1e848a0.txt"),jl=l.t(l.p+"media/NetDevPack.Security.Jwt_8.1.5-89a46ebc.txt"),Hl=l.t(l.p+"media/Newtonsoft.Json.Bson_1.0.2-268dd409.txt"),Vl=l.t(l.p+"media/Newtonsoft.Json_13.0.3-833bafbe.txt"),Ll=l.t(l.p+"media/Npgsql.EntityFrameworkCore.PostgreSQL_8.0.10-99681dd6.txt"),Ql=l.t(l.p+"media/Npgsql_8.0.5-7e9bd0ff.txt"),Ul=l.t(l.p+"media/QRCoder_1.6.0-aec6eb56.txt"),Yl=l.t(l.p+"media/Quartz.Extensions.DependencyInjection_3.13.1-6c81f0b2.txt"),Kl=l.t(l.p+"media/Quartz.Extensions.Hosting_3.13.1-6c81f0b2.txt"),ql=l.t(l.p+"media/Quartz_3.13.1-6c81f0b2.txt"),td=l.t(l.p+"media/SMBLibrary_0-4a20916b.txt"),rd=l.t(l.p+"media/SSH.NET_2024.2.0-821af0cf.txt"),ad=l.t(l.p+"media/SharpCompress_0.38.0-ff71bb15.txt"),sd=l.t(l.p+"media/Snappier_1.0.0-7d592cac.txt"),dd=l.t(l.p+"media/Std.UriTemplate_0.0.55-32da4646.txt"),Pt=l.t(l.p+"media/Swashbuckle.AspNetCore_6.5.0-1f6c9352.txt");const Rd=[gr,gr,Ds,ws,Ns,Os,Gs,Ws,Xs,Js,zs,Zs,el,nl,qe,qe,qe,qe,qe,Xt,qe,Xt,qe,Xt,Xt,Ge,Ge,Ge,Ge,sl,Ge,Ge,Ge,dl,Ge,Ge,pl,ml,hl,gl,yl,_l,xl,$l,Il,Rl,kl,Ml,Bl,jl,Hl,Vl,Ll,Ql,Ul,Yl,Kl,ql,td,rd,ad,sd,dd,Pt,Pt,Pt,Pt,Pt,l.t(l.p+"media/Thinkecture.Logging.Configuration_2.0.0-1a826eee.txt"),l.t(l.p+"media/TimeZoneConverter_6.1.0-ab6e07c3.txt"),l.t(l.p+"media/Twilio_0-877f902c.txt"),l.t(l.p+"media/WebPush_0-50386836.txt"),l.t(l.p+"media/ZstdSharp.Port_
10.6.2-85b6c8bc.txt"),l.t(l.p+"media/libphonenumber-csharp_8.13.49-1dd9695f.txt"),l.t(l.p+"media/prometheus-net.AspNetCore_8.2.1-0fb2bc61.txt"),l.t(l.p+"media/protobuf-net_2.4.6-2fcc0af4.txt"),l.t(l.p+"media/OpenAI-787ce693.txt")];function Ed(i){const v=i.substring(i.lastIndexOf("/")+1);return v.substring(0,v.lastIndexOf("_"))}function vr(i,v){return v.map((t,r)=>({lib:Ed(t),licenseFilename:i[r].default}))}const Md=[...vr(As,["./licenses/native/TimescaleDB_0.txt","./licenses/native/FreeImage_0.txt","./licenses/native/Freepik_0.txt","./licenses/native/LibJXR_0.txt","./licenses/native/LibOpenJPEG_0.txt","./licenses/native/LibPNG_0.txt","./licenses/native/LibRawLite_0.txt","./licenses/native/LibTIFF4_0.txt","./licenses/native/LibWebP_0.txt","./licenses/native/Libjpeg_0.txt","./licenses/native/Nginx_0.txt","./licenses/native/OpenEXR_0.txt","./licenses/native/OpenSSL_0.txt","./licenses/native/Opus_0.txt","./licenses/native/PostgreSQL_0.txt","./licenses/native/SpanDSP_0.txt","./licenses/native/Speex_0.txt","./licenses/native/Windows.Service.Wrapper_0.txt","./licenses/native/ilmbase_0.txt","./licenses/native/libSRTP_0.txt","./licenses/native/libgsm_0.txt","./licenses/native/libpqxx_0.txt","./licenses/native/reSIProcate_0.txt","./licenses/native/zlib_0.txt"]),...vr(Rd,["AWSSDK.Core_3.7.400.48.txt","AWSSDK.Polly_3.7.401.36.txt","Autofac.Extensions.DependencyInjection_10.0.0.txt","Autofac_8.1.1.txt","Azure.Core_1.28.0.txt","BitMiracle.LibTiff.NET_2.4.649.txt","BouncyCastle.Cryptography_2.4.0.txt","CsvHelper_33.0.1.txt","Dapper_2.1.35.txt","DnsClient_1.8.0.txt","EmailValidation_1.2.0.txt","FirebaseAdmin_3.1.0.txt","FluentFTP_51.1.0.txt","FreeImage.Standard_4.3.8-12.txt","Google.Api.CommonProtos_2.7.0.txt","Google.Api.Gax.Grpc_4.3.1.txt","Google.Api.Gax.Rest_4.3.1.txt","Google.Api.Gax_4.3.1.txt","Google.Apis.Admin.Directory.directory_v1_1.68.txt","Google.Apis.Auth_1.60.0.txt","Google.Apis.Calendar.v3_1.68.txt","Google.Apis.Core_1.60.0.txt","Google.Apis.Gmail.v1_1.68.txt","Google.Apis.Storage.v1_1.60.0.2742.txt","Google.Apis_1.60.0.txt","Google.Cloud.Speech.V1_3.4.0.txt","Google.Cloud.Storage.V1_4.5.0.txt","Google.Cloud.TextToSpeech.V1_3.2.0.txt","Google.LongRunning_3.0.0.txt","Google.Protobuf_3.21.0.txt","GoogleAuthenticator_3.1.txt","Grpc.Auth_2.51.0.txt","Grpc.Core.Api_2.51.0.txt","Grpc.Core_2.46.6.txt","Grpc.Net.Client_2.51.0.txt","Grpc.Net.Common_2.51.0.txt","HtmlAgilityPack_1.11.71.txt","IniFileParser.Core_2.3.0.txt","MailKit_4.8.0.txt","MediaInfo.Wrapper.Core_21.9.2-25.txt","Microsoft.Data.SqlClient_5.2.2.txt","Microsoft.Graph.Core_0.txt","Microsoft.Graph_0.txt","Microsoft.Identity.Web_7.txt","MimeKit_4.8.0.txt","MongoDB.Driver_3.0.txt","Mono.Options_6.12.0.148.txt","MySqlConnector_2.4.0.txt","NSwag_0.txt","NetDevPack.Security.Jwt_8.1.5.txt","Newtonsoft.Json.Bson_1.0.2.txt","Newtonsoft.Json_13.0.3.txt","Npgsql.EntityFrameworkCore.PostgreSQL_8.0.10.txt","Npgsql_8.0.5.txt","QRCoder_1.6.0.txt","Quartz.Extensions.DependencyInjection_3.13.1.txt","Quartz.Extensions.Hosting_3.13.1.txt","Quartz_3.13.1.txt","SMBLibrary_0.txt","SSH.NET_2024.2.0.txt","SharpCompress_0.38.0.txt","Snappier_1.0.0.txt","Std.UriTemplate_0.0.55.txt","Swashbuckle.AspNetCore.Newtonsoft_6.5.0.txt","Swashbuckle.AspNetCore.SwaggerGen_6.5.0.txt","Swashbuckle.AspNetCore.SwaggerUI_6.5.0.txt","Swashbuckle.AspNetCore.Swagger_6.5.0.txt","Swashbuckle.AspNetCore_6.5.0.txt","Thinkecture.Logging.Configuration_2.0.0.txt","TimeZoneConverter_6.1.0.txt","Twilio_0.txt","WebPush_0.txt","ZstdSharp.Port_0.6.2.txt","libphonenumber-csharp_8.13.49.txt","prometheus-net.AspNetCore_8.2.1.txt","protobuf-net_2.4.6.txt","OpenAI_2.8.0.txt"])].sort(function kd(i,v){return i.lib<v.lib?-1:i.lib>v.lib?1:0});function Dd(i,v){if(1&i&&(e.j41(0,"p")(1,"a",1),e.EFF(2),e.k0s()()),2&i){const t=v.$implicit;e.R7$(),e.Y8G("href",e.mNQ(t.licenseFilename),e.B4B),e.R7$(),e.JRh(t.lib)}}const wd=[{path:"",component:I,children:[{path:"blacklist-ip",resolve:{blacklistIps:()=>{const i=(0,p.WQX)(g.s);return(0,p.WQX)(kt).resolveData(1,xe.z9,"").pipe((0,P.W)(t=>i.handleError(t)))}},data:{title:"_i18n.BlacklistIp",navTitle:"_i18n.BlacklistIp"},component:Pe},{path:"",redirectTo:"blacklist-ip",pathMatch:"full"},{path:"anti-hacking",component:sn,data:{title:"_i18n.AntiHacking",navTitle:"_i18n.AntiHacking"},resolve:{antiHackingSettings:()=>{const i=(0,p.WQX)(At),v=(0,p.WQX)(g.s);return i.getAntiHackingSettings({}).pipe((0,P.W)(t=>v.handleError(t)))}}},{path:"network",component:tn,data:{title:"_i18n.Network",navTitle:"_i18n.Network"},resolve:{network:()=>{const i=(0,p.WQX)(tt.j),v=(0,p.WQX)(g.s);return(0,Ze.p)([i.getNetworkSettings({}),i.getIfaces({})]).pipe((0,C.T)(([t,r])=>({settings:t,ifaces:r.value})),(0,P.W)(t=>v.handleError(t)))}}},{path:"codecs",component:on,resolve:{codecsSettings:()=>{const i=(0,p.WQX)(Rt),v=(0,p.WQX)(g.s);return i.getCodecsSettings({}).pipe((0,P.W)(t=>v.handleError(t)))}},data:{title:"_i18n.Codecs",navTitle:"_i18n.Codecs",helpUri:"_i18n.AdminManualUri"}},{path:"allowed-country-codes",component:zt,resolve:{disabledCountryCodes:()=>{const i=(0,p.WQX)(g.s),v=(0,p.WQX)(et),t=(0,p.WQX)(B.C);return(0,ke.z)([v.getCountryCodes({}),t.countries$]).pipe((0,C.T)(([r,n])=>n.reduce((s,a)=>a.CountryCodes&&a.CountryCodes.length>0?s.concat(a.CountryCodes.map(m=>
1Ft(a,m,r))):a.CountryCode?s.concat([Ft(a,a.CountryCode,r)]):s,new Array)),(0,P.W)(r=>i.handleError(r)))}},data:{title:"_i18n.AllowedCountryCodes",navTitle:"_i18n.AllowedCountryCodes"}},{path:"cid-rules",data:{title:"_i18n.CIDRules",navTitle:"_i18n.CIDRules"},resolve:{cidRules:()=>{const i=(0,p.WQX)(Bt),v=(0,p.WQX)(g.s);return i.resolveData().pipe((0,P.W)(t=>v.handleError(t)))},...wt.oF},component:Ar},{path:"blacklist-numbers",resolve:{blacklistedNumbers:()=>{const i=(0,p.WQX)(Et),v=(0,p.WQX)(g.s);return i.resolveData(1,xe.z9,"").pipe((0,P.W)(t=>v.handleError(t)))}},data:{title:"_i18n.BlacklistNumbers",navTitle:"_i18n.BlacklistNumbers"},component:Dr},{path:"console-restrictions",resolve:{consoleRestrictions:()=>{const i=(0,p.WQX)(jt),v=(0,p.WQX)(g.s);return i.getConsoleRestrictions({}).pipe((0,P.W)(t=>v.handleError(t)))}},data:{title:"_i18n.ConsoleRestrictions",navTitle:"_i18n.ConsoleRestrictions"},component:Kr},{path:"security-sip",component:Ce,resolve:{securitySipSettings:()=>{const i=(0,p.WQX)(w),v=(0,p.WQX)(g.s);return i.getSecureSipSettings({}).pipe((0,P.W)(t=>v.handleError(t)))}},data:{title:"_i18n.SecureSip",navTitle:"_i18n.SecureSip"}},{path:"parameters",data:{title:"_i18n.Parameters",navTitle:"_i18n.Parameters"},resolve:{data:()=>{const i=(0,p.WQX)(mn.Z),v=(0,p.WQX)(ft),t=(0,p.WQX)(Nt.L);return(0,Ze.p)([i.getMyToken$(),v.getParameterByName({name:"DEVELOPMENT_DNTABLE_EXPOSE"}).pipe((0,P.W)(()=>(0,q.of)({Value:"0"})))]).pipe((0,_.n)(([r,n])=>r.globalAdmin&&"1"===n.Value?t.listPeer({$select:["Number"],$skip:0,$top:1,$filter:"not (Number eq 'HOL')"}).pipe((0,C.T)(s=>({isExtraParamsAccessible:!0,firstDn:s.value[0],myToken:r}))):(0,q.of)({isExtraParamsAccessible:!1,myToken:r})))},isMultiCompanyMode:bn.s},component:hi},{path:"templates",canActivate:[rn.bV],data:{title:"_i18n.Templates",navTitle:"_i18n.Templates"},children:Ea},{path:"fax",data:{title:"_i18n.Fax",navTitle:"_i18n.Fax"},children:ho},{path:"e-164",component:ue,data:{title:"_i18n.E164",navTitle:"_i18n.E164"},resolve:{e164Settings:()=>{const i=(0,p.WQX)(F),v=(0,p.WQX)(g.s);return i.getE164Settings({}).pipe((0,P.W)(t=>v.handleError(t)))}}},{path:"cdr",data:{title:"_i18n.CDRSettings",navTitle:"_i18n.CDRSettings"},resolve:{cdr:()=>{const i=(0,p.WQX)(Dt),v=(0,p.WQX)(tt.j),t=(0,p.WQX)(g.s);return(0,Ze.p)([i.getCDRSettings({}),v.getIfaces({})]).pipe((0,C.T)(([r,n])=>({cdrSettings:r,networkInterfaces:n.value})),(0,P.W)(r=>t.handleError(r)))}},component:Bo},{path:"credits",component:(()=>{class i{licenses=Md;static \u0275fac=function(r){return new(r||i)};static \u0275cmp=e.VBU({type:i,selectors:[["ng-component"]],decls:3,vars:0,consts:[["header","_i18n.Credits"],["target","_blank",1,"link","dashed",3,"href"]],template:function(r,n){1&r&&(e.j41(0,"app-page",0),e.Z7z(1,Dd,3,3,"p",null,e.fX1),e.k0s()),2&r&&(e.R7$(),e.Dyx(n.licenses))},dependencies:[ve.H],encapsulation:2,changeDetection:0})}return i})()}]}]},30689(ee,D,l){"use strict";l.d(D,{s:()=>B});var p=l(85802),M=l(16444),o=l(99437),c=l(96354),N=l(25558),e=l(96697),F=l(19037);const B=()=>{const C=(0,p.WQX)(M.gx),A=(0,p.WQX)(F.s);return function _(C){return C.myPhoneSession.pipe((0,N.n)(A=>A.systemParameters$),(0,c.T)(A=>A.MultiCompanyMode))}(C).pipe((0,e.s)(1),(0,o.W)(x=>A.handleError(x)))}},24112(ee,D,l){"use strict";l.d(D,{R:()=>oe});var p=l(85802),M=l(71747),o=l(45317),c=function(O){return O[O.EndCall=1]="EndCall",O[O.Extension=2]="Extension",O[O.Voicemail=3]="Voicemail",O[O.DigitalReceptionist=4]="DigitalReceptionist",O[O.RingGroup=5]="RingGroup",O[O.Queue=6]="Queue",O[O.Fax=7]="Fax",O[O.External=8]="External",O[O.CallFlow=9]="CallFlow",O[O.ProceedWithNoExceptions=10]="ProceedWithNoExceptions",O[O.Group=11]="Group",O[O.Unknown=12]="Unknown",O}(c||{});function N(O){switch(O?.To){case o.h.ProceedWithNoExceptions:return c.ProceedWithNoExceptions;case o.h.Extension:return c.Extension;case o.h.VoiceMail:return c.Voicemail;case o.h.RingGroup:return c.RingGroup;case o.h.Ivr:return c.DigitalReceptionist;case o.h.RoutePoint:return"Group"===O.Type?c.Group:c.CallFlow;case o.h.Queue:return c.Queue;
1case o.h.External:return c.External;case o.h.Fax:return c.Fax;case o.h.None:return c.EndCall;default:return c.Unknown}}function e(O){switch(O){case c.Extension:case c.Voicemail:case c.RingGroup:case c.Fax:case c.CallFlow:case c.Group:case c.DigitalReceptionist:case c.Queue:return!0;default:return!1}}function F(O){return O===c.External}function _(O){switch(O){case c.EndCall:return o.h.None;case c.ProceedWithNoExceptions:return o.h.ProceedWithNoExceptions;case c.Extension:return o.h.Extension;case c.Fax:return o.h.Fax;case c.External:return o.h.External;case c.Voicemail:return o.h.VoiceMail;case c.RingGroup:return o.h.RingGroup;case c.DigitalReceptionist:return o.h.Ivr;case c.Queue:return o.h.Queue;case c.CallFlow:case c.Group:return o.h.RoutePoint;default:return o.h.None}}var x=l(89417),V=l(98352),G=l(56998),X=l(84460),W=l(95604),Y=l(66300),K=l(61851),ue=l(13798),ae=l(89079),I=l(24708),g=l(35547);const P=[[["val-errors"]]],R=["val-errors"];function w(O,q){if(1&O&&(g.j41(0,"field-wrapper",6),g.nrm(1,"app-dn-select",7)(2,"val-errors",8),g.k0s()),2&O){const z=g.XpG();g.AVh("ng-touched",!z.f.peer.untouched),g.R7$(),g.Y8G("searchDnTypes",z.searchDnTypes)}}function L(O,q){1&O&&(g.j41(0,"field-input",4),g.nrm(1,"val-errors",9),g.k0s()),2&O&&g.Y8G("maxlength",50)}const Z={[c.EndCall]:"_i18n.EndCall",[c.Group]:"_i18n.Department",[c.DigitalReceptionist]:"_i18n.DigitalReceptionist",[c.CallFlow]:"_i18n.CallFlow",[c.External]:"_i18n.ForwardToOutsideNumber",[c.Voicemail]:"_i18n.V
1oicemailBox",[c.Fax]:"_i18n.SendFax",[c.ProceedWithNoExceptions]:"_i18n.ProceedWithNoExceptions",[c.Extension]:"_i18n.User",[c.Queue]:"_i18n.Queue",[c.RingGroup]:"_i18n.RingGroup",[c.Unknown]:"_i18n.Unknown"};let oe=(()=>{class O extends V.z{destroy$=(0,p.WQX)(p.abz);proceedWithNoExceptionsEnabled=!1;departmentEnabled;externalNumberEnabled;voicemailEnabled=!0;faxEnabled;label;containerClass="form-input d-flex flex-column gap-2 align-items-stretch";typeOptions=[];searchDnTypes=[];form=new x.gE({type:new x.MJ(c.EndCall,{nonNullable:!0,validators:({value:z})=>z&&z!==c.Unknown?null:{required:!0}}),peer:new x.MJ(null),externalNumber:new x.MJ(null)},z=>{if(!z.value)return null;const me=e(z.value.type)&&!z.value.peer,Ce=F(z.value.type)&&!z.value.externalNumber?.trim(),{peer:ct,externalNumber:et}=z.controls;return ct.setErrors(me?{required:!0}:null),et.setErrors(Ce?{required:!0}:null),null});get f(){return this.form.controls}writeValue(z){super.writeValue(z),this.form.setValue({type:this.value.type,peer:this.value.peer||null,externalNumber:this.value.externalNumber??null},{emitEvent:!1}),this.updateTypeOptions(),this.updateSearchDnTypes(this.value.type)}parse(z){return function A(O){return O?{type:N(O),externalNumber:O.External,peer:O.Number?{Tags:O.Tags,Type:O.Type,Name:O.Name,Number:O.Number}:null}:function C(){return{type:c.EndCall}}()}(z)}format(z){return function B(O){return{Number:O.peer?.Number,External:O.externalNumber,To:_(O.type)}}(z)}setDisabledState(z){super.setDisabledState(z),(0,G.TZ)(this.form,!z)}get isDestinationToDn(){return e(this.form.value.type)}get isDestinationToNumber(){return F(this.form.value.type)}ngOnInit(){this.form.controls.type.valueChanges.pipe((0,ae.pQ)(this.destroy$)).subscribe(z=>{this.updateSearchDnTypes(z),this.form.value.peer&&this.form.patchValue({peer:null})}),this.form.valueChanges.pipe((0,ue.Z)(0),(0,ae.pQ)(this.destroy$)).subscribe(z=>{this.valueChanged({type:z.type??c.Unknown,peer:e(z.type)&&z.peer||null,externalNumber:F(z.type)&&z.externalNumber?.trim()||void 0})}),this.syncControlState(this.form)}ngOnChanges(z){this.updateTypeOptions()}validate=this.createComponentValidator(this.form);updateSearchDnTypes(z){this.searchDnTypes=O.getSearchDnTypes(z),this.cd.markForCheck()}updateTypeOptions(){this.typeOptions=[...this.proceedWithNoExceptionsEnabled?[c.ProceedWithNoExceptions]:[],c.EndCall,c.Extension,...this.voicemailEnabled?[c.Voicemail]:[],c.RingGroup,c.DigitalReceptionist,c.Queue,...this.departmentEnabled?[c.Group]:[],c.CallFlow,...this.externalNumberEnabled?[c.External]:[],...this.faxEnabled?[c.Fax]:[],...this.form.controls.type.value===c.Unknown?[c.Unknown]:[]].map(me=>({value:me,label:Z[me],disabled:me===c.Unknown}))}static getSearchDnTypes(z){switch(z){case c.Extension:return[M.J.Extension];case c.Voicemail:return[M.J.Extension,M.J.RingGroup,M.J.Queue];case c.RingGroup:return[M.J.RingGroup];case c.Fax:return[M.J.Fax,M.J.Extension];case c.CallFlow:return[M.J.RoutePoint];case c.Group:return[M.J.Group];case c.DigitalReceptionist:return[M.J.Ivr];case c.Queue:return[M.J.Queue];default:return[]}}static \u0275fac=(()=>{let z;return function(Ce){return(z||(z=g.xGo(O)))(Ce||O)}})();static \u0275cmp=g.VBU({type:O,selectors:[["app-call-forwarding"]],hostVars:2,hostBindings:function(me,Ce){2&me&&g.HbH(Ce.containerClass)},inputs:{proceedWithNoExceptionsEnabled:"proceedWithNoExceptionsEnabled",departmentEnabled:"departmentEnabled",externalNumberEnabled:"externalNumberEnabled",voicemailEnabled:"voicemailEnabled",faxEnabled:"faxEnabled",label:"label"},features:[g.Jv_([{provide:x.cz,useExisting:O,multi:!0},{provide:x.kq,multi:!0,useExisting:O}]),g.Vt3,g.OA$],ngContentSelectors:R,decls:7,vars:5,consts:[[3,"formGroup"],["formControlName","type","data-qa","call-forwarding-destination-type",1,"mb-0",3,"label","options"],["controlName","type"],[1,"mb-0",3,"ng-touched"],["data-qa","call-forwarding-external-number","formControlName","externalNumber","placeholder","_i18n.ExternalNum",1,"mb-0",3,"maxlength"],[1,"form-control-validation"],[1,"mb-0"],["data-qa","call-forwarding-number-forward-dn","formControlName","peer",3,"searchDnTypes"],["controlName","peer"],["controlName","externalNumber"]],template:function(me,Ce){1&me&&(g.NAR(P),g.qex(0,0),g.j41(1,"field-select",1),g.nrm(2,"val-errors",2),g.k0s(),g.nVh(3,w,3,3,"field-wrapper",3),g.nVh(4,L,2,1,"field-input",4),g.j41(5,"div",5),g.SdG(6),g.k0s(),g.bVm()),2&me&&(g.Y8G("formGroup",Ce.form),g.R7$(),g.Y8G("label",Ce.label)("options",Ce.typeOptions),g.R7$(2),g.vxM(Ce.isDestinationToDn?3:-1),g.R7$(),g.vxM(Ce.isDestinationToNumber?4:-1))},dependencies:[X.m,W.z,K.A,I.N4,I.IH,x.X1,x.BC,x.cb,x.tU,x.j4,x.JD,Y.q],encapsulation:2})}return O})()},94743(ee,D,l){"use strict";l.d(D,{a:()=>A});var p=l(17705),M=l(85802),o=l(40953),c=l(54999),N=l(22972),e=l(7707),F=l(62049),_=l(89417),B=l(35547);function C(x,V){if(1&x){const G=B.RV6();B.j41(0,"tr",3),B.bIt("click",function(){const W=M.eBV(G).$implicit,Y=
1B.XpG();return M.Njj(Y.selector.toggle(W))}),B.j41(1,"td",4)(2,"app-checker",5),B.bIt("ngModelChange",function(W){const Y=M.eBV(G).$implicit,K=B.XpG();return M.Njj(K.selector.setSelected(Y,W))}),B.k0s()(),B.j41(3,"td"),B.EFF(4),B.k0s()()}if(2&x){const G=V.$implicit,X=B.XpG();B.R7$(2),B.Y8G("ngModel",X.selector.isRowSelected(G)),B.R7$(2),B.JRh(G)}}let A=(()=>{class x extends N.m{selector;possibleValues=[];constructor(){const G=(0,M.WQX)(p.gRc);super(),this.selector=new F.a({cd:G,keySelector:X=>X,notKeepSelectedOnDataChange:!0})}ngOnInit(){this.selector.onDataChanged(this.possibleValues)}buttons=c.P.OkCancel;getPayload(){return this.selector.selectedValues}static \u0275fac=function(X){return new(X||x)};static \u0275cmp=B.VBU({type:x,selectors:[["ng-component"]],inputs:{possibleValues:"possibleValues"},features:[B.Vt3],decls:5,vars:1,consts:[["header","_i18n.SelectCodecsToAdd",3,"submitted","buttons"],[1,"scrollable-table","mb-3"],[1,"clickable"],[1,"clickable",3,"click"],[1,"checker"],[3,"ngModelChange","ngModel"]],template:function(X,W){1&X&&(B.j41(0,"app-modal-dialog",0),B.bIt("submitted",function(){return W.onSubmit()}),B.j41(1,"table",1)(2,"tbody"),B.Z7z(3,C,5,2,"tr",2,B.fX1),B.k0s()()()),2&X&&(B.Y8G("buttons",W.buttons),B.R7$(3),B.Dyx(W.possibleValues))},dependencies:[o.p,e.$,_.YN,_.BC,_.vS],encapsulation:2,changeDetection:0})}return x})()},31899(ee,D,l){"use strict";l.d(D,{w:()=>ue});var p=l(35547),M=l(85802),o=l(23994),c=l(89417),N=l(92996),e=l(38
1601),F=l(72510),_=l(56998),B=l(98352),C=l(68018),A=l(51606),x=l(89079),V=l(95604),G=l(8876),X=l(49769);const W=[[["val-errors"]]],Y=["val-errors"];function K(ae,I){if(1&ae){const g=p.RV6();p.j41(0,"field-wrapper",0)(1,"ng-select",1),p.nI1(2,"translate"),p.bIt("change",function(R){M.eBV(g);const w=p.XpG();return M.Njj(w.valueChanged(R))})("open",function(){M.eBV(g);const R=p.XpG();return M.Njj(R.loadTrunksOnce())}),p.k0s(),p.qex(3,2),p.SdG(4),p.bVm(),p.k0s()}if(2&ae){const g=p.XpG();p.Y8G("label",g.label)("labelFor",g.id),p.R7$(),p.Y8G("id",g.id)("placeholder",p.bMT(2,11,g.placeholder))("disabled",!I.trunks)("items",g.trunks)("ngModel",g.value)("multiple",!1)("closeOnSelect",!0)("clearable",g.isClearable)("loading",g.loading)}}let ue=(()=>{class ae extends B.z{tokenInfoService=(0,M.WQX)(N.Z);trunksApiService=(0,M.WQX)(o.T);modalService=(0,M.WQX)(e.B);destroy$=(0,M.WQX)(M.abz);el=(0,M.WQX)(p.aKT);id=(0,_.bn)("trunk-select");label="";isClearable=!0;isNew;access$=this.tokenInfoService.myToken$;trunks=[];loading=!1;routesLoaded=!1;ngOnInit(){!this.isClearable&&this.isNew&&this.loadTrunksOnce(!0)}ngAfterViewInit(){this.el.nativeElement.id=""}constructor(){super(),this.touchOnChange=!0}loadTrunksOnce(g=!1){this.routesLoaded||(this.routesLoaded=!0,this.loading=!0,this.cd.markForCheck(),this.trunksApiService.listTrunk({$select:["Id","Gateway($select=Name)","Groups"],$expand:["Groups($select=GroupId,Name)"],$filter:A.O}).pipe((0,x.pQ)(this.destroy$)).subscribe({next:({value:P})=>{this.trunks=P||[],this.loadingFinished(),g&&this.valueChanged(this.trunks[0])},error:P=>{this.modalService.error(P),this.loadingFinished()}}))}writeValue(g){super.writeValue(g&&(this.trunks.find(P=>P.Id===g.Id)??g))}get placeholder(){return this.value?"":"_i18n.OutboundBlockCalls"}loadingFinished(){this.loading=!1,this.cd.markForCheck()}static \u0275fac=function(P){return new(P||ae)};static \u0275cmp=p.VBU({type:ae,selectors:[["app-trunk-select"]],hostVars:2,hostBindings:function(P,R){2&P&&p.AVh("form-input",!0)},inputs:{id:"id",label:"label",isClearable:"isClearable",isNew:"isNew"},features:[p.Jv_([{provide:c.kq,multi:!0,useExisting:ae}]),p.Vt3],ngContentSelectors:Y,decls:2,vars:3,consts:[["data-qa","trunk-select",1,"mb-0",3,"label","labelFor"],["data-qa","select","bindLabel","Gateway.Name",3,"change","open","id","placeholder","disabled","items","ngModel","multiple","closeOnSelect","clearable","loading"],["ngProjectAs","val-errors",5,["val-errors"]]],template:function(P,R){if(1&P&&(p.NAR(W),p.nVh(0,K,5,13,"field-wrapper",0),p.nI1(1,"async")),2&P){let w;p.vxM((w=p.bMT(1,1,R.access$))?0:-1,w)}},dependencies:[c.YN,c.BC,c.vS,F.vr,V.z,G.c,C.D9,X.Jj],styles:[".ng-touched.ng-invalid[_nghost-%COMP%]   ng-select[_ngcontent-%COMP%]:not(.ng-select-focused){--ng-select-border-color: var(--error)}"],changeDetection:0})}return ae})()},51606(ee,D,l){"use strict";l.d(D,{O:()=>e,o:()=>F});var p=l(85802),M=l(96354),o=l(23994),c=l(19037),N=l(99437);const e="(Gateway/Type eq 'Provider' or Gateway/Type eq 'Analog' or Gateway/Type eq 'BridgeMaster' or Gateway/Type eq 'BridgeSlave' or Gateway/Type eq 'BridgeSlaveOverTunnel') and not (Messaging/Provider eq 'facebook' or Messaging/Provider eq 'whatsapp' or Tags/any(t: t eq 'WM'))",F=()=>{const _=(0,p.WQX)(o.T),B=(0,p.WQX)(c.s);return _.listTrunk({$top:1,$filter:e,$select:["Id"]}).pipe((0,M.T)(({value:C})=>!!C?.length),(0,N.W)(C=>B.handleError(C)))}},43218(ee,D,l){"use strict";l.d(D,{y:()=>I});var p=l(98352),M=l(56998),o=l(35547),c=l(85802),N=l(89417),e=l(96697),F=l(33971),_=l(59053),B=l(89079),C=l(95604),A=l(17873),x=l(5738),V=l(68018);const G=[[["val-errors"],["show-error-warning"]],[["","description",""]]],X=["val-errors,show-error-warning","[description]"];function W(g,P){1&g&&o.nrm(0,"i",6)}function Y(g,P){if(1&g&&(o.EFF(0),o.nI1(1,"translate")),2&g){const R=o.XpG();o.SpI(" ",o.bMT(1,1,R.uploadBtnText)," ")}}function K(g,P){1&g&&o.nrm(0,"i",11)}function ue(g,P){if(1&g&&(o.EFF(0),o.nI1(1,"translate")),2&g){const R=o.XpG(2);o.SpI(" ",o.bMT(1,1,R.clearBtnText)," ")}}function ae(g,P){if(1&g){const R=o.RV6();o.j41(0,"button",10),o.nI1(1,"translate"),o.bIt("click",function(){c.eBV(R);const L=o.XpG();return c.Njj(L.setFile(null))}),o.nVh(2,K,1,0,"i",11)(3,ue,2,3),o.k0s()}if(2&g){const R=o.XpG();o.Y8G("title",R.btnIcons?o.bMT(1,3,R.clearBtnText):"")("disabled",R.disabled||R.readonly||!R.value),o.R7$(2),o.vxM(R.btnIcons?2:3)}}let I=(()=>{class g extends p.z{el=(0,c.WQX)(o.aKT);id=(0,M.bn)("file-input");label="";description="";hint="";placeholder="";readonly;hideAsterisk;inlineLabel;hideClear;btnIcons=!0;uploadBtnText="_i18n.SelectFile";clearBtnText="_i18n.Clear";accept;maxSizeMb;incorrectExtensionText;readContent;readAsDataUrl;contentConverter;onFileSelected$;required=!1;get fileName(){return"string"==typeof this.value?this.value:this.value?.name||""}get isRequired(){return!(this.readonly||this.disabled||this.hideAsterisk)&&(this.required||!0===this.componentControl?.hasValidator(N.k0.required))}ngAfterViewInit(){this.el.nativeElement.id=""}validate({value:R,pristine:w}){if("string"==typeof R||R?.concealed||w)return null;const Z=R?(0,_.j$)(R,{maxSizeMb:this.maxSizeMb,accept:this.accept,incorrectExtensionText:this.incorrectExtensionText}):null;return Z?{customError:Z}:this.convertError}setFile(R){R?this.onFileSelected$?this.onFileSelected$(R).pipe((0,e.s)(1),(0,B.pQ)(this.destroyRef)).subscribe(w=>this.valueChanged(w)):this.readContent||this.contentConverter?(0,F.TA)(R,w=>this.valueChanged({name:R.name,size:R.size,content:w}),w=>console.error(w),this.readAsDataUrl?"dataUrl":"text"):this.valueChanged(R):this.valueChanged("string"==typeof this.value?"":null)}writeValue(R){if("object"!=typeof R&&!this.onFileSelected$)throw new Error("field-input-file with non-file value type requires onFileSelected$ callback.");super.writeValue(R)}convertError=null;valueChanged(R,w){if(this.convertError=null,R&&"object"==typeof R&&"content"in R&&this.contentConverter){const L=this.contentConverter(R.content||"");"string"==typeof L?(this.convertError=null,R.content=L):this.convertError=L}super.valueChanged(R,w),this.markAsTouched()}static \u0275fac=(()=>{let R;return function(L){return(R||(R=o.xGo(g)))(L||g)}})();static \u0275cmp=o.VBU({type:g,selectors:[["field-input-file"]],inputs:{id:"id",label:"label",description:"description",hint:"hint",placeholder:"placeholder",readonly:"readonly",hideAsterisk:"hideAsterisk",inlineLabel:"inlineLabel",hideClear:"hideClear",btnIcons:"btnIcons",uploadBtnText:"uploadBtnText",clearBtnText:"clearBtnText",accept:"accept",maxSizeMb:"maxSizeMb",incorrectExtensionText:"incorrectExtensionText",readContent:"readContent",readAsD
1ataUrl:"readAsDataUrl",contentConverter:"contentConverter",onFileSelected$:"onFileSelected$",required:"required"},features:[o.Jv_([{provide:N.kq,multi:!0,useExisting:g},{provide:N.cz,multi:!0,useExisting:g}]),o.Vt3],ngContentSelectors:X,decls:15,vars:24,consts:[["file",""],[3,"label","labelFor","inlineLabel","disabled","required","description","hint"],[1,"input-group"],["data-qa","file-input","hidden","","type","file",3,"change","accept","id","disabled"],["name","input-file-name","data-qa","input","type","text",1,"form-control",3,"click","readonly","disabled","placeholder","ngModel"],["data-qa","upload","type","button",1,"btn","btn-border",3,"click","title","disabled"],["app-arrow-alt-circle-up-solid-icon","",1,"svg-sm"],["data-qa","clear","type","button",1,"btn","btn-border",3,"title","disabled"],["ngProjectAs","val-errors",5,["val-errors"]],["ngProjectAs","[description]",5,["","description",""]],["data-qa","clear","type","button",1,"btn","btn-border",3,"click","title","disabled"],["app-xmark-solid-icon","",1,"svg-sm"]],template:function(w,L){if(1&w){const Z=o.RV6();o.NAR(G),o.j41(0,"field-wrapper",1)(1,"div",2)(2,"input",3,0),o.bIt("change",function(){c.eBV(Z);const O=o.sdS(3);return c.Njj(L.setFile((null==O.files?null:O.files[0])||null))}),o.k0s(),o.j41(4,"input",4),o.nI1(5,"translate"),o.bIt("click",function(){c.eBV(Z);const O=o.sdS(3);return O.value="",c.Njj(O.click())}),o.k0s(),o.j41(6,"button",5),o.nI1(7,"translate"),o.bIt("click",function(){c.eBV(Z);const O=o.sdS(3);return O.value="",c.Njj(O.click())}),o.nVh(8,W,1,0,"i",6)(9,Y,2,3),o.k0s(),o.nVh(10,ae,4,5,"button",7),o.k0s(),o.qex(11,8),o.SdG(12),o.bVm(),o.qex(13,9),o.SdG(14,1),o.bVm(),o.k0s()}2&w&&(o.Y8G("label",L.label)("labelFor",L.id)("inlineLabel",L.inlineLabel)("disabled",L.disabled)("required",L.isRequired)("description",L.description)("hint",L.hint),o.R7$(2),o.Y8G("accept",L.accept)("id",L.id)("disabled",L.disabled),o.R7$(2),o.AVh("pointer",!L.disabled),o.Y8G("readonly",!0)("disabled",L.disabled)("placeholder",o.bMT(5,20,L.placeholder||""))("ngModel",L.fileName),o.R7$(2),o.Y8G("title",L.btnIcons?o.bMT(7,22,L.uploadBtnText):"")("disabled",L.disabled||L.readonly),o.R7$(2),o.vxM(L.btnIcons?8:9),o.R7$(2),o.vxM(L.hideClear?-1:10))},dependencies:[C.z,N.X1,N.me,N.BC,N.YN,N.vS,A.f,x.N,V.D9],styles:["[_nghost-%COMP%]{display:block;margin-bottom:16px}[_nghost-%COMP%]   field-wrapper[_ngcontent-%COMP%]{margin-bottom:0}[_nghost-%COMP%]     .input-group>.btn{border-left:0}.max-length-3[_nghost-%COMP%]     input[type=number]{max-width:calc(12px * 2 + .65em * 3);min-width:calc(12px * 2 + .65em * 3)}.max-length-4[_nghost-%COMP%]     input[type=number]{max-width:calc(24px + 2.6em);min-width:calc(24px + 2.6em)}.max-length-5[_nghost-%COMP%]     input[type=number]{max-width:calc(24px + 3.25em);min-width:calc(24px + 3.25em)}.max-length-6[_nghost-%COMP%]     input[type=number]{max-width:calc(12px * 2 + .65em * 6);min-width:calc(12px * 2 + .65em * 6)}.max-length-7[_nghost-%COMP%]     input[type=number]{max-width:calc(24px + 4.55em);min-width:calc(24px + 4.55em)}.min-length-3[_nghost-%COMP%]     input[type=number]{min-width:calc(12px * 2 + .65em * 3)}.min-length-4[_nghost-%COMP%]     input[type=number]{min-width:calc(24px + 2.6em)}.min-length-5[_nghost-%COMP%]     input[type=number]{min-width:calc(24px + 3.25em)}.min-length-6[_nghost-%COMP%]     input[type=number]{min-width:calc(12px * 2 + .65em * 6)}.min-length-7[_nghost-%COMP%]     input[type=number]{min-width:calc(24px + 4.55em)}[_nghost-%COMP%]   .clear[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;cursor:pointer;--svg-color: currentColor;--svg-vertical-align: baseline}"],changeDetection:0})}return g})()},72009(ee,D,l){"use strict";l.d(D,{z:()=>o});var p=l(35547),M=l(85802);let o=(()=>{class c{static \u0275fac=function(F){return new(F||c)};static \u0275cmp=p.VBU({type:c,selectors:[["app-chevron-down-solid-icon"],["","app-chevron-down-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]],template:function(F,_){1&F&&(M.qSk(),p.rj2(0,"svg",0),p.Hgh(1,"path",1),p.eux())},encapsulation:2})}return c})()},8470(ee,D,l){"use strict";l.d(D,{Y:()=>o});var p=l(35547),M=l(85802);let o=(()=>{class c{static \u0275fac=function(F){return new(F||c)};static \u0275cmp=p.VBU({type:c,selectors:[["app-ellipsis-v-regular-icon"],["","app-ellipsis-v-regular-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 128 512"],["d","M64 208c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48 21.5-48 48-48zM16 104c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zm0 304c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48z"]],template:function(F,_){1&F&&(M.qSk(),p.rj2(0,"svg",0),p.Hgh(1,"path",1),p.eux())},encapsulation:2})}return c})()},5738(ee,D,l){"use strict";l.d(D,{N:()=>o});var p=l(35547),M=l(85802);let o=(()=>{class c{static \u0275fac=function(F){return new(F||c)};static \u0275cmp=p.VBU({type:c,selectors:[["app-xmark-solid-icon"],["","app-xmark-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 384 512"],["d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]],template:function(F,_){1&F&&(M.qSk(),p.rj2(0,"svg",0),p.Hgh(1,"path",1),p.eux())},encapsulation:2})}return c})()},51432(ee,D,l){"use strict";l.d(D,{H:()=>c});
1var p=l(83230),M=l(8516),o=l(35547);let c=(()=>{class N{text="_i18n.DisplayCopy";disabled;theme="primary";loader;Copy=M.QRo;static \u0275fac=function(_){return new(_||N)};static \u0275cmp=o.VBU({type:N,selectors:[["app-button-copy"]],inputs:{text:"text",disabled:"disabled",theme:"theme",loader:"loader"},decls:1,vars:5,consts:[["data-qa","copy",3,"disabled","theme","icon","text","loader"]],template:function(_,B){1&_&&o.nrm(0,"app-button",0),2&_&&o.Y8G("disabled",B.disabled)("theme",B.theme)("icon",B.Copy)("text",B.text)("loader",B.loader)},dependencies:[p.Q],encapsulation:2,changeDetection:0})}return N})()},97519(ee,D,l){"use strict";l.d(D,{U:()=>e});var p=l(7673),M=l(88141),o=l(99437),c=l(7881),N=l(445);const e=(F,_="_i18n.ImportDone",B=!1)=>C=>C.pipe((0,o.W)(A=>(0,p.of)({Exception:(0,c.PE)(A)})),(0,M.M)(A=>{F.showComponent(N.K,{initialState:{result:A,successMessage:_,isAsyncImport:B}})}))},87018(ee,D,l){"use strict";l.d(D,{I:()=>ae});var p=l(85802),M=l(59882),o=l(93049),c=l(49769),N=l(68018),e=l(68580),F=l(92151),_=l(35547);const B=["*"],C=I=>({exact:I}),A=(I,g)=>g.routeLink;function x(I,g){1&I&&(_.j41(0,"small",11),_.EFF(1),_.nI1(2,"translate"),_.k0s()),2&I&&(_.R7$(),_.SpI("(",_.bMT(2,1,g),")"))}function V(I,g){1&I&&_.nrm(0,"app-badge",12),2&I&&_.Y8G("badge",g)}function G(I,g){if(1&I&&(_.j41(0,"li",8)(1,"a",9)(2,"span",10),_.EFF(3),_.nI1(4,"translate"),_.k0s(),_.nVh(5,x,3,3,"small",11),_.nVh(6,V,1,1,"app-badge",12),_.nI1(7,"async"),_.k0s()()),2&I){let P,R;const w=_.XpG().$implicit;_.R7$(),_.Y8G("routerLink",w.routeLink)("routerLinkActiveOptions",_.eq3(10,C,w.activeExact??!1)),_.BMQ("data-qa",w.routeLink),_.R7$(2),_.JRh(_.bMT(4,6,w.routeLabel)),_.R7$(2),_.vxM((P=w.remark)?5:-1,P),_.R7$(),_.vxM((R=_.bMT(7,8,w.badge$&&w.badge$))?6:-1,R)}}function X(I,g){if(1&I&&(_.nVh(0,G,8,12,"li",8),_.nI1(1,"async")),2&I){const P=g.$implicit;_.vxM(!P.visible$||_.bMT(1,1,P.visible$)?0:-1)}}function W(I,g){if(1&I&&_.Z7z(0,X,2,3,null,null,A),2&I){const P=_.XpG();_.Dyx(P.menuItems)}}function Y(I,g){1&I&&_.eu8(0)}function K(I,g){if(1&I&&(_.j41(0,"ul",13),_.DNE(1,Y,1,0,"ng-container",6),_.k0s()),2&I){_.XpG();const P=_.sdS(1);_.R7$(),_.Y8G("ngTemplateOutlet",P)}}function ue(I,g){1&I&&_.eu8(0)}let ae=(()=>{class I{route=(0,p.WQX)(M.nX);menuItems;get title(){const P=this.route.firstChild?.snapshot.data?.navTitle,R=this.route.firstChild?.firstChild?.snapshot.data?.navTitle;return P||R}static \u0275fac=function(R){return new(R||I)};static \u0275cmp=_.VBU({type:I,selectors:[["app-layout-with-sidebar"]],inputs:{menuItems:"menuItems"},ngContentSelectors:B,decls:13,vars:4,consts:[["navMenuItems",""],["role","menu"],["dropdown",""],["type","button","dropdownToggle","","data-qa","nav-menu-toggle",1,"btn","btn-plain","dropdown-toggle"],["class","dropdown-menu dropdown-menu-right",4,"dropdownMenu"],["role","menubar","data-qa","nav-menu-options"],[4,"ngTemplateOutlet"],[1,"flex-child"],["role","menuitem","data-qa","sidebar-menu-item"],["routerLinkActive","selected",1,"selectable","dropdown-item",3,"routerLink","routerLinkActiveOptions"],["data-qa","name",1,"line-clamp-2"],["data-qa","remark"],[3,"badge"],[1,"dropdown-menu","dropdown-menu-right"]],template:function(R,w){if(1&R&&(_.NAR(),_.DNE(0,W,2,0,"ng-template",null,0,_.C5r),_.j41(2,"nav",1)(3,"div",2)(4,"button",3),_.EFF(5),_.nI1(6,"translate"),_.k0s(),_.DNE(7,K,2,1,"ul",4),_.k0s()(),_.j41(8,"aside")(9,"ul",5),_.DNE(10,ue,1,0,"ng-container",6),_.k0s()(),_.j41(11,"div",7),_.SdG(12),_.k0s()),2&R){const L=_.sdS(1);_.R7$(5),_.SpI(" ",_.bMT(6,2,w.title)," "),_.R7$(5),_.Y8G("ngTemplateOutlet",L)}},dependencies:[c.T3,o.iI,o.Wk,o.wQ,e.Kk,e.UL,e.hs,F.n,c.Jj,N.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%]{width:100%;height:100%;display:flex}[_nghost-%COMP%]   aside[_ngcontent-%COMP%], [_nghost-%COMP%]   nav[_ngcontent-%COMP%]{display:none}@media(max-width:767.98px){[_nghost-%COMP%]{flex-direction:column}[_nghost-%COMP%]:has(li[role=menuitem]:nth-child(2))   nav[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:end;border-bottom:1px solid var(--border-color);height:var(--aside-folded-nav-height)}}@media(min-width:768px){[_nghost-%COMP%]:has(li[role=menuitem]:nth-child(2))   aside[_ngcontent-%COMP%]{display:block;width:150px;height:100%;flex-shrink:0;overflow-y:auto;margin:0;border-right:1px solid var(--border-color)}}
1ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}.dropdown-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--spacer-s)}.dropdown-item[_ngcontent-%COMP%]   app-badge[_ngcontent-%COMP%]{position:relative;top:-6px;right:calc(var(--spacer-s) - 2px)}aside[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]{padding:0 var(--spacer-s);gap:var(--spacer-xs);height:var(--aside-folded-nav-height);border-bottom:1px solid var(--border-color);background:var(--current-background, var(--bg-primary))}aside[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]   app-badge[_ngcontent-%COMP%]{right:calc(var(--spacer-xs) - 2px)}"],changeDetection:0})}return I})()},48244(ee,D,l){"use strict";l.d(D,{M:()=>F});var p=l(85802),M=l(19037),o=l(99437),c=l(96354),N=l(96697),e=l(16444);const F=()=>{const _=(0,p.WQX)(e.gx),B=(0,p.WQX)(M.s);return _.myPhoneSession.pipe((0,c.T)(C=>C.systemParameters),(0,N.s)(1),(0,o.W)(C=>B.handleError(C)))}},72084(ee,D,l){"use strict";l.d(D,{J:()=>p});const p={SrtpDisabled:"SRTPDisabled",SrtpEnabled:"SRTPEnabled",SrtpEnforced:"SRTPEnforced"}},27994(ee,D,l){"use strict";const p=l(6703),M=l(28879).BigInteger;ee.exports=(()=>{class c{constructor(e){if("string"!=typeof e||!e.match("/"))throw new Error("Invalid CIDR address.");const F=this.constructor.createAddress(e);this.cidr=F.address,this.ipAddressType=F.constructor,this.address=F,this.addressStart=F.startAddress(),this.addressEnd=F.endAddress(),this.addressStart.subnet=this.addressEnd.subnet=this.address.subnet,this.addressStart.subnetMask=this.addressEnd.subnetMask=this.address.subnetMask,this.size=new M(this.addressEnd.bigInteger().subtract(this.addressStart.bigInteger()).add(new M("1")).toString())}contains(e){try{return!(e instanceof p.Address6)&&!(e instanceof p.Address4)&&(e="object"==typeof e?this.ipAddressType.fromBigInteger(e):this.constructor.createAddress(e)),e.isInSubnet(this.address)}catch{return!1}}start(e){return this.constructor.formatIP(this.addressStart,e)}end(e){return this.constructor.formatIP(this.addressEnd,e)}toString(){return this.cidr}toRange(e){return[this.constructor.formatIP(this.addressStart,e),this.constructor.formatIP(this.addressEnd,e)]}toObject(e){return{start:this.constructor.formatIP(this.addressStart,e),end:this.constructor.formatIP(this.addressEnd,e)}}toArray(e,F){e=e||{};const _=[],B=this.constructor.formatIP(this.addressStart,{type:"bigInteger"}),A=this.constructor.formatIP(this.addressEnd,{type:"bigInteger"}).subtract(B).add(new M("1")),x=this.getChunkInfo(A,e);return F&&Object.assign(F,x),this.loopInfo(x,V=>{const G=B.add(V),X=this.constructor.formatIP(this.ipAddressType.fromBigInteger(G),e);_.push(X)}),_}loop(e,F,_){F=F||{};const B=[],C=this.constructor.formatIP(this.addressStart,{type:"bigInteger"}),x=this.constructor.formatIP(this.addressEnd,{type:"bigInteger"}).subtract(C).add(new M("1")),V=this.getChunkInfo(x,F);return _&&Object.assign(_,V),this.loopInfo(V,G=>{const X=C.add(G),W=this.constructor.formatIP(this.ipAddressType.fromBigInteger(X),F);B.push(e(W))}),Promise.all(B)}loopInfo(e,F){let _=e.from;for(;_.compareTo(e.to)<0;)F(_),_=_.add(new M("1"))}getChunkInfo(e,F){let A,_=F.from,B=F.limit,C=F.to;const x=this.constructor.formatIP(this.address,{type:"bigInteger"}),V=G=>"string"==typeof G&&G.match(/:|\./)?this.constructor.formatIP(this.constructor.createAddress(G),{type:"bigInteger"}).subtract(x):"object"!=typeof G?new M(G+""):G;return _=V(void 0!==_?_:0),void 0!==C?(C=V(C),B=C.subtract(_)):B=void 0!==B?V(B):e,A=e.subtract(_),B.compareTo(A)>0&&(B=A),C=_.add(B),{from:_,to:C,limit:B,length:e}}}return c.formatIP=function(N,e){return"bigInteger"==(e=e||{}).type?new M(N.bigInteger().toString()):"addressObject"==e.type?N:N.addressMinusSuffix},c.createAddress=function(N){if("string"!=typeof N)throw new Error("Invalid IP address.");N.match(/:.\./)&&(N=N.split(":").pop());let F=new(N.match(":")?p.Address6:p.Address4)(N);if(F.v4&&N.match(":")&&F.address4&&(F=F.address4),F.v4){const _=F.addressMinusSuffix.split(".");for(let B=0;B<_.length;B++){const C=_[B].split("/")[0];if("0"==C[0]&&C.length>1)throw new Error("Invalid IPv4 address.")}}return F},c.isValidAddress=function(N){try{return!!this.createAddress(N)}catch{return!1}},c.isValidCIDR=function(N){if("string"!=typeof N||!N.match("/"))return!1;try{return!!this.createAddress(N)}catch{return!1}},c})()},6703(ee,D,l){"use strict";var p=this&&this.__createBinding||(Object.create?function(F,_,B,C){void 0===C&&(C=B),Object.defineProperty(F,C,{enumerable:!0,get:function(){return _[B]}})}:function(F,_,B,C){void 0===C&&(C=B),F[C]=_[B]}),M=this&&this.__setModuleDefault||(Object.create?function(F,_){Object.defineProperty(F,"default",{enumerable:!0,value:_})}:function(F,_){F.default=_}),o=this&&this.__importStar||function(F){if(F&&F.__esModule)return F;var _={};if(null!=F)for(var B in F)"default"!==B&&Object.prototype.hasOwnProperty.call(F,B)&&p(_,F,B);return M(_,F),_};Object.defineProperty(D,"__esModule",{value:!0}),D.v6=D.Address6=D.Address4=void 0;var c=l(72492);Object.defineProperty(D,"Address4",{enumerable:!0,get:function(){return c.Address4}});var N=l(61462);Object.defineProperty(D,"Address6",{enumerable:!0,get:function(){return N.Address6}});var e=o(l(41421));D.v6={helpers:e}},76616(ee,D){"use strict";var l=this&&this.__extends||function(){var M=function(o,c){return(M=Object.
1setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,e){N.__proto__=e}||function(N,e){for(var F in e)Object.prototype.hasOwnProperty.call(e,F)&&(N[F]=e[F])})(o,c)};return function(o,c){function N(){this.constructor=o}M(o,c),o.prototype=null===c?Object.create(c):(N.prototype=c.prototype,new N)}}();Object.defineProperty(D,"__esModule",{value:!0}),D.AddressError=void 0;var p=function(M){function o(c,N){var e=M.call(this,c)||this;return e.name="AddressError",null!==N&&(e.parseMessage=N),e}return l(o,M),o}(Error);D.AddressError=p},90070(ee,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isCorrect=D.isInSubnet=void 0,D.isInSubnet=function l(M){return!(this.subnetMask<M.subnetMask)&&this.mask(M.subnetMask)===M.mask()},D.isCorrect=function p(M){return function(){return this.addressMinusSuffix===this.correctForm()&&(this.subnetMask===M&&!this.parsedSubnet||this.parsedSubnet===String(this.subnetMask))}}},72492(ee,D,l){"use strict";var p=this&&this.__createBinding||(Object.create?function(C,A,x,V){void 0===V&&(V=x),Object.defineProperty(C,V,{enumerable:!0,get:function(){return A[x]}})}:function(C,A,x,V){void 0===V&&(V=x),C[V]=A[x]}),M=this&&this.__setModuleDefault||(Object.create?function(C,A){Object.defineProperty(C,"default",{enumerable:!0,value:A})}:function(C,A){C.default=A}),o=this&&this.__importStar||function(C){if(C&&C.__esModule)return C;var A={};if(null!=C)for(var x in C)"default"!==x&&Object.prototype.hasOwnProperty.call(C,x)&&p(A,C,x);return M(A,C),A};Object.defineProperty(D,"__esModule",{value:!0}),D.Address4=void 0;var c=o(l(90070)),N=o(l(64291)),e=l(76616),F=l(28879),_=l(61807),B=function(){function C(A){this.groups=N.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=c.isCorrect(N.BITS),this.isInSubnet=c.isInSubnet,this.address=A;var x=N.RE_SUBNET_STRING.exec(A);if(x){if(this.parsedSubnet=x[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,this.subnetMask<0||this.subnetMask>N.BITS)throw new e.AddressError("Invalid subnet mask.");A=A.replace(N.RE_SUBNET_STRING,"")}this.addressMinusSuffix=A,this.parsedAddress=this.parse(A)}return C.isValid=function(A){try{return new C(A),!0}catch{return!1}},C.prototype.parse=function(A){var x=A.split(".");if(!A.match(N.RE_ADDRESS))throw new e.AddressError("Invalid IPv4 address.");return x},C.prototype.correctForm=function(){return this.parsedAddress.map(function(A){return parseInt(A,10)}).join(".")},C.fromHex=function(A){var G,x=A.replace(/:/g,"").padStart(8,"0"),V=[];for(G=0;G<8;G+=2){var X=x.slice(G,G+2);V.push(parseInt(X,16))}return new C(V.join("."))},C.fromInteger=function(A){return C.fromHex(A.toString(16))},C.prototype.toHex=function(){return this.parsedAddress.map(function(A){return _.sprintf("%02x",parseInt(A,10))}).join(":")},C.prototype.toArray=function(){return this.parsedAddress.map(function(A){return parseInt(A,10)})},C.prototype.toGroup6=function(){var x,A=[];for(x=0;x<N.GROUPS;x+=2){var V=_.sprintf("%02x%02x",parseInt(this.parsedAddress[x],10),parseInt(this.parsedAddress[x+1],10));A.push(_.sprintf("%x",parseInt(V,16)))}return A.join(":")},C.prototype.bigInteger=function(){return new F.BigInteger(this.parsedAddress.map(function(A){return _.sprintf("%02x",parseInt(A,10))}).join(""),16)},C.prototype._startAddress=function(){return new F.BigInteger(this.mask()+"0".repeat(N.BITS-this.subnetMask),2)},C.prototype.startAddress=function(){return C.fromBigInteger(this._startAddress())},C.prototype.startAddressExclusive=function(){var A=new F.BigInteger("1");return C.fromBigInteger(this._startAddress().add(A))},C.prototype._endAddress=function(){return new F.BigInteger(this.mask()+"1".repeat(N.BITS-this.subnetMask),2)},C.prototype.endAddress=function(){return C.fromBigInteger(this._endAddress())},C.prototype.endAddressExclusive=function(){var A=new F.BigInteger("1");return C.fromBigInteger(this._endAddress().subtract(A))},C.fromBigInteger=function(A){return C.fromInteger(parseInt(A.toString(),10))},C.prototype.mask=function(A){return void 0===A&&(A=this.subnetMask),this.getBitsBase2(0,A)},C.prototype.getBitsBase2=function(A,x){return this.binaryZeroPad().slice(A,x)},C.prototype.isMulticast=function(){return this.isInSubnet(new C("224.0.0.0/4"))},C.prototype.binaryZeroPad=function(){return this.bigInteger().toString(2).padStart(N.BITS,"0")},C.prototype.groupForV6=function(){var A=this.parsedAddress;return this.address.replace(N.RE_ADDRESS,_.sprintf('<span class="hover-group group-v4 group-6">%s</span>
1.<span class="hover-group group-v4 group-7">%s</span>',A.slice(0,2).join("."),A.slice(2,4).join(".")))},C}();D.Address4=B},61462(ee,D,l){"use strict";var p=this&&this.__createBinding||(Object.create?function(I,g,P,R){void 0===R&&(R=P),Object.defineProperty(I,R,{enumerable:!0,get:function(){return g[P]}})}:function(I,g,P,R){void 0===R&&(R=P),I[R]=g[P]}),M=this&&this.__setModuleDefault||(Object.create?function(I,g){Object.defineProperty(I,"default",{enumerable:!0,value:g})}:function(I,g){I.default=g}),o=this&&this.__importStar||function(I){if(I&&I.__esModule)return I;var g={};if(null!=I)for(var P in I)"default"!==P&&Object.prototype.hasOwnProperty.call(I,P)&&p(g,I,P);return M(g,I),g},c=this&&this.__spreadArrays||function(){for(var I=0,g=0,P=arguments.length;g<P;g++)I+=arguments[g].length;var R=Array(I),w=0;for(g=0;g<P;g++)for(var L=arguments[g],Z=0,oe=L.length;Z<oe;Z++,w++)R[w]=L[Z];return R};Object.defineProperty(D,"__esModule",{value:!0}),D.Address6=void 0;var N=o(l(90070)),e=o(l(64291)),F=o(l(53605)),_=o(l(41421)),B=l(72492),C=l(95550),A=l(76616),x=l(28879),V=l(61807);function G(I){if(!I)throw new Error("Assertion failed.")}function W(I){return(I=I.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2')).replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2')}function K(I){return V.sprintf("%04x",parseInt(I,16))}function ue(I){return 255&I}var ae=function(){function I(g,P){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=N.isInSubnet,this.isCorrect=N.isCorrect(F.BITS),this.groups=void 0===P?F.GROUPS:P,this.address=g;var R=F.RE_SUBNET_STRING.exec(g);if(R){if(this.parsedSubnet=R[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet="/"+this.subnetMask,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>F.BITS)throw new A.AddressError("Invalid subnet mask.");g=g.replace(F.RE_SUBNET_STRING,"")}else if(/\//.test(g))throw new A.AddressError("Invalid subnet mask.");var w=F.RE_ZONE_STRING.exec(g);w&&(this.zone=w[0],g=g.replace(F.RE_ZONE_STRING,"")),this.addressMinusSuffix=g,this.parsedAddress=this.parse(this.addressMinusSuffix)}return I.isValid=function(g){try{return new I(g),!0}catch{return!1}},I.fromBigInteger=function(g){var w,P=g.toString(16).padStart(32,"0"),R=[];for(w=0;w<F.GROUPS;w++)R.push(P.slice(4*w,4*(w+1)));return new I(R.join(":"))},I.fromURL=function(g){var P,w,R=null;if(-1!==g.indexOf("[")&&-1!==g.indexOf("]:")){if(null===(w=F.RE_URL_WITH_PORT.exec(g)))return{error:"failed to parse address with port",address:null,port:null};P=w[1],R=w[2]}else if(-1!==g.indexOf("/")){if(g=g.replace(/^[a-z0-9]+:\/\//,""),null===(w=F.RE_URL.exec(g)))return{error:"failed to parse address from URL",address:null,port:null};P=w[1]}else P=g;return R?((R=parseInt(R,10))<0||R>65536)&&(R=null):R=null,{address:new I(P),port:R}},I.fromAddress4=function(g){var P=new B.Address4(g),R=F.BITS-(e.BITS-P.subnetMask);return new I("::ffff:"+P.correctForm()+"/"+R)},I.fromArpa=function(g){var P=g.replace(/(\.ip6\.arpa)?\.$/,"");if(63!==P.length)throw new A.AddressError("Invalid 'ip6.arpa' form.");for(var w=P.split(".").reverse(),L=7;L>0;L--)w.splice(4*L,0,":");return new I(P=w.join(""))},I.prototype.microsoftTranscription=function(){return V.sprintf("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))},I.prototype.mask=function(g){return void 0===g&&(g=this.subnetMask),this.getBitsBase2(0,g)},I.prototype.possibleSubnets=function(g){void 0===g&&(g=128);var w=F.BITS-this.subnetMask-Math.abs(g-F.BITS);return w<0?"0":function X(I){for(var g=/(\d+)(\d{3})/;g.test(I);)I=I.replace(g,"$1,$2");return I}(new x.BigInteger("2",10).pow(w).toString(10))},I.prototype._startAddress=function(){return new x.BigInteger(this.mask()+"0".repeat(F.BITS-this.subnetMask),2)},I.prototype.startAddress=function(){return I.fromBigInteger(this._startAddress())},I.prototype.startAddressExclusive=function(){var g=new x.BigInteger("1");return I.fromBigInteger(this._startAddress().add(g))},I.prototype._endAddress=function(){return new x.BigInteger(this.mask()+"1".repeat(F.BITS-this.subnetMask),2)},I.prototype.endAddress=function(){return I.fromBigInteger(this._endAddress())},I.prototype.endAddressExclusive=function(){var g=new x.BigInteger("1");return I.fromBigInteger(this._endAddress().subtract(g))},I.prototype.getScope=function(){var g=F.SCOPES[this.getBits(12,16).intValue()];return"Global unicast"===this.getType()&&"Link local"!==g&&(g="Global"),g||"Unknown"},I.prototype.getType=function(){for(var g=0,P=Object.keys(F.TYPES);g<P.length;g++){var R=P[g];if(this.isInSubnet(new I(R)))return F.TYPES[R]}return"Global unicast"},I.prototype.getBits=function(g,P){return new x.BigInteger(this.getBitsBase2(g,P),2)},I.prototype.getBitsBase2=function(g,P){return this.binaryZeroPad().slice(g,P)},I.prototype.getBitsBase16=function(g,P){var R=P-g;if(R%4!=0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(g,P).toString(16).padStart(R/4,"0")},I.prototype.getBitsPastSubnet=function(){return this.getBitsBase2(this.subnetMask,F.BITS)},I.prototype.reverseForm=function(g){g||(g={});var P=Math.floor(this.subnetMask/4),R=this.canonicalForm().replace(/:/g,"").split("").slice(0,P).reverse().join(".");return P>0?g.omitSuffix?R:V.sprintf("%s.ip6.arpa.",R):g.omitSuffix?"":"ip6.arpa."},I.prototype.correctForm=function(){var g,P=[],R=0,w=[];for(g=0;g<this.parsedAddress.length;g++){var L=parseInt(this.parsedAddress[g],16);0===L&&R++,0!==L&&R>0&&(R>1&&w.push([g-R,g-1]),R=0)}R>1&&w.push([this.parsedAddress.length-R,this.parsedAddress.length-1]);var Z=w.map(function(q){return q[1]-q[0]+1});if(w.length>0){var oe=Z.indexOf(Math.max.apply(Math,Z));
1P=function Y(I,g){var w,P=[],R=[];for(w=0;w<I.length;w++)w<g[0]?P.push(I[w]):w>g[1]&&R.push(I[w]);return P.concat(["compact"]).concat(R)}(this.parsedAddress,w[oe])}else P=this.parsedAddress;for(g=0;g<P.length;g++)"compact"!==P[g]&&(P[g]=parseInt(P[g],16).toString(16));var O=P.join(":");return(O=(O=O.replace(/^compact$/,"::")).replace(/^compact|compact$/,":")).replace(/compact/,"")},I.prototype.binaryZeroPad=function(){return this.bigInteger().toString(2).padStart(F.BITS,"0")},I.prototype.parse4in6=function(g){var P=g.split(":"),w=P.slice(-1)[0].match(e.RE_ADDRESS);if(w){this.parsedAddress4=w[0],this.address4=new B.Address4(this.parsedAddress4);for(var L=0;L<this.address4.groups;L++)if(/^0[0-9]+/.test(this.address4.parsedAddress[L]))throw new A.AddressError("IPv4 addresses can't have leading zeroes.",g.replace(e.RE_ADDRESS,this.address4.parsedAddress.map(W).join(".")));this.v4=!0,P[P.length-1]=this.address4.toGroup6(),g=P.join(":")}return g},I.prototype.parse=function(g){var P=(g=this.parse4in6(g)).match(F.RE_BAD_CHARACTERS);if(P)throw new A.AddressError(V.sprintf("Bad character%s detected in address: %s",P.length>1?"s":"",P.join("")),g.replace(F.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));var R=g.match(F.RE_BAD_ADDRESS);if(R)throw new A.AddressError(V.sprintf("Address failed regex: %s",R.join("")),g.replace(F.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));var w=[],L=g.split("::");if(2===L.length){var Z=L[0].split(":"),oe=L[1].split(":");1===Z.length&&""===Z[0]&&(Z=[]),1===oe.length&&""===oe[0]&&(oe=[]);var O=this.groups-(Z.length+oe.length);if(!O)throw new A.AddressError("Error parsing groups");this.elidedGroups=O,this.elisionBegin=Z.length,this.elisionEnd=Z.length+this.elidedGroups,w=w.concat(Z);for(var q=0;q<O;q++)w.push("0");w=w.concat(oe)}else{if(1!==L.length)throw new A.AddressError("Too many :: groups found");w=g.split(":"),this.elidedGroups=0}if((w=w.map(function(z){return V.sprintf("%x",parseInt(z,16))})).length!==this.groups)throw new A.AddressError("Incorrect number of groups found");return w},I.prototype.canonicalForm=function(){return this.parsedAddress.map(K).join(":")},I.prototype.decimal=function(){return this.parsedAddress.map(function(g){return V.sprintf("%05d",parseInt(g,16))}).join(":")},I.prototype.bigInteger=function(){return new x.BigInteger(this.parsedAddress.map(K).join(""),16)},I.prototype.to4=function(){var g=this.binaryZeroPad().split("");return B.Address4.fromHex(new x.BigInteger(g.slice(96,128).join(""),2).toString(16))},I.prototype.to4in6=function(){var g=this.to4(),R=new I(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),w="";return/:$/.test(R)||(w=":"),R+w+g.address},I.prototype.inspectTeredo=function(){var g=this.getBitsBase16(0,32),P=this.getBits(80,96).xor(new x.BigInteger("ffff",16)).toString(),R=B.Address4.fromHex(this.getBitsBase16(32,64)),w=B.Address4.fromHex(this.getBits(96,128).xor(new x.BigInteger("ffffffff",16)).toString(16)),L=this.getBits(64,80),Z=this.getBitsBase2(64,80),oe=L.testBit(15),O=L.testBit(14),q=L.testBit(8),z=L.testBit(9),me=new x.BigInteger(Z.slice(2,6)+Z.slice(8,16),2).toString(10);return{prefix:V.sprintf("%s:%s",g.slice(0,4),g.slice(4,8)),server4:R.address,client4:w.address,flags:Z,coneNat:oe,microsoft:{reserved:O,universalLocal:z,groupIndividual:q,nonce:me},udpPort:P}},I.prototype.inspect6to4=function(){var g=this.getBitsBase16(0,16),P=B.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:V.sprintf("%s",g.slice(0,4)),gateway:P.address}},I.prototype.to6to4=function(){return this.is4()?new I(["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":")):null},I.prototype.toByteArray=function(){var g=this.bigInteger().toByteArray();return 17===g.length&&0===g[0]?g.slice(1):g},I.prototype.toUnsignedByteArray=function(){return this.toByteArray().map(ue)},I.fromByteArray=function(g){return this.fromUnsignedByteArray(g.map(ue))},I.fromUnsignedByteArray=function(g){for(var P=new x.BigInteger("256",10),R=new x.BigInteger("0",10),w=new x.BigInteger("1",10),L=g.length-1;L>=0;L--)R=R.add(w.multiply(new x.BigInteger(g[L].toString(10),10))),w=w.multiply(P);return I.fromBigInteger(R)},I.prototype.isCanonical=function(){return this.addressMinusSuffix===this.canonicalForm()},I.prototype.isLinkLocal=function(){return"1111111010000000000000000000000000000000000000000000000000000000"===this.getBitsBase2(0,64)},I.prototype.isMulticast=function(){return"Multicast"===this.getType()},I.prototype.is4=function(){return this.v4},I.prototype.isTeredo=function(){return this.isInSubnet(new I("2001::/32"))},I.prototype.is6to4=function(){return this.isInSubnet(new I("2002::/16"))},I.prototype.isLoopback=function(){return"Loopback"===this.getType()},I.prototype.href=function(g){return g=void 0===g?"":V.sprintf(":%s",g),V.sprintf("http://[%s]%s/",this.correctForm(),g)},I.prototype.link=function(g){g||(g={}),void 0===g.className&&(g.className=""),void 0===g.prefix&&(g.prefix="/#address="),void 0===g.v4&&(g.v4=!1);var P=this.correctForm;return g.v4&&(P=this.to4in6),g.className?V.sprintf('<a href="%1$s%2$s" class="%3$s">%2$s</a>',g.prefix,P.call(this),g.className):V.sprintf('<a href="%1$s%2$s">%2$s</a>',g.prefix,P.call(this))},I.prototype.group=function(){if(0===this.elidedGroups)return _.simpleGroup(this.address).join(":");G("number"==typeof this.elidedGroups),G("number"==typeof this.elisionBegin);var g=[],P=this.address.split("::"),R=P[0],w=P[1];R.length?g.push.apply(g,_.simpleGroup(R)):g.push("");for(var L=["hover-group"],Z=this.elisionBegin;Z<this.elisionBegin+this.elidedGroups;Z++)L.push(V.sprintf("group-%d",Z));return g.push(V.sprintf('<span class="%s"></span>',L.join(" "))),w.length?g.push.apply(g,_.simpleGroup(w,this.elisionEnd)):g.push(""),this.is4()&&
1(G(this.address4 instanceof B.Address4),g.pop(),g.push(this.address4.groupForV6())),g.join(":")},I.prototype.regularExpressionString=function(g){void 0===g&&(g=!1);var P=[],R=new I(this.correctForm());if(0===R.elidedGroups)P.push(C.simpleRegularExpression(R.parsedAddress));else if(R.elidedGroups===F.GROUPS)P.push(C.possibleElisions(F.GROUPS));else{var w=R.address.split("::");w[0].length&&P.push(C.simpleRegularExpression(w[0].split(":"))),G("number"==typeof R.elidedGroups),P.push(C.possibleElisions(R.elidedGroups,0!==w[0].length,0!==w[1].length)),w[1].length&&P.push(C.simpleRegularExpression(w[1].split(":"))),P=[P.join(":")]}return g||(P=c(["(?=^|",C.ADDRESS_BOUNDARY,"|[^\\w\\:])("],P,[")(?=[^\\w\\:]|",C.ADDRESS_BOUNDARY,"|$)"])),P.join("")},I.prototype.regularExpression=function(g){return void 0===g&&(g=!1),new RegExp(this.regularExpressionString(g),"i")},I}();D.Address6=ae},64291(ee,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.RE_SUBNET_STRING=D.RE_ADDRESS=D.GROUPS=D.BITS=void 0,D.BITS=32,D.GROUPS=4,D.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,D.RE_SUBNET_STRING=/\/\d{1,2}$/},53605(ee,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.RE_URL_WITH_PORT=D.RE_URL=D.RE_ZONE_STRING=D.RE_SUBNET_STRING=D.RE_BAD_ADDRESS=D.RE_BAD_CHARACTERS=D.TYPES=D.SCOPES=D.GROUPS=D.BITS=void 0,D.BITS=128,D.GROUPS=8,D.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},D.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},D.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi,D.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,D.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,D.RE_ZONE_STRING=/%.*$/,D.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/),D.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)},41421(ee,D,l){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.simpleGroup=D.spanLeadingZeroes=D.spanAll=D.spanAllZeroes=void 0;var p=l(61807);function M(F){return F.replace(/(0+)/g,'<span class="zero">$1</span>')}function c(F){return F.replace(/^(0+)/,'<span class="zero">$1</span>')}D.spanAllZeroes=M,D.spanAll=function o(F,_){return void 0===_&&(_=0),F.split("").map(function(C,A){return p.sprintf('<span class="digit value-%s position-%d">%s</span>',C,A+_,M(C))}).join("")},D.spanLeadingZeroes=function N(F){return F.split(":").map(function(B){return c(B)}).join(":")},D.simpleGroup=function e(F,_){return void 0===_&&(_=0),F.split(":").map(function(C,A){return/group-v4/.test(C)?C:p.sprintf('<span class="hover-group group-%d">%s</span>',A+_,c(C))})}},95550(ee,D,l){"use strict";var p=this&&this.__createBinding||(Object.create?function(C,A,x,V){void 0===V&&(V=x),Object.defineProperty(C,V,{enumerable:!0,get:function(){return A[x]}})}:function(C,A,x,V){void 0===V&&(V=x),C[V]=A[x]}),M=this&&this.__setModuleDefault||(Object.create?function(C,A){Object.defineProperty(C,"default",{enumerable:!0,value:A})}:function(C,A){C.default=A}),o=this&&this.__importStar||function(C){if(C&&C.__esModule)return C;var A={};if(null!=C)for(var x in C)"default"!==x&&Object.prototype.hasOwnProperty.call(C,x)&&p(A,C,x);return M(A,C),A};Object.defineProperty(D,"__esModule",{value:!0}),D.possibleElisions=D.simpleRegularExpression=D.ADDRESS_BOUNDARY=D.padGroup=D.groupPossibilities=void 0;var c=o(l(53605)),N=l(61807);function e(C){return N.sprintf("(%s)",C.join("|"))}function F(C){return C.length<4?N.sprintf("0{0,%d}%s",4-C.length,C):C}D.groupPossibilities=e,D.padGroup=F,D.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]",D.simpleRegularExpression=function _(C){var A=[];
1C.forEach(function(V,G){0===parseInt(V,16)&&A.push(G)});var x=A.map(function(V){return C.map(function(G,X){if(X===V){var W=0===X||X===c.GROUPS-1?":":"";return e([F(G),W])}return F(G)}).join(":")});return x.push(C.map(F).join(":")),e(x)},D.possibleElisions=function B(C,A,x){var V=A?"":":",G=x?"":":",X=[];!A&&!x&&X.push("::"),A&&x&&X.push(""),(x&&!A||!x&&A)&&X.push(":"),X.push(N.sprintf("%s(:0{1,4}){1,%d}",V,C-1)),X.push(N.sprintf("(0{1,4}:){1,%d}%s",C-1,G)),X.push(N.sprintf("(0{1,4}:){%d}0{1,4}",C-1));for(var W=1;W<C-1;W++)for(var Y=1;Y<C-W;Y++)X.push(N.sprintf("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",Y,C-Y-W-1));return e(X)}},61807(ee,D,l){var p;!function(){"use strict";var M={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(_){return function N(_,B){var x,G,X,W,Y,K,ue,ae,I,C=1,A=_.length,V="";for(G=0;G<A;G++)if("string"==typeof _[G])V+=_[G];else if("object"==typeof _[G]){if((W=_[G]).keys)for(x=B[C],X=0;X<W.keys.length;X++){if(null==x)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',W.keys[X],W.keys[X-1]));x=x[W.keys[X]]}else x=W.param_no?B[W.param_no]:B[C++];if(M.not_type.test(W.type)&&M.not_primitive.test(W.type)&&x instanceof Function&&(x=x()),M.numeric_arg.test(W.type)&&"number"!=typeof x&&isNaN(x))throw new TypeError(o("[sprintf] expecting number but found %T",x));switch(M.number.test(W.type)&&(ae=x>=0),W.type){case"b":x=parseInt(x,10).toString(2);break;case"c":x=String.fromCharCode(parseInt(x,10));break;case"d":case"i":x=parseInt(x,10);break;case"j":x=JSON.stringify(x,null,W.width?parseInt(W.width):0);break;case"e":x=W.precision?parseFloat(x).toExponential(W.precision):parseFloat(x).toExponential();break;case"f":x=W.precision?parseFloat(x).toFixed(W.precision):parseFloat(x);break;case"g":x=W.precision?String(Number(x.toPrecision(W.precision))):parseFloat(x);break;case"o":x=(parseInt(x,10)>>>0).toString(8);break;case"s":x=String(x),x=W.precision?x.substring(0,W.precision):x;break;case"t":x=String(!!x),x=W.precision?x.substring(0,W.precision):x;break;case"T":x=Object.prototype.toString.call(x).slice(8,-1).toLowerCase(),x=W.precision?x.substring(0,W.precision):x;break;case"u":x=parseInt(x,10)>>>0;break;case"v":x=x.valueOf(),x=W.precision?x.substring(0,W.precision):x;break;case"x":x=(parseInt(x,10)>>>0).toString(16);break;case"X":x=(parseInt(x,10)>>>0).toString(16).toUpperCase()}M.json.test(W.type)?V+=x:(!M.number.test(W.type)||ae&&!W.sign?I="":(I=ae?"+":"-",x=x.toString().replace(M.sign,"")),K=W.pad_char?"0"===W.pad_char?"0":W.pad_char.charAt(1):" ",ue=W.width-(I+x).length,Y=W.width&&ue>0?K.repeat(ue):"",V+=W.align?I+x+Y:"0"===K?I+Y+x:Y+I+x)}return V}(function F(_){if(e[_])return e[_];for(var C,B=_,A=[],x=0;B;){if(null!==(C=M.text.exec(B)))A.push(C[0]);else if(null!==(C=M.modulo.exec(B)))A.push("%");else{if(null===(C=M.placeholder.exec(B)))throw new SyntaxError("[sprintf] unexpected placeholder");if(C[2]){x|=1;var V=[],G=C[2],X=[];if(null===(X=M.key.exec(G)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(V.push(X[1]);""!==(G=G.substring(X[0].length));)if(null!==(X=M.key_access.exec(G)))V.push(X[1]);else{if(null===(X=M.index_access.exec(G)))throw new SyntaxError("[sprintf] failed to parse named argument key");V.push(X[1])}C[2]=V}else x|=2;if(3===x)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");A.push({placeholder:C[0],param_no:C[1],keys:C[2],sign:C[3],pad_char:C[4],align:C[5],width:C[6],precision:C[7],type:C[8]})}B=B.substring(C[0].length)}return e[_]=A}(_),arguments)}function c(_,B){return o.apply(null,[_].concat(B||[]))}var e=Object.create(null);D.sprintf=o,D.vsprintf=c,typeof window<"u"&&(window.sprintf=o,window.vsprintf=c,void 0!==(p=function(){return{sprintf:o,vsprintf:c}}.call(D,l,D,ee))&&(ee.exports=p))}()},28879(ee,D){(function(){var l;function o(d,u,f){null!=d&&("number"==typeof d?this.fromNumber(d,u,f):this.fromString(d,null==u&&"string"!=typeof d?256:u))}function c(){return new o(null)}var _=typeof navigator<"u";_&&"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function e(d,u,f,T,j,H){for(var Q=32767&u,U=u>>15;--H>=0;){var ne=32767&this[d],pe=this[d++]>>15,Pe=U*ne+pe*Q;j=((ne=Q*ne+((32767&Pe)<<15)+f[T]+(1073741823&j))>>>30)+(Pe>>>15)+U*pe+(j>>>30),f[T++]=1073741823&ne}return j},l=30):_&&"Netscape"!=navigator.appName?(o.prototype.am=function N(d,u,f,T,j,H){for(;--H>=0;){var Q=u*this[d++]+f[T]+j;j=Math.floor(Q/67108864),f[T++]=67108863&Q}return j},l=26):(o.prototype.am=function F(d,u,f,T,j,H){for(var Q=16383&u,U=u>>14;--H>=0;){var ne=16383&this[d],pe=this[d++]>>14,Pe=U*ne+pe*Q;j=((ne=Q*ne+((16383&Pe)<<14)+f[T]+j)>>28)+(Pe>>14)+U*pe,f[T++]=268435455&ne}return j},l=28),o.prototype.DB=l,o.prototype.DM=(1<<l)-1,o.prototype.DV=1<<l,o.prototype.FV=Math.pow(2,52),o.prototype.F1=52-l,o.prototype.F2=2*l-52;var x,V,A=new Array;for(x=48,V=0;V<=9;++V)A[x++]=V;for(x=97,V=10;V<36;++V)A[x++]=V;for(x=65,V=10;V<36;++V)A[x++]=V;function G(d){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(d)}function X(d,u){return A[d.charCodeAt(u)]??-1}function K(d){var u=c();return u.fromInt(d),u}function w(d){var f,u=1;return 0!=(f=d>>>16)&&(d=f,u+=16),0!=(f=d>>8)&&(d=f,u+=8),0!=(f=d>>4)&&(d=f,u+=4),0!=(f=d>>2)&&(d=f,u+=2),0!=(f=d>>1)&&(d=f,u+=1),u}function ve(d){this.m=d}function ke(d){this.m=d,this.mp=d.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>
vendor: 5,079 bytes, line 1
1>15,this.um=(1<<d.DB-15)-1,this.mt2=2*d.t}function Ne(d,u){return d&u}function ut(d,u){return d|u}function nt(d,u){return d^u}function Mt(d,u){return d&~u}function Bt(d){if(0==d)return-1;var u=0;return!(65535&d)&&(d>>=16,u+=16),!(255&d)&&(d>>=8,u+=8),!(15&d)&&(d>>=4,u+=4),!(3&d)&&(d>>=2,u+=2),!(1&d)&&++u,u}function wt(d){for(var u=0;0!=d;)d&=d-1,++u;return u}function He(){}function rt(d){return d}function Ve(d){this.r2=c(),this.q3=c(),o.ONE.dlShiftTo(2*d.t,this.r2),this.mu=this.r2.divide(d),this.m=d}ve.prototype.convert=function It(d){return d.s<0||d.compareTo(this.m)>=0?d.mod(this.m):d},ve.prototype.revert=function Ut(d){return d},ve.prototype.reduce=function ze(d){d.divRemTo(this.m,null,d)},ve.prototype.mulTo=function Jt(d,u,f){d.multiplyTo(u,f),this.reduce(f)},ve.prototype.sqrTo=function Yt(d,u){d.squareTo(u),this.reduce(u)},ke.prototype.convert=function Ft(d){var u=c();return d.abs().dlShiftTo(this.m.t,u),u.divRemTo(this.m,null,u),d.s<0&&u.compareTo(o.ZERO)>0&&this.m.subTo(u,u),u},ke.prototype.revert=function Kt(d){var u=c();return d.copyTo(u),this.reduce(u),u},ke.prototype.reduce=function Rt(d){for(;d.t<=this.mt2;)d[d.t++]=0;for(var u=0;u<this.m.t;++u){var f=32767&d[u],T=f*this.mpl+((f*this.mph+(d[u]>>15)*this.mpl&this.um)<<15)&d.DM;for(d[f=u+this.m.t]+=this.m.am(0,T,d,u,0,this.m.t);d[f]>=d.DV;)d[f]-=d.DV,d[++f]++}d.clamp(),d.drShiftTo(this.m.t,d),d.compareTo(this.m)>=0&&d.subTo(this.m,d)},ke.prototype.mulTo=function tt(d,u,f){d.multiplyTo(u,f),this.reduce(f)},ke.prototype.sqrTo=function Zt(d,u){d.squareTo(u),this.reduce(u)},o.prototype.copyTo=function W(d){for(var u=this.t-1;u>=0;--u)d[u]=this[u];d.t=this.t,d.s=this.s},o.prototype.fromInt=function Y(d){this.t=1,this.s=d<0?-1:0,d>0?this[0]=d:d<-1?this[0]=d+this.DV:this.t=0},o.prototype.fromString=function ue(d,u){var f;if(16==u)f=4;else if(8==u)f=3;else if(256==u)f=8;else if(2==u)f=1;else if(32==u)f=5;else{if(4!=u)return void this.fromRadix(d,u);f=2}this.t=0,this.s=0;for(var T=d.length,j=!1,H=0;--T>=0;){var Q=8==f?255&d[T]:X(d,T);Q<0?"-"==d.charAt(T)&&(j=!0):(j=!1,0==H?this[this.t++]=Q:H+f>this.DB?(this[this.t-1]|=(Q&(1<<this.DB-H)-1)<<H,this[this.t++]=Q>>this.DB-H):this[this.t-1]|=Q<<H,(H+=f)>=this.DB&&(H-=this.DB))}8==f&&!!(128&d[0])&&(this.s=-1,H>0&&(this[this.t-1]|=(1<<this.DB-H)-1<<H)),this.clamp(),j&&o.ZERO.subTo(this,this)},o.prototype.clamp=function ae(){for(var d=this.s&this.DM;this.t>0&&this[this.t-1]==d;)--this.t},o.prototype.dlShiftTo=function Z(d,u){var f;for(f=this.t-1;f>=0;--f)u[f+d]=this[f];for(f=d-1;f>=0;--f)u[f]=0;u.t=this.t+d,u.s=this.s},o.prototype.drShiftTo=function oe(d,u){for(var f=d;f<this.t;++f)u[f-d]=this[f];u.t=Math.max(this.t-d,0),u.s=this.s},o.prototype.lShiftTo=function O(d,u){var U,f=d%this.DB,T=this.DB-f,j=(1<<T)-1,H=Math.floor(d/this.DB),Q=this.s<<f&this.DM;for(U=this.t-1;U>=0;--U)u[U+H+1]=this[U]>>T|Q,Q=(this[U]&j)<<f;for(U=H-1;U>=0;--U)u[U]=0;u[H]=Q,u.t=this.t+H+1,u.s=this.s,u.clamp()},o.prototype.rShiftTo=function q(d,u){u.s=this.s;var f=Math.floor(d/this.DB);if(f>=this.t)u.t=0;else{var T=d%this.DB,j=this.DB-T,H=(1<<T)-1;u[0]=this[f]>>T;for(var Q=f+1;Q<this.t;++Q)u[Q-f-1]|=(this[Q]&H)<<j,u[Q-f]=this[Q]>>T;T>0&&(u[this.t-f-1]|=(this.s&H)<<j),u.t=this.t-f,u.clamp()}},o.prototype.subTo=function z(d,u){for(var f=0,T=0,j=Math.min(d.t,this.t);f<j;)T+=this[f]-d[f],u[f++]=T&this.DM,T>>=this.DB;if(d.t<this.t){for(T-=d.s;f<this.t;)T+=this[f],u[f++]=T&this.DM,T>>=this.DB;T+=this.s}else{for(T+=this.s;f<d.t;)T-=d[f],u[f++]=T&this.DM,T>>=this.DB;T-=d.s}u.s=T<0?-1:0,T<-1?u[f++]=this.DV+T:T>0&&(u[f++]=T),u.t=f,u.clamp()},o.prototype.multiplyTo=function me(d,u){var f=this.abs(),T=d.abs(),j=f.t;for(u.t=j+T.t;--j>=0;)u[j]=0;for(j=0;j<T.t;++j)u[j+f.t]=f.am(0,T[j],u,j,0,f.t);u.s=0,u.clamp(),this.s!=d.s&&o.ZERO.subTo(u,u)},o.prototype.squareTo=function Ce(d){for(var u=this.abs(),f=d.t=2*u.t;--f>=0;)d[f]=0;for(f=0;f<u.t-1;++f){var T=u.am(f,u[f],d,2*f,0,1);(d[f+u.t]+=u.am(f+1,2*u[f],d,2*f+1,T,u.t-f-1))>=u.DV&&(d[f+u.t]-=u.DV,d[f+u.t+1]=1)}d.t>0&&(d[d.t-1]+=u.am(f,u[f],d,2*f,0,1)),d.s=0,d.clamp()},o.prototype.divRemTo=function ct(d,u,f){var T=d.abs();if(!(T.t<=0)){var j=this.abs();if(j.t<T.t)return u?.fromInt(0),void(null!=f&&this.copyTo(f));null==f&&(f=c());var H=c(),Q=this.s,U=d.s,ne=this.DB-w(T[T.t-1]);ne>0?(T.lShiftTo(ne,H),j.lShiftTo(ne,f)):(T.copyTo(H),j.copyTo(f));var pe=H.t,Pe=H[pe-1];if(0!=Pe){var Te=Pe*(1<<this.F1)+(pe>1?H[pe-2]>>this.F2:0),Ee=this.FV/Te,ot=(1<<this.F1)/Te,ge=1<<this.F2,Ie=f.t,st=Ie-pe,we=u??c();for(H.dlShiftTo(st,we),f.compareTo(we)>=0&&(f[f.t++]=1,f.subTo(we,f)),o.ONE.dlShiftTo(pe,we),we.subTo(H,H);H.t<pe;)H[H.t++]=0;for(;--st>=0;){var Tt=f[--Ie]==Pe?this.DM:Math.floor(f[Ie]*Ee+(f[Ie-1]+ge)*ot);if((f[Ie]+=H.am(0,Tt,f,st,0,pe))<Tt)for(H.dlShiftTo(st,we),f.subTo(we,f);f[Ie]<--Tt;)f.subTo(we,f)}null!=u&&(f.drShiftTo(pe,u),Q!=U&&o.ZERO.subTo(u,u)),f.t=pe,f.clamp(),ne>0&&f.rShiftTo(ne,f),Q<0&&o.ZERO.subTo(f,f)}}},o.prototype.invDigit=function zt(){if(this.t<1)return 0;var d=this[0];if(!(1&d))return 0;var u=3&d;return(u=(u=(u=(u=u*(2-(15&d)*u)&15)*(2-(255&d)*u)&255)*(2-((65535&d)*u&65535))&65535)
vendor: 1,787 bytes, line 1
1*(2-d*u%this.DV)%this.DV)>0?this.DV-u:-u},o.prototype.isEven=function qt(){return 0==(this.t>0?1&this[0]:this.s)},o.prototype.exp=function fe(d,u){if(d>4294967295||d<1)return o.ONE;var f=c(),T=c(),j=u.convert(this),H=w(d)-1;for(j.copyTo(f);--H>=0;)if(u.sqrTo(f,T),(d&1<<H)>0)u.mulTo(T,j,f);else{var Q=f;f=T,T=Q}return u.revert(f)},o.prototype.toString=function I(d){if(this.s<0)return"-"+this.negate().toString(d);var u;if(16==d)u=4;else if(8==d)u=3;else if(2==d)u=1;else if(32==d)u=5;else{if(4!=d)return this.toRadix(d);u=2}var T,f=(1<<u)-1,j=!1,H="",Q=this.t,U=this.DB-Q*this.DB%u;if(Q-- >0)for(U<this.DB&&(T=this[Q]>>U)>0&&(j=!0,H=G(T));Q>=0;)U<u?(T=(this[Q]&(1<<U)-1)<<u-U,T|=this[--Q]>>(U+=this.DB-u)):(T=this[Q]>>(U-=u)&f,U<=0&&(U+=this.DB,--Q)),T>0&&(j=!0),j&&(H+=G(T));return j?H:"0"},o.prototype.negate=function g(){var d=c();return o.ZERO.subTo(this,d),d},o.prototype.abs=function P(){return this.s<0?this.negate():this},o.prototype.compareTo=function R(d){var u=this.s-d.s;if(0!=u)return u;var f=this.t;if(0!=(u=f-d.t))return this.s<0?-u:u;for(;--f>=0;)if(0!=(u=this[f]-d[f]))return u;return 0},o.prototype.bitLength=function L(){return this.t<=0?0:this.DB*(this.t-1)+w(this[this.t-1]^this.s&this.DM)},o.prototype.mod=function et(d){var u=c();return this.abs().divRemTo(d,null,u),this.s<0&&u.compareTo(o.ZERO)>0&&d.subTo(u,u),u},o.prototype.modPowInt=function je(d,u){var f;return f=d<256||u.isEven()?new ve(u):new ke(u),this.exp(d,f)},o.ZERO=K(0),o.ONE=K(1),He.prototype.convert=rt,He.prototype.revert=rt,He.prototype.mulTo=function gn(d,u,f){d.multiplyTo(u,f)},He.prototype.sqrTo=function vn(d,u){d.squareTo(u)},Ve.prototype.convert=function yn(d){if(d.s<0||d.t>2*this.m.t)return d.mod(this.m);if(d.compareTo(this.m)<0)return d;var u=c();return d.copyTo(u),this.reduce(u),u}
vendor: 10,358 bytes, line 1
1,Ve.prototype.revert=function Cn(d){return d},Ve.prototype.reduce=function _n(d){for(d.drShiftTo(this.m.t-1,this.r2),d.t>this.m.t+1&&(d.t=this.m.t+1,d.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);d.compareTo(this.r2)<0;)d.dAddOffset(1,this.m.t+1);for(d.subTo(this.r2,d);d.compareTo(this.m)>=0;)d.subTo(this.m,d)},Ve.prototype.mulTo=function xn(d,u,f){d.multiplyTo(u,f),this.reduce(f)},Ve.prototype.sqrTo=function Tn(d,u){d.squareTo(u),this.reduce(u)};var te,_e,ce,be=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Pn=(1<<26)/be[be.length-1];function gt(){!function We(d){_e[ce++]^=255&d,_e[ce++]^=d>>8&255,_e[ce++]^=d>>16&255,_e[ce++]^=d>>24&255,ce>=Ue&&(ce-=Ue)}((new Date).getTime())}if(o.prototype.chunkSize=function Ze(d){return Math.floor(Math.LN2*this.DB/Math.log(d))},o.prototype.toRadix=function rn(d){if(null==d&&(d=10),0==this.signum()||d<2||d>36)return"0";var u=this.chunkSize(d),f=Math.pow(d,u),T=K(f),j=c(),H=c(),Q="";for(this.divRemTo(T,j,H);j.signum()>0;)Q=(f+H.intValue()).toString(d).substr(1)+Q,j.divRemTo(T,j,H);return H.intValue().toString(d)+Q},o.prototype.fromRadix=function an(d,u){this.fromInt(0),null==u&&(u=10);for(var f=this.chunkSize(u),T=Math.pow(u,f),j=!1,H=0,Q=0,U=0;U<d.length;++U){var ne=X(d,U);ne<0?"-"==d.charAt(U)&&0==this.signum()&&(j=!0):(Q=u*Q+ne,++H>=f&&(this.dMultiply(T),this.dAddOffset(Q,0),H=0,Q=0))}H>0&&(this.dMultiply(Math.pow(u,H)),this.dAddOffset(Q,0)),j&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function on(d,u,f){if("number"==typeof u)if(d<2)this.fromInt(1);else for(this.fromNumber(d,f),this.testBit(d-1)||this.bitwiseTo(o.ONE.shiftLeft(d-1),ut,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(u);)this.dAddOffset(2,0),this.bitLength()>d&&this.subTo(o.ONE.shiftLeft(d-1),this);else{var T=new Array,j=7&d;T.length=1+(d>>3),u.nextBytes(T),j>0?T[0]&=(1<<j)-1:T[0]=0,this.fromString(T,256)}},o.prototype.bitwiseTo=function xe(d,u,f){var T,j,H=Math.min(d.t,this.t);for(T=0;T<H;++T)f[T]=u(this[T],d[T]);if(d.t<this.t){for(j=d.s&this.DM,T=H;T<this.t;++T)f[T]=u(this[T],j);f.t=this.t}else{for(j=this.s&this.DM,T=H;T<d.t;++T)f[T]=u(j,d[T]);f.t=d.t}f.s=u(this.s,d.s),f.clamp()},o.prototype.changeBit=function ft(d,u){var f=o.ONE.shiftLeft(d);return this.bitwiseTo(f,u,f),f},o.prototype.addTo=function hn(d,u){for(var f=0,T=0,j=Math.min(d.t,this.t);f<j;)T+=this[f]+d[f],u[f++]=T&this.DM,T>>=this.DB;if(d.t<this.t){for(T+=d.s;f<this.t;)T+=this[f],u[f++]=T&this.DM,T>>=this.DB;T+=this.s}else{for(T+=this.s;f<d.t;)T+=d[f],u[f++]=T&this.DM,T>>=this.DB;T+=d.s}u.s=T<0?-1:0,T>0?u[f++]=T:T<-1&&(u[f++]=this.DV+T),u.t=f,u.clamp()},o.prototype.dMultiply=function $e(d){this[this.t]=this.am(0,d-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function Re(d,u){if(0!=d){for(;this.t<=u;)this[this.t++]=0;for(this[u]+=d;this[u]>=this.DV;)this[u]-=this.DV,++u>=this.t&&(this[this.t++]=0),++this[u]}},o.prototype.multiplyLowerTo=function bt(d,u,f){var j,T=Math.min(this.t+d.t,u);for(f.s=0,f.t=T;T>0;)f[--T]=0;for(j=f.t-this.t;T<j;++T)f[T+this.t]=this.am(0,d[T],f,T,0,this.t);for(j=Math.min(d.t,u);T<j;++T)this.am(0,d[T],f,T,0,u-T);f.clamp()},o.prototype.multiplyUpperTo=function Ot(d,u,f){--u;var T=f.t=this.t+d.t-u;for(f.s=0;--T>=0;)f[T]=0;for(T=Math.max(u-this.t,0);T<d.t;++T)f[this.t+T-u]=this.am(u-T,d[T],f,0,0,this.t+T-u);f.clamp(),f.drShiftTo(1,f)},o.prototype.modInt=function Sn(d){if(d<=0)return 0;var u=this.DV%d,f=this.s<0?d-1:0;if(this.t>0)if(0==u)f=this[0]%d;else for(var T=this.t-1;T>=0;--T)f=(u*f+this[T])%d;return f},o.prototype.millerRabin=function In(d){var u=this.subtract(o.ONE),f=u.getLowestSetBit();if(f<=0)return!1;var T=u.shiftRight(f);(d=d+1>>1)>be.length&&(d=be.length);for(var j=c(),H=0;H<d;++H){j.fromInt(be[Math.floor(Math.random()*be.length)]);var Q=j.modPow(T,this);if(0!=Q.compareTo(o.ONE)&&0!=Q.compareTo(u)){for(var U=1;U++<f&&0!=Q.compareTo(u);)if(0==(Q=Q.modPowInt(2,this)).compareTo(o.ONE))return!1;if(0!=Q.compareTo(u))return!1}}return!0},o.prototype.clone=function Ke(){var d=c();return this.copyTo(d),d},o.prototype.intValue=function se(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},o.prototype.byteValue=function en(){return 0==this.t?this.s:this[0]<<24>>24},o.prototype.shortValue=function tn(){return 0==this.t?this.s:this[0]<<16>>16},o.prototype.signum=function nn(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},o.prototype.toByteArray=function At(){var d=this.t,u=new Array;u[0]=this.s;var T,f=this.DB-d*this.DB%8,j=0;if(d-- >0)for(f<this.DB&&(T=this[d]>>f)!=(this.s&this.DM)>>f&&(u[j++]=T|this.s<<this.DB-f);d>=0;)f<8?(T=(this[d]&(1<<f)-1)<<8-f,T|=this[--d]>>(f+=this.DB-8)):(T=this[d]>>(f-=8)&255,f<=0&&(f+=this.DB,--d)),!!(128&T)&&(T|=-256),0==j&&(128&this.s)!=(128&T)&&++j,(j>0||T!=this.s)&&(u[j++]=T);return u},o.prototype.equals=function sn(d){return 0==this.compareTo(d)},o.prototype.min=function ln(d){return this.compareTo(d)<0?this:d},o.prototype.max=function pt(d){return this.compareTo(d)>0?this:d},o.prototype.and=function kt(d){var u=c();return this.bitwiseTo(d,Ne,u),u},o.prototype.or=function dn(d){var u=c();return this.bitwiseTo(d,ut,u),u},o.prototype.xor=function Et(d){var u=c();return this.bitwiseTo(d,nt,u),u},o.prototype.andNot=function Dt(d){var u=c();return this.bitwiseTo(d,Mt,u),u},o.prototype.not=function cn(){for(var d=c(),u=0;u<this.t;++u)d[u]=this.DM&~this[u];return d.t=this.t,d.s=~this.s,d},o.prototype.shiftLeft=function Le(d){var u=c();return d<0?this.rShiftTo(-d,u):this.lShiftTo(d,u),u},o.prototype.shiftRight=function mt(d){var u=c();return d<0?this.lShiftTo(-d,u):this.rShiftTo(d,u),u},o.prototype.getLowestSetBit=function pn(){for(var d=0;d<this.t;++d)if(0!=this[d])return d*this.DB+Bt(this[d]);return this.s<0?this.t*this.DB:-1},o.prototype.bitCount=function jt(){for(var d=0,u=this.s&this.DM,f=0;f<this.t;++f)d+=wt(this[f]^u);return d},o.prototype.testBit=function un(d){var u=Math.floor(d/this.DB);return u>=this.t?0!=this.s:!!(this[u]&1<<d%this.DB)},o.prototype.setBit=function Nt(d){return this.changeBit(d,ut)},o.prototype.clearBit=function mn(d){return this.changeBit(d,Mt)},o.prototype.flipBit=function fn(d){return this.changeBit(d,nt)},o.prototype.add=function bn(d){var u=c();return this.addTo(d,u),u},o.prototype.subtract=function re(d){var u=c();return this.subTo(d,u),u},o.prototype.multiply=function ht(d){var u=c();return this.multiplyTo(d,u),u},o.prototype.divide=function Be(d){var u=c();return this.divRemTo(d,u,null),u},o.prototype.remainder=function Se(d){var u=c();return this.divRemTo(d,null,u),u},o.prototype.divideAndRemainder=function he(d){var u=c(),f=c();return this.divRemTo(d,u,f),new Array(u,f)},o.prototype.modPow=function it(d,u){var T,H,f=d.bitLength(),j=K(1);if(f<=0)return j;T=f<18?1:f<48?3:f<144?4:f<768?5:6,H=f<8?new ve(u):u.isEven()?new Ve(u):new ke(u);var Q=new Array,U=3,ne=T-1,pe=(1<<T)-1;if(Q[1]=H.convert(this),T>1){var Pe=c();for(H.sqrTo(Q[1],Pe);U<=pe;)Q[U]=c(),H.mulTo(Pe,Q[U-2],Q[U]),U+=2}var Ee,Ie,Te=d.t-1,ot=!0,ge=c();for(f=w(d[Te])-1;Te>=0;){for(f>=ne?Ee=d[Te]>>f-ne&pe:(Ee=(d[Te]&(1<<f+1)-1)<<ne-f,Te>0&&(Ee|=d[Te-1]>>this.DB+f-ne)),U=T;!(1&Ee);)Ee>>=1,--U;if((f-=U)<0&&(f+=this.DB,--Te),ot)Q[Ee].copyTo(j),ot=!1;else{for(;U>1;)H.sqrTo(j,ge),H.sqrTo(ge,j),U-=2;U>0?H.sqrTo(j,ge):(Ie=j,j=ge,ge=Ie),H.mulTo(ge,Q[Ee],j)}for(;Te>=0&&!(d[Te]&1<<f);)H.sqrTo(j,ge),Ie=j,j=ge,ge=Ie,--f<0&&(f=this.DB-1,--Te)}return H.revert(j)},o.prototype.modInverse=function $n(d){var u=d.isEven();if(this.isEven()&&u||0==d.signum())return o.ZERO;for(var f=d.clone(),T=this.clone(),j=K(1),H=K(0),Q=K(0),U=K(1);0!=f.signum();){for(;f.isEven();)f.rShiftTo(1,f),u?((!j.isEven()||!H.isEven())&&(j.addTo(this,j),H.subTo(d,H)),j.rShiftTo(1,j)):H.isEven()||H.subTo(d,H),H.rShiftTo(1,H);for(;T.isEven();)T.rShiftTo(1,T),u?((!Q.isEven()||!U.isEven())&&(Q.addTo(this,Q),U.subTo(d,U)),Q.rShiftTo(1,Q)):U.isEven()||U.subTo(d,U),U.rShiftTo(1,U);f.compareTo(T)>=0?(f.subTo(T,f),u&&j.subTo(Q,j),H.subTo(U,H)):(T.subTo(f,T),u&&Q.subTo(j,Q),U.subTo(H,U))}return 0!=T.compareTo(o.ONE)?o.ZERO:U.compareTo(d)>=0?U.subtract(d):U.signum()<0?(U.addTo(d,U),U.signum()<0?U.add(d):U):U},o.prototype.pow=function Oe(d){return this.exp(d,new He)},o.prototype.gcd=function Vt(d){var u=this.s<0?this.negate():this.clone(),f=d.s<0?d.negate():d.clone();if(u.compareTo(f)<0){var T=u;u=f,f=T}var j=u.getLowestSetBit(),H=f.getLowestSetBit();if(H<0)return u;for(j<H&&(H=j),H>0&&(u.rShiftTo(H,u),f.rShiftTo(H,f));u.signum()>0;)(j=u.getLowestSetBit())>0&&u.rShiftTo(j,u),(j=f.getLowestSetBit())>0&&f.rShiftTo(j,f),u.compareTo(f)>=0?(u.subTo(f,u),u.rShiftTo(1,u)):(f.subTo(u,f),f.rShiftTo(1,f));return H>0&&f.lShiftTo(H,f),f},o.prototype.isProbablePrime=function Gt(d){var u,f=this.abs();if(1==f.t&&f[0]<=be[be.length-1]){for(u=0;u<be.length;++u)if(f[0]==be[u])return!0;return!1}if(f.isEven())return!1;for(u=1;u<be.length;){for(var T=be[u],j=u+1;j<be.length&&T<Pn;)T*=be[j++];for(T=f.modInt(T);u<j;)if(T%be[u++]==0)return!1}return f.millerRabin(d)},o.prototype.square=function Ht(){var d=c();return this.squareTo(d),d},o.prototype.Barrett=Ve,null==_e){var ye;if(_e=new Array,ce=0,typeof window<"u"&&window.crypto)if(window.crypto.getRandomValues){var vt=new Uint8Array(32);for(window.crypto.getRandomValues(vt),ye=0;ye<32;++ye)_e[ce++]=vt[ye]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var Lt=window.crypto.random(32);for(ye=0;ye<Lt.length;++ye)_e[ce++]=255&Lt.charCodeAt(ye)}for(;ce<Ue;)ye=Math.floor(65536*Math.random()),_e[ce++]=ye>>>8,_e[ce++]=255&ye;ce=0,gt()}function yt(){if(null==te){for(gt(),(te=function _t(){return new Xe}()).init(_e),ce=0;ce<_e.length;++ce)_e[ce]=0;ce=0}
1return te.next()}function Qe(){}function Xe(){this.i=0,this.j=0,this.S=new Array}Qe.prototype.nextBytes=function at(d){var u;for(u=0;u<d.length;++u)d[u]=yt()},Xe.prototype.init=function De(d){var u,f,T;for(u=0;u<256;++u)this.S[u]=u;for(f=0,u=0;u<256;++u)T=this.S[u],this.S[u]=this.S[f=f+this.S[u]+d[u%d.length]&255],this.S[f]=T;this.i=0,this.j=0},Xe.prototype.next=function Ct(){var d;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,d=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=d,this.S[d+this.S[this.i]&255]};var Ue=256;ee.exports={default:o,BigInteger:o,SecureRandom:Qe}}).call(this)}}]);

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.