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/1.0.663/ |
//{"name":"Shields","version":"1.2.593","created":"2021-09-06T10:51:07.329Z"} import e from"./ractive.js";import{EventEmitter as t,eventer as n,serviceRequest as i,moduleManager as l,napiTracker as s,windowApi as a}from"./napi.js";import{productModel as o,napiUtils as c,soundService as r,settingsService as d}from"./napiExtensions.js";import{logger as h,stringUtils as u}from"./libs.js";import{nls as p,moment as b,format as m}from"./i18n.js";import{modals as g}from"./ractiveComponents.js";var S=".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 f=h.createLogger("shields.serviceProxy"),v={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"}},_={starting:"start_waiting",active:"started",inactive:"inactive",paused:"paused"},y={installed:"installed",notInstalled:"notInstalled",installing:"installing"},k={shieldsChanged:"shieldsChanged",shieldChanged:{file:"fileShieldChanged",web:"webShieldChanged",email:"emailShieldChanged",behavior:"behaviorShieldChanged",antiRootkit:"antiRootkitShieldChanged",antiExploit:"antiExploitShieldChanged"}};const I=new class extends t{constructor(){f.debug("constructor"),super(),this.EVENTS=k,this.SHIELDS=v,this.SHIELD_LIST=Object.keys(v).map((e=>v[e])),this.SHIELD_STATUSES=_,this.SHIELD_INSTALL_STATUSES=y,this._shieldData=null,this._loadShieldsDataPromise=null,this._shieldInstallers={},this._listeners=[],this._userCount=0}init(){if(f.debug("init"),0===this._userCount){for(const e in v)(v[e].component||v[e].id)&&this._listeners.push(n.on(`product.change.feature.${v[e].component||v[e].id}`,this._shieldChangeHandler.bind(this,e)));this._loadShieldsData()}this._userCount++}destroy(){if(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 o.isLicensed(e)&&o.isInstalled(e)}installShield(e){return v[e].component?(this._shieldInstallers[e]||(this._shieldInstallers[e]=o.getInstaller(v[e].component)),this._shieldData[e].installStatus=y.installing,this._emitShieldEvent(e),this._shieldInstallers[e].install().catch((t=>{f.error("installing shield failed",e,t),this._shieldData[e].installStatus=y.notInstalled,this._emitShieldEvent(e)}))):Promise.reject("Shield "+v[e].id+" is not installable.")}startShield(e){return o.enableFeature(v[e].id).then((()=>this._loadShieldData(e,!0))).then((()=>{}))}startShields(e){const t=e.map((e=>v[e].id));return o.enableFeatures(t).then((()=>this._loadShieldsData()))}stopShield(e,t=-1){return o.disableFeature(v[e].id,t).then((()=>this._loadShieldData(e,!0))).then((()=>{}))}stopShields(e,t=-1){const n=e.map((e=>v[e].id));return o.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(v).map((t=>this._loadShieldData(t,e)));return this._loadShieldsDataPromise=Promise.all(t).then((()=>this._shieldData)).catch((e=>{this._loadShieldsDataPromise=null,f.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}),v[e].component?this._shieldData[e].installStatus=o.isInstalled(v[e].component)?y.installed:y.notInstalled:this._shieldData[e].installStatus=y.installed,this._shieldData[e].installStatus===y.installed?n=i("app.features.GetStatus",{featureId:v[e].id}).then((t=>{this._shieldData[e].status=t&&t.status})):(this._shieldInstallers[e]=o.getInstaller(v[e].component),n=this._shieldInstallers[e].getStatus().then((t=>{"running"===t.status&&(this._shieldData[e].installStatus=y.installing)}))),n.then((()=>this._shieldData[e]))}_shieldChangeHandler(e,t){this.getShieldData(e).then((()=>{this._shieldData[e].status=t.enabled?_.active:_.inactive,this._shieldData[e].installStatus=t.installed?y.installed:y.notInstalled,this._emitShieldEvent(e)}))}_emitShieldEvent(e){this.emit(k.shieldsChanged,this._shieldData),this.emit(k.shieldChanged[e],this._shieldData[e])}},x=h.createLogger("shields.shieldController"),C=e.extend({data:()=>({SHIELD_INSTALL_STATUSES:I.SHIELD_INSTALL_STATUSES,shieldKey:null,shield:{},isAfbManaged:o.isAfbManaged()}),oninit(){const e=this.get("shieldKey");x.debug("oninit",e),I.init(),I.on(I.EVENTS.shieldChanged[e],this.updateShield.bind(this)),I.getShieldData(e).then((e=>{this.updateShield(e)})).catch((t=>{x.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(){x.debug("onteardown",this.get("shieldKey"),this._torndown),this._torndown=!0,!this._torndown&&I.destroy()},updateShield(e){this.set("shield",{active:e.status===I.SHIELD_STATUSES.active,installStatus:e.installStatus,controllable:!this.get("isAfbManaged")&&e.installStatus===I.SHIELD_INSTALL_STATUSES.installed})},onToggleShield(){const e=this.get("shieldKey"),t=this.get("shield.active"),i=()=>{this.set("shield.controllable",!0)},l=()=>{this.set("shield.active",!t),i()},s=()=>{this.isSettings&&n.emit("Settings.gaTrack","Enable "+e+" shield","on"),I.startShield(e).then(l).catch(i)};this.set("shield.controllable",!1),t?this.selectStopOption().then((t=>{I.stopShield(e,t).then((()=>{this.isSettings&&n.emit("Settings.gaTrack","Enable "+e+" shield","off",t),l()})).catch(i)})).catch(i):o.isPassiveMode()?g.passiveMode(o.getPassiveModeInfo()).then(s).catch(i):s()},onInstallShield(){I.installShield(this.get("shieldKey"))},selectStopOption:()=>g.stopOptions({title:p("shields.turnOffShield"),desc:p("shields.turnOffShield.desc")}).then((e=>e.time))}),A=C.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:"kin-switch",a:{"data-test":[{t:2,x:{r:["shieldKey"],s:'"shields-"+_0'}}],"kin-checked":[{t:2,r:"shield.active"}],"kin-disabled":[{t:2,x:{r:["shield.controllable"],s:"!_0"}}],title:[{t:2,x:{r:["nls","shieldKey"],s:'_0("shields."+_1)'}}]},v:{click:"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:"kin-button",v:{click:"installShield"},a:{type:"secondary",size:"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:S}),w=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:"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:S,components:{Shield:A},data:()=>({shieldKeys:["file","behavior","web","email"]})}),T={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 P=new class extends t{init(){I.init(),this.componentToggleRunning=!1,this.componentToggleTo=null,this.componentValue=null,this._listeners=[I.on(I.EVENTS.shieldsChanged,this._updateStatus.bind(this)),n.on("app.settings.onStatusChanged",this._updateStatus.bind(this))],this.MAIN_SHIELDS=Object.keys(I.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,I.destroy()}loadStatus(e){return!e&&this.loadStatusPromise||(this.MAIN_SHIELDS.forEach((e=>{this.shieldPromises[e]=I.getShieldData(e).then((e=>({isChangePossible:e.installStatus===I.SHIELD_INSTALL_STATUSES.installed,enabled:e.status===I.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&&o.isPassiveMode()?g.passiveMode(o.getPassiveModeInfo()).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 I.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 I.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 g.stopOptions({title:p("shields.turnOffShield"),desc:p("shields.turnOffShield.desc")}).then((e=>e.time))}_updateStatus(){this.loadStatus(!0).then(this.emit.bind(this,"change"))}},E="shields.settings.selectActionVirus.auto",D="shields.settings.selectActionVirus.auto.desc",N="shields.settings.selectActionVirus.ask",O="shields.settings.selectActionVirus.ask.desc",W=[E,D,N,O],R=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:p(E),desc:p(D),value:"fix",recommended:!0},{label:p(N),desc:p(O),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})])}}),j=["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"],L=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:p("settings.pup"),desc:p("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:p("settings.pup.action.fix"),desc:p("settings.pup.action.fix.desc"),value:"fix",recommended:!0},{label:p("settings.pup.action.interactive"),desc:p("settings.pup.action.interactive.desc"),value:"interactive"}],track:{subject:"PUP action"}},toolEnabled:{id:"settings_shields_whatToDoWith_unwantedProgram_toolsEnabled",label:p("settings.pup.tools"),desc:p("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:p("settings.pup.action.fix"),value:"fix"},{label:p("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}),F="shields.settings.selectActionUnwantedProgram.auto",$="shields.settings.selectActionUnwantedProgram.auto.desc",M="shields.settings.selectActionUnwantedProgram.ask",H="shields.settings.selectActionUnwantedProgram.ask.desc",U="shields.settings.selectActionUnwantedProgram.nothing",B="shields.settings.selectActionUnwantedProgram.nothing.desc",G=[F,$,M,H,U,B],V=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:p(F),desc:p($),value:"fix",recommended:!0},{label:p(M),desc:p(H),value:"interactive"},{label:p(U),desc:p(B),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})])}}),z={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"}]}}]}]},K=C.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:"kin-button",a:{type:"secondary",size:"small",class:"g-margin-bottom--10"},v:{click:"installShield"},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:p("shields.turnOffShield"),desc:p("shields.turnOffShield.desc")}}),computed:{enableShieldIdAttr:function(){return this.get("enableShieldId")||"stg-shield-"+this.get("shieldKey")+"-checkbox"},component:function(){return v[this.get("shieldKey")].component}},onToggleShield(){this.toggle("shield.active"),this._super()}}),X={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:p(X.scanAutorun),desc:p(X.scanAutorunDesc),path:"avcfg://FileSystemShield/FileSystem/ScanAutorun",track:{subject:"Scan autorun"},search:X.scanAutorun},fileTypes:{label:p(X.selectFileTypes),path:["avcfg://FileSystemShield/FileSystem/ScanOnWriteAllFiles","avcfg://FileSystemShield/FileSystem/ScanOnOpenAllFiles"],options:[{label:p(X.selectFileTypesRecommended),value:"0"},{label:p(X.selectFileTypesAll),value:"1"}],track:{subject:"File types to scan",valueMap:{0:"Recommended",1:"All"}},search:{title:X.selectFileTypes,others:[X.selectFileTypesRecommended,X.selectFileTypesAll]}},scanOnExecute:{label:p(X.scanOnExecute),path:"avcfg://FileSystemShield/FileSystem/ScanOnExecute",track:{subject:"Scan on execute"},search:X.scanOnExecute},scanOnOpen:{label:p(X.scanOnOpen),path:"avcfg://FileSystemShield/FileSystem/ScanOnOpenDocuments",track:{subject:"Scan on open"},search:X.scanOnOpen},scanOnWrite:{label:p(X.scanOnWrite),path:"avcfg://FileSystemShield/FileSystem/ScanOnWriteDefault",track:{subject:"Scan on write"},search:X.scanOnWrite}},Y={enableShield:{id:"stg-shield-file-checkbox",label:p(X.enableFileShield),search:X.enableFileShield}};function Z(e){const t=q;return e||(t.enableShield=Y.enableShield),t}const Q={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:[]}]},J={title:"shields.behavior",desc:"shields.behavior.desc",enableBehaviorShield:"shields.settings.enableBehaviorShield"};p(J.enableBehaviorShield),p(J.enableBehaviorShieldDesc);const ee={enableShield:{id:"stg-shield-behavior-checkbox",label:p(J.enableBehaviorShield),search:J.enableBehaviorShield}};function te(e){return e?{}:{enableShield:ee.enableShield}}const ne={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:"kin-button",a:{type:"secondary",size:"small",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"}]},ie=h.createLogger("shields.settings.blockedWebsites"),le={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"},se="avcfg://WebShield/WebScanner/BlockedURLs",ae=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 -compact"},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:"kin-button",a:{type:"blank",size:"tiny",icononly:0,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:"14"}}]}]}]}," ",{t:4,f:[{t:7,e:"tr",f:[{t:7,e:"td",a:{colspan:"3",class:"table__last"},f:[{t:7,e:"kin-button",a:{size:"small",type:"critical"},v:{click:"confirmRemove"},f:[{t:3,x:{r:["nls","STRINGS.confirmRemove"],s:"_0(_1)"}}]}," ",{t:7,e:"kin-button",a:{size:"small",type:"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:"kin-button",a:{type:"secondary"},v:{click:"close"},f:[{t:3,x:{r:["nls"],s:'_0("global.close")'}}]}]}],p:{modalHeaderContent:[{t:7,e:"kin-button",a:{class:"g-margin-top--10",type:"secondary","data-test":"addWebsite"},v:{click:"add"},f:["+ ",{t:3,x:{r:["nls","STRINGS.addWebsite"],s:"_0(_1)"}}]}]}}]},data:()=>({STRINGS:le,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:se}).then((e=>{this.set("blockedWebsites",e.value.split(";").filter((e=>""!==e)))})).catch((e=>{ie.error("loading the blocked websites failed",e)}))},updateBlockedWebsites(){i("app.settings.Set",{name:se,value:this.get("blockedWebsites").filter((e=>""!==e)).join(";")})}}),oe={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"},ce={httpsScanning:{label:p(oe.httpsScanning),desc:p(oe.httpsScanningDesc),path:"avcfg://WebShield/WebScanner/HttpsScanning",track:{subject:"Enable HTTPS scanning"},search:oe.httpsScanning},scriptScanning:{label:p(oe.scriptScanning),desc:p(oe.scriptScanningDesc),path:"avcfg://WebShield/WebScanner/ScriptScaning",track:{subject:"Enable script scanning"},search:oe.scriptScanning},siteBlocking:{label:p(oe.siteBlocking),path:"avcfg://WebShield/WebScanner/URLBlocking",track:{subject:"Enable site blocking"},search:oe.siteBlocking},botnetBlocker:{label:p(oe.botnetBlocker),desc:p(oe.botnetBlockerDesc),path:"avcfg://WebShield/ConnectionBlocker/BotnetBlocker",track:{subject:"Block botnet attacks"},search:oe.botnetBlocker},showBlockedWebsites:{id:"stg-shield-web-showBlockedWebsites",label:p(oe.showBlockedWebsites),search:oe.showBlockedWebsites},quicScanning:{label:p(oe.quicScanning),path:"avcfg://WebShield/Quic/Enabled",track:{subject:"Enable QUIC/HTTP3 scanning"},search:oe.quicScanning}},re={enableShield:{id:"stg-shield-web-checkbox",label:p(oe.enableWebShield),search:oe.enableWebShield}},de=h.createLogger("shields.settings.webShield");function he(e){const t=ce;return e||(t.enableShield=re.enableShield),t}const ue={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"}]}}]}]},pe={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 be(e){const t={scanInbound:{label:p(pe.scanInbound),path:"avcfg://EmailShield/EmailScanner/ScanInbound",track:{subject:"Scan inbound"},search:pe.scanInbound},scanOutbound:{label:p(pe.scanOutbound),path:"avcfg://EmailShield/EmailScanner/ScanOutbound",track:{subject:"Scan outbound"},search:pe.scanOutbound},insertNoteCleanMsgOut:{label:p(pe.insertNoteCleanMsgOut),path:"avcfg://EmailShield/EmailScanner/InsertNoteCleanMsgOut",track:{subject:"Insert note into clean message"},search:pe.insertNoteCleanMsgOut},markSubjectForVirusMsg:{label:p(pe.markSubjectForVirusMsg),path:"avcfg://EmailShield/EmailScanner/MarkSubjectForVirusMsg",track:{subject:"Mark subject of virus message"},search:pe.markSubjectForVirusMsg},subjectForVirusMsg:{path:"avcfg://EmailShield/EmailScanner/SubjectForVirusMsg",track:{subject:"Virus message subject mark"}},scanAttachmentDuringAttaching:{label:p(pe.scanAttachmentDuringAttaching),path:"avcfg://EmailShield/EmailScanner/ScanAttachmentDuringAttachingMSO",track:{subject:"Scan attachment"},search:pe.scanAttachmentDuringAttaching}};return e||(t.enableShield={id:"stg-shield-mail-checkbox",label:p(pe.enableMailShield),search:pe.enableMailShield}),t}const me=c.supportedSince("21.1"),ge=me?L:V,Se=me?j:G,fe=(ve=!1,e.extend({template:z,components:{ShieldContainer:K},data:()=>({STRINGS:X,standalone:ve,properties:Z(ve)})}));var ve;const _e=function(t){return e.extend({template:Q,components:{ShieldContainer:K},data:()=>({STRINGS:J,standalone:t,properties:te(t)})})}(!1),ye=function(t){return e.extend({template:ne,components:{ShieldContainer:K,BlockedWebsites:ae},data:()=>({STRINGS:oe,standalone:t,showBlockedWebsites:!1,properties:he(t)}),oninit(){this.on("openBlockedWebsites",(()=>{n.emit("Settings.gaTrack","Open blocked websites"),de.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),ke=function(t){return e.extend({template:ue,components:{ShieldContainer:K},data:()=>({STRINGS:pe,standalone:t,properties:be(t)}),oninit(){this.observe("markSubjectForVirusMsg.value",(e=>{this.set("subjectForVirusMsg.disabled",!e)}))}})}(!1),Ie=h.createLogger("shields.settings.core"),xe={title:"shields",desc:"shields.settings.desc",whatToDoWith:"shields.settings.whatToDoWith",whatToDoWithViruses:me?"shields.settings.whatToDoWith.malware":"shields.settings.whatToDoWith.viruses",whatToDoWithUnwantedProgram:me?"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"},Ce=[{name:"avcfg://***ProviderINI***/Common/Report",objectId:"FileSystemShield"},{name:"avcfg://***ProviderINI***/Common/Report",objectId:"WebShield"},{name:"avcfg://***ProviderINI***/Common/Report",objectId:"EmailShield"}];const Ae={label:p(xe.enableCyberCapture),desc:p(xe.enableCyberCaptureDesc),path:"avcfg://avast5/Common/AutoSandboxEnabled",track:{subject:"Enable CyberCapture"},search:{title:xe.enableCyberCapture,desc:xe.enableCyberCaptureDesc,others:[xe.cyberCaptureSendForAnalysisAuto,xe.cyberCaptureSendForAnalysisAsk]}},we={path:"avcfg://avast5/Custody/AutomaticallySendForAnalysis",options:[{label:p(xe.cyberCaptureSendForAnalysisAuto),value:"1"},{label:p(xe.cyberCaptureSendForAnalysisAsk),value:"0"}],track:{subject:"Send files to Threat Labs",valueMap:{1:"Automatically",0:"Ask"}}},Te={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:p("settings.sensitivity.low")},{value:"80",label:p("settings.sensitivity.medium")},{value:"100",label:p("settings.sensitivity.high")}],track:{subject:"Sensitivity",valueMap:{40:"Low",80:"Medium",100:"High"}}},whatToDoWithViruses:{id:"stg-shields-whatToDoWithViruses",type:"tab",title:p(xe.whatToDoWithViruses),compo:R,testAttr:"viruses",search:{title:xe.whatToDoWithViruses,others:W}},whatToDoWithUnwantedProgram:{id:"stg-shields-whatToDoWithUnwantedProgram",type:"tab",title:p(xe.whatToDoWithUnwantedProgram),compo:ge,testAttr:"unwantedProgram",search:{title:xe.whatToDoWithUnwantedProgram,others:Se}},enableCyberCapture:Ae,enableCyberCaptureOptions:we,enableHardenedMode:{label:p(xe.enableHardenedMode),desc:p(xe.enableHardenedModeDesc),path:"avcfg://avast5/Common/HardenedMode",track:{subject:"Enable Hardened mode"},search:{title:xe.enableHardenedMode,desc:xe.enableHardenedModeDesc}},enableRootkitDetection:{id:"stg-shields-rootkitDetections",label:p(xe.enableRootkitDetection),load:function(){return I.getShieldData("antiRootkit",!0).then((e=>({value:e.status===I.SHIELD_STATUSES.active,locked:!1})))},change:function(e){return e?I.startShield("antiRootkit"):I.stopShield("antiRootkit")},updateOnEvent:{event:"product.change.feature.AntiRootkit.enabled",getValue:e=>e},track:{subject:"Enable Rootkit detection"},search:xe.enableRootkitDetection},enableExploitDetection:{id:"stg-shields-exploitDetection",label:p(xe.enableExploitDetection),load:function(){return Promise.all([I.getShieldData("antiExploit",!0),I.getShieldData("antiRootkit",!0)]).then((([e,t])=>{const n=I.SHIELD_STATUSES.active;return{value:e.status===n&&t.status===n,locked:!1}}))},change:function(e){return e?I.startShield("antiExploit"):I.stopShield("antiExploit")},updateOnEvent:{event:"product.change.feature.AntiExploit.enabled",getValue:e=>e},track:{subject:"Enable Exploit detection"},search:xe.enableExploitDetection},generateReportFile:{id:"shields-settings-generateReportFile",label:p(xe.generateReportFile),descAsPromise:function(){return l.importModule("Settings","common").then((e=>e.getReportDestination())).then((e=>p(xe.generateReportFileDesc,e,"NAPI.request('app.utils.BrowseFolder', '"+e.replace(/\\/g,"\\\\")+"')")))},load:function(){return i("app.settings.GetValues",Ce).then((e=>({locked:e.some((e=>e.locked)),value:e.every((e=>"None"!==e.value))}))).catch((e=>{Ie.error("loading report file failed",e)}))},change:function(e){const t=Ce.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(Ce),search:xe.generateReportFile}},Pe={configureShields:{id:"stg-shields-configureShields",label:p(xe.shieldTypeSettings),search:xe.shieldTypeSettings},fileShield:{id:"stg-shields-fileShield",type:"tab",title:p(xe.shield.file),compo:fe,testAttr:"fileShield",search:{title:xe.shield.file,items:function(e){return{title:X.title,desc:X.desc,items:I.isLicensedAndInstalled(v.file.component)&&Z(e)}}(!1).items}},behaviorShield:{id:"stg-shields-behaviorShield",type:"tab",title:p(xe.shield.behavior),compo:_e,testAttr:"behaviorShield",search:{title:xe.shield.behavior,items:function(e){return{title:J.title,desc:J.desc,items:I.isLicensedAndInstalled(v.behavior.component)&&te(e)}}(!1).items}},webShield:{id:"stg-shields-webShield",type:"tab",title:p(xe.shield.web),compo:ye,testAttr:"webShield",search:{title:xe.shield.web,items:function(e){return{title:oe.title,desc:oe.desc,items:I.isLicensedAndInstalled(v.web.component)&&he(e)}}(!1).items}},mailShield:{id:"stg-shields-mailShield",type:"tab",title:p(xe.shield.mail),compo:ke,testAttr:"mailShield",search:{title:xe.shield.mail,items:function(e){return{title:pe.title,desc:pe.desc,items:I.isLicensedAndInstalled(v.email.component)&&be(e)}}(!1).items}}};function Ee(e){const t=Te;return e||(t.configureShields=Pe.configureShields,t.fileShield=Pe.fileShield,t.behaviorShield=Pe.behaviorShield,t.webShield=Pe.webShield,t.mailShield=Pe.mailShield),t}function De(){let e=[];return I.isLicensedAndInstalled(v.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:p("geek.behavShield.detected.label"),value:"2"},{label:p("geek.behavShield.known.label"),value:"3"}]}]),e}const Ne={name:"avcfg://***ProviderINI***/Common/VirusAction",objectId:"FileSystemShield"},Oe={name:"avcfg://***ProviderINI***/Common/PUPAction",objectId:"FileSystemShield"},We={name:"avcfg://***ProviderINI***/Common/SuspiciousAction",objectId:"FileSystemShield"},Re=[{label:"Fix automatically",value:"fix"},{label:p("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 je(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 Le(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 Fe(){let e=[];return I.isLicensedAndInstalled(v.file.component)&&(e=[{label:"Action to be performed when a virus is found",path:Ne,load:je.bind(null,Ne,0),change:Le.bind(null,Ne,0),emitOnChange:"settings.change.fileShield.virusAction",updateOnEvent:"settings.change.fileShield.virusAction",type:"select",options:Re},{label:"if the action above fails, then",path:Ne,load:je.bind(null,Ne,1),change:Le.bind(null,Ne,1),emitOnChange:"settings.change.fileShield.virusAction",updateOnEvent:"settings.change.fileShield.virusAction",type:"select",options:Re,unsearchable:!0},{label:"if the action above fails, then",path:Ne,load:je.bind(null,Ne,2),change:Le.bind(null,Ne,2),emitOnChange:"settings.change.fileShield.virusAction",updateOnEvent:"settings.change.fileShield.virusAction",type:"select",options:Re,unsearchable:!0},{label:"Action to be performed when a potentially unwanted program is found",path:Oe,load:je.bind(null,Oe,0),change:Le.bind(null,Oe,0),emitOnChange:"settings.change.fileShield.pupAction",updateOnEvent:"settings.change.fileShield.pupAction",type:"select",options:Re},{label:"if the action above fails, then",path:Oe,load:je.bind(null,Oe,1),change:Le.bind(null,Oe,1),emitOnChange:"settings.change.fileShield.pupAction",updateOnEvent:"settings.change.fileShield.pupAction",type:"select",options:Re,unsearchable:!0},{label:"if the action above fails, then",path:Oe,load:je.bind(null,Oe,2),change:Le.bind(null,Oe,2),emitOnChange:"settings.change.fileShield.pupAction",updateOnEvent:"settings.change.fileShield.pupAction",type:"select",options:Re,unsearchable:!0},{label:"Action to be performed when a suspicious object is found",path:We,load:je.bind(null,We,0),change:Le.bind(null,We,0),emitOnChange:"settings.change.fileShield.suspiciousAction",updateOnEvent:"settings.change.fileShield.suspiciousAction",type:"select",options:Re},{label:"if the action above fails, then",path:We,load:je.bind(null,We,1),change:Le.bind(null,We,1),emitOnChange:"settings.change.fileShield.suspiciousAction",updateOnEvent:"settings.change.fileShield.suspiciousAction",type:"select",options:Re,unsearchable:!0},{label:"if the action above fails, then",path:We,load:je.bind(null,We,2),change:Le.bind(null,We,2),emitOnChange:"settings.change.fileShield.suspiciousAction",updateOnEvent:"settings.change.fileShield.suspiciousAction",type:"select",options:Re,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 $e(){let e=[];return I.isLicensedAndInstalled(v.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:p("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:p("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:p("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 Me(){let e=[];return I.isLicensedAndInstalled(v.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 He(){}function Ue(e){return e()}function Be(){return Object.create(null)}function Ge(e){e.forEach(Ue)}function Ve(e){return"function"==typeof e}function ze(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function Ke(e,t,n,i){if(e){const l=Xe(e,t,n,i);return e[0](l)}}function Xe(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 qe(e,t,n,i,l,s,a){const o=function(e,t,n,i){if(e[2]&&i){const l=e[2](i(n));if(void 0===t.dirty)return l;if("object"==typeof l){const e=[],n=Math.max(t.dirty.length,l.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|l[i];return e}return t.dirty|l}return t.dirty}(t,i,l,s);if(o){const l=Xe(t,n,i,a);e.p(l,o)}}function Ye(e){return e&&Ve(e.destroy)?e.destroy:He}function Ze(e,t){e.appendChild(t)}function Qe(e,t,n){e.insertBefore(t,n||null)}function Je(e){e.parentNode.removeChild(e)}function et(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function tt(e){return document.createElement(e)}function nt(e){return document.createTextNode(e)}function it(){return nt(" ")}function lt(){return nt("")}function st(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function at(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ot(e,t,n){t in e?e[t]=n:at(e,t,n)}function ct(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function rt(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function dt(e,t,n){e.classList[n?"add":"remove"](t)}let ht;function ut(e){ht=e}function pt(){if(!ht)throw new Error("Function called outside component initialization");return ht}function bt(e){pt().$$.on_mount.push(e)}function mt(){const e=pt();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const l=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,l)}))}}}const gt=[],St=[],ft=[],vt=[],_t=Promise.resolve();let yt=!1;function kt(e){ft.push(e)}let It=!1;const xt=new Set;function Ct(){if(!It){It=!0;do{for(let e=0;e<gt.length;e+=1){const t=gt[e];ut(t),At(t.$$)}for(ut(null),gt.length=0;St.length;)St.pop()();for(let e=0;e<ft.length;e+=1){const t=ft[e];xt.has(t)||(xt.add(t),t())}ft.length=0}while(gt.length);for(;vt.length;)vt.pop()();yt=!1,It=!1,xt.clear()}}function At(e){if(null!==e.fragment){e.update(),Ge(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(kt)}}const wt=new Set;let Tt;function Pt(){Tt={r:0,c:[],p:Tt}}function Et(){Tt.r||Ge(Tt.c),Tt=Tt.p}function Dt(e,t){e&&e.i&&(wt.delete(e),e.i(t))}function Nt(e,t,n,i){if(e&&e.o){if(wt.has(e))return;wt.add(e),Tt.c.push((()=>{wt.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}const Ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Wt(e){e&&e.c()}function Rt(e,t,n,i){const{fragment:l,on_mount:s,on_destroy:a,after_update:o}=e.$$;l&&l.m(t,n),i||kt((()=>{const t=s.map(Ue).filter(Ve);a?a.push(...t):Ge(t),e.$$.on_mount=[]})),o.forEach(kt)}function jt(e,t){const n=e.$$;null!==n.fragment&&(Ge(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Lt(e,t){-1===e.$$.dirty[0]&&(gt.push(e),yt||(yt=!0,_t.then(Ct)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ft(e,t,n,i,l,s,a=[-1]){const o=ht;ut(e);const c=e.$$={fragment:null,ctx:null,props:s,update:He,not_equal:l,bound:Be(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o?o.$$.context:[]),callbacks:Be(),dirty:a,skip_bound:!1};let r=!1;if(c.ctx=n?n(e,t.props||{},((t,n,...i)=>{const s=i.length?i[0]:n;return c.ctx&&l(c.ctx[t],c.ctx[t]=s)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](s),r&&Lt(e,t)),n})):[],c.update(),r=!0,Ge(c.before_update),c.fragment=!!i&&i(c.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);c.fragment&&c.fragment.l(e),e.forEach(Je)}else c.fragment&&c.fragment.c();t.intro&&Dt(e.$$.fragment),Rt(e,t.target,t.anchor,t.customElement),Ct()}ut(o)}class $t{$destroy(){jt(this,1),this.$destroy=He}$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)}}var Mt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ht=/^\s+|\s+$/g,Ut=/^[-+]0x[0-9a-f]+$/i,Bt=/^0b[01]+$/i,Gt=/^0o[0-7]+$/i,Vt=parseInt,zt="object"==typeof Mt&&Mt&&Mt.Object===Object&&Mt,Kt="object"==typeof self&&self&&self.Object===Object&&self,Xt=zt||Kt||Function("return this")(),qt=Object.prototype.toString,Yt=Math.max,Zt=Math.min,Qt=function(){return Xt.Date.now()};function Jt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function en(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==qt.call(e)}(e))return NaN;if(Jt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Jt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ht,"");var n=Bt.test(e);return n||Gt.test(e)?Vt(e.slice(2),n?2:8):Ut.test(e)?NaN:+e}var tn=function(e,t,n){var i,l,s,a,o,c,r=0,d=!1,h=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,s=l;return i=l=void 0,r=t,a=e.apply(s,n)}function b(e){return r=e,o=setTimeout(g,t),d?p(e):a}function m(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-r>=s}function g(){var e=Qt();if(m(e))return S(e);o=setTimeout(g,function(e){var n=t-(e-c);return h?Zt(n,s-(e-r)):n}(e))}function S(e){return o=void 0,u&&i?p(e):(i=l=void 0,a)}function f(){var e=Qt(),n=m(e);if(i=arguments,l=this,c=e,n){if(void 0===o)return b(c);if(h)return o=setTimeout(g,t),p(c)}return void 0===o&&(o=setTimeout(g,t)),a}return t=en(t)||0,Jt(n)&&(d=!!n.leading,s=(h="maxWait"in n)?Yt(en(n.maxWait)||0,t):s,u="trailing"in n?!!n.trailing:u),f.cancel=function(){void 0!==o&&clearTimeout(o),r=0,i=c=l=o=void 0},f.flush=function(){return void 0===o?a:S(Qt())},f};const{window:nn}=Ot;function ln(e,t,n){const i=e.slice();return i[49]=t[n],i}function sn(e,t,n){const i=e.slice();return i[52]=t[n],i}function an(e,t,n){const i=e.slice();return i[55]=t[n],i[57]=n,i}const on=e=>({}),cn=e=>({});function rn(e){let t,n,i,l,s,a,o,c,r,d,h,u,b,m,g,S,f,v,_,y,k,I,x,C=e[0].icon&&dn(e),A=e[0].title&&bn(e);const w=e[30].default,T=Ke(w,e,e[29],null);let P=e[0].text&&mn(e),E=e[0].actionText&&gn(e);const D=e[30]["custom-content"],N=Ke(D,e,e[29],cn);let O=!e[3]&&e[0].actions&&e[0].actions.length&&Sn(e),W=e[3]&&xn(e),R=e[0].dontShowAgain&&An(e),j=e[0].details&&e[0].details.length&&wn(e),L=e[2]&&En(e),F=(e[11]||e[14]>1)&&Gn(e);return{c(){t=tt("div"),n=tt("div"),i=tt("h1"),i.innerHTML='<span class="logo -white -width-70"></span>',l=it(),s=tt("div"),a=tt("button"),o=it(),c=tt("div"),C&&C.c(),r=it(),A&&A.c(),d=it(),T&&T.c(),h=it(),P&&P.c(),u=it(),E&&E.c(),b=it(),N&&N.c(),m=it(),O&&O.c(),g=it(),W&&W.c(),S=it(),R&&R.c(),f=it(),j&&j.c(),v=it(),L&&L.c(),_=it(),F&&F.c(),at(i,"class","nui_logo"),at(a,"class","nui_controls__item -close nui_caption_client g-cursor--pointer"),at(a,"title",p("global.closeModalWindow")),at(s,"class","nui_controls"),at(n,"class","nui_titlebar -toaster nui_caption"),at(c,"class","sve_toaster__main"),dt(c,"-auto-v-scroll",e[10]),at(t,"class",y="sve_toaster -detection "+(e[0].color?"-"+e[0].color:"")),rt(t,"width",e[1]+"px")},m(p,y){Qe(p,t,y),Ze(t,n),Ze(n,i),Ze(n,l),Ze(n,s),Ze(s,a),Ze(t,o),Ze(t,c),C&&C.m(c,null),Ze(c,r),A&&A.m(c,null),Ze(c,d),T&&T.m(c,null),Ze(c,h),P&&P.m(c,null),Ze(c,u),E&&E.m(c,null),Ze(c,b),N&&N.m(c,null),Ze(c,m),O&&O.m(c,null),Ze(c,g),W&&W.m(c,null),Ze(c,S),R&&R.m(c,null),Ze(c,f),j&&j.m(c,null),Ze(t,v),L&&L.m(t,null),Ze(t,_),F&&F.m(t,null),k=!0,I||(x=[st(a,"click",e[19]),Ye(e[24].call(null,t))],I=!0)},p(e,n){e[0].icon?C?C.p(e,n):(C=dn(e),C.c(),C.m(c,r)):C&&(C.d(1),C=null),e[0].title?A?A.p(e,n):(A=bn(e),A.c(),A.m(c,d)):A&&(A.d(1),A=null),T&&T.p&&536870912&n[0]&&qe(T,w,e,e[29],n,null,null),e[0].text?P?P.p(e,n):(P=mn(e),P.c(),P.m(c,u)):P&&(P.d(1),P=null),e[0].actionText?E?E.p(e,n):(E=gn(e),E.c(),E.m(c,b)):E&&(E.d(1),E=null),N&&N.p&&536870912&n[0]&&qe(N,D,e,e[29],n,on,cn),!e[3]&&e[0].actions&&e[0].actions.length?O?O.p(e,n):(O=Sn(e),O.c(),O.m(c,g)):O&&(O.d(1),O=null),e[3]?W?W.p(e,n):(W=xn(e),W.c(),W.m(c,S)):W&&(W.d(1),W=null),e[0].dontShowAgain?R?R.p(e,n):(R=An(e),R.c(),R.m(c,f)):R&&(R.d(1),R=null),e[0].details&&e[0].details.length?j?j.p(e,n):(j=wn(e),j.c(),j.m(c,null)):j&&(j.d(1),j=null),1024&n[0]&&dt(c,"-auto-v-scroll",e[10]),e[2]?L?L.p(e,n):(L=En(e),L.c(),L.m(t,_)):L&&(L.d(1),L=null),e[11]||e[14]>1?F?F.p(e,n):(F=Gn(e),F.c(),F.m(t,null)):F&&(F.d(1),F=null),(!k||1&n[0]&&y!==(y="sve_toaster -detection "+(e[0].color?"-"+e[0].color:"")))&&at(t,"class",y),(!k||2&n[0])&&rt(t,"width",e[1]+"px")},i(e){k||(Dt(T,e),Dt(N,e),k=!0)},o(e){Nt(T,e),Nt(N,e),k=!1},d(e){e&&Je(t),C&&C.d(),A&&A.d(),T&&T.d(e),P&&P.d(),E&&E.d(),N&&N.d(e),O&&O.d(),W&&W.d(),R&&R.d(),j&&j.d(),L&&L.d(),F&&F.d(),I=!1,Ge(x)}}}function dn(e){let t;function n(e,t){return e[0].icon.base64data?un:hn}let i=n(e),l=i(e);return{c(){t=tt("div"),l.c(),at(t,"class","sve_toaster__icon__container")},m(e,n){Qe(e,t,n),l.m(t,null)},p(e,s){i===(i=n(e))&&l?l.p(e,s):(l.d(1),l=i(e),l&&(l.c(),l.m(t,null)))},d(e){e&&Je(t),l.d()}}}function hn(e){let t,n,i,l,s,a,o,c=e[0].icon.color&&pn(e);return{c(){t=tt("kin-icon"),i=it(),l=tt("kin-icon"),a=it(),c&&c.c(),o=lt(),ot(t,"illustration","true"),ot(t,"name",n="ok"==e[0].icon.color?"i-detection-ok":"critical"==e[0].icon.color?"i-detection-critical":""),ot(t,"size","144"),ot(t,"width","264"),ot(t,"class","sve_toaster__icon__bg"),ot(l,"class","sve_toaster__icon"),ot(l,"name",s=e[0].icon.name),ot(l,"size","72")},m(e,n){Qe(e,t,n),Qe(e,i,n),Qe(e,l,n),Qe(e,a,n),c&&c.m(e,n),Qe(e,o,n)},p(e,i){1&i[0]&&n!==(n="ok"==e[0].icon.color?"i-detection-ok":"critical"==e[0].icon.color?"i-detection-critical":"")&&ot(t,"name",n),1&i[0]&&s!==(s=e[0].icon.name)&&ot(l,"name",s),e[0].icon.color?c?c.p(e,i):(c=pn(e),c.c(),c.m(o.parentNode,o)):c&&(c.d(1),c=null)},d(e){e&&Je(t),e&&Je(i),e&&Je(l),e&&Je(a),c&&c.d(e),e&&Je(o)}}}function un(e){let t,n,i;return{c(){t=tt("img"),at(t,"class","kin-img"),at(t,"height","60"),t.src!==(n="data:image/png;base64,"+e[0].icon.base64data)&&at(t,"src",n),at(t,"alt",i=e[0].title)},m(e,n){Qe(e,t,n)},p(e,l){1&l[0]&&t.src!==(n="data:image/png;base64,"+e[0].icon.base64data)&&at(t,"src",n),1&l[0]&&i!==(i=e[0].title)&&at(t,"alt",i)},d(e){e&&Je(t)}}}function pn(e){let t,n;return{c(){t=tt("kin-icon"),ot(t,"class","sve_toaster__icon__status"),ot(t,"name",n="ok"==e[0].icon.color?"icon-s-fill-secured":"icon-s-fill-unsecured"),ot(t,"size","32")},m(e,n){Qe(e,t,n)},p(e,i){1&i[0]&&n!==(n="ok"==e[0].icon.color?"icon-s-fill-secured":"icon-s-fill-unsecured")&&ot(t,"name",n)},d(e){e&&Je(t)}}}function bn(e){let t,n=e[0].title+"";return{c(){t=tt("h2"),at(t,"class","sve_toaster__title h2")},m(e,i){Qe(e,t,i),t.innerHTML=n},p(e,i){1&i[0]&&n!==(n=e[0].title+"")&&(t.innerHTML=n)},d(e){e&&Je(t)}}}function mn(e){let t,n=e[0].text+"";return{c(){t=tt("p"),at(t,"class","sve_toaster__text p")},m(e,i){Qe(e,t,i),t.innerHTML=n},p(e,i){1&i[0]&&n!==(n=e[0].text+"")&&(t.innerHTML=n)},d(e){e&&Je(t)}}}function gn(e){let t,n,i=e[0].actionText+"";return{c(){t=tt("p"),n=nt(i),at(t,"class","sve_toaster__text p -small -secondary")},m(e,i){Qe(e,t,i),Ze(t,n)},p(e,t){1&t[0]&&i!==(i=e[0].actionText+"")&&ct(n,i)},d(e){e&&Je(t)}}}function Sn(e){let t,n,i,l,s,a,o,c,r,d,h,u,p=e[0].actions[0].label+"",b=null!=e[9]&&fn(e),m=1===e[0].actions.length&&e[14]>1&&e[15]&&vn(e);function g(e,t){return 2!==e[0].actions.length||e[0].hideSecondAction?e[0].actions.length>2||e[0].hideSecondAction&&e[0].actions.length>1?_n:void 0:yn}let S=g(e),f=S&&S(e),v=e[0].errorText&&In(e);return{c(){t=tt("div"),n=tt("kin-button"),i=tt("span"),l=nt(p),s=it(),b&&b.c(),o=it(),m&&m.c(),c=it(),f&&f.c(),r=it(),v&&v.c(),d=lt(),ot(n,"processing",e[8]),ot(n,"data-test",a="dd_primary_"+e[0].actions[0].labelTest||"dd_primary_btn"),at(t,"class","sve_toaster__btns")},m(a,p){Qe(a,t,p),Ze(t,n),Ze(n,i),Ze(i,l),Ze(i,s),b&&b.m(i,null),Ze(t,o),m&&m.m(t,null),Ze(t,c),f&&f.m(t,null),Qe(a,r,p),v&&v.m(a,p),Qe(a,d,p),h||(u=st(n,"click",e[31]),h=!0)},p(e,s){1&s[0]&&p!==(p=e[0].actions[0].label+"")&&ct(l,p),null!=e[9]?b?b.p(e,s):(b=fn(e),b.c(),b.m(i,null)):b&&(b.d(1),b=null),256&s[0]&&ot(n,"processing",e[8]),1&s[0]&&a!==(a="dd_primary_"+e[0].actions[0].labelTest||"dd_primary_btn")&&ot(n,"data-test",a),1===e[0].actions.length&&e[14]>1&&e[15]?m?m.p(e,s):(m=vn(e),m.c(),m.m(t,c)):m&&(m.d(1),m=null),S===(S=g(e))&&f?f.p(e,s):(f&&f.d(1),f=S&&S(e),f&&(f.c(),f.m(t,null))),e[0].errorText?v?v.p(e,s):(v=In(e),v.c(),v.m(d.parentNode,d)):v&&(v.d(1),v=null)},d(e){e&&Je(t),b&&b.d(),m&&m.d(),f&&f.d(),e&&Je(r),v&&v.d(e),e&&Je(d),h=!1,u()}}}function fn(e){let t,n,i;return{c(){t=nt("("),n=nt(e[9]),i=nt(")")},m(e,l){Qe(e,t,l),Qe(e,n,l),Qe(e,i,l)},p(e,t){512&t[0]&&ct(n,e[9])},d(e){e&&Je(t),e&&Je(n),e&&Je(i)}}}function vn(e){let t,n,i,l,s,a,o,c=p("detection.action.closeAll")+"";return{c(){t=tt("kin-button"),n=nt(c),i=nt("\n\t\t\t\t\t\t\t("),l=nt(e[14]),s=nt(")"),ot(t,"class","g-margin-left--10"),ot(t,"kin-disabled",e[8]),ot(t,"data-test","closeAll"),ot(t,"type","secondary")},m(c,r){Qe(c,t,r),Ze(t,n),Ze(t,i),Ze(t,l),Ze(t,s),a||(o=st(t,"click",e[19]),a=!0)},p(e,n){16384&n[0]&&ct(l,e[14]),256&n[0]&&ot(t,"kin-disabled",e[8])},d(e){e&&Je(t),a=!1,o()}}}function _n(e){let t,n,i,l,s,a,o,c,r=p("global.moreOptions")+"",d=e[0].actions,h=[];for(let u=0;u<d.length;u+=1)h[u]=kn(an(e,d,u));return{c(){t=tt("kin-dropdown"),n=tt("div"),i=tt("kin-button"),l=nt(r),s=it(),a=tt("kin-icon"),o=it(),c=tt("div");for(let e=0;e<h.length;e+=1)h[e].c();ot(a,"class","g-margin-left--5"),ot(a,"name","icon-s-controls-arrow-down"),ot(a,"size","16"),ot(i,"type","secondary"),ot(i,"data-test","dd_dropdown_btn"),at(n,"slot","dropdown-activator"),ot(t,"class","g-margin-left--10")},m(e,r){Qe(e,t,r),Ze(t,n),Ze(n,i),Ze(i,l),Ze(i,s),Ze(i,a),Ze(t,o),Ze(t,c);for(let t=0;t<h.length;t+=1)h[t].m(c,null)},p(e,t){if(8388609&t[0]){let n;for(d=e[0].actions,n=0;n<d.length;n+=1){const i=an(e,d,n);h[n]?h[n].p(i,t):(h[n]=kn(i),h[n].c(),h[n].m(c,null))}for(;n<h.length;n+=1)h[n].d(1);h.length=d.length}},d(e){e&&Je(t),et(h,e)}}}function yn(e){let t,n,i,l,s,a=e[0].actions[1].label+"";return{c(){t=tt("kin-button"),n=nt(a),ot(t,"class","g-margin-left--10"),ot(t,"kin-disabled",e[8]),ot(t,"data-test",i="dd_secondary_"+e[0].actions[1].labelTest||"dd_secondary_btn"),ot(t,"type","secondary")},m(i,a){Qe(i,t,a),Ze(t,n),l||(s=st(t,"click",e[32]),l=!0)},p(e,l){1&l[0]&&a!==(a=e[0].actions[1].label+"")&&ct(n,a),256&l[0]&&ot(t,"kin-disabled",e[8]),1&l[0]&&i!==(i="dd_secondary_"+e[0].actions[1].labelTest||"dd_secondary_btn")&&ot(t,"data-test",i)},d(e){e&&Je(t),l=!1,s()}}}function kn(e){let t,n=0!==e[57]&&function(e){let t,n,i,l,s,a,o=e[55].label+"";function c(){return e[33](e[57])}return{c(){t=tt("kin-dropdown-item"),n=nt(o),i=it(),ot(t,"data-test",l="dd_dropdown_"+e[55].labelTest||"dd_dropdown_"+e[57])},m(e,l){Qe(e,t,l),Ze(t,n),Ze(t,i),s||(a=st(t,"click",c),s=!0)},p(i,s){e=i,1&s[0]&&o!==(o=e[55].label+"")&&ct(n,o),1&s[0]&&l!==(l="dd_dropdown_"+e[55].labelTest||"dd_dropdown_"+e[57])&&ot(t,"data-test",l)},d(e){e&&Je(t),s=!1,a()}}}(e);return{c(){n&&n.c(),t=lt()},m(e,i){n&&n.m(e,i),Qe(e,t,i)},p(e,t){0!==e[57]&&n.p(e,t)},d(e){n&&n.d(e),e&&Je(t)}}}function In(e){let t,n,i=e[0].errorText+"";return{c(){t=tt("p"),n=nt(i),at(t,"class","g-margin-top--5 g-margin-bottom--10 p -small -secondary -text color-danger")},m(e,i){Qe(e,t,i),Ze(t,n)},p(e,t){1&t[0]&&i!==(i=e[0].errorText+"")&&ct(n,i)},d(e){e&&Je(t)}}}function xn(e){let t,n,i,l=(e[5]||e[4]&&e[4].text)&&Cn(e);return{c(){t=tt("div"),n=tt("kin-progress"),i=it(),l&&l.c(),ot(n,"percentage","-1"),at(t,"class","sve_toaster__progress")},m(e,s){Qe(e,t,s),Ze(t,n),Ze(t,i),l&&l.m(t,null)},p(e,n){e[5]||e[4]&&e[4].text?l?l.p(e,n):(l=Cn(e),l.c(),l.m(t,null)):l&&(l.d(1),l=null)},d(e){e&&Je(t),l&&l.d()}}}function Cn(e){let t,n,i=(e[5]||e[4].text)+"";return{c(){t=tt("p"),n=nt(i),at(t,"class","g-margin-top--10 p -small -secondary")},m(e,i){Qe(e,t,i),Ze(t,n)},p(e,t){48&t[0]&&i!==(i=(e[5]||e[4].text)+"")&&ct(n,i)},d(e){e&&Je(t)}}}function An(e){let t,n,i,l,s,a,o,c=e[0].dontShowAgain.label+"";return{c(){t=tt("p"),n=tt("input"),i=it(),l=tt("label"),s=nt(c),at(n,"type","checkbox"),at(n,"id","detection_dontShowAgain"),at(n,"class","checkbox"),at(l,"for","detection_dontShowAgain"),at(l,"class","g-margin-left--5"),at(t,"class","sve_toaster__text p g-margin-top--10")},m(c,r){Qe(c,t,r),Ze(t,n),Ze(t,i),Ze(t,l),Ze(l,s),a||(o=st(n,"click",e[34]),a=!0)},p(e,t){1&t[0]&&c!==(c=e[0].dontShowAgain.label+"")&&ct(s,c)},d(e){e&&Je(t),a=!1,o()}}}function wn(e){let t,n,i;function l(e,t){return e[2]?Pn:Tn}let s=l(e),a=s(e);return{c(){t=tt("button"),a.c(),at(t,"class","span -small -secondary g-cursor--pointer g-margin-top--10"),at(t,"data-test","btn_toggleDetails")},m(l,s){Qe(l,t,s),a.m(t,null),n||(i=st(t,"click",e[20]),n=!0)},p(e,n){s===(s=l(e))&&a?a.p(e,n):(a.d(1),a=s(e),a&&(a.c(),a.m(t,null)))},d(e){e&&Je(t),a.d(),n=!1,i()}}}function Tn(e){let t,n,i,l=p("global.showDetails")+"";return{c(){t=nt(l),n=it(),i=tt("kin-icon"),ot(i,"name","icon-s-controls-arrow-down"),ot(i,"size","16")},m(e,l){Qe(e,t,l),Qe(e,n,l),Qe(e,i,l)},p:He,d(e){e&&Je(t),e&&Je(n),e&&Je(i)}}}function Pn(e){let t,n,i,l=p("global.hideDetails")+"";return{c(){t=nt(l),n=it(),i=tt("kin-icon"),ot(i,"name","icon-s-controls-arrow-up"),ot(i,"size","16")},m(e,l){Qe(e,t,l),Qe(e,n,l),Qe(e,i,l)},p:He,d(e){e&&Je(t),e&&Je(n),e&&Je(i)}}}function En(e){let t,n,i,l,s,a=e[0].details,o=[];for(let h=0;h<a.length;h+=1)o[h]=Wn(sn(e,a,h));let c=e[4]&&Rn(e),r=e[6]&&Ln(e),d=e[7]&&Fn(e);return{c(){t=tt("div"),n=tt("dl");for(let e=0;e<o.length;e+=1)o[e].c();i=lt(),c&&c.c(),l=lt(),r&&r.c(),s=lt(),d&&d.c(),at(n,"class","desclist -short"),at(t,"class","sve_toaster__details")},m(e,a){Qe(e,t,a),Ze(t,n);for(let t=0;t<o.length;t+=1)o[t].m(n,null);Ze(n,i),c&&c.m(n,null),Ze(n,l),r&&r.m(n,null),Ze(n,s),d&&d.m(n,null)},p(e,t){if(1&t[0]){let l;for(a=e[0].details,l=0;l<a.length;l+=1){const s=sn(e,a,l);o[l]?o[l].p(s,t):(o[l]=Wn(s),o[l].c(),o[l].m(n,i))}for(;l<o.length;l+=1)o[l].d(1);o.length=a.length}e[4]?c?c.p(e,t):(c=Rn(e),c.c(),c.m(n,l)):c&&(c.d(1),c=null),e[6]?r?r.p(e,t):(r=Ln(e),r.c(),r.m(n,s)):r&&(r.d(1),r=null),e[7]?d?d.p(e,t):(d=Fn(e),d.c(),d.m(n,null)):d&&(d.d(1),d=null)},d(e){e&&Je(t),et(o,e),c&&c.d(),r&&r.d(),d&&d.d()}}}function Dn(e){let t,n,i,l=e[52].title+"";function s(e,t){return"scoreMeter"===e[52].type&&4>e[52].value?On:Nn}let a=s(e),o=a(e);return{c(){t=tt("dt"),n=nt(l),o.c(),i=lt()},m(e,l){Qe(e,t,l),Ze(t,n),o.m(e,l),Qe(e,i,l)},p(e,t){1&t[0]&&l!==(l=e[52].title+"")&&ct(n,l),a===(a=s(e))&&o?o.p(e,t):(o.d(1),o=a(e),o&&(o.c(),o.m(i.parentNode,i)))},d(e){e&&Je(t),o.d(e),e&&Je(i)}}}function Nn(e){let t,n,i,l=e[52].value+"";return{c(){t=tt("dd"),n=nt(l),at(t,"data-test",i=e[52].testValue)},m(e,i){Qe(e,t,i),Ze(t,n)},p(e,s){1&s[0]&&l!==(l=e[52].value+"")&&ct(n,l),1&s[0]&&i!==(i=e[52].testValue)&&at(t,"data-test",i)},d(e){e&&Je(t)}}}function On(e){let t,n,i,l,s,a,o,c,r;return{c(){t=tt("dd"),n=tt("div"),i=tt("div"),l=it(),s=tt("div"),a=it(),o=tt("div"),r=it(),at(n,"class",c="scoremeter -val-"+e[52].value)},m(e,c){Qe(e,t,c),Ze(t,n),Ze(n,i),Ze(n,l),Ze(n,s),Ze(n,a),Ze(n,o),Ze(t,r)},p(e,t){1&t[0]&&c!==(c="scoremeter -val-"+e[52].value)&&at(n,"class",c)},d(e){e&&Je(t)}}}function Wn(e){let t,n=e[52].value&&Dn(e);return{c(){n&&n.c(),t=lt()},m(e,i){n&&n.m(e,i),Qe(e,t,i)},p(e,i){e[52].value?n?n.p(e,i):(n=Dn(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&Je(t)}}}function Rn(e){let t,n,i,l,s,a=e[4].text+"",o=e[4].action&&jn(e);return{c(){t=tt("dt"),t.textContent=`${p("global.status")}`,n=tt("dd"),i=nt(a),l=it(),o&&o.c(),s=it(),at(n,"data-test","status")},m(e,a){Qe(e,t,a),Qe(e,n,a),Ze(n,i),Ze(n,l),o&&o.m(n,null),Ze(n,s)},p(e,t){16&t[0]&&a!==(a=e[4].text+"")&&ct(i,a),e[4].action?o?o.p(e,t):(o=jn(e),o.c(),o.m(n,s)):o&&(o.d(1),o=null)},d(e){e&&Je(t),e&&Je(n),o&&o.d()}}}function jn(e){let t,n,i,l,s,a,o=e[4].actionLabel+"";return{c(){t=nt("| "),n=tt("button"),i=nt(o),at(n,"class","a"),at(n,"data-test",l="scn_"+e[4].actionLabelGa)},m(l,o){Qe(l,t,o),Qe(l,n,o),Ze(n,i),s||(a=st(n,"click",e[21]),s=!0)},p(e,t){16&t[0]&&o!==(o=e[4].actionLabel+"")&&ct(i,o),16&t[0]&&l!==(l="scn_"+e[4].actionLabelGa)&&at(n,"data-test",l)},d(e){e&&Je(t),e&&Je(n),s=!1,a()}}}function Ln(e){let t,n,i,l,s,a,o,c,r=e[6].text+"";return{c(){t=tt("dt"),t.textContent=`${p("global.option")}`,n=tt("dd"),i=tt("button"),l=nt(r),a=it(),at(i,"class","a"),at(i,"data-test",s="scn_"+e[6].actionLabelGa),at(n,"data-test","option")},m(s,r){Qe(s,t,r),Qe(s,n,r),Ze(n,i),Ze(i,l),Ze(n,a),o||(c=st(i,"click",e[22]),o=!0)},p(e,t){64&t[0]&&r!==(r=e[6].text+"")&&ct(l,r),64&t[0]&&s!==(s="scn_"+e[6].actionLabelGa)&&at(i,"data-test",s)},d(e){e&&Je(t),e&&Je(n),o=!1,c()}}}function Fn(e){let t,n=e[7],i=[];for(let l=0;l<n.length;l+=1)i[l]=Bn(ln(e,n,l));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=lt()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);Qe(e,t,n)},p(e,l){if(33554560&l[0]){let s;for(n=e[7],s=0;s<n.length;s+=1){const a=ln(e,n,s);i[s]?i[s].p(a,l):(i[s]=Bn(a),i[s].c(),i[s].m(t.parentNode,t))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},d(e){et(i,e),e&&Je(t)}}}function $n(e){let t;return{c(){t=tt("dt"),t.textContent=`${p("global.options")}`},m(e,n){Qe(e,t,n)},p:He,d(e){e&&Je(t)}}}function Mn(e){let t,n,i=e[49].title+"";return{c(){t=tt("dt"),n=nt(i)},m(e,i){Qe(e,t,i),Ze(t,n)},p(e,t){128&t[0]&&i!==(i=e[49].title+"")&&ct(n,i)},d(e){e&&Je(t)}}}function Hn(e){let t,n,i,l,s,a,o,c,r,d=e[49].label+"";function h(){return e[35](e[49])}return{c(){t=tt("input"),l=it(),s=tt("label"),a=nt(d),at(t,"type","checkbox"),at(t,"class","checkbox"),t.checked=n=e[49].value,at(t,"id",i="form_checkbox_"+e[49].valueName),at(s,"for",o="form_checkbox_"+e[49].valueName),at(s,"class","g-margin-left--5")},m(e,n){Qe(e,t,n),Qe(e,l,n),Qe(e,s,n),Ze(s,a),c||(r=st(t,"click",h),c=!0)},p(l,c){e=l,128&c[0]&&n!==(n=e[49].value)&&(t.checked=n),128&c[0]&&i!==(i="form_checkbox_"+e[49].valueName)&&at(t,"id",i),128&c[0]&&d!==(d=e[49].label+"")&&ct(a,d),128&c[0]&&o!==(o="form_checkbox_"+e[49].valueName)&&at(s,"for",o)},d(e){e&&Je(t),e&&Je(l),e&&Je(s),c=!1,r()}}}function Un(e){let t,n,i,l=e[49].label+"";return{c(){t=tt("label"),n=nt(l),at(t,"for",i="form_checkbox_"+e[49].valueName)},m(e,i){Qe(e,t,i),Ze(t,n)},p(e,s){128&s[0]&&l!==(l=e[49].label+"")&&ct(n,l),128&s[0]&&i!==(i="form_checkbox_"+e[49].valueName)&&at(t,"for",i)},d(e){e&&Je(t)}}}function Bn(e){let t,n,i;function l(e,t){return e[49].title?Mn:$n}let s=l(e),a=s(e),o="checkbox"===e[49].type&&Hn(e),c="label"===e[49].type&&Un(e);return{c(){a.c(),t=tt("dd"),o&&o.c(),n=it(),c&&c.c(),i=it()},m(e,l){a.m(e,l),Qe(e,t,l),o&&o.m(t,null),Ze(t,n),c&&c.m(t,null),Ze(t,i)},p(e,r){s===(s=l(e))&&a?a.p(e,r):(a.d(1),a=s(e),a&&(a.c(),a.m(t.parentNode,t))),"checkbox"===e[49].type?o?o.p(e,r):(o=Hn(e),o.c(),o.m(t,n)):o&&(o.d(1),o=null),"label"===e[49].type?c?c.p(e,r):(c=Un(e),c.c(),c.m(t,i)):c&&(c.d(1),c=null)},d(e){a.d(e),e&&Je(t),o&&o.d(),c&&c.d()}}}function Gn(e){let t,n,i,l,s=e[11]&&Vn(e),a=e[14]>1&&zn(e);return{c(){t=tt("div"),n=tt("div"),s&&s.c(),i=it(),l=tt("div"),a&&a.c(),at(t,"class","sve_toaster__footer")},m(e,o){Qe(e,t,o),Ze(t,n),s&&s.m(n,null),Ze(t,i),Ze(t,l),a&&a.m(l,null)},p(e,t){e[11]?s?s.p(e,t):(s=Vn(e),s.c(),s.m(n,null)):s&&(s.d(1),s=null),e[14]>1?a?a.p(e,t):(a=zn(e),a.c(),a.m(l,null)):a&&(a.d(1),a=null)},d(e){e&&Je(t),s&&s.d(),a&&a.d()}}}function Vn(e){let t,n,i,l,s,a,o,c,r,d,h,u,b=e[12]?"/"+e[12]:"";return{c(){t=tt("span"),n=nt(e[11]),i=nt(b),l=it(),s=tt("kin-tooltip"),a=tt("span"),a.innerHTML='<kin-icon name="icon-m-action-info" size="20"></kin-icon>',o=it(),c=tt("div"),r=tt("h4"),r.textContent=`${p("detection.alertid.title")}`,d=it(),h=tt("p"),h.textContent=`${p("detection.alertid.desc")}`,u=tt("p"),at(t,"class","span -small -secondary"),at(t,"data-test","dd_alertid_text"),at(a,"slot","tooltip-activator"),at(r,"class","h4 -margins"),at(h,"class","p -small"),at(c,"slot","tooltip"),ot(s,"severity","highlight")},m(e,p){Qe(e,t,p),Ze(t,n),Ze(t,i),Qe(e,l,p),Qe(e,s,p),Ze(s,a),Ze(s,o),Ze(s,c),Ze(c,r),Ze(c,d),Ze(c,h),Ze(c,u)},p(e,t){2048&t[0]&&ct(n,e[11]),4096&t[0]&&b!==(b=e[12]?"/"+e[12]:"")&&ct(i,b)},d(e){e&&Je(t),e&&Je(l),e&&Je(s)}}}function zn(e){let t,n,i,l,s,a,o,c,r,d,h,u,b,m=e[13]+1+"";return{c(){t=tt("span"),t.textContent=`${p("detection.more.detections")}`,n=it(),i=tt("kin-button"),l=tt("kin-icon"),s=it(),a=nt(m),o=nt("\n\t\t\t\t\t\t/\n\t\t\t\t\t\t"),c=tt("kin-button"),r=nt(e[14]),d=it(),h=tt("kin-icon"),at(t,"class","span -small -secondary"),ot(l,"name","icon-s-controls-arrow-left"),ot(l,"size","16"),ot(l,"rtlflip","true"),ot(i,"type","blank"),ot(i,"size","small"),ot(i,"class","sve_toaster__paginator g-margin-left--5"),ot(i,"data-test","dd_prev_btn"),ot(h,"name","icon-s-controls-arrow-right"),ot(h,"size","16"),ot(h,"rtlflip","true"),ot(c,"type","blank"),ot(c,"size","small"),ot(c,"class","sve_toaster__paginator"),ot(c,"data-test","dd_next_btn")},m(p,m){Qe(p,t,m),Qe(p,n,m),Qe(p,i,m),Ze(i,l),Ze(i,s),Ze(i,a),Qe(p,o,m),Qe(p,c,m),Ze(c,r),Ze(c,d),Ze(c,h),u||(b=[st(i,"click",e[17]),st(c,"click",e[18])],u=!0)},p(e,t){8192&t[0]&&m!==(m=e[13]+1+"")&&ct(a,m),16384&t[0]&&ct(r,e[14])},d(e){e&&Je(t),e&&Je(n),e&&Je(i),e&&Je(o),e&&Je(c),u=!1,Ge(b)}}}function Kn(e){let t,n,i,l,s=e[0]&&rn(e);return{c(){s&&s.c(),t=lt()},m(a,o){s&&s.m(a,o),Qe(a,t,o),n=!0,i||(l=st(nn,"keydown",e[16]),i=!0)},p(e,n){e[0]?s?(s.p(e,n),1&n[0]&&Dt(s,1)):(s=rn(e),s.c(),Dt(s,1),s.m(t.parentNode,t)):s&&(Pt(),Nt(s,1,1,(()=>{s=null})),Et())},i(e){n||(Dt(s),n=!0)},o(e){Nt(s),n=!1},d(e){s&&s.d(e),e&&Je(t),i=!1,l()}}}function Xn(e,t,n){let i,l,o,c,d,h,u,{$$slots:p={},$$scope:m}=t;const g=mt();let S,f,v,_,y,k,{windowWidth:I=600}=t,{config:x=null}=t,{windowClose:C=null}=t,A=!1,w=null,T=null,P=!1,E=!1,D=!1,N=!1;var O;function W(e=!1){const t=x&&x.closeResponse;C?C(t):(g("close",t),(e||h<=1)&&a.close())}function R(e){j(x.actions[e],e)}function j(e,t){const i=e.action&&e.action(),l=Date.now();if(T&&T(),null==i)null==e.nextConfig?W():L(e.nextConfig,l,e.minDuration);else{const s=1===t&&2===x.actions.length&&!x.hideSecondAction;e.status||0!==t&&!s?(n(4,S=e.status),n(5,f=void 0),n(6,v=e.option),n(3,P=!0)):n(8,E=!0),i.then((t=>{L(t,l,e.minDuration)})).catch((t=>{L(t,l,e.minDuration)}))}e.labelGa&&s.event("DetectionDialog","Click",e.labelGa)}function L(e,t,i){const l=Math.max(i-(Date.now()-t),0);if(w&&w(),l>0){const t=window.setTimeout((()=>{!e&&h>0?W():n(0,x=e),w&&w()}),l);w=()=>{window.clearTimeout(t),w=null}}else!e&&h>0?W():n(0,x=e)}function F(e){e?(n(3,P=x.progress),n(4,S=x.status),n(5,f=x.progressStatusText),n(6,v=x.option),n(7,_=x.formItems),n(8,E=!1),function(){if(T&&T(),x.actions&&x.actions.length&&x.actions[0].countdown){n(9,y=x.actions[0].countdown);const e=window.setInterval((function(){y?n(9,y--,y):j(x.actions[0],0)}),1e3);T=function(){window.clearInterval(e),n(9,y=null),T=null}}}()):W()}function $(e){const t=Math.max(400,e.scrollHeight);N&&(N=!1,n(10,D=t>window.screen.availHeight)),a.resize(I,Math.min(t,window.screen.availHeight))}function M(e){e.value=!e.value,g("formItemUpdated",e)}bt((()=>{r.play("threat")})),O=()=>{w&&w(),T&&T(),k&&k.cancel()},pt().$$.on_destroy.push(O);return e.$$set=e=>{"windowWidth"in e&&n(1,I=e.windowWidth),"config"in e&&n(0,x=e.config),"windowClose"in e&&n(26,C=e.windowClose),"$$scope"in e&&n(29,m=e.$$scope)},e.$$.update=()=>{1&e.$$.dirty[0]&&F(x),1&e.$$.dirty[0]&&n(27,i=x&&x.trackerTitle),134217728&e.$$.dirty[0]&&function(e){const t=a.getUrlParams();null!=e&&s.view(t.module+"_"+t.view+(e?"_"+e:""))}(i),1&e.$$.dirty[0]&&n(28,l=x&&x.detectionInfo||{}),268435456&e.$$.dirty[0]&&n(11,o=l.id||""),268435456&e.$$.dirty[0]&&n(12,c=l.timestamp&&b(l.timestamp).format("YYMMDD.HHmmZZ")||""),268435456&e.$$.dirty[0]&&n(13,d=l.index||0),268435456&e.$$.dirty[0]&&n(14,h=l.total||0),268435456&e.$$.dirty[0]&&n(15,u=l.showCloseAllBtn||!1)},[x,I,A,P,S,f,v,_,E,y,D,o,c,d,h,u,function(e){const t=x.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 j(t,n),!0}))},function(){g("prev")},function(){g("next")},function(){!function(e=!1){s.event("DetectionDialog","Close"),g("ignore"),W(e)}(!0)},function(){n(2,A=!A),N=!0},function(){const e=S.actionLabelGa,t=S.action;e&&s.event("DetectionDialog","Click",e),"function"==typeof t?t():console.error("[SvelteComponents] {DetectionDialog} StatusAction is not function")},function(){const e=v.actionLabelGa,t=v.action;e&&s.event("DetectionDialog","Click",e),"function"==typeof t?t():console.error("[SvelteComponents] {DetectionDialog} OptionAction is not function")},R,function(e){$(e),k=tn($.bind(this,e),25);const t=new MutationObserver(k);return t.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),{destroy:t.disconnect.bind(t)}},M,C,i,l,m,p,()=>R(0),()=>R(1),e=>R(e),e=>x.dontShowAgain.action(e.target.checked),e=>M(e)]}class qn extends $t{constructor(e){super(),Ft(this,e,Xn,Kn,ze,{windowWidth:1,config:0,windowClose:26},[-1,-1])}}function Yn(e){let t,n;return t=new qn({props:{config:e[2],windowClose:e[0].close.action,$$slots:{default:[Qn]},$$scope:{ctx:e}}}),{c(){Wt(t.$$.fragment)},m(e,i){Rt(t,e,i),n=!0},p(e,n){const i={};4&n&&(i.config=e[2]),1&n&&(i.windowClose=e[0].close.action),67108874&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Dt(t.$$.fragment,e),n=!0)},o(e){Nt(t.$$.fragment,e),n=!1},d(e){jt(t,e)}}}function Zn(e){let t,n,i,l,s;return{c(){t=tt("kin-input"),n=it(),i=tt("kin-input"),ot(t,"size","large"),ot(t,"formrow",""),ot(t,"label",p("detection.cyberCapture.addDetails.url.title")+" ("+p("global.optional")+")"),ot(t,"placeholder",p("detection.cyberCapture.addDetails.url.placeholder")),ot(i,"type","textarea"),ot(i,"formrow",""),ot(i,"size","large"),ot(i,"label",p("detection.cyberCapture.addDetails.info.title")+" ("+p("global.optional")+")"),ot(i,"placeholder",p("detection.cyberCapture.addDetails.info.placeholder"))},m(a,o){Qe(a,t,o),Qe(a,n,o),Qe(a,i,o),l||(s=[st(t,"input",e[5]),Ye(ei.call(null,t)),st(i,"input",e[6])],l=!0)},p:He,d(e){e&&Je(t),e&&Je(n),e&&Je(i),l=!1,Ge(s)}}}function Qn(e){let t,n=e[3]&&Zn(e);return{c(){n&&n.c(),t=lt()},m(e,i){n&&n.m(e,i),Qe(e,t,i)},p(e,i){e[3]?n?n.p(e,i):(n=Zn(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&Je(t)}}}function Jn(e){let t,n,i=e[2]&&Yn(e);return{c(){i&&i.c(),t=lt()},m(e,l){i&&i.m(e,l),Qe(e,t,l),n=!0},p(e,[n]){e[2]?i?(i.p(e,n),4&n&&Dt(i,1)):(i=Yn(e),i.c(),Dt(i,1),i.m(t.parentNode,t)):i&&(Pt(),Nt(i,1,1,(()=>{i=null})),Et())},i(e){n||(Dt(i),n=!0)},o(e){Nt(i),n=!1},d(e){i&&i.d(e),e&&Je(t)}}}function ei(e){e.focus()}function ti(e,t,l){const s="scanning",o="scanned",c="resolved",r="movedToChest",h="deleted",b="sentForAnalysis",g="analysed",S="error",f=[c,r,h,S],v={close:{label:p("global.close"),labelGa:"close",labelTest:"btn_close",countdown:30},confirmOpenAnyway:{label:p("detection.cyberCapture.action.openAnyway"),action:()=>Promise.resolve({color:"white",icon:{name:"icon-m-scan-file",color:"white"},title:p("detection.cyberCapture.openAnyway.title"),text:p("detection.cyberCapture.openAnyway.desc",y.fileName),actions:[v.keepBlocking,v.openAnyway],trackerTitle:"openAnywayConfirmation"}),labelGa:"confirmOpenAnyway",labelTest:"btn_confirmOpenAnyway"},openAnyway:{label:p("detection.cyberCapture.action.openAnyway"),action:()=>i("app.av.detections.UserChoice",{id:_,userChoice:"open"}).catch((e=>{console.error("CyberCapture: opening the file failed",e)})),labelGa:"openAnyway",labelTest:"btn_openAnyway"},keepBlocking:{label:p("detection.action.keepBlocking"),labelGa:"keepBlocking",labelTest:"btn_keepBlocking"},goToFile:{label:p("global.goToFile"),action(){const e=y.filePath.substring(0,y.filePath.lastIndexOf("\\"));return i("app.utils.BrowseFolder",e)},labelGa:"goToFile",labelTest:"btn_goToFile"},openChest:{label:p("viruschest.open"),action:()=>a.openMainWindow({route:"VirusChest"}),labelGa:"openChest",labelTest:"btn_openChest"},resolve:{label:p("global.resolve"),action:R.bind(null,"resolve"),labelGa:"resolve",labelTest:"btn_resolve"},moveToChest:{label:p("detection.action.chest"),action:R.bind(null,"moveToChest"),labelGa:"moveToChest",labelTest:"btn_moveToChest"},delete:{label:p("global.delete"),action:R.bind(null,"delete"),labelGa:"delete",labelTest:"btn_delete"},sendForAnalysis:{label:p("detection.cyberCapture.action.sendForAnalysis"),minDuration:1e3,action:()=>(l(2,C.progress=!0,C),new Promise((e=>{x=function(){e({color:"white",icon:{name:"icon-m-scan-file",color:"white"},title:p("detection.cyberCapture.sentForAnalysis.manually.title"),text:p("detection.cyberCapture.sentForAnalysis.manually.desc",y.fileName),actions:[v.addDetails,v.close],details:I,trackerTitle:"manuallySentForAnalysis"})},i("app.av.detections.UserChoice",{id:_,userChoice:"sendForAnalysis"})}))),labelGa:"sendForAnalysis",labelTest:"btn_sendForAnalysis"},addDetails:{label:p("global.addDetails"),action:()=>(l(3,A=!0),Promise.resolve({color:"white",title:p("detection.cyberCapture.addDetails.title"),actions:[v.sendDetails,v.close],trackerTitle:"addDetails"})),labelGa:"addDetails",labelTest:"btn_addDetails"},sendDetails:{label:p("global.add"),action(){const e={programName:y.filePath,description:k.info,url:k.url};return l(3,A=!1),i("app.detections.cyber_capture_send_details",e).catch((()=>{})).then((()=>({color:"green",icon:{name:"icon-m-scan-file",color:"ok"},title:p("detection.cyberCapture.addDetails.thankYou"),actions:[v.close],trackerTitle:"thanksForDetails"})))},labelGa:"sendDetails",labelTest:"btn_sendDetails"}},_=a.getUrlParams().id,y={},k={};let I,x,C=null,A=!1,w=!1,T=60,P=null,E=!1;function D(e){e.id===_&&(e.state===o&&(w=!0),e.filePath=e.filePath||e.path,e.fileSize=e.fileSize||e.filesize,y.filePath!==e.filePath&&(y.fileName=e.filePath.substring(e.filePath.lastIndexOf("\\")+1)),Object.assign(y,e),function(){if(I&&4===I.length)return;I=[{title:p("global.fileName"),value:u.escapeHtml(y.fileName),testValue:"fileName"},{title:p("global.filePath"),value:u.escapeHtml(y.filePath),testValue:"filePath"},{title:p("global.detectedBy"),value:p("cyberCapture"),testValue:"detectedBy"}],y.fileSize&&I.splice(2,0,{title:p("global.fileSize"),value:m.formatBytes(y.fileSize),testValue:"fileSize"})}(),x?(x(),x=null):function(){if(f.includes(y.state))return void l(2,C=W());l(2,C={}),l(2,C.details=I,C),l(2,C.icon={name:"icon-m-scan-file",color:"white"},C),(y.state!==s||T<=0)&&N();if(y.state===s){l(2,C.color="white",C),l(2,C.title=p("detection.cyberCapture.scanning.title"),C);let e="detection.cyberCapture.scanning.desc";E&&(e+=".ask"),l(2,C.text=p(e,y.fileName),C),l(2,C.progress=!0,C),T>0&&(P=setInterval(O,1e3)),l(2,C.status={text:p("global.scanning")},C),l(2,C.trackerTitle="scanning",C)}else y.state===o&&null==y.threatDetected?(l(2,C.color="red",C),l(2,C.icon.color="critical",C),l(2,C.title=p("detection.cyberCapture.scanned.needsAnalysis.title"),C),l(2,C.text=p("detection.cyberCapture.scanned.needsAnalysis.desc",y.fileName),C),l(2,C.actions=[v.sendForAnalysis,v.moveToChest,v.confirmOpenAnyway],C),l(2,C.trackerTitle="needsAnalysis",C)):y.state!==o||y.threatDetected?y.state===o&&y.threatDetected?(l(2,C.color="red",C),l(2,C.icon.color="critical",C),l(2,C.title=p("detection.cyberCapture.scanned.threatDetected.title"),C),l(2,C.text=p("detection.cyberCapture.scanned.threatDetected.desc",y.fileName),C),l(2,C.actions=[v.resolve,v.moveToChest,v.delete],C),l(2,C.trackerTitle="threatDetected",C)):y.state===b?(l(2,C.color="red",C),l(2,C.icon.color="critical",C),l(2,C.title=p("detection.cyberCapture.sentForAnalysis.automatically.title"),C),l(2,C.text=p("detection.cyberCapture.sentForAnalysis.automatically.desc",y.fileName),C),l(2,C.actions=[v.close,v.moveToChest,v.confirmOpenAnyway],C),l(2,C.trackerTitle="automaticallySentForAnalysis",C)):y.state!==g||y.threatDetected?y.state===g&&y.threatDetected&&(l(2,C.color="red",C),l(2,C.icon.color="critical",C),l(2,C.title=p("detection.cyberCapture.analysed.threatDetected.title"),C),l(2,C.text=p("detection.cyberCapture.analysed.threatDetected.desc",y.fileName),C),l(2,C.actions=[v.resolve,v.moveToChest,v.delete],C),l(2,C.trackerTitle="analysedThreatDetected",C)):(l(2,C.color="green",C),l(2,C.icon.color="ok",C),l(2,C.title=p("detection.cyberCapture.analysed.noThreat.title"),C),l(2,C.text=p("detection.cyberCapture.analysed.noThreat.desc",y.fileName),C),l(2,C.actions=[v.goToFile],C),l(2,C.trackerTitle="analysedNoThreat",C)):(l(2,C.color="green",C),l(2,C.icon.color="ok",C),l(2,C.title=p("detection.cyberCapture.scanned.noThreat.title"),C),l(2,C.text=p("detection.cyberCapture.scanned.noThreat.desc",y.fileName),C),l(2,C.actions=[v.close],C),l(2,C.trackerTitle="noThreat",C))}())}function N(){P=P&&clearInterval(P),l(2,C.progressStatusText=void 0,C)}function O(){T<=0?N():l(2,C.progressStatusText=p("global.scanning")+" "+p("detection.aboutSecRemaining",Math.max(0,T--)),C)}function W(){let e;return y.state===S?(console.error("CyberCapture: resolving threat failed",y.errorCode),e={color:"white",icon:{name:"icon-m-scan-file"},title:p("detection.cyberCapture.error.title")}):e={color:"green",icon:{name:"icon-m-scan-file",color:"ok"},title:p(w?"detection.threat.secured":"detection.cyberCapture.threatDetectedAndSecured"),text:p("detection.cyberCapture."+y.state+".desc",y.fileName),details:I},e.text=p("detection.cyberCapture."+y.state+".desc",y.fileName),e.details=I,e.trackerTitle=y.state,y.state===r?e.actions=[v.close,v.openChest]:y.state!==c&&y.state!==h&&y.state!==S||(e.actions=[v.close]),e}function R(e){return new Promise((t=>{x=function(){t(W())},i("app.av.detections.UserChoice",{id:_,userChoice:e})}))}n.on("app.av.detections.onStatusChanged",D),Promise.allSettled([d.getValue("avdef://config/CyberCapture/DetectionCloseCountdown"),d.getValue("avdef://config/CyberCapture/SyncTimeout"),d.getValue("avcfg://avast5/Custody/AutomaticallySendForAnalysis")]).then((([e,t,n])=>{if("fulfilled"===e.status){const t=e.value;l(0,v.close.countdown=null==t?v.close.countdown:parseInt(t),v)}T=parseInt(t.value)||0,E=0===parseInt(n.value)})).then((()=>i("app.av.detections.GetStatus",{id:_}).then(D))).then((()=>a.init({width:600,height:420})));return[v,k,C,A,!0,e=>l(1,k.url=e.target.value,k),e=>l(1,k.info=e.target.value,k)]}class ni extends $t{constructor(e){super(),Ft(this,e,ti,Jn,ze,{handlesWindowInit:4})}get handlesWindowInit(){return this.$$.ctx[4]}}function ii(e){let t,n;return t=new qn({props:{config:e[0]}}),{c(){Wt(t.$$.fragment)},m(e,i){Rt(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.config=e[0]),t.$set(i)},i(e){n||(Dt(t.$$.fragment,e),n=!0)},o(e){Nt(t.$$.fragment,e),n=!1},d(e){jt(t,e)}}}function li(e){let t,n,i=e[0]&&ii(e);return{c(){i&&i.c(),t=lt()},m(e,l){i&&i.m(e,l),Qe(e,t,l),n=!0},p(e,[n]){e[0]?i?(i.p(e,n),1&n&&Dt(i,1)):(i=ii(e),i.c(),Dt(i,1),i.m(t.parentNode,t)):i&&(Pt(),Nt(i,1,1,(()=>{i=null})),Et())},i(e){n||(Dt(i),n=!0)},o(e){Nt(i),n=!1},d(e){i&&i.d(e),e&&Je(t)}}}function si(e){return{server:e.server_name,process:e.process_path,exclusionAllowed:e.allow_accept,cert:e.cert,certChain:e.cert_chain,certProblems:e.cert_status}}function ai(e,t,n){const l=a.getUrlParams().id;let s=null;function o(e){n(0,s={color:"red",icon:{name:"icon-m-scan-file",color:"critical"},title:p("detection.mailCertificate.title",e.certProblems.length),text:c(e.certProblems)+p("detection.mailCertificate.note"),actions:r(e),details:[{title:p("global.location"),value:u.escapeHtml(e.server),testValue:"location"},{title:p("global.process"),value:u.escapeHtml(e.process),testValue:"detectedBy"},{title:p("global.detectedBy"),value:p("shields.email"),testValue:"detectedBy"}]})}function c(e){if(!e||!e.length)return"";let t="";return e.forEach((e=>{t+=p("detection.mailCertificate.desc."+e)+"<br />"})),t+"<br />"}function r(e){const t={close:{label:p("global.close"),labelGa:"close",labelTest:"btn_close"},confirmExclusion:{label:p("detection.mailCertificate.confirmExclusion"),action:()=>i("app.av.detections.UserChoice",{id:l,userChoice:"allow"}),labelGa:"confirmExclusion",labelTest:"btn_confirmExclusion"},confirmExclusionAndStore:{label:p("detection.mailCertificate.confirmAndStoreExclusion"),action:()=>i("app.av.detections.UserChoice",{id:l,userChoice:"allow_and_store"}),labelGa:"confirmExclusionAndStore",labelTest:"btn_confirmExclusionAndStore"},viewCertificate:{label:p("detection.mailCertificate.viewCertificate"),action:()=>(i("app.utils.ViewCertificate",{cert:e.cert,cert_chain:e.certChain}),Promise.resolve(s)),labelGa:"viewCertificate",labelTest:"btn_viewCertificate"}};return e.exclusionAllowed?[t.confirmExclusion,t.confirmExclusionAndStore,t.viewCertificate]:[t.close,t.viewCertificate]}return bt((()=>{i("app.av.detections.GetStatus",{id:l}).then(si).then(o).then(a.init)})),[s,!0]}class oi extends $t{constructor(e){super(),Ft(this,e,ai,li,ze,{handlesWindowInit:1})}get handlesWindowInit(){return this.$$.ctx[1]}}const ci=(ri=!1,e.extend({template:T,data(){const e=Ee(ri);return{STRINGS:xe,componentService:P,shieldsSeparately:ri,properties:e,whatToDoWithTabs:[e.whatToDoWithViruses,e.whatToDoWithUnwantedProgram],shieldTabs:[e.fileShield,e.behaviorShield,e.webShield,e.mailShield]}},oninit(){this.observers=[],this.observers.push(this.observe("properties.enableCyberCapture.value",(e=>{this.set("properties.enableCyberCaptureOptions.disabled",!e)}))),this.observers.push(this.observe("properties.enableRootkitDetection.value",(e=>{this.set("properties.enableExploitDetection.disabled",!e)}))),this.listeners=[],c.supportedUntil("21.4")&&this.listeners.push(n.on("product.change.feature.AntiRootkit.enabled",(e=>{e||I.stopShield("antiExploit")})))},onteardown(){for(;this.listeners.length;)this.listeners.pop()();for(;this.observers.length;)this.observers.pop().cancel()}}));var ri;const di=function(e){return{title:xe.title,desc:xe.desc,items:Ee(e)}}.bind(null,!1);function hi(){const e=[{prefix:"Behavior shield",items:De()},{prefix:"File shield",items:Fe()},{prefix:"Mail shield",items:$e()},{prefix:"Web shield",items:Me()}],t=[];return e.forEach((e=>{e.items.forEach((n=>{n.label=e.prefix+": "+n.label,t.push(n)}))})),t}export default w;export{ni as cyberCaptureDetection,oi as mailCertificateDetection,I as serviceProxy,ci as settings,hi as settingsGeek,di as settingsSearchStrings};const ui={name:"Shields",version:"1.2.593",created:"2021-09-06T10:51:07.329Z"};export{ui as metadata};