Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
User : User ( 0)
PHP Version : 7.4.6
Disable Function : NONE
Directory :  C:/Program Files/Avast Software/Avast/gui_resources/default_av/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/Program Files/Avast Software/Avast/gui_resources/default_av/Shields.js
//{"name":"Shields","version":"1.2.379","created":"2021-03-10T09:13:03.790Z"}
import e from"./ractive.js";import{EventEmitter as t,eventer as n,serviceRequest as i,moduleManager as s,napiTracker as l,onlineChecker as a,windowApi as o}from"./napi.js";import{productModel as c,napiUtils as r,settingsService as d,ipmService as h,soundService as p}from"./napiExtensions.js";import{logger as u,stringUtils as b}from"./libs.js";import{nls as m,format as g}from"./i18n.js";import{modals as S}from"./ractiveComponents.js";import{objectFromEntriesPolyfill as f}from"./plugins.js";var v=".shl {\n  text-align: center;\n}\n.shl_block {\n  position: relative;\n  padding-top: 25vh;\n  text-align: center;\n}\n.shl_block__tooltip {\n  margin: 2rem -1.2rem 0 -1.3rem;\n}\n.shl_icon {\n  position: absolute;\n  font-size: 55px;\n  top: 14vh;\n  left: 0;\n  right: 0;\n  margin: auto;\n}\n.shl_icon.-secondary {\n  opacity: 0.3;\n}\n.shl_state {\n  height: 30px;\n  padding-top: 5px;\n}\n.shl_progress {\n  width: auto;\n  margin: 5px 20px;\n}\n";const _=u.createLogger("shields.serviceProxy"),y={file:{id:"FileSystemShield",component:"ais_shl_fil"},web:{id:"WebShield",component:"ais_shl_web"},email:{id:"EmailShield",component:"ais_shl_mai"},behavior:{id:"BehaviorShield",component:"ais_shl_bhv"},antiRootkit:{id:"AntiRootkit"},antiExploit:{id:"AntiExploit"}},I={starting:"start_waiting",active:"started",inactive:"inactive",paused:"paused"},k={installed:"installed",notInstalled:"notInstalled",installing:"installing"},C={shieldsChanged:"shieldsChanged",shieldChanged:{file:"fileShieldChanged",web:"webShieldChanged",email:"emailShieldChanged",behavior:"behaviorShieldChanged",antiRootkit:"antiRootkitShieldChanged",antiExploit:"antiExploitShieldChanged"}};const w=new class extends t{constructor(){_.debug("constructor"),super(),this.EVENTS=C,this.SHIELDS=y,this.SHIELD_LIST=Object.keys(y).map((e=>y[e])),this.SHIELD_STATUSES=I,this.SHIELD_INSTALL_STATUSES=k,this._shieldData=null,this._loadShieldsDataPromise=null,this._shieldInstallers={},this._listeners=[],this._userCount=0}init(){if(_.debug("init"),0===this._userCount){for(const e in y)(y[e].component||y[e].id)&&this._listeners.push(n.on(`product.change.feature.${y[e].component||y[e].id}`,this._shieldChangeHandler.bind(this,e)));this._loadShieldsData()}this._userCount++}destroy(){if(_.debug("destroy"),this._userCount=Math.max(this._userCount-1,0),0===this._userCount){this._listeners.forEach((e=>e())),this._listeners.length=0;for(const e in this._shieldInstallers)this._shieldInstallers[e].close();this.removeAllListeners(),this._shieldData=null,this._loadShieldsDataPromise=null}}isLicensedAndInstalled(e){return c.isLicensed(e)&&c.isInstalled(e)}installShield(e){return y[e].component?(this._shieldInstallers[e]||(this._shieldInstallers[e]=c.getInstaller(y[e].component)),this._shieldData[e].installStatus=k.installing,this._emitShieldEvent(e),this._shieldInstallers[e].install().catch((t=>{_.error("installing shield failed",e,t),this._shieldData[e].installStatus=k.notInstalled,this._emitShieldEvent(e)}))):Promise.reject("Shield "+y[e].id+" is not installable.")}startShield(e){return c.enableFeature(y[e].id).then((()=>this._loadShieldData(e,!0))).then((()=>{}))}startShields(e){const t=e.map((e=>y[e].id));return c.enableFeatures(t).then((()=>this._loadShieldsData()))}stopShield(e,t=-1){return c.disableFeature(y[e].id,t).then((()=>this._loadShieldData(e,!0))).then((()=>{}))}stopShields(e,t=-1){const n=e.map((e=>y[e].id));return c.disableFeatures(n,t).then((()=>this._loadShieldsData()))}getShieldData(e,t){return e?this._loadShieldData(e,t):this._loadShieldsData(t)}_loadShieldsData(e){if(this._loadShieldsDataPromise&&!e)return this._loadShieldsDataPromise;const t=Object.keys(y).map((t=>this._loadShieldData(t,e)));return this._loadShieldsDataPromise=Promise.all(t).then((()=>this._shieldData)).catch((e=>{this._loadShieldsDataPromise=null,_.error("loading shield data failed",e)})),this._loadShieldsDataPromise}_loadShieldData(e,t){if(this._loadShieldsDataPromise&&!t)return this._loadShieldsDataPromise.then((t=>t[e]));let n;return this._shieldData=this._shieldData||{},void 0===this._shieldData[e]&&(this._shieldData[e]={status:null,installStatus:null}),y[e].component?this._shieldData[e].installStatus=c.isInstalled(y[e].component)?k.installed:k.notInstalled:this._shieldData[e].installStatus=k.installed,this._shieldData[e].installStatus===k.installed?n=i("app.features.GetStatus",{featureId:y[e].id}).then((t=>{this._shieldData[e].status=t&&t.status})):(this._shieldInstallers[e]=c.getInstaller(y[e].component),n=this._shieldInstallers[e].getStatus().then((t=>{"running"===t.status&&(this._shieldData[e].installStatus=k.installing)}))),n.then((()=>this._shieldData[e]))}_shieldChangeHandler(e,t){this.getShieldData(e).then((()=>{this._shieldData[e].status=t.enabled?I.active:I.inactive,this._shieldData[e].installStatus=t.installed?k.installed:k.notInstalled,this._emitShieldEvent(e)}))}_emitShieldEvent(e){this.emit(C.shieldsChanged,this._shieldData),this.emit(C.shieldChanged[e],this._shieldData[e])}},A=u.createLogger("shields.shieldController"),T=e.extend({data:()=>({SHIELD_INSTALL_STATUSES:w.SHIELD_INSTALL_STATUSES,shieldKey:null,shield:{},isAfbManaged:c.isAfbManaged()}),oninit(){const e=this.get("shieldKey");A.debug("oninit",e),w.init(),w.on(w.EVENTS.shieldChanged[e],this.updateShield.bind(this)),w.getShieldData(e).then((e=>{this.updateShield(e)})).catch((t=>{A.error("loading shield failed",e,t)})),this.on("toggleShield",this.onToggleShield.bind(this)),this.on("installShield",this.onInstallShield.bind(this)),this.isSettings=window.location.hash.includes("#Settings/")},onteardown(){A.debug("onteardown",this.get("shieldKey"),this._torndown),this._torndown=!0,!this._torndown&&w.destroy()},updateShield(e){this.set("shield",{active:e.status===w.SHIELD_STATUSES.active,installStatus:e.installStatus,controllable:!this.get("isAfbManaged")&&e.installStatus===w.SHIELD_INSTALL_STATUSES.installed})},onToggleShield(){const e=this.get("shieldKey"),t=this.get("shield.active"),i=()=>{this.set("shield.controllable",!0)},s=()=>{this.set("shield.active",!t),i()},l=()=>{this.isSettings&&n.emit("Settings.gaTrack","Enable "+e+" shield","on"),w.startShield(e).then(s).catch(i)};this.set("shield.controllable",!1),t?this.selectStopOption().then((t=>{w.stopShield(e,t).then((()=>{this.isSettings&&n.emit("Settings.gaTrack","Enable "+e+" shield","off",t),s()})).catch(i)})).catch(i):c.isPassiveMode()?S.passiveMode().then(l).catch(i):l()},onInstallShield(){w.installShield(this.get("shieldKey"))},selectStopOption:()=>S.stopOptions({title:m("shields.turnOffShield"),desc:m("shields.turnOffShield.desc")}).then((e=>e.time))}),x=T.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"eightpack__2 shl_block"},f:[{t:7,e:"Icon",a:{name:["shield-type-",{t:2,r:"shieldKey"}],cssCls:["shl_icon ",{t:4,f:["-secondary"],n:50,x:{r:["shield.installStatus"],s:'_0==="notInstalled"'}}]}}," ",{t:7,e:"Icon",a:{name:"shield-type-shield",cssCls:["shl_icon ",{t:4,f:["-secondary"],n:50,x:{r:["shield.installStatus"],s:'_0==="notInstalled"||_0==="installing"'}},{t:4,n:51,f:[{t:4,n:50,x:{r:["shield.active"],s:"_0"},f:["color-ok -text"]},{t:4,n:50,x:{r:["shield.active"],s:"!(_0)"},f:["color-critical -text"]}],x:{r:["shield.installStatus"],s:'_0==="notInstalled"||_0==="installing"'}}]}}," ",{t:7,e:"Icon",a:{name:["shield-type-",{t:4,f:[{t:2,r:"shield.active"}],n:50,x:{r:["shield.installStatus"],s:'_0!=="notInstalled"'}},{t:4,n:51,f:["download"],x:{r:["shield.installStatus"],s:'_0!=="notInstalled"'}}],cssCls:"shl_icon"}}," ",{t:7,e:"div",a:{class:"shl_state"},f:[{t:4,f:[{t:7,e:"Switch",a:{preventToggle:"true",checked:[{t:2,r:"shield.active"}],disabled:[{t:2,x:{r:["shield.controllable"],s:"!_0"}}],title:[{t:3,x:{r:["nls","shieldKey"],s:'_0("shields."+_1)'}}]},v:{domClick:"toggleShield"}}],n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installed"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installing"],s:"_0===_1"},f:[{t:7,e:"Progress",a:{percentage:"unknown",cssCls:"-standalone shl_progress"}}," ",{t:7,e:"p",a:{class:"p -secondary -small"},f:[{t:3,x:{r:["nls"],s:'_0("shields.installingShield")'}}]}]},{t:4,n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installing","isAfbManaged"],s:"(!(_0===_1))&&(!_2)"},f:[" ",{t:7,e:"Button",v:{domClick:"installShield"},a:{cssCls:"-secondary -small"},f:[{t:3,x:{r:["nls"],s:'_0("shields.installShield")'}}]}]}],x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installed"],s:"_0===_1"}}]}," ",{t:7,e:"p",a:{class:"g-margin-top--30"},f:[{t:3,x:{r:["nls","shieldKey"],s:'_0("shields."+_1)'}}]}," ",{t:7,e:"p",a:{class:"g-margin-top--5 p -secondary -small"},f:[{t:3,x:{r:["nls","shieldKey"],s:'_0("shields."+_1+".desc")'}}]}," ",{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"tooltip -arrow-top shl_block__tooltip"},f:[{t:7,e:"div",a:{class:"tooltip__arrow"}}," ",{t:7,e:"p",a:{class:"p -secondary -small"},f:[{t:3,x:{r:["nls"],s:'_0("shields.disabledByAdmin")'}}]}]}],n:50,r:"isAfbManaged"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"tooltip -arrow-top shl_block__tooltip"},f:[{t:7,e:"div",a:{class:"tooltip__arrow"}}," ",{t:7,e:"p",a:{class:"p -secondary -small"},f:[{t:3,x:{r:["nls"],s:'_0("shields.notInstalledWarning")'}}]}]}],r:"isAfbManaged"}],n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.notInstalled"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installed","shield.active"],s:"_0===_1&&!_2"},f:[{t:4,f:[{t:7,e:"div",a:{class:"tooltip -arrow-top shl_block__tooltip"},f:[{t:7,e:"div",a:{class:"tooltip__arrow"}}," ",{t:7,e:"p",a:{class:"p -small"},f:[{t:3,x:{r:["nls"],s:'_0("shields.disabledByAdmin")'}}]}]}],n:50,r:"isAfbManaged"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"tooltip -critical -arrow-top shl_block__tooltip"},f:[{t:7,e:"div",a:{class:"tooltip__arrow"}}," ",{t:7,e:"p",a:{class:"p -small"},f:[{t:3,x:{r:["nls","shieldKey"],s:'_0("shields."+_1+".inactiveWarning")'}}]}]}],r:"isAfbManaged"}]}],x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.notInstalled"],s:"_0===_1"}}]}]},css:v}),P=e.extend({template:{v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["nls"],s:'_0("shields")'}}],cssCls:"shl",settingsUrl:"#Settings/Shields",backHash:"#security"},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:7,e:"Crumbs",a:{section:"security",moduleId:"shields"}}]}," ",{t:7,e:"div",a:{slot:"page-content"},f:[{t:7,e:"kin-view",f:[{t:7,e:"div",a:{slot:"description"},f:[{t:7,e:"p",a:{class:"kin_description__text"},f:[{t:3,x:{r:["nls"],s:'_0("shields.module.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"div",a:{class:"eightpack"},f:[{t:4,f:[{t:7,e:"Shield",a:{shieldKey:[{t:2,r:"."}]}}],r:"shieldKeys"}]}]}]}]}]}]},css:v,components:{Shield:x},data:()=>({shieldKeys:["file","behavior","web","email"]})}),E={v:3,t:[{t:7,e:"SettingsContainer",a:{noInstall:"true",noEnable:[{t:2,r:"shieldsSeparately"}],title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],componentService:[{t:2,r:"componentService"}]},f:[{t:7,e:"SettingsRange",a:{property:[{t:2,r:"properties.sensitivity"}]}}," ",{t:7,e:"p",a:{class:"p g-margin-top--15"},f:[{t:3,x:{r:["nls","STRINGS.whatToDoWith"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsTabs",a:{tabs:[{t:2,r:"whatToDoWithTabs"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.enableCyberCapture"}]},f:[{t:7,e:"div",a:{class:"settings__indent"},f:[{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"properties.enableCyberCaptureOptions"}]}}]}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.enableHardenedMode"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.enableRootkitDetection"}]},f:[{t:7,e:"div",a:{class:"settings__indent"},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.enableExploitDetection"}]}}]}]}," ",{t:4,f:[{t:7,e:"p",a:{class:"p g-margin-top--20",id:[{t:2,r:"properties.configureShields.id"}]},f:[{t:2,r:"properties.configureShields.label"}]}," ",{t:7,e:"SettingsTabs",a:{watchedTabsHeightContainer:".settings__section",tabs:[{t:2,r:"shieldTabs"}]}}],n:50,x:{r:["shieldsSeparately"],s:"!_0"}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.generateReportFile"}]}}]}]};const D=new class extends t{init(){w.init(),this.componentToggleRunning=!1,this.componentToggleTo=null,this.componentValue=null,this._listeners=[w.on(w.EVENTS.shieldsChanged,this._updateStatus.bind(this)),n.on("app.settings.onStatusChanged",this._updateStatus.bind(this))],this.MAIN_SHIELDS=Object.keys(w.SHIELDS),this.OTHER_SHIELDS=[],this.OTHER_SHIELD_PATHS={},this.SHIELDS=this.MAIN_SHIELDS.concat(this.OTHER_SHIELDS),this.shieldPromises={}}destroy(){this._listeners.forEach((e=>e())),this._listeners=[],this.shieldPromises={},this.loadStatusPromise=null,w.destroy()}loadStatus(e){return!e&&this.loadStatusPromise||(this.MAIN_SHIELDS.forEach((e=>{this.shieldPromises[e]=w.getShieldData(e).then((e=>({isChangePossible:e.installStatus===w.SHIELD_INSTALL_STATUSES.installed,enabled:e.status===w.SHIELD_STATUSES.active})))})),this.OTHER_SHIELDS.forEach((e=>{const t=this.OTHER_SHIELD_PATHS[e].map((e=>i("app.settings.Get",{name:e})));this.shieldPromises[e]=Promise.all(t).then((e=>({isChangePossible:e.every((e=>!e.locked)),enabled:e.every((e=>"1"==e.value))})))})),this.loadStatusPromise=Promise.all(this.SHIELDS.map((e=>this.shieldPromises[e]))).then((e=>{const t=e.some((e=>e.enabled));this.componentValue=t;let n=!0;return null!==this.componentToggleTo?this.componentToggleTo===t?(n=!0,this.componentToggleTo=null):n=!1:this.componentToggleRunning&&(n=!1),{installed:!0,controllable:n,enabled:t}}))),this.loadStatusPromise}toggleStart(){this.componentToggleRunning=!0,this.emit("controllable",!1)}toggleCancel(){this.componentToggleRunning=!1,this.emit("controllable",!0)}toggleFinish(){this.componentToggleRunning=!1,this.componentToggleTo===this.componentValue&&(this.componentToggleTo=null),null===this.componentToggleTo&&this.emit("controllable",!0)}toggleTo(e){this.componentToggleTo=e}hasToggleWithWaiting(){return!0}toggleEnabled(){return this.toggleStart(),this.loadStatus().then((e=>e.enabled?this._stopShields():!e.enabled&&c.isPassiveMode()?S.passiveMode().then(this._startShields.bind(this)):(n.emit("Settings.gaTrack","Shields ON/OFF","on"),this._startShields()))).then((()=>{i("app.settings.ApplySettings").then((()=>{this.toggleFinish()}))})).catch((()=>{this.toggleCancel()}))}_stopShields(){return this._areStopOptionsNeeded().then((e=>e?this._openStopOptions():void 0)).then((e=>(this.toggleTo(!1),n.emit("Settings.gaTrack","Shields ON/OFF","off",e),i("app.features.StopEach",{featureType:"CoreShieldFeature",time:e}))))}_startShields(){this.toggleTo(!0);const e=this.SHIELDS.map((e=>this._isChangePossible(e,!0).then((t=>t&&this._startShield(e)))));return Promise.all(e)}_isChangePossible(e,t){return this.shieldPromises[e].then((e=>e.isChangePossible&&e.enabled!==t))}_startShield(e){if(this.OTHER_SHIELDS.includes(e)){const t=this.OTHER_SHIELD_PATHS[e].map((e=>i("app.settings.Set",{name:e,value:"1"})));return Promise.all(t)}return w.startShield(e)}_stopShield(e,t){if(this.OTHER_SHIELDS.includes(e)){const t=this.OTHER_SHIELD_PATHS[e].map((e=>i("app.settings.Set",{name:e,value:"0"})));return Promise.all(t)}return w.stopShield(e,t)}_areStopOptionsNeeded(){const e=this.MAIN_SHIELDS.map((e=>this._isChangePossible(e,!1)));return Promise.all(e).then((e=>e.some((e=>e))))}_openStopOptions(){return S.stopOptions({title:m("shields.turnOffShield"),desc:m("shields.turnOffShield.desc")}).then((e=>e.time))}_updateStatus(){this.loadStatus(!0).then(this.emit.bind(this,"change"))}},N="shields.settings.selectActionVirus.auto",O="shields.settings.selectActionVirus.auto.desc",R="shields.settings.selectActionVirus.ask",W="shields.settings.selectActionVirus.ask.desc",L=[N,O,R,W],j=e.extend({template:"<SettingsRadio property={{property}} />",data(){return{property:{id:"settings_shields_whatToDoWith_viruses",path:[{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"FileSystemShield"},{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"EmailShield"},{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"WebShield"},{name:"avcfg://settings/IDP/DetectedAction"}],change:this.changeVirusAction.bind(this),options:[{label:m(N),desc:m(O),value:"fix",recommended:!0},{label:m(R),desc:m(W),value:"interactive"}],track:{subject:"Virus action"}}}},changeVirusAction(e){const t="fix"===e?"abort":e;return Promise.all([i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"FileSystemShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"EmailShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"WebShield",value:t}),i("app.settings.Set",{name:"avcfg://settings/IDP/DetectedAction",value:e})])}}),F=["settings.pup","settings.pup.desc","settings.pup.tools","settings.pup.tools.desc","settings.pup.action.fix","settings.pup.action.fix.desc","settings.pup.action.interactive","settings.pup.action.interactive.desc"],$=e.extend({template:{v:3,t:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"pupEnabled"}]},f:[{t:7,e:"div",a:{class:"settings__indent"},f:[{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"pupAction"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"toolEnabled"}]},f:[{t:7,e:"div",a:{class:"settings__indent"},f:[{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"toolAction"}]}}]}]}]}]}]},oninit(){this.observe("pupEnabled.value",(e=>{this.set("pupAction.disabled",!e),this.set("toolEnabled.disabled",!e)})),this.observe("toolEnabled.value",(e=>{this.set("toolAction.disabled",!e)}))},data(){return{pupEnabled:{id:"settings_shields_whatToDoWith_unwantedProgram_pupEnabled",label:m("settings.pup"),desc:m("settings.pup.desc"),load:this.loadPupEnabled.bind(this),change:this.changePupEnabled.bind(this),changeEvent:"pupEnabled",track:{subject:"PUP enabled"}},pupAction:{id:"settings_shields_whatToDoWith_unwantedProgram_pupAction",load:this.loadPupAction.bind(this),change:this.changePupAction.bind(this),options:[{label:m("settings.pup.action.fix"),desc:m("settings.pup.action.fix.desc"),value:"fix",recommended:!0},{label:m("settings.pup.action.interactive"),desc:m("settings.pup.action.interactive.desc"),value:"interactive"}],track:{subject:"PUP action"}},toolEnabled:{id:"settings_shields_whatToDoWith_unwantedProgram_toolsEnabled",label:m("settings.pup.tools"),desc:m("settings.pup.tools.desc"),load:this.loadToolEnabled.bind(this),change:this.changeToolEnabled.bind(this),updateOnEvent:"settings.change.pupEnabled",track:{subject:"Tools enabled"}},toolAction:{id:"settings_shields_whatToDoWith_unwantedProgram_toolAction",load:this.loadToolAction.bind(this),change:this.changeToolAction.bind(this),options:[{label:m("settings.pup.action.fix"),value:"fix"},{label:m("settings.pup.action.interactive"),value:"interactive"}],track:{subject:"Tools action"}}}},loadPupEnabled(){return this.loadScanPup().then((e=>({value:"1"==e.value||"2"==e.value,locked:e.locked})))},changePupEnabled(e){return this.changeScanPup(e?"1":"0")},loadPupAction:()=>i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"FileSystemShield"}),changePupAction(e){const t=this.getWebShieldAction(e);return Promise.all([i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"FileSystemShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"EmailShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"WebShield",value:t})])},loadToolEnabled(){return this.loadScanPup().then((e=>({value:"2"==e.value,locked:e.locked})))},changeToolEnabled(e){return this.changeScanPup(e?"2":"1")},loadToolAction:()=>i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/ToolAction",objectId:"FileSystemShield"}),changeToolAction(e){const t=this.getWebShieldAction(e);return Promise.all([i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ToolAction",objectId:"FileSystemShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ToolAction",objectId:"EmailShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ToolAction",objectId:"WebShield",value:t})])},loadScanPup(){return this.scanPupPromise||(this.scanPupPromise=i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"FileSystemShield"})),this.scanPupPromise},changeScanPup(e){this.scanPupPromise=null;const t=[i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"FileSystemShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"EmailShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"WebShield",value:e})];return Promise.all(t)},getWebShieldAction:e=>"fix"===e?"abort":e}),M="shields.settings.selectActionUnwantedProgram.auto",H="shields.settings.selectActionUnwantedProgram.auto.desc",U="shields.settings.selectActionUnwantedProgram.ask",B="shields.settings.selectActionUnwantedProgram.ask.desc",G="shields.settings.selectActionUnwantedProgram.nothing",V="shields.settings.selectActionUnwantedProgram.nothing.desc",K=[M,H,U,B,G,V],z=e.extend({template:"<SettingsRadio property={{property}} />",data(){return{property:{id:"settings_shields_whatToDoWith_unwantedProgram",load:this.loadScanPup.bind(this),change:this.changeScanPup.bind(this),options:[{label:m(M),desc:m(H),value:"fix",recommended:!0},{label:m(U),desc:m(B),value:"interactive"},{label:m(G),desc:m(V),value:"nothing"}],track:{subject:"PUP action"}}}},loadScanPup(){return Promise.all([i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"FileSystemShield"}),i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"EmailShield"}),i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"WebShield"})]).then((e=>{const t=e.some((e=>e.locked));return e.some((e=>0==e.value))?{locked:t,value:"nothing"}:this.loadPupAction()}))},changeScanPup(e){const t="nothing"===e?"0":"1",n=[i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"FileSystemShield",value:t}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"EmailShield",value:t}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/ScanPUP",objectId:"WebShield",value:t})];return"nothing"!==e&&n.push(this.changePupAction(e)),Promise.all(n)},loadPupAction:()=>Promise.all([i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"FileSystemShield"}),i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"EmailShield"}),i("app.settings.Get",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"WebShield"})]).then((e=>({locked:e.some((e=>e.locked)),value:e[0].value}))),changePupAction(e){const t="fix"===e?"abort":e;return Promise.all([i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"FileSystemShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"EmailShield",value:e}),i("app.settings.Set",{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"WebShield",value:t})])}}),X={v:3,t:[{t:7,e:"ShieldContainer",a:{shieldKey:"file",title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:2,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],enableShieldId:[{t:2,r:"properties.enableShield.id"}],enableShieldLabel:[{t:2,r:"properties.enableShield.label"}],standalone:[{t:2,r:"standalone"}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanAutorun"}]}}," ",{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"properties.fileTypes"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanOnExecute"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanOnOpen"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanOnWrite"}]}}]}]},q=T.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"SettingsContainer",a:{title:[{t:2,r:"title"}],component:[{t:2,r:"component"}],stopOptions:[{t:2,r:"stopOptions"}],noLicense:"true"},f:[{t:8,r:"container"}]}],n:50,r:"standalone"},{t:4,n:51,f:[{t:8,r:"container"}],r:"standalone"}],p:{container:[{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"checkbox__row settings__row",id:[{t:2,r:"enableShieldIdAttr"},"__container"]},f:[{t:7,e:"input",a:{type:"checkbox",checked:[{t:2,r:"shield.active"}],disabled:[{t:2,x:{r:["shield.controllable"],s:"!_0"}}],id:[{t:2,r:"enableShieldIdAttr"}],class:"checkbox"},v:{change:"toggleShield"}}," ",{t:7,e:"label",a:{class:"checkbox__label",for:[{t:2,r:"enableShieldIdAttr"}]},f:[{t:3,r:"enableShieldLabel"}]}," ",{t:7,e:"p",a:{class:"settings__indent checkbox__desc"},f:[{t:2,r:"desc"}]}]}],n:50,x:{r:["standalone"],s:"!_0"}},{t:4,n:51,f:[{t:7,e:"p",a:{class:"settings__desc"},f:[{t:2,r:"desc"}]}],x:{r:["standalone"],s:"!_0"}}," ",{t:16}],n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installed"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installing"],s:"_0===_1"},f:[{t:7,e:"Progress",a:{percentage:"unknown",cssCls:"-standalone shl_progress  g-margin-bottom--25 g-margin-top--20"}}," ",{t:7,e:"p",a:{class:"p -secondary -small"},f:[{t:3,x:{r:["nls"],s:'_0("shields.installingShield")'}}]}]},{t:4,n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installing","isAfbManaged"],s:"(!(_0===_1))&&(!_2)"},f:[" ",{t:7,e:"Button",v:{domClick:"installShield"},a:{cssCls:"-secondary -small g-margin-bottom--10"},f:[{t:2,x:{r:["nls"],s:'_0("shields.installShield")'}}]}]}],x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.installed"],s:"_0===_1"}}," ",{t:4,f:[{t:7,e:"p",a:{class:"p -secondary -small g-margin-top--10"},f:[{t:4,f:[{t:2,x:{r:["nls"],s:'_0("shields.disabledByAdmin")'}}],n:50,r:"isAfbManaged"},{t:4,n:51,f:[{t:2,x:{r:["nls"],s:'_0("shields.notInstalledWarning")'}}],r:"isAfbManaged"}]}],n:50,x:{r:["shield.installStatus","SHIELD_INSTALL_STATUSES.notInstalled"],s:"_0===_1"}}]}},data:()=>({shieldKey:null,enableShieldId:null,enableShieldLabel:null,standalone:!1,title:null,stopOptions:{title:m("shields.turnOffShield"),desc:m("shields.turnOffShield.desc")}}),computed:{enableShieldIdAttr:function(){return this.get("enableShieldId")||"stg-shield-"+this.get("shieldKey")+"-checkbox"},component:function(){return y[this.get("shieldKey")].component}},onToggleShield(){this.toggle("shield.active"),this._super()}}),J={title:"shields.file",desc:"shields.file.desc",enableFileShield:"shields.settings.enableFileShield",scanAutorun:"shields.settings.scanAutorun",scanAutorunDesc:"shields.settings.scanAutorun.desc",selectFileTypes:"shields.settings.selectFileTypes",selectFileTypesRecommended:"shields.settings.selectFileTypes.recommended",selectFileTypesAll:"shields.settings.selectFileTypes.all",scanOnExecute:"shields.settings.scanOnExecute",scanOnOpen:"shields.settings.scanOnOpen",scanOnWrite:"shields.settings.scanOnWrite"},Q={scanAutorun:{label:m(J.scanAutorun),desc:m(J.scanAutorunDesc),path:"avcfg://FileSystemShield/FileSystem/ScanAutorun",track:{subject:"Scan autorun"},search:J.scanAutorun},fileTypes:{label:m(J.selectFileTypes),path:["avcfg://FileSystemShield/FileSystem/ScanOnWriteAllFiles","avcfg://FileSystemShield/FileSystem/ScanOnOpenAllFiles"],options:[{label:m(J.selectFileTypesRecommended),value:"0"},{label:m(J.selectFileTypesAll),value:"1"}],track:{subject:"File types to scan",valueMap:{0:"Recommended",1:"All"}},search:{title:J.selectFileTypes,others:[J.selectFileTypesRecommended,J.selectFileTypesAll]}},scanOnExecute:{label:m(J.scanOnExecute),path:"avcfg://FileSystemShield/FileSystem/ScanOnExecute",track:{subject:"Scan on execute"},search:J.scanOnExecute},scanOnOpen:{label:m(J.scanOnOpen),path:"avcfg://FileSystemShield/FileSystem/ScanOnOpenDocuments",track:{subject:"Scan on open"},search:J.scanOnOpen},scanOnWrite:{label:m(J.scanOnWrite),path:"avcfg://FileSystemShield/FileSystem/ScanOnWriteDefault",track:{subject:"Scan on write"},search:J.scanOnWrite}},Y={enableShield:{id:"stg-shield-file-checkbox",label:m(J.enableFileShield),search:J.enableFileShield}};function Z(e){const t=Q;return e||(t.enableShield=Y.enableShield),t}const ee={v:3,t:[{t:7,e:"ShieldContainer",a:{shieldKey:"behavior",title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:2,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],enableShieldId:[{t:2,r:"properties.enableShield.id"}],enableShieldLabel:[{t:2,r:"properties.enableShield.label"}],standalone:[{t:2,r:"standalone"}]},f:[]}]},te={title:"shields.behavior",desc:"shields.behavior.desc",enableBehaviorShield:"shields.settings.enableBehaviorShield"};m(te.enableBehaviorShield),m(te.enableBehaviorShieldDesc);const ne={enableShield:{id:"stg-shield-behavior-checkbox",label:m(te.enableBehaviorShield),search:te.enableBehaviorShield}};function ie(e){return e?{}:{enableShield:ne.enableShield}}const se={v:3,t:[{t:7,e:"ShieldContainer",a:{shieldKey:"web",title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:2,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],enableShieldId:[{t:2,r:"properties.enableShield.id"}],enableShieldLabel:[{t:2,r:"properties.enableShield.label"}],standalone:[{t:2,r:"standalone"}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.httpsScanning"}]}}," ",{t:4,f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.quicScanning"}]}}],n:50,r:"properties.quicScanning"}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.botnetBlocker"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scriptScanning"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.siteBlocking"}]}}," ",{t:7,e:"div",a:{class:"settings__indent g-margin-bottom--15"},f:[{t:7,e:"button",a:{class:"btn -secondary",id:[{t:2,r:"properties.showBlockedWebsites.id"}]},v:{click:"openBlockedWebsites"},f:[{t:3,r:"properties.showBlockedWebsites.label"}]}]}]}," ",{t:4,f:[{t:7,e:"BlockedWebsites"}],n:50,r:"showBlockedWebsites"}]},le=u.createLogger("shields.settings.blockedWebsites"),ae={blockedWebsites:"shields.settings.blockedWebsites",blockedWebsitesDesc:"shields.settings.blockedWebsites.desc",addWebsite:"shields.settings.blockedWebsites.add",enterWebsite:"shields.settings.blockedWebsites.enter",noBlockedWebsites:"shields.settings.blockedWebsites.noWebsites",confirmRemove:"shields.settings.blockedWebsites.confirmRemove",cancelRemove:"shields.settings.blockedWebsites.cancelRemove"},oe="avcfg://WebShield/WebScanner/BlockedURLs",ce=e.extend({template:{v:3,t:[{t:7,e:"Modal",a:{scrollable:0,title:[{t:3,x:{r:["nls","STRINGS.blockedWebsites"],s:"_0(_1)"}}],subtitle:[{t:3,x:{r:["nls","STRINGS.blockedWebsitesDesc"],s:"_0(_1)"}}]},f:[" ",{t:7,e:"div",a:{class:"modal"},f:[{t:4,f:[{t:7,e:"table",a:{class:"table -small"},f:[{t:4,f:[{t:7,e:"tr",a:{class:["-hoverable ",{t:4,f:["-expanded -selected"],n:50,x:{r:["showRemoveConfirmationIndex","index"],s:"_0===_1"}}]},f:[{t:7,e:"td",f:[{t:7,e:"input",a:{type:"text",value:[{t:2,r:"."}],class:"input -blank -small -full",placeholder:[{t:2,x:{r:["nls","STRINGS.enterWebsite"],s:"_0(_1)"}}],autofocus:0}}]}," ",{t:7,e:"td",a:{class:"table__delete"},f:[{t:7,e:"button",a:{class:"a",title:[{t:3,x:{r:["nls"],s:'_0("global.remove")'}}]},v:{click:"remove"},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-bin",size:"16"}}]}]}]}," ",{t:4,f:[{t:7,e:"tr",f:[{t:7,e:"td",a:{colspan:"3",class:"table__last"},f:[{t:7,e:"button",a:{class:"btn -small -critical"},v:{click:"confirmRemove"},f:[{t:3,x:{r:["nls","STRINGS.confirmRemove"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -small -secondary"},v:{click:"cancelRemove"},f:[{t:3,x:{r:["nls","STRINGS.cancelRemove"],s:"_0(_1)"}}]}]}]}],n:50,x:{r:["showRemoveConfirmationIndex","index"],s:"_0===_1"}}],i:"index",r:"blockedWebsites"}]}],n:50,r:"blockedWebsites.length"},{t:4,n:51,f:[{t:7,e:"p",a:{class:"p -small -secondary"},f:[{t:3,x:{r:["nls","STRINGS.noBlockedWebsites"],s:"_0(_1)"}}]}],r:"blockedWebsites.length"}]}," ",{t:7,e:"div",a:{class:"modal__footer"},f:[{t:7,e:"button",a:{class:"btn -secondary"},v:{click:"close"},f:[{t:3,x:{r:["nls"],s:'_0("global.close")'}}]}]}],p:{modalHeaderContent:[{t:7,e:"button",a:{class:"btn -small -secondary g-margin-top--10","data-test":"addWebsite"},v:{click:"add"},f:["+ ",{t:3,x:{r:["nls","STRINGS.addWebsite"],s:"_0(_1)"}}]}]}}]},data:()=>({STRINGS:ae,blockedWebsites:[],showRemoveConfirmationIndex:null}),oninit(){this.on("Modal.modalClose",(()=>{this.fire("close")})),this.on("add",(()=>{this.get("blockedWebsites").every((e=>""!==e))&&this.get("blockedWebsites").unshift("")})),this.on("remove",(e=>{this.set("showRemoveConfirmationIndex",e.index.index)})),this.on("cancelRemove",(()=>{this.set("showRemoveConfirmationIndex",null)})),this.on("confirmRemove",(e=>{this.get("blockedWebsites").splice(e.index.index,1),this.set("showRemoveConfirmationIndex",null)})),this.loadBlockedWebsites()},onteardown(){this.updateBlockedWebsites()},loadBlockedWebsites(){i("app.settings.Get",{name:oe}).then((e=>{this.set("blockedWebsites",e.value.split(";").filter((e=>""!==e)))})).catch((e=>{le.error("loading the blocked websites failed",e)}))},updateBlockedWebsites(){i("app.settings.Set",{name:oe,value:this.get("blockedWebsites").filter((e=>""!==e)).join(";")})}}),re={title:"shields.web",desc:"shields.web.desc",enableWebShield:"shields.settings.enableWebShield",httpsScanning:"shields.settings.httpsScanning",httpsScanningDesc:"shields.settings.httpsScanning.desc",quicScanning:"shields.settings.quicScanning",scriptScanning:"shields.settings.scriptScanning",scriptScanningDesc:"shields.settings.scriptScanning.desc",botnetBlocker:"shields.settings.botnetBlocker",botnetBlockerDesc:"shields.settings.botnetBlocker.desc",siteBlocking:"shields.settings.siteBlocking",showBlockedWebsites:"shields.settings.showBlockedWebsites"},de={httpsScanning:{label:m(re.httpsScanning),desc:m(re.httpsScanningDesc),path:"avcfg://WebShield/WebScanner/HttpsScanning",track:{subject:"Enable HTTPS scanning"},search:re.httpsScanning},scriptScanning:{label:m(re.scriptScanning),desc:m(re.scriptScanningDesc),path:"avcfg://WebShield/WebScanner/ScriptScaning",track:{subject:"Enable script scanning"},search:re.scriptScanning},siteBlocking:{label:m(re.siteBlocking),path:"avcfg://WebShield/WebScanner/URLBlocking",track:{subject:"Enable site blocking"},search:re.siteBlocking},botnetBlocker:{label:m(re.botnetBlocker),desc:m(re.botnetBlockerDesc),path:"avcfg://WebShield/ConnectionBlocker/BotnetBlocker",track:{subject:"Block botnet attacks"},search:re.botnetBlocker},showBlockedWebsites:{id:"stg-shield-web-showBlockedWebsites",label:m(re.showBlockedWebsites),search:re.showBlockedWebsites},quicScanning:{label:m(re.quicScanning),path:"avcfg://WebShield/Quic/Enabled",track:{subject:"Enable QUIC/HTTP3 scanning"},search:re.quicScanning}},he={enableShield:{id:"stg-shield-web-checkbox",label:m(re.enableWebShield),search:re.enableWebShield}},pe=u.createLogger("shields.settings.webShield");function ue(e){const t=de;return e||(t.enableShield=he.enableShield),r.isVersionSupported("19.7")||delete t.quicScanning,t}const be={v:3,t:[{t:7,e:"ShieldContainer",a:{shieldKey:"email",title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:2,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],enableShieldId:[{t:2,r:"properties.enableShield.id"}],enableShieldLabel:[{t:2,r:"properties.enableShield.label"}],standalone:[{t:2,r:"standalone"}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanInbound"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanOutbound"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.insertNoteCleanMsgOut"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.markSubjectForVirusMsg"}]},f:[{t:7,e:"div",a:{class:"settings__indent"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.subjectForVirusMsg"}]}}]}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanAttachmentDuringAttaching"}]}}]}]},me={title:"shields.email",desc:"shields.email.desc",enableMailShield:"shields.settings.enableMailShield",scanInbound:"shields.settings.scanInbound",scanOutbound:"shields.settings.scanOutbound",insertNoteCleanMsgOut:"shields.settings.insertNoteCleanMsgOut",markSubjectForVirusMsg:"shields.settings.markSubjectForVirusMsg",scanAttachmentDuringAttaching:"shields.settings.scanAttachmentDuringAttaching"};function ge(e){const t={scanInbound:{label:m(me.scanInbound),path:"avcfg://EmailShield/EmailScanner/ScanInbound",track:{subject:"Scan inbound"},search:me.scanInbound},scanOutbound:{label:m(me.scanOutbound),path:"avcfg://EmailShield/EmailScanner/ScanOutbound",track:{subject:"Scan outbound"},search:me.scanOutbound},insertNoteCleanMsgOut:{label:m(me.insertNoteCleanMsgOut),path:"avcfg://EmailShield/EmailScanner/InsertNoteCleanMsgOut",track:{subject:"Insert note into clean message"},search:me.insertNoteCleanMsgOut},markSubjectForVirusMsg:{label:m(me.markSubjectForVirusMsg),path:"avcfg://EmailShield/EmailScanner/MarkSubjectForVirusMsg",track:{subject:"Mark subject of virus message"},search:me.markSubjectForVirusMsg},subjectForVirusMsg:{path:"avcfg://EmailShield/EmailScanner/SubjectForVirusMsg",track:{subject:"Virus message subject mark"}},scanAttachmentDuringAttaching:{label:m(me.scanAttachmentDuringAttaching),path:"avcfg://EmailShield/EmailScanner/ScanAttachmentDuringAttachingMSO",track:{subject:"Scan attachment"},search:me.scanAttachmentDuringAttaching}};return e||(t.enableShield={id:"stg-shield-mail-checkbox",label:m(me.enableMailShield),search:me.enableMailShield}),t}const Se=null==localStorage.newPup?r.isVersionSupported("21.1"):1==localStorage.newPup,fe=Se?$:z,ve=Se?F:K,_e=(ye=!1,e.extend({template:X,components:{ShieldContainer:q},data:()=>({STRINGS:J,standalone:ye,properties:Z(ye)})}));var ye;const Ie=function(t){return e.extend({template:ee,components:{ShieldContainer:q},data:()=>({STRINGS:te,standalone:t,properties:ie(t)})})}(!1),ke=function(t){return e.extend({template:se,components:{ShieldContainer:q,BlockedWebsites:ce},data:()=>({STRINGS:re,standalone:t,showBlockedWebsites:!1,properties:ue(t)}),oninit(){this.on("openBlockedWebsites",(()=>{n.emit("Settings.gaTrack","Open blocked websites"),pe.info("opening Web Shield blocked websites"),this.set("showBlockedWebsites",!0)})),this.on("BlockedWebsites.close",(()=>{n.emit("Settings.gaTrack","Close blocked websites"),this.set("showBlockedWebsites",!1)})),this.on("BlockedWebsites.add",(()=>{n.emit("Settings.gaTrack","Add blocked website")})),this.on("BlockedWebsites.confirmRemove",(()=>{n.emit("Settings.gaTrack","Remove blocked website")})),this.observe("webScanning.value",(e=>{this.set("httpsScanning.disabled",!e)}))}})}(!1),Ce=function(t){return e.extend({template:be,components:{ShieldContainer:q},data:()=>({STRINGS:me,standalone:t,properties:ge(t)}),oninit(){this.observe("markSubjectForVirusMsg.value",(e=>{this.set("subjectForVirusMsg.disabled",!e)}))}})}(!1),we=u.createLogger("shields.settings.core"),Ae={title:"shields",desc:"shields.settings.desc",whatToDoWith:"shields.settings.whatToDoWith",whatToDoWithViruses:Se?"shields.settings.whatToDoWith.malware":"shields.settings.whatToDoWith.viruses",whatToDoWithUnwantedProgram:Se?"shields.settings.whatToDoWith.pupAndTools":"shields.settings.whatToDoWith.unwantedProgram",shield:{file:"shields.file",behavior:"shields.behavior",web:"shields.web",mail:"shields.email"},shieldTypeSettings:"shields.settings.shieldTypeSettings",enableCyberCapture:"shields.settings.enableCyberCapture",enableCyberCaptureDesc:"shields.settings.enableCyberCapture.desc",cyberCaptureSendForAnalysisAuto:"shields.settings.cyberCapture.sendForAnalysis.auto",cyberCaptureSendForAnalysisAsk:"shields.settings.cyberCapture.sendForAnalysis.ask",enableCyberCaptureOld:"shields.settings.enableCyberCaptureOld",enableCyberCaptureOldDesc:"shields.settings.enableCyberCaptureOld.desc",enableCyberCaptureOldAlways:"shields.settings.enableCyberCaptureOld.always",enableCyberCaptureOldAsk:"shields.settings.enableCyberCaptureOld.ask",enableHardenedMode:"shields.settings.enableHardenedMode",enableHardenedModeDesc:"shields.settings.enableHardenedMode.desc",enableExploitDetection:"shields.settings.enableExploitDetection",enableRootkitDetection:"shields.settings.enableRootkitDetection",generateReportFile:"shields.settings.generateReportFile",generateReportFileDesc:"shields.settings.generateReportFile.desc"},Te=[{name:"avcfg://***ProviderINI***/Common/Report",objectId:"FileSystemShield"},{name:"avcfg://***ProviderINI***/Common/Report",objectId:"WebShield"},{name:"avcfg://***ProviderINI***/Common/Report",objectId:"EmailShield"}];let xe,Pe;r.isVersionSupported(20.8)?(xe={label:m(Ae.enableCyberCapture),desc:m(Ae.enableCyberCaptureDesc),path:"avcfg://avast5/Common/AutoSandboxEnabled",track:{subject:"Enable CyberCapture"},search:{title:Ae.enableCyberCapture,desc:Ae.enableCyberCaptureDesc,others:[Ae.cyberCaptureSendForAnalysisAuto,Ae.cyberCaptureSendForAnalysisAsk]}},Pe={path:"avcfg://avast5/Custody/AutomaticallySendForAnalysis",options:[{label:m(Ae.cyberCaptureSendForAnalysisAuto),value:"1"},{label:m(Ae.cyberCaptureSendForAnalysisAsk),value:"0"}],track:{subject:"Send files to Threat Labs",valueMap:{1:"Automatically",0:"Ask"}}}):(xe={label:m(Ae.enableCyberCaptureOld),desc:m(Ae.enableCyberCaptureOldDesc),path:"avcfg://avast5/Common/AutoSandboxEnabled",track:{subject:"Enable CyberCapture"},search:{title:Ae.enableCyberCaptureOld,desc:Ae.enableCyberCaptureOldDesc,others:[Ae.enableCyberCaptureOldAlways,Ae.enableCyberCaptureOldAsk]}},Pe={path:"avcfg://avast5/Custody/AllowUserRunSuspicious",options:[{label:m(Ae.enableCyberCaptureOldAlways),value:"0"},{label:m(Ae.enableCyberCaptureOldAsk),value:"1"}],track:{subject:"Allow user to run suspicious",valueMap:{0:"Always block",1:"Ask"}}});const Ee={sensitivity:{path:[{name:"avcfg://***ProviderINI***/Common/TaskSensitivity",objectId:"FileSystemShield"},{name:"avcfg://***ProviderINI***/Common/TaskSensitivity",objectId:"BehaviorShield"},{name:"avcfg://***ProviderINI***/Common/TaskSensitivity",objectId:"WebShield"},{name:"avcfg://***ProviderINI***/Common/TaskSensitivity",objectId:"EmailShield"}],options:[{value:"40",label:m("settings.sensitivity.low")},{value:"80",label:m("settings.sensitivity.medium")},{value:"100",label:m("settings.sensitivity.high")}],track:{subject:"Sensitivity",valueMap:{40:"Low",80:"Medium",100:"High"}}},whatToDoWithViruses:{id:"stg-shields-whatToDoWithViruses",type:"tab",title:m(Ae.whatToDoWithViruses),compo:j,testAttr:"viruses",search:{title:Ae.whatToDoWithViruses,others:L}},whatToDoWithUnwantedProgram:{id:"stg-shields-whatToDoWithUnwantedProgram",type:"tab",title:m(Ae.whatToDoWithUnwantedProgram),compo:fe,testAttr:"unwantedProgram",search:{title:Ae.whatToDoWithUnwantedProgram,others:ve}},enableCyberCapture:xe,enableCyberCaptureOptions:Pe,enableHardenedMode:{label:m(Ae.enableHardenedMode),desc:m(Ae.enableHardenedModeDesc),path:"avcfg://avast5/Common/HardenedMode",track:{subject:"Enable Hardened mode"},search:{title:Ae.enableHardenedMode,desc:Ae.enableHardenedModeDesc}},enableRootkitDetection:{id:"stg-shields-rootkitDetections",label:m(Ae.enableRootkitDetection),load:function(){return w.getShieldData("antiRootkit",!0).then((e=>({value:e.status===w.SHIELD_STATUSES.active,locked:!1})))},change:function(e){return e?w.startShield("antiRootkit"):w.stopShield("antiRootkit")},track:{subject:"Enable Rootkit detection"},search:Ae.enableRootkitDetection},enableExploitDetection:{id:"stg-shields-exploitDetection",label:m(Ae.enableExploitDetection),load:function(){return Promise.all([w.getShieldData("antiExploit",!0),w.getShieldData("antiRootkit",!0)]).then((([e,t])=>{const n=w.SHIELD_STATUSES.active;return{value:e.status===n&&t.status===n,locked:!1}}))},change:function(e){return e?w.startShield("antiExploit"):w.stopShield("antiExploit")},track:{subject:"Enable Exploit detection"},search:Ae.enableExploitDetection},generateReportFile:{id:"shields-settings-generateReportFile",label:m(Ae.generateReportFile),descAsPromise:function(){return s.importModule("Settings","common").then((e=>e.getReportDestination())).then((e=>m(Ae.generateReportFileDesc,e,"NAPI.request('app.utils.BrowseFolder', '"+e.replace(/\\/g,"\\\\")+"')")))},load:function(){return i("app.settings.GetValues",Te).then((e=>({locked:e.some((e=>e.locked)),value:e.every((e=>"None"!==e.value))}))).catch((e=>{we.error("loading report file failed",e)}))},change:function(e){const t=Te.map((t=>i("app.settings.Set",Object.assign({value:e?"TXT":"None"},t))));return Promise.all(t)},track:{subject:"Generate report file"},testAttr:JSON.stringify(Te),search:Ae.generateReportFile}},De={configureShields:{id:"stg-shields-configureShields",label:m(Ae.shieldTypeSettings),search:Ae.shieldTypeSettings},fileShield:{id:"stg-shields-fileShield",type:"tab",title:m(Ae.shield.file),compo:_e,testAttr:"fileShield",search:{title:Ae.shield.file,items:function(e){return{title:J.title,desc:J.desc,items:w.isLicensedAndInstalled(y.file.component)&&Z(e)}}(!1).items}},behaviorShield:{id:"stg-shields-behaviorShield",type:"tab",title:m(Ae.shield.behavior),compo:Ie,testAttr:"behaviorShield",search:{title:Ae.shield.behavior,items:function(e){return{title:te.title,desc:te.desc,items:w.isLicensedAndInstalled(y.behavior.component)&&ie(e)}}(!1).items}},webShield:{id:"stg-shields-webShield",type:"tab",title:m(Ae.shield.web),compo:ke,testAttr:"webShield",search:{title:Ae.shield.web,items:function(e){return{title:re.title,desc:re.desc,items:w.isLicensedAndInstalled(y.web.component)&&ue(e)}}(!1).items}},mailShield:{id:"stg-shields-mailShield",type:"tab",title:m(Ae.shield.mail),compo:Ce,testAttr:"mailShield",search:{title:Ae.shield.mail,items:function(e){return{title:me.title,desc:me.desc,items:w.isLicensedAndInstalled(y.email.component)&&ge(e)}}(!1).items}}};function Ne(e){const t=Ee;return e||(t.configureShields=De.configureShields,t.fileShield=De.fileShield,t.behaviorShield=De.behaviorShield,t.webShield=De.webShield,t.mailShield=De.mailShield),t}function Oe(){let e=[];return w.isLicensedAndInstalled(y.behavior.component)&&(e=[{label:"How to deal with suspicious program behavior",path:"avcfg://settings/IDP/DetectedAction",type:"select",options:[{label:"Always ask",value:"1"},{label:m("geek.behavShield.detected.label"),value:"2"},{label:m("geek.behavShield.known.label"),value:"3"}]}]),e}const Re={name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"FileSystemShield"},We={name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"FileSystemShield"},Le={name:"avcfg://***ProviderINI***/Common/SuspiciousAction",objectId:"FileSystemShield"},je=[{label:"Fix automatically",value:"fix"},{label:m("geek.move.to.chest"),value:"trezor"},{label:"Repair",value:"repair"},{label:"Abort connection",value:"abort"},{label:"Ask",value:"interactive"},{label:"Delete",value:"delete"},{label:"Nothing",value:""}];function Fe(e,t){return i("app.settings.Get",e).then((e=>{const n=e.value&&e.value.split(" iffailed ");return{value:n&&n[t]||"",locked:e.locked}}))}function $e(e,t,n){return i("app.settings.Get",e).then((e=>e.value&&e.value.split(" iffailed ")||[])).then((e=>(e[t]=n,e.filter((e=>e)).join(" iffailed ")))).then((t=>i("app.settings.Set",Object.assign({value:t},e))))}function Me(){let e=[];return w.isLicensedAndInstalled(y.file.component)&&(e=[{label:"Action to be performed when a virus is found",path:Re,load:Fe.bind(null,Re,0),change:$e.bind(null,Re,0),emitOnChange:"settings.change.fileShield.virusAction",updateOnEvent:"settings.change.fileShield.virusAction",type:"select",options:je},{label:"if the action above fails, then",path:Re,load:Fe.bind(null,Re,1),change:$e.bind(null,Re,1),emitOnChange:"settings.change.fileShield.virusAction",updateOnEvent:"settings.change.fileShield.virusAction",type:"select",options:je,unsearchable:!0},{label:"if the action above fails, then",path:Re,load:Fe.bind(null,Re,2),change:$e.bind(null,Re,2),emitOnChange:"settings.change.fileShield.virusAction",updateOnEvent:"settings.change.fileShield.virusAction",type:"select",options:je,unsearchable:!0},{label:"Action to be performed when a potentially unwanted program is found",path:We,load:Fe.bind(null,We,0),change:$e.bind(null,We,0),emitOnChange:"settings.change.fileShield.pupAction",updateOnEvent:"settings.change.fileShield.pupAction",type:"select",options:je},{label:"if the action above fails, then",path:We,load:Fe.bind(null,We,1),change:$e.bind(null,We,1),emitOnChange:"settings.change.fileShield.pupAction",updateOnEvent:"settings.change.fileShield.pupAction",type:"select",options:je,unsearchable:!0},{label:"if the action above fails, then",path:We,load:Fe.bind(null,We,2),change:$e.bind(null,We,2),emitOnChange:"settings.change.fileShield.pupAction",updateOnEvent:"settings.change.fileShield.pupAction",type:"select",options:je,unsearchable:!0},{label:"Action to be performed when a suspicious object is found",path:Le,load:Fe.bind(null,Le,0),change:$e.bind(null,Le,0),emitOnChange:"settings.change.fileShield.suspiciousAction",updateOnEvent:"settings.change.fileShield.suspiciousAction",type:"select",options:je},{label:"if the action above fails, then",path:Le,load:Fe.bind(null,Le,1),change:$e.bind(null,Le,1),emitOnChange:"settings.change.fileShield.suspiciousAction",updateOnEvent:"settings.change.fileShield.suspiciousAction",type:"select",options:je,unsearchable:!0},{label:"if the action above fails, then",path:Le,load:Fe.bind(null,Le,2),change:$e.bind(null,Le,2),emitOnChange:"settings.change.fileShield.suspiciousAction",updateOnEvent:"settings.change.fileShield.suspiciousAction",type:"select",options:je,unsearchable:!0},{label:"Show a notification window when action is taken",path:{name:"avcfg://***ProviderINI***/Common/ShowAppliedActionNotification",objectId:"FileSystemShield"},type:"checkbox"},{label:"Report file name",path:{name:"avcfg://***ProviderINI***/Common/ReportName",objectId:"FileSystemShield"},type:"text"},{label:"Report file type",path:{name:"avcfg://***ProviderINI***/Common/Report",objectId:"FileSystemShield"},type:"select",options:[{label:"Plain text (ANSI)",value:"TXT"},{label:"Plain text (Unicode)",value:"UTXT"},{label:"XML",value:"XML"}]},{label:"If report file exists",path:{name:"avcfg://***ProviderINI***/Common/OverwriteReport",objectId:"FileSystemShield"},type:"select",options:[{label:"Append",value:"0"},{label:"Overwrite",value:"1"}]},{label:"Reported items",desc:"Possible values: Infected, HardErrors, SoftErrors, OK, Skipped. Values are separated by semicolon (e.g. OK;Skipped). There may be also values Start and Stop but they have no effect.",path:{name:"avcfg://***ProviderINI***/Common/ReportRecords",objectId:"FileSystemShield"},type:"text"}]),e}function He(){let e=[];return w.isLicensedAndInstalled(y.email.component)&&(e=[{label:"Action to be performed when a virus is found",path:{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"EmailShield"},type:"select",options:[{label:"Auto",value:"fix"},{label:"Ask",value:"interactive"},{label:"Nothing",value:"nothing"},{label:m("geek.move.to.chest"),value:"trezor"},{label:"Repair",value:"repair"},{label:"Delete",value:"delete"}]},{label:"Action to be performed when a potentially unwanted program is found",path:{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"EmailShield"},type:"select",options:[{label:"Auto",value:"fix"},{label:"Ask",value:"interactive"},{label:"Nothing",value:"nothing"},{label:m("geek.move.to.chest"),value:"trezor"},{label:"Repair",value:"repair"},{label:"Delete",value:"delete"}]},{label:"Action to be performed when a suspicious object is found",path:{name:"avcfg://***ProviderINI***/Common/SuspiciousAction",objectId:"EmailShield"},type:"select",options:[{label:"Auto",value:"fix"},{label:"Ask",value:"interactive"},{label:"Nothing",value:"nothing"},{label:m("geek.move.to.chest"),value:"trezor"},{label:"Repair",value:"repair"},{label:"Delete",value:"delete"}]},{label:"Show a notification window when action is taken",path:{name:"avcfg://***ProviderINI***/Common/ShowAppliedActionNotification",objectId:"EmailShield"},type:"checkbox"},{label:"Scan archived messages when opening",path:"avcfg://EmailShield/EmailScanner/ScanArchivedMessagesMSO",type:"select",options:[{label:"No",value:"0"},{label:"All messages",value:"1"},{label:"Unread messages only",value:"2"}]},{label:"Scan SSL connections",path:"avcfg://EmailShield/EmailScanner/ScanSSL",type:"checkbox"},{id:"mailShield_exportCertificate",label:"Export certificate",type:"button",action:i.bind(null,"av.command","app:export_certificate")},{label:"Report file name",path:{name:"avcfg://***ProviderINI***/Common/ReportName",objectId:"EmailShield"},type:"text"},{label:"Report file type",path:{name:"avcfg://***ProviderINI***/Common/Report",objectId:"EmailShield"},type:"select",options:[{label:"Plain text (ANSI)",value:"TXT"},{label:"Plain text (Unicode)",value:"UTXT"},{label:"XML",value:"XML"}]},{label:"If report file exists",path:{name:"avcfg://***ProviderINI***/Common/OverwriteReport",objectId:"EmailShield"},type:"select",options:[{label:"Append",value:"0"},{label:"Overwrite",value:"1"}]},{label:"Reported items",desc:"Possible values: Infected, HardErrors, SoftErrors, OK, Skipped. Values are separated by semicolon (e.g. OK;Skipped). There may be also values Start and Stop but they have no effect.",path:{name:"avcfg://***ProviderINI***/Common/ReportRecords",objectId:"EmailShield"},type:"text"},{label:"SMTP port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/SmtpRedirectPort",type:"text"},{label:"SMTP secure port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/SmtpRedirectPortSSL",type:"text"},{label:"POP port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/PopRedirectPort",type:"text"},{label:"POP secure port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/PopRedirectPortSSL",type:"text"},{label:"IMAP port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/ImapRedirectPort",type:"text"},{label:"IMAP secure port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/ImapRedirectPortSSL",type:"text"},{label:"NNTP port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/NntpRedirectPort",type:"text"},{label:"NNTP secure port(s)",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/NntpRedirectPortSSL",type:"text"},{label:"Ignored addresses",desc:"Separate multiple values with a comma.",path:"avcfg://EmailShield/EmailScanner/IgnoreAddress",type:"text"},{label:"Ignore local communication",path:"avcfg://EmailShield/EmailScanner/IgnoreLocalhost",type:"checkbox"}]),e}function Ue(){let e=[];return w.isLicensedAndInstalled(y.web.component)&&(e=[{label:"Action to be performed when a virus is found",path:{name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"WebShield"},type:"select",options:[{label:"Abort connection",value:"abort"},{label:"Ask",value:"interactive"}]},{label:"Action to be performed when a potentially unwanted program is found",path:{name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"WebShield"},type:"select",options:[{label:"Abort connection",value:"abort"},{label:"Ask",value:"interactive"}]},{label:"Action to be performed when a suspicious object is found",path:{name:"avcfg://***ProviderINI***/Common/SuspiciousAction",objectId:"WebShield"},type:"select",options:[{label:"Abort connection",value:"abort"},{label:"Ask",value:"interactive"}]},{label:"Scan traffic from well-known browser process only",path:{name:"avcfg://WebShield/WebScanner/ScanOnlyBrowsers"},type:"checkbox"},{label:"Show a notification window when action is taken",path:{name:"avcfg://***ProviderINI***/Common/ShowAppliedActionNotification",objectId:"WebShield"},type:"checkbox"},{label:"Do not unpack archives with valid digital signatures",path:"avcfg://WebShield/WebScanner/DontUnpackSignedArchives",type:"checkbox"},{label:"Protect Internet Explorer with Script Shield",path:"avcfg://ScriptShield/Common/InternetExplorer",type:"checkbox"},{label:"Protect Mozilla Firefox with Script Shield",path:"avcfg://ScriptShield/Common/MozillaFirefox",type:"checkbox"},{label:"Protect Google Chrome with Script Shield",path:"avcfg://ScriptShield/Common/GoogleChrome",type:"checkbox"},{label:"Protect Adobe Acrobat Reader with Script Shield",path:"avcfg://ScriptShield/Common/AdobeAcrobatReader",type:"checkbox"},{label:"Protect other applications with Script Shield",path:"avcfg://ScriptShield/Common/OtherApplications",type:"checkbox"},{label:"Report file name",path:{name:"avcfg://***ProviderINI***/Common/ReportName",objectId:"WebShield"},type:"text"},{label:"Report file type",path:{name:"avcfg://***ProviderINI***/Common/Report",objectId:"WebShield"},type:"select",options:[{label:"Plain text (ANSI)",value:"TXT"},{label:"Plain text (Unicode)",value:"UTXT"},{label:"XML",value:"XML"}]},{label:"If report file exists",path:{name:"avcfg://***ProviderINI***/Common/OverwriteReport",objectId:"WebShield"},type:"select",options:[{label:"Append",value:"0"},{label:"Overwrite",value:"1"}]},{label:"Reported items",desc:"Possible values: Infected, HardErrors, SoftErrors, OK, Skipped. Values are separated by semicolon (e.g. OK;Skipped). There may be also values Start and Stop but they have no effect.",path:{name:"avcfg://***ProviderINI***/Common/ReportRecords",objectId:"WebShield"},type:"text"}]),e}function Be(){}function Ge(e){return e()}function Ve(){return Object.create(null)}function Ke(e){e.forEach(Ge)}function ze(e){return"function"==typeof e}function Xe(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function qe(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return Be;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function Je(e,t,n,i){if(e){const s=Qe(e,t,n,i);return e[0](s)}}function Qe(e,t,n,i){return e[1]&&i?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](i(t))):n.ctx}function Ye(e,t,n,i,s,l,a){const o=function(e,t,n,i){if(e[2]&&i){const s=e[2](i(n));if(void 0===t.dirty)return s;if("object"==typeof s){const e=[],n=Math.max(t.dirty.length,s.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|s[i];return e}return t.dirty|s}return t.dirty}(t,i,s,l);if(o){const s=Qe(t,n,i,a);e.p(s,o)}}function Ze(e){return e&&ze(e.destroy)?e.destroy:Be}function et(e,t){e.appendChild(t)}function tt(e,t,n){e.insertBefore(t,n||null)}function nt(e){e.parentNode.removeChild(e)}function it(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function st(e){return document.createElement(e)}function lt(e){return document.createTextNode(e)}function at(){return lt(" ")}function ot(){return lt("")}function ct(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function rt(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function dt(e,t,n){t in e?e[t]=n:rt(e,t,n)}function ht(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function pt(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function ut(e,t,n){e.classList[n?"add":"remove"](t)}let bt;function mt(e){bt=e}function gt(){if(!bt)throw new Error("Function called outside component initialization");return bt}function St(e){gt().$$.on_mount.push(e)}function ft(e){gt().$$.on_destroy.push(e)}function vt(){const e=gt();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const s=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);i.slice().forEach((t=>{t.call(e,s)}))}}}const _t=[],yt=[],It=[],kt=[],Ct=Promise.resolve();let wt=!1;function At(e){It.push(e)}let Tt=!1;const xt=new Set;function Pt(){if(!Tt){Tt=!0;do{for(let e=0;e<_t.length;e+=1){const t=_t[e];mt(t),Et(t.$$)}for(mt(null),_t.length=0;yt.length;)yt.pop()();for(let e=0;e<It.length;e+=1){const t=It[e];xt.has(t)||(xt.add(t),t())}It.length=0}while(_t.length);for(;kt.length;)kt.pop()();wt=!1,Tt=!1,xt.clear()}}function Et(e){if(null!==e.fragment){e.update(),Ke(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(At)}}const Dt=new Set;let Nt;function Ot(){Nt={r:0,c:[],p:Nt}}function Rt(){Nt.r||Ke(Nt.c),Nt=Nt.p}function Wt(e,t){e&&e.i&&(Dt.delete(e),e.i(t))}function Lt(e,t,n,i){if(e&&e.o){if(Dt.has(e))return;Dt.add(e),Nt.c.push((()=>{Dt.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}const jt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ft(e){e&&e.c()}function $t(e,t,n){const{fragment:i,on_mount:s,on_destroy:l,after_update:a}=e.$$;i&&i.m(t,n),At((()=>{const t=s.map(Ge).filter(ze);l?l.push(...t):Ke(t),e.$$.on_mount=[]})),a.forEach(At)}function Mt(e,t){const n=e.$$;null!==n.fragment&&(Ke(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ht(e,t){-1===e.$$.dirty[0]&&(_t.push(e),wt||(wt=!0,Ct.then(Pt)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ut(e,t,n,i,s,l,a=[-1]){const o=bt;mt(e);const c=t.props||{},r=e.$$={fragment:null,ctx:null,props:l,update:Be,not_equal:s,bound:Ve(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(o?o.$$.context:[]),callbacks:Ve(),dirty:a,skip_bound:!1};let d=!1;if(r.ctx=n?n(e,c,((t,n,...i)=>{const l=i.length?i[0]:n;return r.ctx&&s(r.ctx[t],r.ctx[t]=l)&&(!r.skip_bound&&r.bound[t]&&r.bound[t](l),d&&Ht(e,t)),n})):[],r.update(),d=!0,Ke(r.before_update),r.fragment=!!i&&i(r.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);r.fragment&&r.fragment.l(e),e.forEach(nt)}else r.fragment&&r.fragment.c();t.intro&&Wt(e.$$.fragment),$t(e,t.target,t.anchor),Pt()}mt(o)}class Bt{$destroy(){Mt(this,1),this.$destroy=Be}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Gt(e){let t,n,i,s,l,a,o,c;const r=e[15].default,d=Je(r,e,e[14],null);return{c(){t=st("div"),n=st("div"),i=st("iframe"),a=at(),o=st("div"),d&&d.c(),i.src!==(s=e[2])&&rt(i,"src",s),rt(i,"data-test",l="ipm-elm-"+e[0]),rt(i,"title",e[1]),rt(n,"class","sve_ipm"),pt(n,"display",e[4]?"block":"none"),rt(o,"data-slot",""),pt(o,"display",e[4]?"none":"block"),rt(t,"class","svelte wrap")},m(s,l){tt(s,t,l),et(t,n),et(n,i),e[16](i),et(t,a),et(t,o),d&&d.m(o,null),c=!0},p(e,t){(!c||4&t[0]&&i.src!==(s=e[2]))&&rt(i,"src",s),(!c||1&t[0]&&l!==(l="ipm-elm-"+e[0]))&&rt(i,"data-test",l),(!c||2&t[0])&&rt(i,"title",e[1]),(!c||16&t[0])&&pt(n,"display",e[4]?"block":"none"),d&&d.p&&16384&t[0]&&Ye(d,r,e,e[14],t,null,null),(!c||16&t[0])&&pt(o,"display",e[4]?"none":"block")},i(e){c||(Wt(d,e),c=!0)},o(e){Lt(d,e),c=!1},d(n){n&&nt(t),e[16](null),d&&d.d(n)}}}f();const Vt=7e3;function Kt(e,t){if(!e)return e;try{const n=new URL(e);return Object.entries(t).forEach((([e,t])=>n.searchParams.set(e,encodeURIComponent(t)))),n.href}catch(n){return console.log(n),e}}function zt(e,t,s){let o;qe(e,a,(e=>s(13,o=e)));let{$$slots:c={},$$scope:r}=t,{id:p}=t,{opmUrl:b}=t,{title:m}=t,{params:g={}}=t,{condition:S=!0}=t,{timeout:f=Vt}=t,{route:v}=t;const _=u.createLogger("component.ipm"),y=vt(),I="true"===localStorage.getItem("automationDisableIpm"),k=[];let C,w,A,T,x,P,E,D,N,O=null;function R(){!A&&O&&i("opm.message_shown",{message_id:O})}function W(e){_.debug({isIframe:C,ipmUrl:w,event:e,id:p,impId:e&&e.data?e.data.elmId:null}),C&&e&&e.data&&("windowLoaded"!==e.data.action||""===e.data.elmId||e.data.elmId!=p&&e.data.placement!=p||(_.info("ipm content loaded"),j(),L(Math.round((performance.now()-P)/1e3)),p==parseInt(p)&&i("app.ipm_tracking.track",{elem_id:parseInt(p),response_time:-1}),y("success",p)))}function L(e){d.getValueCached("avdef://config/GuiCache/TrackIpmLoadTime",!0).then((t=>{var n;t&&l.timing("IPM loading",!1===e?66666:e,p,!1===(n=e)?"timeout":n>=6e4?"> 60s":n>=3e4?"30-60 s":n>=15e3?"15-30 s":n>=1e4?"10-15 s":n>=5e3?"5-10 s":n>=4e3?"4-5 s":n>=3e3?"3-4 s":n>=2e3?"2-3 s":n>=1e3?"1-2 s":"0-1 s")}))}function j(){E&&clearTimeout(E)}function F(){const e=null!=p?T[p]:null;return e?Promise.resolve(e):b?Promise.resolve(b):!p&&0!==p||"object"==typeof p?Promise.resolve("about:blank"):"string"==typeof p?function(){if(Number.isInteger(parseInt(p)))return console.error("IPM Component tried to load OPM component with an integer in a string:",p),h.getUrl(parseInt(p),g);return i("av.opm.GetUrlForPlacement",{id:p}).then((e=>e?(O=e.msg_id||null,Kt(e.url||e,g)):(console.warn("OPM URL empty, for ID:",p),""))).catch((e=>(console.error("Ipm component, av.opm.GetUrlForPlacement failed:",e),M("opmCallFailed"),"")))}():Number.isInteger(p)?h.getUrl(parseInt(p),g):(console.error("IPM component could not recognize id:",p,"of type:",typeof p),M("wrongParam"),Promise.resolve(""))}function $(e=null){_.info("updateFrame",{isIframe:C,ipmUrl:w}),s(11,A=null),e&&e.url&&O!=e.msg_id&&(R(),O=e.msg_id),C&&(j(),(e&&e.url?Promise.resolve(e.url):F()).then((e=>{e=Kt(e,g),P=performance.now(),_.info("loading ipm url: "+e),w!==e&&(E=setTimeout((()=>{L(!1),M("timeout")}),f),s(2,w=e))})))}function M(e,t=0){s(11,A=e),console.warn("Ipm component error:",A,"for id:",p),y("error",{message:e,code:t,id:p})}return St((()=>{$()})),ft((()=>{j(),k.forEach((e=>e())),window.removeEventListener("message",W),window.removeEventListener("beforeunload",R)})),function(){let e;try{e=JSON.parse(localStorage.getItem("IPM_OVERRIDE")),T=e||{},e&&_.info("using override",e)}catch{_.error("Failed to parse localStorage.IPM_OVERRIDE"),T={}}}(),window.addEventListener("beforeunload",R,!1),window.addEventListener("message",W,!1),k.push(n.on("ASW_NOTIF_RELOAD_IPM",(()=>$())),n.on("ipm.reload."+p,(e=>$(e)))),e.$$set=e=>{"id"in e&&s(0,p=e.id),"opmUrl"in e&&s(5,b=e.opmUrl),"title"in e&&s(1,m=e.title),"params"in e&&s(6,g=e.params),"condition"in e&&s(7,S=e.condition),"timeout"in e&&s(8,f=e.timeout),"route"in e&&s(9,v=e.route),"$$scope"in e&&s(14,r=e.$$scope)},e.$$.update=()=>{12288&e.$$.dirty[0]&&null!=o&&(o?!1===D&&(_.debug("went online"),$()):(_.debug("went offline"),j(),M("offline")),s(12,D=o)),2176&e.$$.dirty[0]&&s(10,C=!A&&!I&&S),1544&e.$$.dirty[0]&&null!=v&&C&&(_.debug("change of route: "+v),x.contentWindow&&x.contentWindow.postMessage&&x.contentWindow.postMessage("route:"+v,"*")),1028&e.$$.dirty[0]&&s(4,N=C&&w)},[p,m,w,x,N,b,g,S,f,v,C,A,D,o,r,c,function(e){yt[e?"unshift":"push"]((()=>{x=e,s(3,x)}))}]}class Xt extends Bt{constructor(e){super(),Ut(this,e,zt,Gt,Xe,{id:0,opmUrl:5,title:1,params:6,condition:7,timeout:8,route:9},[-1,-1])}}const{window:qt}=jt;function Jt(e,t,n){const i=e.slice();return i[45]=t[n],i}function Qt(e,t,n){const i=e.slice();return i[48]=t[n],i[50]=n,i}function Yt(e){let t,n,i,s,l,a,o,c;return{c(){t=st("div"),n=st("kin-icon"),l=at(),a=st("kin-icon"),dt(n,"class",i="sve_toaster__icon -"+e[0].icon.cssCls),dt(n,"name",s=e[0].icon.name),dt(n,"size","40"),dt(a,"name",o=e[0].icon.bgName),dt(a,"size","80"),dt(a,"class",c="sve_toaster__icon__bg -"+e[0].icon.bgName+" "+(e[0].icon.color?"color-"+e[0].icon.color:"")+" -text"),rt(t,"class","sve_toaster__icon__container")},m(e,i){tt(e,t,i),et(t,n),et(t,l),et(t,a)},p(e,t){1&t[0]&&i!==(i="sve_toaster__icon -"+e[0].icon.cssCls)&&dt(n,"class",i),1&t[0]&&s!==(s=e[0].icon.name)&&dt(n,"name",s),1&t[0]&&o!==(o=e[0].icon.bgName)&&dt(a,"name",o),1&t[0]&&c!==(c="sve_toaster__icon__bg -"+e[0].icon.bgName+" "+(e[0].icon.color?"color-"+e[0].icon.color:"")+" -text")&&dt(a,"class",c)},d(e){e&&nt(t)}}}function Zt(e){let t,n=e[0].title+"";return{c(){t=st("h2"),rt(t,"class","sve_toaster__title h2")},m(e,i){tt(e,t,i),t.innerHTML=n},p(e,i){1&i[0]&&n!==(n=e[0].title+"")&&(t.innerHTML=n)},d(e){e&&nt(t)}}}function en(e){let t,n=e[0].text+"";return{c(){t=st("p"),rt(t,"class","sve_toaster__text p")},m(e,i){tt(e,t,i),t.innerHTML=n},p(e,i){1&i[0]&&n!==(n=e[0].text+"")&&(t.innerHTML=n)},d(e){e&&nt(t)}}}function tn(e){let t,n,i;return n=new Xt({props:{params:e[0].ipmParams,id:e[0].ipmAction}}),n.$on("error",e[31]),{c(){t=st("div"),Ft(n.$$.fragment),rt(t,"class","sve_toaster__ipmaction")},m(e,s){tt(e,t,s),$t(n,t,null),i=!0},p(e,t){const i={};1&t[0]&&(i.params=e[0].ipmParams),1&t[0]&&(i.id=e[0].ipmAction),n.$set(i)},i(e){i||(Wt(n.$$.fragment,e),i=!0)},o(e){Lt(n.$$.fragment,e),i=!1},d(e){e&&nt(t),Mt(n)}}}function nn(e){let t,n,i,s,l=e[0].actionText&&sn(e),a=!e[4]&&e[0].actions&&e[0].actions.length&&ln(e),o=e[4]&&pn(e),c=e[0].dontShowAgain&&bn(e);return{c(){l&&l.c(),t=at(),a&&a.c(),n=at(),o&&o.c(),i=at(),c&&c.c(),s=ot()},m(e,r){l&&l.m(e,r),tt(e,t,r),a&&a.m(e,r),tt(e,n,r),o&&o.m(e,r),tt(e,i,r),c&&c.m(e,r),tt(e,s,r)},p(e,r){e[0].actionText?l?l.p(e,r):(l=sn(e),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),!e[4]&&e[0].actions&&e[0].actions.length?a?a.p(e,r):(a=ln(e),a.c(),a.m(n.parentNode,n)):a&&(a.d(1),a=null),e[4]?o?o.p(e,r):(o=pn(e),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null),e[0].dontShowAgain?c?c.p(e,r):(c=bn(e),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i:Be,o:Be,d(e){l&&l.d(e),e&&nt(t),a&&a.d(e),e&&nt(n),o&&o.d(e),e&&nt(i),c&&c.d(e),e&&nt(s)}}}function sn(e){let t,n,i=e[0].actionText+"";return{c(){t=st("p"),n=lt(i),rt(t,"class","sve_toaster__text p -small -secondary")},m(e,i){tt(e,t,i),et(t,n)},p(e,t){1&t[0]&&i!==(i=e[0].actionText+"")&&ht(n,i)},d(e){e&&nt(t)}}}function ln(e){let t,n,i,s,l,a,o,c,r,d=e[0].actions[0].label+"",h=null!=e[8]&&an(e),p=1===e[0].actions.length&&e[12]>1&&e[13]&&on(e);function u(e,t){return 2!==e[0].actions.length||e[0].hideSecondAction?e[0].actions.length>2||e[0].hideSecondAction&&e[0].actions.length>1?cn:void 0:rn}let b=u(e),m=b&&b(e);return{c(){t=st("div"),n=st("kin-button"),i=lt(d),s=at(),h&&h.c(),a=at(),p&&p.c(),o=at(),m&&m.c(),dt(n,"processing",e[7]),dt(n,"data-test",l="dd_primary_"+e[0].actions[0].labelTest||"dd_primary_btn"),rt(t,"class","sve_toaster__btns")},m(l,d){tt(l,t,d),et(t,n),et(n,i),et(n,s),h&&h.m(n,null),et(t,a),p&&p.m(t,null),et(t,o),m&&m.m(t,null),c||(r=ct(n,"click",e[27]),c=!0)},p(e,s){1&s[0]&&d!==(d=e[0].actions[0].label+"")&&ht(i,d),null!=e[8]?h?h.p(e,s):(h=an(e),h.c(),h.m(n,null)):h&&(h.d(1),h=null),128&s[0]&&dt(n,"processing",e[7]),1&s[0]&&l!==(l="dd_primary_"+e[0].actions[0].labelTest||"dd_primary_btn")&&dt(n,"data-test",l),1===e[0].actions.length&&e[12]>1&&e[13]?p?p.p(e,s):(p=on(e),p.c(),p.m(t,o)):p&&(p.d(1),p=null),b===(b=u(e))&&m?m.p(e,s):(m&&m.d(1),m=b&&b(e),m&&(m.c(),m.m(t,null)))},d(e){e&&nt(t),h&&h.d(),p&&p.d(),m&&m.d(),c=!1,r()}}}function an(e){let t,n,i;return{c(){t=lt("("),n=lt(e[8]),i=lt(")")},m(e,s){tt(e,t,s),tt(e,n,s),tt(e,i,s)},p(e,t){256&t[0]&&ht(n,e[8])},d(e){e&&nt(t),e&&nt(n),e&&nt(i)}}}function on(e){let t,n,i,s,l,a,o,c,r=m("detection.action.closeAll")+"";return{c(){t=st("kin-button"),n=lt(r),i=lt("\n\t\t\t\t\t\t\t("),s=lt(e[12]),l=lt(")"),dt(t,"class","g-margin-left--10"),dt(t,"processing",e[7]),dt(t,"data-test",a="closeAll"),dt(t,"type","secondary")},m(a,r){tt(a,t,r),et(t,n),et(t,i),et(t,s),et(t,l),o||(c=ct(t,"click",e[17]),o=!0)},p(e,n){4096&n[0]&&ht(s,e[12]),128&n[0]&&dt(t,"processing",e[7])},d(e){e&&nt(t),o=!1,c()}}}function cn(e){let t,n,i,s,l,a,o,c,r,d=m("global.moreOptions")+"",h=e[0].actions,p=[];for(let u=0;u<h.length;u+=1)p[u]=dn(Qt(e,h,u));return{c(){t=st("kin-dropdown"),n=st("div"),i=st("kin-button"),s=lt(d),l=at(),a=st("kin-icon"),c=at(),r=st("div");for(let e=0;e<p.length;e+=1)p[e].c();dt(a,"name","icon-s-controls-arrow-down"),dt(a,"size","16"),dt(i,"type","secondary"),dt(i,"data-test",o="dd_dropdown_btn"),rt(n,"slot","dropdown-activator")},m(e,o){tt(e,t,o),et(t,n),et(n,i),et(i,s),et(i,l),et(i,a),et(t,c),et(t,r);for(let t=0;t<p.length;t+=1)p[t].m(r,null)},p(e,t){if(2097153&t[0]){let n;for(h=e[0].actions,n=0;n<h.length;n+=1){const i=Qt(e,h,n);p[n]?p[n].p(i,t):(p[n]=dn(i),p[n].c(),p[n].m(r,null))}for(;n<p.length;n+=1)p[n].d(1);p.length=h.length}},d(e){e&&nt(t),it(p,e)}}}function rn(e){let t,n,i,s,l,a,o=e[0].actions[1].label+"",c=null!=e[8]&&hn(e);return{c(){t=st("kin-button"),n=lt(o),i=at(),c&&c.c(),dt(t,"class","g-margin-left--10"),dt(t,"processing",e[7]),dt(t,"data-test",s="dd_secondary_"+e[0].actions[1].labelTest||"dd_secondary_btn"),dt(t,"type","secondary")},m(s,o){tt(s,t,o),et(t,n),et(t,i),c&&c.m(t,null),l||(a=ct(t,"click",e[28]),l=!0)},p(e,i){1&i[0]&&o!==(o=e[0].actions[1].label+"")&&ht(n,o),null!=e[8]?c?c.p(e,i):(c=hn(e),c.c(),c.m(t,null)):c&&(c.d(1),c=null),128&i[0]&&dt(t,"processing",e[7]),1&i[0]&&s!==(s="dd_secondary_"+e[0].actions[1].labelTest||"dd_secondary_btn")&&dt(t,"data-test",s)},d(e){e&&nt(t),c&&c.d(),l=!1,a()}}}function dn(e){let t,n=0!==e[50]&&function(e){let t,n,i,s,l,a,o=e[48].label+"";function c(){return e[29](e[50])}return{c(){t=st("kin-dropdown-item"),n=lt(o),i=at(),dt(t,"data-test",s="dd_dropdown_"+e[48].labelTest||"dd_dropdown_"+e[50])},m(e,s){tt(e,t,s),et(t,n),et(t,i),l||(a=ct(t,"click",c),l=!0)},p(i,l){e=i,1&l[0]&&o!==(o=e[48].label+"")&&ht(n,o),1&l[0]&&s!==(s="dd_dropdown_"+e[48].labelTest||"dd_dropdown_"+e[50])&&dt(t,"data-test",s)},d(e){e&&nt(t),l=!1,a()}}}(e);return{c(){n&&n.c(),t=ot()},m(e,i){n&&n.m(e,i),tt(e,t,i)},p(e,t){0!==e[50]&&n.p(e,t)},d(e){n&&n.d(e),e&&nt(t)}}}function hn(e){let t,n,i;return{c(){t=lt("("),n=lt(e[8]),i=lt(")")},m(e,s){tt(e,t,s),tt(e,n,s),tt(e,i,s)},p(e,t){256&t[0]&&ht(n,e[8])},d(e){e&&nt(t),e&&nt(n),e&&nt(i)}}}function pn(e){let t,n,i,s=e[5]&&e[5].text&&un(e);return{c(){t=st("div"),n=st("kin-progress"),i=at(),s&&s.c(),dt(n,"percentage","unknown"),rt(t,"class","sve_toaster__progress")},m(e,l){tt(e,t,l),et(t,n),et(t,i),s&&s.m(t,null)},p(e,n){e[5]&&e[5].text?s?s.p(e,n):(s=un(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(e){e&&nt(t),s&&s.d()}}}function un(e){let t,n,i=e[5].text+"";return{c(){t=st("p"),n=lt(i),rt(t,"class","g-margin-top--10 p -small -secondary")},m(e,i){tt(e,t,i),et(t,n)},p(e,t){32&t[0]&&i!==(i=e[5].text+"")&&ht(n,i)},d(e){e&&nt(t)}}}function bn(e){let t,n,i,s,l,a,o,c=e[0].dontShowAgain.label+"";return{c(){t=st("p"),n=st("input"),i=at(),s=st("label"),l=lt(c),rt(n,"type","checkbox"),rt(n,"id","detection_dontShowAgain"),rt(n,"class","checkbox"),rt(s,"for","detection_dontShowAgain"),rt(s,"class","g-margin-left--5"),rt(t,"class","sve_toaster__text p  g-margin-top--10")},m(c,r){tt(c,t,r),et(t,n),et(t,i),et(t,s),et(s,l),a||(o=ct(n,"click",e[30]),a=!0)},p(e,t){1&t[0]&&c!==(c=e[0].dontShowAgain.label+"")&&ht(l,c)},d(e){e&&nt(t),a=!1,o()}}}function mn(e){let t,n,i,s,l;function a(e,t){return e[2]?Sn:gn}let o=a(e),c=o(e),r=e[2]&&fn(e);return{c(){t=st("button"),c.c(),n=at(),r&&r.c(),i=ot(),rt(t,"class","span -small -secondary g-cursor--pointer"),rt(t,"data-test","btn_toggleDetails")},m(a,o){tt(a,t,o),c.m(t,null),tt(a,n,o),r&&r.m(a,o),tt(a,i,o),s||(l=ct(t,"click",e[18]),s=!0)},p(e,n){o===(o=a(e))&&c?c.p(e,n):(c.d(1),c=o(e),c&&(c.c(),c.m(t,null))),e[2]?r?r.p(e,n):(r=fn(e),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null)},d(e){e&&nt(t),c.d(),e&&nt(n),r&&r.d(e),e&&nt(i),s=!1,l()}}}function gn(e){let t,n,i,s=m("global.showDetails")+"";return{c(){t=lt(s),n=at(),i=st("kin-icon"),dt(i,"name","icon-s-controls-arrow-down"),dt(i,"size","16")},m(e,s){tt(e,t,s),tt(e,n,s),tt(e,i,s)},p:Be,d(e){e&&nt(t),e&&nt(n),e&&nt(i)}}}function Sn(e){let t,n,i,s=m("global.hideDetails")+"";return{c(){t=lt(s),n=at(),i=st("kin-icon"),dt(i,"name","icon-s-controls-arrow-up"),dt(i,"size","16")},m(e,s){tt(e,t,s),tt(e,n,s),tt(e,i,s)},p:Be,d(e){e&&nt(t),e&&nt(n),e&&nt(i)}}}function fn(e){let t,n,i,s,l=e[0].details,a=[];for(let r=0;r<l.length;r+=1)a[r]=In(Jt(e,l,r));let o=e[5]&&kn(e),c=e[6]&&wn(e);return{c(){t=st("div"),n=st("dl");for(let e=0;e<a.length;e+=1)a[e].c();i=ot(),o&&o.c(),s=ot(),c&&c.c(),rt(n,"class","desclist -short"),rt(t,"class","sve_toaster__details")},m(e,l){tt(e,t,l),et(t,n);for(let t=0;t<a.length;t+=1)a[t].m(n,null);et(n,i),o&&o.m(n,null),et(n,s),c&&c.m(n,null)},p(e,t){if(1&t[0]){let s;for(l=e[0].details,s=0;s<l.length;s+=1){const o=Jt(e,l,s);a[s]?a[s].p(o,t):(a[s]=In(o),a[s].c(),a[s].m(n,i))}for(;s<a.length;s+=1)a[s].d(1);a.length=l.length}e[5]?o?o.p(e,t):(o=kn(e),o.c(),o.m(n,s)):o&&(o.d(1),o=null),e[6]?c?c.p(e,t):(c=wn(e),c.c(),c.m(n,null)):c&&(c.d(1),c=null)},d(e){e&&nt(t),it(a,e),o&&o.d(),c&&c.d()}}}function vn(e){let t,n,i,s=e[45].title+"";function l(e,t){return"scoreMeter"===e[45].type&&4>e[45].value?yn:_n}let a=l(e),o=a(e);return{c(){t=st("dt"),n=lt(s),o.c(),i=ot()},m(e,s){tt(e,t,s),et(t,n),o.m(e,s),tt(e,i,s)},p(e,t){1&t[0]&&s!==(s=e[45].title+"")&&ht(n,s),a===(a=l(e))&&o?o.p(e,t):(o.d(1),o=a(e),o&&(o.c(),o.m(i.parentNode,i)))},d(e){e&&nt(t),o.d(e),e&&nt(i)}}}function _n(e){let t,n,i,s=e[45].value+"";return{c(){t=st("dd"),n=lt(s),rt(t,"data-test",i=e[45].testValue)},m(e,i){tt(e,t,i),et(t,n)},p(e,l){1&l[0]&&s!==(s=e[45].value+"")&&ht(n,s),1&l[0]&&i!==(i=e[45].testValue)&&rt(t,"data-test",i)},d(e){e&&nt(t)}}}function yn(e){let t,n,i,s,l,a,o,c,r;return{c(){t=st("dd"),n=st("div"),i=st("div"),s=at(),l=st("div"),a=at(),o=st("div"),r=at(),rt(n,"class",c="scoremeter -val-"+e[45].value)},m(e,c){tt(e,t,c),et(t,n),et(n,i),et(n,s),et(n,l),et(n,a),et(n,o),et(t,r)},p(e,t){1&t[0]&&c!==(c="scoremeter -val-"+e[45].value)&&rt(n,"class",c)},d(e){e&&nt(t)}}}function In(e){let t,n=e[45].value&&vn(e);return{c(){n&&n.c(),t=ot()},m(e,i){n&&n.m(e,i),tt(e,t,i)},p(e,i){e[45].value?n?n.p(e,i):(n=vn(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&nt(t)}}}function kn(e){let t,n,i,s,l,a=e[5].text+"",o=e[5].action&&Cn(e);return{c(){t=st("dt"),t.textContent=`${m("global.status")}`,n=st("dd"),i=lt(a),s=at(),o&&o.c(),l=at(),rt(n,"data-test","status")},m(e,a){tt(e,t,a),tt(e,n,a),et(n,i),et(n,s),o&&o.m(n,null),et(n,l)},p(e,t){32&t[0]&&a!==(a=e[5].text+"")&&ht(i,a),e[5].action?o?o.p(e,t):(o=Cn(e),o.c(),o.m(n,l)):o&&(o.d(1),o=null)},d(e){e&&nt(t),e&&nt(n),o&&o.d()}}}function Cn(e){let t,n,i,s,l,a,o=e[5].actionLabel+"";return{c(){t=lt("| "),n=st("button"),i=lt(o),rt(n,"class","a"),rt(n,"data-test",s="scn_"+e[5].actionLabelGa)},m(s,o){tt(s,t,o),tt(s,n,o),et(n,i),l||(a=ct(n,"click",e[19]),l=!0)},p(e,t){32&t[0]&&o!==(o=e[5].actionLabel+"")&&ht(i,o),32&t[0]&&s!==(s="scn_"+e[5].actionLabelGa)&&rt(n,"data-test",s)},d(e){e&&nt(t),e&&nt(n),l=!1,a()}}}function wn(e){let t,n,i,s,l,a,o,c=e[6].text+"";return{c(){t=st("dt"),t.textContent=`${m("global.option")}`,n=st("dd"),i=st("button"),s=lt(c),rt(i,"class","a"),rt(i,"data-test",l="scn_"+e[6].actionLabelGa),rt(n,"data-test","option")},m(l,c){tt(l,t,c),tt(l,n,c),et(n,i),et(i,s),a||(o=ct(i,"click",e[20]),a=!0)},p(e,t){64&t[0]&&c!==(c=e[6].text+"")&&ht(s,c),64&t[0]&&l!==(l="scn_"+e[6].actionLabelGa)&&rt(i,"data-test",l)},d(e){e&&nt(t),e&&nt(n),a=!1,o()}}}function An(e){let t,n,i,s,l=e[10]&&Tn(e),a=e[12]>1&&xn(e);return{c(){t=st("div"),n=st("div"),l&&l.c(),i=at(),s=st("div"),a&&a.c(),rt(t,"class","sve_toaster__footer")},m(e,o){tt(e,t,o),et(t,n),l&&l.m(n,null),et(t,i),et(t,s),a&&a.m(s,null)},p(e,t){e[10]?l?l.p(e,t):(l=Tn(e),l.c(),l.m(n,null)):l&&(l.d(1),l=null),e[12]>1?a?a.p(e,t):(a=xn(e),a.c(),a.m(s,null)):a&&(a.d(1),a=null)},d(e){e&&nt(t),l&&l.d(),a&&a.d()}}}function Tn(e){let t,n,i,s,l,a,o,c,r,d,h;return{c(){t=st("span"),n=lt(e[10]),i=at(),s=st("kin-tooltip"),l=st("span"),l.innerHTML='<kin-icon name="icon-m-action-info" size="20"></kin-icon>',a=at(),o=st("div"),c=st("p"),c.textContent=`${m("detection.alertid.title")}`,r=at(),d=st("p"),d.textContent=`${m("detection.alertid.desc")}`,h=st("p"),rt(t,"class","span -small -secondary"),rt(l,"slot","tooltip-activator"),rt(c,"class","p strong"),rt(d,"class","p -secondary -small"),rt(o,"slot","tooltip")},m(e,p){tt(e,t,p),et(t,n),tt(e,i,p),tt(e,s,p),et(s,l),et(s,a),et(s,o),et(o,c),et(o,r),et(o,d),et(o,h)},p(e,t){1024&t[0]&&ht(n,e[10])},d(e){e&&nt(t),e&&nt(i),e&&nt(s)}}}function xn(e){let t,n,i,s,l,a,o,c,r,d,h,p,u,b=e[11]+1+"";return{c(){t=st("span"),t.textContent=`${m("detection.more.detections")}`,n=at(),i=st("kin-button"),s=st("kin-icon"),l=at(),a=lt(b),o=lt("\n\t\t\t\t\t/\n\t\t\t\t\t"),c=st("kin-button"),r=lt(e[12]),d=at(),h=st("kin-icon"),rt(t,"class","span -small -secondary"),dt(s,"name","icon-s-controls-arrow-left"),dt(s,"size","16"),dt(s,"rtlflip","true"),dt(i,"type","blank"),dt(i,"size","small"),dt(i,"class","sve_toaster__paginator g-margin-left--5"),dt(h,"name","icon-s-controls-arrow-right"),dt(h,"size","16"),dt(h,"rtlflip","true"),dt(c,"type","blank"),dt(c,"size","small"),dt(c,"class","sve_toaster__paginator")},m(b,m){tt(b,t,m),tt(b,n,m),tt(b,i,m),et(i,s),et(i,l),et(i,a),tt(b,o,m),tt(b,c,m),et(c,r),et(c,d),et(c,h),p||(u=[ct(i,"click",e[15]),ct(c,"click",e[16])],p=!0)},p(e,t){2048&t[0]&&b!==(b=e[11]+1+"")&&ht(a,b),4096&t[0]&&ht(r,e[12])},d(e){e&&nt(t),e&&nt(n),e&&nt(i),e&&nt(o),e&&nt(c),p=!1,Ke(u)}}}function Pn(e){let t,n,i,s,l,a,o,c,r,d,h,p,u,b,g,S,f,v,_,y,I,k,C=e[0].icon&&Yt(e),w=e[0].title&&Zt(e);const A=e[26].default,T=Je(A,e,e[25],null);let x=e[0].text&&en(e);const P=[nn,tn],E=[];function D(e,t){return null==e[0].ipmAction||e[3]?0:1}b=D(e),g=E[b]=P[b](e);let N=e[0].details&&e[0].details.length&&mn(e),O=(e[10]||e[12]>1)&&An(e);return{c(){t=st("div"),n=st("div"),i=st("h1"),i.innerHTML='<span class="logo -white -width-70"></span>',s=at(),l=st("div"),a=st("button"),c=at(),r=st("div"),C&&C.c(),d=at(),w&&w.c(),h=at(),T&&T.c(),p=at(),x&&x.c(),u=at(),g.c(),S=at(),N&&N.c(),v=at(),O&&O.c(),rt(i,"class","nui_logo"),rt(a,"class","nui_controls__item -close nui_caption_client g-cursor--pointer"),rt(a,"title",o=m("global.closeModalWindow")),rt(l,"class","nui_controls"),rt(n,"class","nui_titlebar -toaster nui_caption"),rt(r,"class",f="sve_toaster__main "+(e[0].color?"-"+e[0].color:"")),ut(r,"-auto-v-scroll",e[9]),rt(t,"class","sve_toaster -detection"),pt(t,"width",e[1]+"px")},m(o,m){tt(o,t,m),et(t,n),et(n,i),et(n,s),et(n,l),et(l,a),et(t,c),et(t,r),C&&C.m(r,null),et(r,d),w&&w.m(r,null),et(r,h),T&&T.m(r,null),et(r,p),x&&x.m(r,null),et(r,u),E[b].m(r,null),et(r,S),N&&N.m(r,null),et(t,v),O&&O.m(t,null),y=!0,I||(k=[ct(qt,"keydown",e[14]),ct(a,"click",e[17]),Ze(_=e[22].call(null,t))],I=!0)},p(e,n){e[0].icon?C?C.p(e,n):(C=Yt(e),C.c(),C.m(r,d)):C&&(C.d(1),C=null),e[0].title?w?w.p(e,n):(w=Zt(e),w.c(),w.m(r,h)):w&&(w.d(1),w=null),T&&T.p&&33554432&n[0]&&Ye(T,A,e,e[25],n,null,null),e[0].text?x?x.p(e,n):(x=en(e),x.c(),x.m(r,u)):x&&(x.d(1),x=null);let i=b;b=D(e),b===i?E[b].p(e,n):(Ot(),Lt(E[i],1,1,(()=>{E[i]=null})),Rt(),g=E[b],g?g.p(e,n):(g=E[b]=P[b](e),g.c()),Wt(g,1),g.m(r,S)),e[0].details&&e[0].details.length?N?N.p(e,n):(N=mn(e),N.c(),N.m(r,null)):N&&(N.d(1),N=null),(!y||1&n[0]&&f!==(f="sve_toaster__main "+(e[0].color?"-"+e[0].color:"")))&&rt(r,"class",f),513&n[0]&&ut(r,"-auto-v-scroll",e[9]),e[10]||e[12]>1?O?O.p(e,n):(O=An(e),O.c(),O.m(t,null)):O&&(O.d(1),O=null),(!y||2&n[0])&&pt(t,"width",e[1]+"px")},i(e){y||(Wt(T,e),Wt(g),y=!0)},o(e){Lt(T,e),Lt(g),y=!1},d(e){e&&nt(t),C&&C.d(),w&&w.d(),T&&T.d(e),x&&x.d(),E[b].d(),N&&N.d(),O&&O.d(),I=!1,Ke(k)}}}function En(e,t,n){let{$$slots:i={},$$scope:s}=t;const a=vt();let c,r,d,h,{windowWidth:u=600}=t,{config:b=null}=t,{windowClose:m=null}=t,g=!1,S=null,f=null,v=!1,_=!1,y=!1,I=!1,k=!1;function C(e=!1){const t=b&&b.closeResponse;m?m(t):(a("close",t),(e||O<=1)&&o.close())}function w(e){A(b.actions[e],e)}function A(e,t){const i=e.action&&e.action(),s=Date.now();if(f&&f(),null==i)T(e.nextConfig,s,e.minDuration);else{const l=1===t&&2===b.actions.length&&!b.hideSecondAction;e.status||0!==t&&!l?(n(5,r=e.status),n(6,d=e.option),n(4,_=!0)):n(7,y=!0),i.then((t=>{T(t,s,e.minDuration)})).catch((t=>{T(t,s,e.minDuration)}))}e.labelGa&&l.event("DetectionDialog","Click",e.labelGa)}function T(e,t,i){const s=Math.max(i-(Date.now()-t),0);if(S&&S(),s>0){const t=window.setTimeout((()=>{!e&&O>0?C():n(0,b=e),S&&S()}),s);S=()=>{window.clearTimeout(t),S=null}}else!e&&O>0?C():n(0,b=e)}function x(e){e?(n(4,_=b.progress),n(5,r=b.status),n(6,d=b.option),n(7,y=!1),function(){if(f&&f(),b.actions&&b.actions.length&&b.actions[0].countdown){n(8,h=b.actions[0].countdown);const e=window.setInterval((function(){h?n(8,h--,h):A(b.actions[0],0)}),1e3);f=function(){window.clearInterval(e),n(8,h=null),f=null}}}(),b.icon?(c="object"!=typeof b.icon?{name:b.icon}:Object.assign({},b.icon),c.name||(c.name="red"===b.color?"icon-s-controls-close":"icon-s-status-check"),c.bgName=c.bgName||"circle",!c.color&&b.color&&(c.color="red"===b.color?"critical":"ok")):c=null):C()}function P(e){k&&(k=!1,n(9,I=e.scrollHeight>window.screen.availHeight)),o.resize(u,Math.min(e.scrollHeight,window.screen.availHeight))}St((()=>{p.play("threat")})),ft((()=>{S&&S(),f&&f()}));let E,D,N,O,R;return e.$$set=e=>{"windowWidth"in e&&n(1,u=e.windowWidth),"config"in e&&n(0,b=e.config),"windowClose"in e&&n(23,m=e.windowClose),"$$scope"in e&&n(25,s=e.$$scope)},e.$$.update=()=>{1&e.$$.dirty[0]&&x(b),1&e.$$.dirty[0]&&function(e){const t=o.getUrlParams();null!=e&&l.view(t.module+"_"+t.view+(e?"_"+e:""))}(b&&b.trackerTitle),1&e.$$.dirty[0]&&n(24,E=b&&b.detectionInfo||{}),16777216&e.$$.dirty[0]&&n(10,D=E.id||""),16777216&e.$$.dirty[0]&&n(11,N=E.index||0),16777216&e.$$.dirty[0]&&n(12,O=E.total||0),16777216&e.$$.dirty[0]&&n(13,R=E.showCloseAllBtn||!1)},[b,u,g,v,_,r,d,y,h,I,D,N,O,R,function(e){const t=b.actions;t&&t.length&&t.some(((t,n)=>{if(t.shortcut&&t.shortcut.code===e.code&&!!t.shortcut.ctrlKey===e.ctrlKey&&!!t.shortcut.shiftKey===e.shiftKey&&!!t.shortcut.altKey===e.altKey&&!!t.shortcut.metaKey===e.metaKey)return A(t,n),!0}))},function(){a("prev")},function(){a("next")},function(){!function(e=!1){l.event("DetectionDialog","Close"),a("ignore"),C(e)}(!0)},function(){n(2,g=!g),k=!0},function(){const e=r.actionLabelGa,t=r.action;e&&l.event("DetectionDialog","Click",e),"function"==typeof t?t():console.error("[SvelteComponents] {DetectionDialog} StatusAction is not function")},function(){const e=d.actionLabelGa,t=d.action;e&&l.event("DetectionDialog","Click",e),"function"==typeof t?t():console.error("[SvelteComponents] {DetectionDialog} OptionAction is not function")},w,function(e){P(e);const t=new MutationObserver(P.bind(this,e));return t.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),{destroy:t.disconnect.bind(t)}},m,E,s,i,()=>w(0),()=>w(1),e=>w(e),e=>b.dontShowAgain.action(e.target.checked),()=>n(3,v=!0)]}class Dn extends Bt{constructor(e){super(),Ut(this,e,En,Pn,Xe,{windowWidth:1,config:0,windowClose:23},[-1,-1])}}var Nn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},On="object"==typeof Nn&&Nn&&Nn.Object===Object&&Nn,Rn="object"==typeof self&&self&&self.Object===Object&&self;On||Rn||Function("return this")();function Wn(e){let t,n;return t=new Dn({props:{config:e[2],windowClose:e[0].close.action,$$slots:{default:[jn]},$$scope:{ctx:e}}}),{c(){Ft(t.$$.fragment)},m(e,i){$t(t,e,i),n=!0},p(e,n){const i={};4&n&&(i.config=e[2]),1&n&&(i.windowClose=e[0].close.action),2097162&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Wt(t.$$.fragment,e),n=!0)},o(e){Lt(t.$$.fragment,e),n=!1},d(e){Mt(t,e)}}}function Ln(e){let t,n,i,s,l,a,o,c,r,d;return{c(){t=st("kin-input"),l=at(),a=st("kin-input"),dt(t,"size","large"),dt(t,"formrow",""),dt(t,"label",n=m("detection.cyberCapture.addDetails.url.title")+" ("+m("global.optional")+")"),dt(t,"placeholder",i=m("detection.cyberCapture.addDetails.url.placeholder")),dt(a,"type","textarea"),dt(a,"formrow",""),dt(a,"size","large"),dt(a,"label",o=m("detection.cyberCapture.addDetails.info.title")+" ("+m("global.optional")+")"),dt(a,"placeholder",c=m("detection.cyberCapture.addDetails.info.placeholder"))},m(n,i){tt(n,t,i),tt(n,l,i),tt(n,a,i),r||(d=[ct(t,"input",e[5]),Ze(s=$n.call(null,t)),ct(a,"input",e[6])],r=!0)},p:Be,d(e){e&&nt(t),e&&nt(l),e&&nt(a),r=!1,Ke(d)}}}function jn(e){let t,n=e[3]&&Ln(e);return{c(){n&&n.c(),t=ot()},m(e,i){n&&n.m(e,i),tt(e,t,i)},p(e,i){e[3]?n?n.p(e,i):(n=Ln(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&nt(t)}}}function Fn(e){let t,n,i=e[2]&&Wn(e);return{c(){i&&i.c(),t=ot()},m(e,s){i&&i.m(e,s),tt(e,t,s),n=!0},p(e,[n]){e[2]?i?(i.p(e,n),4&n&&Wt(i,1)):(i=Wn(e),i.c(),Wt(i,1),i.m(t.parentNode,t)):i&&(Ot(),Lt(i,1,1,(()=>{i=null})),Rt())},i(e){n||(Wt(i),n=!0)},o(e){Lt(i),n=!1},d(e){i&&i.d(e),e&&nt(t)}}}function $n(e){e.focus()}function Mn(e,t,s){const l="scanning",a="scanned",c="resolved",r="movedToChest",d="deleted",h="sentForAnalysis",p="analysed",u="error",S=[c,r,d,u],f={close:{label:m("global.close"),labelGa:"close",labelTest:"btn_close"},confirmOpenAnyway:{label:m("detection.cyberCapture.action.openAnyway"),action:()=>Promise.resolve({color:"white",icon:{name:"icon-m-scan-file",bgName:"shield",color:"white"},title:m("detection.cyberCapture.openAnyway.title"),text:m("detection.cyberCapture.openAnyway.desc",_.fileName),actions:[f.keepBlocking,f.openAnyway],trackerTitle:"openAnywayConfirmation"}),labelGa:"confirmOpenAnyway",labelTest:"btn_confirmOpenAnyway"},openAnyway:{label:m("detection.cyberCapture.action.openAnyway"),action:()=>i("app.av.detections.UserChoice",{id:v,userChoice:"open"}).catch((e=>{console.error("CyberCapture: opening the file failed",e)})),labelGa:"openAnyway",labelTest:"btn_openAnyway"},keepBlocking:{label:m("detection.action.keepBlocking"),labelGa:"keepBlocking",labelTest:"btn_keepBlocking"},goToFile:{label:m("global.goToFile"),action(){const e=_.filePath.substring(0,_.filePath.lastIndexOf("\\"));return i("app.utils.BrowseFolder",e)},labelGa:"goToFile",labelTest:"btn_goToFile"},openChest:{label:m("viruschest.open"),action:()=>o.openMainWindow({route:"VirusChest"}),labelGa:"openChest",labelTest:"btn_openChest"},resolve:{label:m("global.resolve"),action:E.bind(null,"resolve"),labelGa:"resolve",labelTest:"btn_resolve"},moveToChest:{label:m("detection.action.chest"),action:E.bind(null,"moveToChest"),labelGa:"moveToChest",labelTest:"btn_moveToChest"},delete:{label:m("global.delete"),action:E.bind(null,"delete"),labelGa:"delete",labelTest:"btn_delete"},sendForAnalysis:{label:m("detection.cyberCapture.action.sendForAnalysis"),minDuration:1e3,action:()=>(s(2,w.progress=!0,w),new Promise((e=>{C=function(){e({color:"white",icon:{name:"icon-m-scan-file",bgName:"shield",color:"white"},title:m("detection.cyberCapture.sentForAnalysis.manually.title"),text:m("detection.cyberCapture.sentForAnalysis.manually.desc",_.fileName),actions:[f.addDetails,f.close],details:I,trackerTitle:"manuallySentForAnalysis"})},i("app.av.detections.UserChoice",{id:v,userChoice:"sendForAnalysis"})}))),labelGa:"sendForAnalysis",labelTest:"btn_sendForAnalysis"},addDetails:{label:m("global.addDetails"),action:()=>(s(3,A=!0),Promise.resolve({color:"white",title:m("detection.cyberCapture.addDetails.title"),actions:[f.sendDetails,f.close],trackerTitle:"addDetails"})),labelGa:"addDetails",labelTest:"btn_addDetails"},sendDetails:{label:m("global.add"),action(){const e={programName:_.filePath,description:y.info,url:y.url};return s(3,A=!1),i("app.detections.cyber_capture_send_details",e).catch((()=>{})).then((()=>({color:"green",icon:{bgName:"circle-ok"},title:m("detection.cyberCapture.addDetails.thankYou"),actions:[f.close],trackerTitle:"thanksForDetails"})))},labelGa:"sendDetails",labelTest:"btn_sendDetails"}},v=o.getUrlParams().id,_={},y={};let I,k,C,w=null,A=!1,T=!1;function x(e){e.id===v&&(e.state===a&&(T=!0),e.filePath=e.filePath||e.path,e.fileSize=e.fileSize||e.filesize,_.filePath!==e.filePath&&(_.fileName=e.filePath.substring(e.filePath.lastIndexOf("\\")+1)),Object.assign(_,e),function(){if(I&&4===I.length)return;I=[{title:m("global.fileName"),value:b.escapeHtml(_.fileName),testValue:"fileName"},{title:m("global.filePath"),value:b.escapeHtml(_.filePath),testValue:"filePath"},{title:m("global.detectedBy"),value:m("cyberCapture"),testValue:"detectedBy"}],_.fileSize&&I.splice(2,0,{title:m("global.fileSize"),value:g.formatBytes(_.fileSize),testValue:"fileSize"})}(),C?(C(),C=null):function(){if(S.includes(_.state))return void s(2,w=P());s(2,w={}),s(2,w.details=I,w),s(2,w.icon={name:"icon-m-scan-file",bgName:"shield",color:"white"},w),_.state===l?(s(2,w.color="white",w),s(2,w.title=m("detection.cyberCapture.scanning.title"),w),s(2,w.text=m("detection.cyberCapture.scanning.desc",_.fileName),w),s(2,w.progress=!0,w),s(2,w.status={text:m("global.scanning")},w),s(2,w.trackerTitle="scanning",w)):_.state===a&&null==_.threatDetected?(s(2,w.color="red",w),s(2,w.icon.color="critical",w),s(2,w.title=m("detection.cyberCapture.scanned.needsAnalysis.title"),w),s(2,w.text=m("detection.cyberCapture.scanned.needsAnalysis.desc",_.fileName),w),s(2,w.actions=[f.sendForAnalysis,f.moveToChest,f.confirmOpenAnyway],w),s(2,w.trackerTitle="needsAnalysis",w)):_.state!==a||_.threatDetected?_.state===a&&_.threatDetected?(s(2,w.color="red",w),s(2,w.icon.color="critical",w),s(2,w.title=m("detection.cyberCapture.scanned.threatDetected.title"),w),s(2,w.text=m("detection.cyberCapture.scanned.threatDetected.desc",_.fileName),w),s(2,w.actions=[f.resolve,f.moveToChest,f.delete],w),s(2,w.trackerTitle="threatDetected",w)):_.state===h?(s(2,w.color="red",w),s(2,w.icon.color="critical",w),s(2,w.title=m("detection.cyberCapture.sentForAnalysis.automatically.title"),w),s(2,w.text=m("detection.cyberCapture.sentForAnalysis.automatically.desc",_.fileName),w),s(2,w.actions=[f.close,f.moveToChest,f.confirmOpenAnyway],w),s(2,w.trackerTitle="automaticallySentForAnalysis",w)):_.state!==p||_.threatDetected?_.state===p&&_.threatDetected&&(s(2,w.color="red",w),s(2,w.icon.color="critical",w),s(2,w.title=m("detection.cyberCapture.analysed.threatDetected.title"),w),s(2,w.text=m("detection.cyberCapture.analysed.threatDetected.desc",_.fileName),w),s(2,w.actions=[f.resolve,f.moveToChest,f.delete],w),s(2,w.trackerTitle="analysedThreatDetected",w)):(s(2,w.color="green",w),s(2,w.icon.color="ok",w),s(2,w.title=m("detection.cyberCapture.analysed.noThreat.title"),w),s(2,w.text=m("detection.cyberCapture.analysed.noThreat.desc",_.fileName),w),s(2,w.actions=[f.goToFile],w),s(2,w.trackerTitle="analysedNoThreat",w)):(s(2,w.color="green",w),s(2,w.icon.color="ok",w),s(2,w.title=m("detection.cyberCapture.scanned.noThreat.title"),w),s(2,w.text=m("detection.cyberCapture.scanned.noThreat.desc",_.fileName),w),s(0,f.close.countdown=15,f),s(2,w.actions=[f.close],w),s(2,w.trackerTitle="noThreat",w))}())}function P(){let e;return _.state===u?(console.error("CyberCapture: resolving threat failed",_.errorCode),e={color:"white",icon:{name:"icon-m-scan-file",bgName:"shield"},title:m("detection.cyberCapture.error.title")}):e={color:"green",icon:{name:"icon-m-scan-file",bgName:"shield",color:"ok"},title:m(T?"detection.threat.secured":"detection.cyberCapture.threatDetectedAndSecured"),text:m("detection.cyberCapture."+_.state+".desc",_.fileName),details:I},e.text=m("detection.cyberCapture."+_.state+".desc",_.fileName),e.details=I,e.trackerTitle=_.state,_.state===r?e.actions=[f.close,f.openChest]:_.state!==c&&_.state!==d&&_.state!==u||(e.actions=[f.close]),e}function E(e){return new Promise((t=>{C=function(){t(P())},i("app.av.detections.UserChoice",{id:v,userChoice:e})}))}St((()=>{k=n.on("app.av.detections.onStatusChanged",x),i("app.av.detections.GetStatus",{id:v}).then(x).then(o.init)})),ft((()=>{k&&k()}));return[f,y,w,A,!0,e=>s(1,y.url=e.target.value,y),e=>s(1,y.info=e.target.value,y)]}class Hn extends Bt{constructor(e){super(),Ut(this,e,Mn,Fn,Xe,{handlesWindowInit:4})}get handlesWindowInit(){return this.$$.ctx[4]}}const Un=(Bn=!1,e.extend({template:E,data(){const e=Ne(Bn);return{STRINGS:Ae,componentService:D,shieldsSeparately:Bn,properties:e,whatToDoWithTabs:[e.whatToDoWithViruses,e.whatToDoWithUnwantedProgram],shieldTabs:[e.fileShield,e.behaviorShield,e.webShield,e.mailShield]}},oninit(){this.observe("properties.enableCyberCapture.value",(e=>{this.set("properties.enableCyberCaptureOptions.disabled",!e)})),this.observe("properties.enableRootkitDetection.value",(e=>{this.set("properties.enableExploitDetection.disabled",!e)})),this.listeners=[],this.listeners.push(n.on("product.change.feature.AntiRootkit.enabled",(e=>{this.set("properties.enableRootkitDetection.value",e),e||this.set("properties.enableExploitDetection.value",!1)}))),this.listeners.push(n.on("product.change.feature.AntiExploit.enabled",(e=>{this.set("properties.enableExploitDetection.value",e)})))},onteardown(){this.listeners.forEach((e=>e()))}}));var Bn;const Gn=function(e){return{title:Ae.title,desc:Ae.desc,items:Ne(e)}}.bind(null,!1);function Vn(){const e=[{prefix:"Behavior shield",items:Oe()},{prefix:"File shield",items:Me()},{prefix:"Mail shield",items:He()},{prefix:"Web shield",items:Ue()}],t=[];return e.forEach((e=>{e.items.forEach((n=>{n.label=e.prefix+": "+n.label,t.push(n)}))})),t}export default P;export{Hn as cyberCaptureDetection,w as serviceProxy,Un as settings,Vn as settingsGeek,Gn as settingsSearchStrings};const Kn={name:"Shields",version:"1.2.379",created:"2021-03-10T09:13:03.790Z"};export{Kn as metadata};