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


Current File : C:/Program Files/Avast Software/Avast/gui_resources/default_av/ractiveAdapter.js
//{"name":"ractiveAdapter","version":"1.2.172","created":"2021-03-09T09:33:07.639Z"}
import t from"./ractive.js";import{moduleManager as e,windowApi as n,debugMode as o}from"./napi.js";import{soundService as i}from"./napiExtensions.js";import r,{moment as a,nls as s}from"./i18n.js";import d,{modals as l}from"./ractiveComponents.js";import c from"./ractive.js";const p=t.extend({template:'<div class="nui--module--container">{{>Component(cName)}}</div>',isolated:!0,data:()=>({name:null,view:"default",cName:"Loading",Component:function(t){return this.partials[t]||(this.partials[t]="<"+t+"/>"),t}}),computed:{id:{set(t){this.set("name",t)},get(){return this.get("name")}}},components:{Error:t.extend({template:'<div class="nui--module--error">Module Error. Failed to load module {{name}}/{{view}}. {{componentError}}</div>'}),Loading:t.extend({template:'<div class="nui--moduler"></div>'})},onrender(){const t=this.get("name"),n=this.get("view");t?e.importModule(t,n).then((e=>{this.components.ScopedPackage=e,this.set("cName","ScopedPackage");const o=this.find(".nui--module--container");for(const t in e.__NITRO_VERSION)o.dataset["nitro_"+t]=e.__NITRO_VERSION[t];this.fire("moduleReady",t,n)})).catch((e=>{console.log("Module loading error",e),this.set("cName","Error"),this.set("componentError",e),this.fire("moduleError",t,n,e)})):(this.set("cName","Error"),this.fire("moduleError",t,n,"Module name is missing."))}});var m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return f(null==e&&n.path)}},n.exports),n.exports}function f(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var h=u((function(t){!function(e,n){if(t.exports)t.exports=n(c);else{if(!e.Ractive)throw new Error("Could not find Ractive! It must be loaded before the ractive-transitions-slidehorizontal plugin");n(e.Ractive)}}("undefined"!=typeof window?window:m,(function(t){var e,n,o,i;return i={duration:300,easing:"easeInOut"},n=["width","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight","marginLeft","marginRight"],o={width:0,borderLeftWidth:0,borderRightWidth:0,paddingLeft:0,paddingRight:0,marginLeft:0,marginRight:0},e=function(t,e){var r;e=t.processParams(e,i),t.isIntro?(t.setStyle("height",t.getStyle("height")),r=t.getStyle(n),t.setStyle(o)):(t.setStyle("height",t.getStyle("height")),t.setStyle(t.getStyle(n)),r=o),t.setStyle({overflow:"hidden"}),t.animateStyle(r,e).then(t.complete)},t.transitions.slidehorizontal=e,t.transitions.slideh=e,e}))})),g=u((function(t,e){t.exports=function(){var t={duration:300,easing:"easeInOut"},e=["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom","marginTop","marginBottom"],n={height:0,borderTopWidth:0,borderBottomWidth:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0};function o(o,i){var r;i=o.processParams(i,t),o.isIntro?(r=o.getStyle(e),o.setStyle(n)):(o.setStyle(o.getStyle(e)),r=n),o.setStyle("overflowY","hidden"),o.animateStyle(r,i).then(o.complete)}return o}()})),y=u((function(t,e){t.exports=function(){var t={delay:0,duration:300,easing:"linear"};function e(e,n){var o;n=e.processParams(n,t),e.isIntro?(o=e.getStyle("opacity"),e.setStyle("opacity",0)):o=0,e.animateStyle("opacity",o,n).then(e.complete)}return e}()})),v=function(){let t;const e={animation:"animationend","-o-animation":"oAnimationEnd","-moz-animation":"animationend","-webkit-animation":"webkitAnimationEnd","-ms-animation":"animationend"},n=document.createElement("fakeelement");for(t in e)if(void 0!==n.style[t])return e[t];return null}();const w=function(t,e){e=e||(t.isIntro?"slideInDown":"slideOutUp"),t.node.classList.contains("animated")||t.node.classList.add("animated"),t.node.classList.add(e);const n=function(){t.node.classList.remove(e),t.node.classList.remove("animated"),t.node.removeEventListener(v,n),t.complete()};t.node.addEventListener(v,n)};function b(){t.localization=r,t.localization.moment=a,t.defaults.data.nls=r.nls.bind(r),t.defaults.data.nlsc=r.nlsc.bind(r),t.defaults.data.moment=a,t.defaults.data.escapeHtml=r.escapeHtml.bind(r),t.defaults.data.ellipsis=r.ellipsis.bind(r),t.transitions.slideh=h,t.transitions.slide=g,t.transitions.fade=y,t.transitions.animatecss=w,window.localStorage.__noTransition?document.body.classList.add("nui_no-transitions"):document.body.classList.remove("nui_no-transitions"),t.prototype.transitionsEnabled=!window.localStorage.__noTransition,t.defaults.data.partialExists=function(t){return Boolean(this.partials[t])},t.prototype.emit=t.prototype.fire,t.prototype.onconfig=function(){this.on("browser",(t=>(t.original.preventDefault(),n.browse(t.node.getAttribute("href")),!1)))};const e=t.prototype.render;t.prototype.render=function(){return e.apply(this,arguments).then((()=>{!0!==this.asyncLoad&&this.ready()}))},t.prototype.ready=function(){this.onready&&this.onready(),this.fire("ready")};const o=t.prototype.teardown;for(var s in t.prototype.teardown=function(){return o.apply(this,arguments).then((()=>this.router&&this.router.removeAllListeners()))},t.prototype.screenReady=function(t=!0){return this.findAllComponents("Screen").forEach((function(e){e.set("loaded",t)})),Promise.resolve()},t.prototype.screenError=function(t){return this.findAllComponents("Screen").forEach((function(e){e.set("error",t)})),Promise.resolve()},t.UI=l,d)t.components[s]=d[s];t.components.DetectionDialog=t.components.DetectionDialog.extend({sounds:i}),t.components.Module=p,t.components.Titlebar.prototype.titlebarCompleted=function(){setTimeout((()=>{n.setCaption()}),800)},t.components.Overlay.prototype.overlayOpened=function(){n.setCaption(void 0,".nui_caption_client-overlay",!0)},t.components.Overlay.prototype.overlayClosed=function(){document.querySelectorAll("button.overlay__close.nui_caption_client-overlay").length<=1?n.setCaption():n.setCaption(void 0,".nui_caption_client-overlay",!0)},t.decorators.eventHandler=t=>{const e=e=>{if(e.ctrlKey&&"KeyA"===e.code){const e=t.tagName.toUpperCase();["INPUT","TEXTAREA"].indexOf(e)>-1&&t.select()}};return t.addEventListener("keydown",e),{teardown:t.removeEventListener.bind(null,"keydown",e)}}}const _=Object.freeze({__proto__:null,initRactive:function(t){let e;const n={},o=function(o){const i=o.detail.dataname;e||(n[i]=t.el.querySelector("kin-table[dataname="+i+"]"),e=t.observe(i,(function(){const t=n[i],e=parseInt(t.getAttribute("showmorelimit"),10);if(e){const n=parseInt(t.getAttribute("datalength"),10),o=Number.isInteger(n)&&Number.isInteger(e)?n-e:0;t.setAttribute("txtshowmore",s("global.show.more",o)),t.setAttribute("txtshowless",s("global.show.less"))}this.update("rows_"+i)})));const r=[],a=t.get(i);for(let t=o.detail.start;t<o.detail.end;t++)r.push(a[t]);t.set("rows_"+i,r)};t.el.addEventListener("kin-table:showrows",o),t.on("teardown",(function(){this.el.removeEventListener("kin-table:showrows",o),e&&e.cancel()}))}}),E=Object.freeze({__proto__:null,kinTableScrollable:_});function S(){o.isEnabled()?(window.nitro=window.nitro||{},window.nitro.Ractive=t,console.log("Added Ractive to the nitro object.")):window.nitro&&(delete window.nitro.Ractive,console.log("Removed Ractive from the nitro object."))}o.on("enabledChanged",S),S();export{b as extendRactive,E as plugins};const L={name:"ractiveAdapter",version:"1.2.172",created:"2021-03-09T09:33:07.639Z"};export{L as metadata};