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/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/Program Files/Avast Software/Avast/gui_resources/1.0.663/SecureDNS.js
//{"name":"SecureDNS","version":"1.2.464","created":"2021-09-06T10:53:22.950Z"}
import e from"./ractive.js";import{nls as t}from"./i18n.js";import{eventer as s,napiTracker as i,serviceRequest as n}from"./napi.js";import{productModel as o,ipmService as c}from"./napiExtensions.js";import{logger as a}from"./libs.js";import{modals as r}from"./ractiveComponents.js";const l="SecureDnsShield",d={title:"secureDNS",desc:"secureDNS.settings.desc",dohScanning:"secureDNS.settings.dohScanning",dohScanningDesc:"secureDNS.settings.dohScanning.desc",stopOptionsTitle:"secureDNS.stopOptions.title",stopOptionsDesc:"secureDNS.stopOptions.desc",previewTitle1:"secureDNS.preview.title.1",previewTitle2:"secureDNS.preview.title.2",previewDesc1:"secureDNS.preview.desc.1",previewDesc2:"secureDNS.preview.desc.2",previewBtnTitle:"secureDNS.preview.btnTitle"},p={dohScanning:{label:t(d.dohScanning),desc:t(d.dohScanningDesc),path:"avcfg://StreamFilter/HttpPlugin/DohMode",track:{subject:"Support encrypted DNS in browsers"},search:{title:d.dohScanning,desc:d.dohScanningDesc}}},h=e.extend({template:{v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["nls"],s:'_0("secureDNS")'}}],cssCls:"scd",settingsUrl:[{t:2,x:{r:["licensed"],s:'_0?"#Settings/SecureDNS":""'}}],upsell:[{t:2,x:{r:["licensed"],s:"!_0"}}],inactive:[{t:2,x:{r:["shieldActive"],s:"!_0"}}],inactiveMsg:[{t:3,x:{r:["nls"],s:'_0("secureDNS.inactive.tooltip")'}}],backHash:"#security"},f:[" ",{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:7,e:"Crumbs",a:{section:"security",moduleId:"secureDNS"}}]}," ",{t:7,e:"div",a:{slot:"controls"},f:[{t:7,e:"kin-switch",a:{"data-test":"scd_switch",processing:[{t:2,x:{r:["shieldControllable"],s:"!_0"}}],"kin-checked":[{t:2,r:"shieldActive"}],title:[{t:2,x:{r:["nls"],s:'_0("secureDNS")'}}]},v:{click:"toggleStatus"}}]}," ",{t:4,f:[{t:7,e:"div",a:{slot:"upsell"},f:[{t:7,e:"Upsell",a:{desc:[{t:3,x:{r:["nls"],s:'_0("upsell.desc.realSite")'}}],animation:[{t:2,r:"UPSELL_ANIMATION"}]}}]}],n:50,x:{r:["licensed"],s:"!_0"}}," ",{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("secureDNS.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"kin-icon",a:{name:"icon-m-tools-real-site",size:"200",class:["kin_view__icon ",{t:2,x:{r:["shieldActive"],s:'!_0?"color-disabled -text":""'}}]}}]}]}]}]}]},css:".scd_switch__slide {\n  margin: 0 auto 30px;\n  display: block;\n}\n.scd_icon {\n  font-size: 474.5px;\n  margin-top: -70px;\n  margin-bottom: -100px;\n}\n",data:()=>({UPSELL_ANIMATION:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACqCAMAAAAKqCSwAAAAjVBMVEUAAACqt/GVqeCUquCTpdyPotaPo9eNodaMn9WMoNSOptyNodWLn9SLn9WModeLn9SLn9WLn9SLn9SMoNWOotaKntSOotaNotiLn9SLn9SLn9SMoNWMoNaMn9WLoNWLn9SMn9WLn9SLn9SLn9WKn9SLn9SLoNSLn9SLn9SLn9SLn9SLn9SLn9SKn9SKntTLjeBdAAAALnRSTlMABAgLER0ZNlBbFT/ffy2caNV4OySPKSH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!1,product:o.getProduct(),licensed:o.isLicensed(l)}),onconstruct(){this._timers={}},oninit(){this.log=a.createLogger("secureDNS"),this.log.debug("oninit"),this.offProductChanged=s.on("product.change.state.product",(e=>{this.log.debug("product changed; product: "+e),this.set("product",e)})),this.offFeatureChanged=s.on(`product.change.feature.${l}.licensed`,(e=>{this.set("licensed",e)})),this.observe("licensed",((e,t)=>{this.log.info('licensed changed from "'+t+'" to "'+e+'"'),e?this.initialize():this.terminate()})),this.on("toggleStatus",this._onToggleStatus.bind(this)),this.on("Upsell.init",(()=>{i.event("Upsell","View")})),this.on("Upsell.buy",(function(){c.openWindow(343)})),this.on("kinUpsell",(function(){c.openWindow(343)})),this.initialize()},onteardown(){this.log.debug("onteardown"),this.terminate(),this.offProductChanged&&this.offProductChanged(),this.offFeatureChanged&&this.offFeatureChanged()},initialize(){this.get("licensed")&&(o.update().then((()=>{const e=o.getFeature(l);this._setShieldStatus(e.enabled,!0)})),this.offStatusChanged&&this.offStatusChanged(),this.offStatusChanged=s.on(`product.change.feature.${l}.enabled`,(e=>{this._setShieldStatus(e,!0)})))},terminate(){this.offStatusChanged&&this.offStatusChanged(),this.offStatusChanged=null},_onToggleStatus(){const e=this.get("shieldActive"),s=t=>{this.log.info("turning the secureDNS shield "+(e?"off":"on"));const s=e?"app.features.Stop":"app.features.Start",i={featureId:l};null!=t&&(i.time=t),this._setShieldStatus(null,!1),n(s,i).then((()=>{this.log.info(s+" successfully executed"),this._setShieldStatus(!e,!0)})).catch((t=>{this.log.error("an error occured while executing `"+s+"` request",t),this._setShieldStatus(e,!0)}))};e?(this.log.info("opening the stop option dialog"),r.stopOptions({title:t("secureDNS.stopOptions.title"),desc:t("secureDNS.stopOptions.desc")}).then((e=>{this.log.info("stop option selected; params: "+JSON.stringify(e)),s(e.time)})).catch((()=>{this.log.info("no stop option selected.. doing nothing")}))):o.isPassiveMode()?r.passiveMode(o.getPassiveModeInfo()).then(s):s()},_setShieldStatus(e=null,t=null){const s={};null!==e&&(s.shieldActive=e),null!==t&&(s.shieldControllable=t),this.set(s)}});function S(){return p}function u(){return{title:d.title,desc:d.desc,items:S()}}const g=e.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:"SettingsCheckbox",a:{property:[{t:2,r:"properties.dohScanning"}]}}]}]},data:()=>({STRINGS:d,properties:S(),component:l,stopOptions:{title:t(d.stopOptionsTitle),desc:t(d.stopOptionsDesc)},ipmBuyElm:343})});export default h;export{g as settings,u as settingsSearchStrings};const f={name:"SecureDNS",version:"1.2.464",created:"2021-09-06T10:53:22.950Z"};export{f as metadata};