Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/Program Files/Avast Software/Avast/gui_resources/default_av/ |
//{"name":"Antispam","version":"1.2.256","created":"2021-03-09T09:32:20.044Z"} import t from"./ractive.js";import{eventer as s,napiTracker as e,serviceRequest as i}from"./napi.js";import{productModel as a,ipmService as n}from"./napiExtensions.js";import{logger as l}from"./libs.js";import{modals as o}from"./ractiveComponents.js";import{nls as r}from"./i18n.js";const d=t.extend({template:{v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["nls"],s:'_0("antispam")'}}],cssCls:"ats",settingsUrl:[{t:2,x:{r:["licensed"],s:'_0?"#Settings/Antispam":""'}}],upsell:[{t:2,x:{r:["licensed"],s:"!_0"}}],inactive:[{t:2,x:{r:["shieldActive"],s:"!_0"}}],inactiveMsg:[{t:3,x:{r:["nls"],s:'_0("antispam.inactive.tooltip")'}}],backHash:"#privacy"},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:7,e:"Crumbs",a:{customBreadcrumbs:["[{title: ",{t:3,x:{r:["nls"],s:'_0("privacy")'}},", url : '#privacy', section: true}, {title: ",{t:3,x:{r:["nls"],s:'_0("antispam")'}},", url: '#SecurityAntispam'}]"]}}]}," ",{t:7,e:"div",a:{slot:"controls"},f:[{t:7,e:"Switch",a:{attr:"{id:'ats_switch'}",checked:[{t:2,r:"shieldActive"}],disabled:[{t:2,x:{r:["shieldControllable"],s:"!_0"}}],cssCls:[{t:4,f:["-waiting"],n:50,x:{r:["shieldControllable"],s:"!_0"}}],preventToggle:"true",title:[{t:3,x:{r:["nls"],s:'_0("antispam")'}}]},v:{domClick:"toggleStatus"}}]}," ",{t:4,f:[{t:7,e:"div",a:{slot:"upsell"},f:[{t:7,e:"Upsell",f:[{t:4,f:[{t:3,x:{r:["nls","product"],s:'_0("global.featureUnavailable.variables",_0("antispam"),_0("global.product."+_1))'}}],n:50,r:"product"},{t:4,n:51,f:[{t:3,x:{r:["nls"],s:'_0("global.featureUnavailable.generic")'}}],r:"product"}]}]}],n:50,x:{r:["licensed"],s:"!_0"}}," ",{t:7,e:"div",a:{slot:"page-content"},f:[{t:7,e:"kin-view",f:[{t:7,e:"div",a:{slot:"description"},f:[{t:7,e:"p",a:{class:"kin_description__text"},f:[{t:3,x:{r:["nls"],s:'_0("antispam.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"Icon",a:{name:"antispam-large",cssCls:"kin_view__icon"}}]}]}]}]}]},data:{shieldActive:!1,shieldControllable:!1,product:a.getProduct(),licensed:a.isLicensed("antispam")},oninit(){this.log=l.createLogger("antispam"),this.log.info("oninit"),this.listeners=[],this.listeners.push(s.on("product.change.state.product",(t=>{this.log.debug("product changed; product: "+t),this.set("product",t)}))),this.listeners.push(s.on("product.change.feature.antispam.licensed",(t=>{this.set("licensed",t)}))),this.listeners.push(s.on("product.change.feature.antispam.enabled",(t=>{this._setShieldStatus(t,!0)}))),this.observe("licensed",((t,s)=>{this.log.info('licensed changed from "'+s+'" to "'+t+'"'),t&&this.initialize()})),this.on("Upsell.init",(()=>{e.event("Upsell","View")})),this.on("Upsell.buy",(()=>{n.openWindow(132)})),this.on("toggleStatus",this._onToggleStatus.bind(this)),this.initialize()},onteardown(){this.log.info("onteardown"),this.listeners.forEach((t=>{t()}))},initialize(){this.get("licensed")?a.update().then((()=>{const t=a.getFeature("ais_shl_spm");this._setShieldStatus(t.enabled,!0)})):this.log.info("not licensed.. not initializing")},_onToggleStatus(t){t.original.preventDefault();const s=this.get("shieldActive"),e=t=>{this.log.info("turning the antispam shield "+(s?"off":"on"));const e=s?"app.features.Stop":"app.features.Start",a={featureId:"ais_shl_spm"};null!=t&&(a.time=t),this._setShieldStatus(null,!1),i(e,a).then((()=>{this.log.info(e+" successfully executed"),this._setShieldStatus(!s,!0)})).catch((t=>{this.log.error("an error occured while executing `"+e+"` request",t),this._setShieldStatus(s,!0)}))};s?(this.log.info("opening the stop option dialog"),o.stopOptions({title:r("antispam.stopOptions.title"),desc:r("antispam.stopOptions.desc")}).then((t=>{this.log.info("stop option selected; params: "+JSON.stringify(t)),e(t.time)})).catch((()=>{this.log.info("no stop option selected.. doing nothing")}))):e()},_setShieldStatus(t=null,s=null){const e={};null!==t&&(e.shieldActive=t),null!==s&&(e.shieldControllable=s),this.set(e)}});const c=l.createLogger("antispam.settings.list"),p=t.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"table",a:{class:"table -small"},f:[{t:4,f:[{t:7,e:"tr",a:{class:"-selectable"},f:[{t:7,e:"td",f:[{t:7,e:"input",a:{id:[{t:2,r:"listType"},"-list-tooltip-opener-",{t:2,r:"index"}],type:"text",value:[{t:2,r:"."}],class:"input -blank -small ats_list-input",placeholder:[{t:3,x:{r:["nls"],s:'_0("antispam.settings.enterEmailOrDomain")'}}],lazy:"500"},v:{keyup:"inputKeyup",blur:"saveList"}}," ",{t:7,e:"TooltipX",a:{cssCls:"stg__tooltip",boundariesSelector:".settings__content",showOnEllipsis:"true",openerSelector:["#",{t:2,r:"listType"},"-list-tooltip-opener-",{t:2,r:"index"}],placement:"bottom-start"},f:[{t:7,e:"div",a:{class:"text -small -secondary"},f:[{t:2,r:"."}]}]}]}," ",{t:7,e:"td",a:{class:"table__delete"},f:[{t:7,e:"button",a:{class:"a",title:[{t:3,x:{r:["nls"],s:'_0("global.remove")'}}]},v:{click:"removeFromList"},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-bin",size:"16"}}]}]}]}],n:52,i:"index",r:"list"}]}],n:50,r:"list.length"},{t:4,n:51,f:[{t:7,e:"p",a:{class:"p -small -secondary"},v:{click:"addToList"},f:[{t:3,x:{r:["nls"],s:'_0("antispam.settings.emptyList")'}}]}],r:"list.length"}]},data:function(){return{listId:null,path:null,list:[]}},oninit(){this.loadList(),this.on("inputKeyup",(t=>{13===t.original.keyCode&&t.node.blur()})),this.on("saveList",(t=>{s.emit("Settings.gaTrack","Save "+this.get("listId"));const e=this.get("list");t.context.length||e.splice(t.index.index,1),this.updateList(e)})),this.on("addToList",(()=>{this.addToList()})),this.on("removeFromList",(t=>{s.emit("Settings.gaTrack","Remove from "+this.get("listId"));const e=this.get("list");e.splice(t.index.index,1),this.updateList(e)}))},addToList(){const t=this.get("list");(0===t.length||t[0].length>0)&&t.unshift(""),this.find("input.ats_list-input").focus()},loadList(){i("app.settings.Get",{name:this.get("path")}).then((t=>{this.set("list",this.parseList(t.value))})).catch((t=>{c.error("loading list failed",t)}))},updateList(t){this.set("list",t),i("app.settings.Set",{name:this.get("path"),value:this.stringifyList(t)})},parseList:t=>t?t.split("\n").slice(0,-1):[],stringifyList:t=>t&&t.length?t.join("\n")+"\n":""}),m={allowedList:"antispam.settings.allowedList",blockedList:"antispam.settings.blockedList",addEmailOrDomain:"antispam.settings.addEmailOrDomain"},h={whitelist:{id:"AntispamSettingsWhitelist",type:"tab",title:r(m.allowedList),compo:p,compoParams:{path:"antispam://Antispam/Common/WhiteList",listId:"Whitelist"},testAttr:"Whitelist",search:m.allowedList},blacklist:{id:"AntispamSettingsBlacklist",type:"tab",title:r(m.blockedList),compo:p,compoParams:{path:"antispam://Antispam/Common/Blacklist",listId:"Blacklist"},testAttr:"Blacklist",search:m.blockedList},addEmailOrDomain:{id:"antispam_settings_addEmailOrDomain",label:r(m.addEmailOrDomain),search:m.addEmailOrDomain}},u=t.extend({template:{v:3,t:[{t:7,e:"button",a:{class:"btn -small -secondary g-float--right g-margin-bottom--5",id:[{t:2,r:"addEmailOrDomain.id"}],"data-test":"addEmailOrDomain"},v:{click:"addToList"},f:["+ ",{t:3,r:"addEmailOrDomain.label"}]}," ",{t:7,e:"hr",a:{class:"g-clear"}}," ",{t:7,e:"SettingsTabs",a:{tabs:[{t:2,r:"lists"}],watchedTabsHeightContainer:".settings__section"}}]},data:()=>({STRINGS:m,selectedTabId:null,lists:[h.whitelist,h.blacklist],addEmailOrDomain:h.addEmailOrDomain}),oninit(){this.on("addToList",(()=>{const t=this.get("selectedTabId");s.emit("Settings.gaTrack","Add to "+t),this.findComponent(t).addToList()})),this.on("SettingsTabs.selectedTabChanged",(t=>{s.emit("Settings.gaTrack","Show "+t),this.set("selectedTabId",t)})),s.on("settings.selectTabId",(t=>{this.set("selectedTabId",t)}))}}),g={title:"antispam",desc:"antispam.settings.desc",sensitivity:"antispam.sensitivity",sensitivityLow:"antispam.sensitivityLow",sensitivityMedium:"antispam.sensitivityMedium",sensitivityHigh:"antispam.sensitivityHigh",markSubject:"antispam.settings.markSubject",markSubjectPhish:"antispam.settings.markSubjectPhish",addRecipientsAutomatically:"antispam.settings.addRecipientsAutomatically",addRecipientsAutomaticallyDesc:"antispam.settings.addRecipientsAutomatically.desc",addAddressBookToWhitelist:"antispam.settings.addAddressBookToWhitelist"},b={sensitivity:{path:"avastcfg://AntiSpamShield/AntiSpam/Threshold",desc:r(g.sensitivity),options:[{value:"1",label:r(g.sensitivityLow)},{value:"2",label:r(g.sensitivityMedium)},{value:"3",label:r(g.sensitivityHigh)}],track:{subject:"Sensitivity",valueMap:{1:"Low",2:"Medium",3:"High"}},search:g.sensitivity},markSubject:{path:"avastcfg://AntiSpamShield/AntiSpam/MarkSubject",label:r(g.markSubject),track:{subject:"Mark spam message subject"},search:g.markSubject},subjectForSpamMsg:{path:"avastcfg://AntiSpamShield/AntiSpam/SubjectForSpamMsg",track:{subject:"Spam message subject mark"}},markSubjectPhish:{path:"avastcfg://AntiSpamShield/AntiSpam/MarkSubjectPhish",label:r(g.markSubjectPhish),track:{subject:"Mark phishing message subject"},search:g.markSubjectPhish},subjectForPhishMsg:{path:"avastcfg://AntiSpamShield/AntiSpam/SubjectForPhishMsg",track:{subject:"Phishing message subject mark"}},addRecipientsAutomatically:{path:"avastcfg://AntiSpamShield/AntiSpam/AddRecipientsAutomatically",label:r(g.addRecipientsAutomatically),desc:r(g.addRecipientsAutomaticallyDesc),track:{subject:"Add recipients to whitelist automatically"},search:{title:g.addRecipientsAutomatically,desc:g.addRecipientsAutomaticallyDesc}},addAddressBookToWhitelist:{path:"avastcfg://AntiSpamShield/AntiSpam/AddAddressBookToWhitelist",label:r(g.addAddressBookToWhitelist),track:{subject:"Add address book to whitelist automatically"},search:g.addAddressBookToWhitelist}},S={title:g.title,desc:g.desc,items:Object.assign({},b,h)},v=t.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{component:[{t:2,r:"component"}],ipmBuyElm:[{t:2,r:"ipmBuyElm"}],title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],stopOptions:[{t:2,r:"stopOptions"}]},f:[{t:7,e:"SettingsRange",a:{property:[{t:2,r:"properties.sensitivity"}],cssCls:"g-margin-bottom--10"}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.markSubject"}]},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.subjectForSpamMsg"}],cssCls:"settings__indent"}}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.markSubjectPhish"}]},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.subjectForPhishMsg"}],cssCls:"settings__indent"}}]}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"Lists"}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.addRecipientsAutomatically"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.addAddressBookToWhitelist"}]}}]}]},css:".ats_list-input {\n width: 100%;\n}\n",components:{Lists:u},data:function(){return{STRINGS:g,component:"antispam",stopOptions:{title:r("antispam.stopOptions.title"),desc:r("antispam.stopOptions.desc")},ipmBuyElm:132,properties:b}},oninit(){this.observe("properties.markSubject.value",(t=>{this.set("properties.subjectForSpamMsg.disabled",!t)})),this.observe("properties.markSubjectPhish.value",(t=>{this.set("properties.subjectForPhishMsg.disabled",!t)}))}}),f=[{path:"avastcfg://AntiSpamShield/AntiSpam/RuleUpdate",label:"Retrieve new rules?",type:"checkbox"},{path:"avastcfg://AntiSpamShield/AntiSpam/RuleUpdatePeriod",label:"How often should AV retrieve new antispam rules?",type:"number",unit:"seconds",minValue:1,maxValue:2e9,required:!0}];export default d;export{v as settings,f as settingsGeek,S as settingsSearchStrings};const k={name:"Antispam",version:"1.2.256",created:"2021-03-09T09:32:20.044Z"};export{k as metadata};