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":"Dashboard","version":"1.2.524","created":"2021-03-10T09:57:10.153Z"} import{moduleManager as t,serviceRequest as n,eventer as e,onlineChecker as s,napiTracker as i}from"./napi.js";import{stringUtils as o,logger as r}from"./libs.js";import{productModel as c,napiUtils as a,settingsService as l,ipmService as d,utils as u}from"./napiExtensions.js";import{nls as p,moment as f}from"./i18n.js";import{objectFromEntriesPolyfill as m,externalLinks as h}from"./plugins.js";function g(){}function _(t){return t()}function b(){return Object.create(null)}function $(t){t.forEach(_)}function y(t){return"function"==typeof t}function v(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function x(t,...n){if(null==t)return g;const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function S(t,n,e){t.$$.on_destroy.push(x(n,e))}function w(t,n,e,s){if(t){const i=k(t,n,e,s);return t[0](i)}}function k(t,n,e,s){return t[1]&&s?function(t,n){for(const e in n)t[e]=n[e];return t}(e.ctx.slice(),t[1](s(n))):e.ctx}function I(t,n,e,s,i,o,r){const c=function(t,n,e,s){if(t[2]&&s){const i=t[2](s(e));if(void 0===n.dirty)return i;if("object"==typeof i){const t=[],e=Math.max(n.dirty.length,i.length);for(let s=0;s<e;s+=1)t[s]=n.dirty[s]|i[s];return t}return n.dirty|i}return n.dirty}(n,s,i,o);if(c){const i=k(n,e,s,r);t.p(i,c)}}function C(t,n){t.appendChild(n)}function P(t,n,e){t.insertBefore(n,e||null)}function z(t){t.parentNode.removeChild(t)}function E(t){return document.createElement(t)}function N(t){return document.createTextNode(t)}function j(){return N(" ")}function L(){return N("")}function M(t,n,e,s){return t.addEventListener(n,e,s),()=>t.removeEventListener(n,e,s)}function T(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function A(t,n,e){n in t?t[n]=e:T(t,n,e)}function O(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function F(t,n,e,s){t.style.setProperty(n,e,s?"important":"")}function D(t,n,e){t.classList[e?"add":"remove"](n)}class R{constructor(t=null){this.a=t,this.e=this.n=null}m(t,n,e=null){this.e||(this.e=E(n.nodeName),this.t=n,this.h(t)),this.i(e)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)P(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(z)}}let U;function G(t){U=t}function H(){if(!U)throw new Error("Function called outside component initialization");return U}function B(t){H().$$.on_mount.push(t)}function V(t){H().$$.on_destroy.push(t)}function W(){const t=H();return(n,e)=>{const s=t.$$.callbacks[n];if(s){const i=function(t,n){const e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,n),e}(n,e);s.slice().forEach((n=>{n.call(t,i)}))}}}const Y=[],q=[],J=[],Z=[],K=Promise.resolve();let Q=!1;function X(t){J.push(t)}let tt=!1;const nt=new Set;function et(){if(!tt){tt=!0;do{for(let t=0;t<Y.length;t+=1){const n=Y[t];G(n),st(n.$$)}for(G(null),Y.length=0;q.length;)q.pop()();for(let t=0;t<J.length;t+=1){const n=J[t];nt.has(n)||(nt.add(n),n())}J.length=0}while(Y.length);for(;Z.length;)Z.pop()();Q=!1,tt=!1,nt.clear()}}function st(t){if(null!==t.fragment){t.update(),$(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(X)}}const it=new Set;let ot;function rt(){ot={r:0,c:[],p:ot}}function ct(){ot.r||$(ot.c),ot=ot.p}function at(t,n){t&&t.i&&(it.delete(t),t.i(n))}function lt(t,n,e,s){if(t&&t.o){if(it.has(t))return;it.add(t),ot.c.push((()=>{it.delete(t),s&&(e&&t.d(1),s())})),t.o(n)}}function dt(t){t&&t.c()}function ut(t,n,e){const{fragment:s,on_mount:i,on_destroy:o,after_update:r}=t.$$;s&&s.m(n,e),X((()=>{const n=i.map(_).filter(y);o?o.push(...n):$(n),t.$$.on_mount=[]})),r.forEach(X)}function pt(t,n){const e=t.$$;null!==e.fragment&&($(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function ft(t,n){-1===t.$$.dirty[0]&&(Y.push(t),Q||(Q=!0,K.then(et)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function mt(t,n,e,s,i,o,r=[-1]){const c=U;G(t);const a=n.props||{},l=t.$$={fragment:null,ctx:null,props:o,update:g,not_equal:i,bound:b(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:[]),callbacks:b(),dirty:r,skip_bound:!1};let d=!1;if(l.ctx=e?e(t,a,((n,e,...s)=>{const o=s.length?s[0]:e;return l.ctx&&i(l.ctx[n],l.ctx[n]=o)&&(!l.skip_bound&&l.bound[n]&&l.bound[n](o),d&&ft(t,n)),e})):[],l.update(),d=!0,$(l.before_update),l.fragment=!!s&&s(l.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);l.fragment&&l.fragment.l(t),t.forEach(z)}else l.fragment&&l.fragment.c();n.intro&&at(t.$$.fragment),ut(t,n.target,n.anchor),et()}G(c)}class ht{$destroy(){pt(this,1),this.$destroy=g}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function gt(t,n){void 0===n&&(n={});var e=n.insertAt;if(t&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===e&&s.firstChild?s.insertBefore(i,s.firstChild):s.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}gt(".dsh .dsh_status__state {\n white-space: nowrap;\n}\n.dsh .dsh_status__progress {\n display: inline-block;\n vertical-align: middle;\n width: 20rem;\n margin: 0 1rem;\n}\n.dsh .dsh_status__cta {\n position: relative;\n display: flex;\n justify-items: center;\n align-items: center;\n}\n.dsh .dsh_status__cta.-fixing > *,\n.dsh .dsh_status__cta.-fixing > kin-button,\n.dsh .dsh_status__cta.-fixing > kin-dropdown {\n visibility: hidden;\n}\n.dsh .dsh_status__title span {\n color: var(--color-text);\n font-weight: var(--font-weight-h1);\n}\n.dsh .dsh_status__fixing {\n visibility: visible !important;\n color: var(--color-text-secondary);\n font-size: var(--font-size-small);\n position: absolute;\n text-align: center;\n width: 100%;\n}\n");function _t(t){let n,e;const s=t[1].default,i=w(s,t,t[0],null);return{c(){n=E("div"),i&&i.c(),T(n,"class","dsh slants")},m(t,s){P(t,n,s),i&&i.m(n,null),e=!0},p(t,[n]){i&&i.p&&1&n&&I(i,s,t,t[0],n,null,null)},i(t){e||(at(i,t),e=!0)},o(t){lt(i,t),e=!1},d(t){t&&z(n),i&&i.d(t)}}}function bt(t,n,e){let{$$slots:s={},$$scope:i}=n;return t.$$set=t=>{"$$scope"in t&&e(0,i=t.$$scope)},[i,s]}gt(".dsh {\n display: flex;\n align-items: stretch;\n justify-content: stretch;\n flex-direction: column;\n height: 100%;\n overflow: auto;\n max-height: 100%;\n}\n.dsh .dsh_status {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n padding: 15vh 10% 2rem;\n text-align: center;\n}\n.dsh .dsh_status__title {\n margin: 1.5rem 0;\n}\n.dsh .dsh_status__cta {\n margin-top: 2rem;\n justify-content: center;\n}\n.dsh .dsh_status__desc {\n max-width: 60rem;\n}\n.dsh .dsh_banner {\n width: 100%;\n height: 128px;\n flex-shrink: 0;\n position: relative;\n z-index: 0;\n}\n");class $t extends ht{constructor(t){super(),mt(this,t,bt,_t,v,{})}}const yt=[];function vt(t,n){return{subscribe:xt(t,n).subscribe}}function xt(t,n=g){let e;const s=[];function i(n){if(v(t,n)&&(t=n,e)){const n=!yt.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),yt.push(n,t)}if(n){for(let t=0;t<yt.length;t+=2)yt[t][0](yt[t+1]);yt.length=0}}}return{set:i,update:function(n){i(n(t))},subscribe:function(o,r=g){const c=[o,r];return s.push(c),1===s.length&&(e=n(i)||g),o(t),()=>{const t=s.indexOf(c);-1!==t&&s.splice(t,1),0===s.length&&(e(),e=null)}}}}function St(t,n,e){const s=!Array.isArray(t),i=s?[t]:t,o=n.length<2;return vt(e,(t=>{let e=!1;const r=[];let c=0,a=g;const l=()=>{if(c)return;a();const e=n(s?r[0]:r,t);o?t(e):a=y(e)?e:g},d=i.map(((t,n)=>x(t,(t=>{r[n]=t,c&=~(1<<n),e&&l()}),(()=>{c|=1<<n}))));return e=!0,l(),function(){$(d),a()}}))}const wt=["behavshield_off","fsshield_off","mailshield_off","webshield_off","antiexploit_off","arpot_off","antiransomwareshield_off","webcamshield_off","datascan_off","securedns_off","remote_access_shield_off","browserprotection_shield_off"],kt={behavshield_off:"shields.behavior",fsshield_off:"shields.file",mailshield_off:"shields.email",webshield_off:"shields.web",arpot_off:"shields.antiRootkit",antiexploit_off:"scans.antiExploit",antiransomwareshield_off:"antiransomware",webcamshield_off:"webcamshield",datascan_off:"sensitivedata",securedns_off:"secureDNS",remote_access_shield_off:"remoteAccessShield",browserprotection_shield_off:"passwordProtection"},It={id:"some_shields_off",priority:6,severity:1,ignorable:!0,ignored:!1,shields:[]},Ct=["full","folder","quick","media","custom","chest","smartScan","menu"],Pt="30days",zt=t=>{const n=[];for(const e in t)t[e]&&(t[e].id=e,n.push(t[e]));return((t=[])=>{const n=[],e=[];if(t.forEach((t=>wt.includes(t.id)&&!t.ignored?e.push(t.id):n.push(t))),e.length>1){const t=Object.assign(It,{shields:e});return n.push(t),n}return t})(n)},Et=vt(c.isAfbEdition()),Nt=vt(c.isBuyBcProblem),jt=vt(c.isAfbSoho()),Lt=vt(c.isReseller()),Mt=xt(c.getStatus()),Tt=xt(!1),At=St(Mt,(t=>"green"===t?"ok":"yellow"===t?"attention":"red"===t||"service_unreachable"===t?"critical":"white")),Ot=xt(c.getNotifications()),Ft=xt(c.getState().issues),Dt=(St(Ft,(t=>Object.entries(t||[]).filter((([t,n])=>n.ignored)).map((([t,n])=>(n._id=t,n))).sort(((t,n)=>Math.sign(t.priority-n.priority))))),xt(!1)),Rt=xt(!1),Ut=xt(!1),Gt=St(Ft,(t=>{let n=[];return t?(n=zt(t),n.filter((t=>!t.ignored&&t.priority>-1)).sort(((t,n)=>t.priority-n.priority))):n})),Ht=(St(Gt,(t=>t.some((t=>"shields_off"===t.id)))),St(Gt,(t=>t.some((t=>"passive_mode"===t.id||"passive_mode_locked"===t.id)))),St(Gt,(t=>t.some((t=>"service_off"===t.id)))),xt([])),Bt=St([Gt,Ht],(([t,n])=>t.concat(n).sort(((t,n)=>t.priority-n.priority)))),Vt=xt(0);St([Bt,Vt],(([t,n])=>function(t,n=0){return t.slice(n,t.length).concat(t.slice(0,n))}(t,n).slice(0,3).reverse())),St([Bt,Vt],(([t,n])=>`${n+1} / ${t.length}`));let Wt;Tt.subscribe((t=>Wt=t));const Yt=c.getProduct(),qt="omni"===Yt,Jt=t=>"expiring"===t?nn("title"):t&&"undefined"!==t?p(`dashboard.problems.${t}`):null,Zt=(t,n=null)=>"some_shields_off"===t?Kt(t,n):"expiring"===t?nn("desc"):"subscription_paid_expired"===t&&qt?tn("desc"):t&&"undefined"!==t?p(`dashboard.problems.${t}.desc`):null,Kt=(t,n)=>{const e=[...n],s=Qt(e.pop()),i=e.map((t=>Qt(t))).join(", ");return p(`dashboard.problems.${t}.desc`,i,s)},Qt=t=>p(`${kt[t]}`),Xt=t=>"expiring"===t?nn("action"):"subscription_paid_expired"===t&&qt?tn("action"):t&&"undefined"!==t?p(`dashboard.problems.${t}.action`):null,tn=t=>{let n="";switch(t){case"desc":n=Wt?"":p("dashboard.problems.subscription_paid_expired.omni.desc");break;case"action":n=p("dashboard.problems.subscription_paid_expired.omni.action")}return n},nn=t=>{let n="";const e=c.getExpiration(),s=c.isTrial(),i=p(a.getProductStringId()),o="pro_av"===Yt;switch(t){case"title":n=p(s?"dashboard.problems.expiring.trial":"dashboard.problems.expiring",e);break;case"desc":n=o?p(s?"dashboard.problems.expiring.trial.pro.desc":"dashboard.problems.expiring.pro.desc",i):qt?p("dashboard.problems.expiring.omni.desc"):p(s?"dashboard.problems.expiring.trial.desc":"dashboard.problems.expiring.desc",i);break;case"action":n=p(s?"dashboard.problems.expiring.trial.action":"dashboard.problems.expiring.action")}return n},en=t=>"custom"===t.type?p("dashboard.scan.running.desc",t.label):p("dashboard.scan.running.desc",p(`scans.scanType.${t.type}`)),sn=t=>"custom"===t.type?p("dashboard.scan.finished.desc",t.label):p("dashboard.scan.finished.desc",p(`scans.scanType.${t.type}`)),on=t=>p("dashboard.progress",t);function rn(t){let n,e,s,i,o,r,c,a=sn(t[1])+"",l=p("scans.seeResults")+"";return{c(){n=E("div"),e=N(a),s=j(),i=E("div"),o=E("kin-button"),r=N(l),T(n,"class","dsh_status__desc"),A(o,"size",t[0]),A(o,"link",c=t[4](t[1])),T(i,"class","dsh_status__cta")},m(t,c){P(t,n,c),C(n,e),P(t,s,c),P(t,i,c),C(i,o),C(o,r)},p(t,n){2&n&&a!==(a=sn(t[1])+"")&&O(e,a),1&n&&A(o,"size",t[0]),2&n&&c!==(c=t[4](t[1]))&&A(o,"link",c)},d(t){t&&z(n),t&&z(s),t&&z(i)}}}function cn(t){let n,e,s,i,o,r,c,a,l,d,u,f=en(t[2])+"",m=p("global.showDetails")+"",h=t[3]>=0&&an(t);return{c(){n=E("div"),e=N(f),s=j(),i=E("span"),o=E("kin-progress"),r=j(),h&&h.c(),c=j(),a=E("div"),l=E("kin-button"),d=N(m),A(o,"percentage",t[3]),A(o,"small","true"),A(o,"class","dsh_status__progress"),T(i,"class","dsh_status__state"),T(n,"class","dsh_status__desc"),A(l,"size",t[0]),A(l,"link",u=t[4](t[2])),T(a,"class","dsh_status__cta")},m(t,u){P(t,n,u),C(n,e),C(n,s),C(n,i),C(i,o),C(i,r),h&&h.m(i,null),P(t,c,u),P(t,a,u),C(a,l),C(l,d)},p(t,n){4&n&&f!==(f=en(t[2])+"")&&O(e,f),8&n&&A(o,"percentage",t[3]),t[3]>=0?h?h.p(t,n):(h=an(t),h.c(),h.m(i,null)):h&&(h.d(1),h=null),1&n&&A(l,"size",t[0]),4&n&&u!==(u=t[4](t[2]))&&A(l,"link",u)},d(t){t&&z(n),h&&h.d(),t&&z(c),t&&z(a)}}}function an(t){let n,e=on(t[3])+"";return{c(){n=E("span"),T(n,"dir","ltr")},m(t,s){P(t,n,s),n.innerHTML=e},p(t,s){8&s&&e!==(e=on(t[3])+"")&&(n.innerHTML=e)},d(t){t&&z(n)}}}function ln(t){let n,e=Rt&&function(t){let n;function e(t,n){return t[2]?cn:t[1]?rn:void 0}let s=e(t),i=s&&s(t);return{c(){i&&i.c(),n=L()},m(t,e){i&&i.m(t,e),P(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i&&i.d(1),i=s&&s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i&&i.d(t),t&&z(n)}}}(t);return{c(){e&&e.c(),n=L()},m(t,s){e&&e.m(t,s),P(t,n,s)},p(t,[n]){Rt&&e.p(t,n)},i:g,o:g,d(t){e&&e.d(t),t&&z(n)}}}function dn(e,s,i){let{buttonSize:o="large"}=s,r=[],c=null,a=null,l=null,d=[],u=[],p=-1,f=null;B((()=>{_(),t.importModule("Scans","serviceProxy").then((t=>(a=t,a.getScans()))).then((t=>{d=t.filter((t=>Ct.includes(t.type))).map((t=>t.id)),m(),h()}))}));const m=()=>{d.forEach((t=>{r.push(a.on("running."+t,(()=>{h()})))})),r.push(a.on("running.smartScan",(()=>{h()})))},h=()=>{a.getRunningScans().then((t=>{i(5,u=t.filter((t=>Ct.includes(t.type))))}))};function g(){l&&l.stopPolling(),l=null,c&&clearInterval(c),c=null}function _(){l&&g(),r.forEach((t=>{t()})),r=[]}let b;return V((()=>{_()})),e.$$set=t=>{"buttonSize"in t&&i(0,o=t.buttonSize)},e.$$.update=()=>{32&e.$$.dirty&&i(2,b=0!==u.lenght?u[0]:null),38&e.$$.dirty&&(b?(Rt.set(!0),i(1,f=b),!b||"smartScan"!==b.type&&"SmartScan"!==b.job?a.getScan(b.id).then((t=>{l=t,r.push(l.on("change",(t=>{t.progress&&i(3,p=t.progress)}))),l.getStatus().then((t=>{l.startPolling()}))})):(i(3,p=-1),c||(c=setInterval((()=>{n("app.smartScan.GetStatus").then((t=>{"scan_report"!==t.statusPrimary&&"ready"!==t.statusPrimary||(clearInterval(c),h())}))}),1e3)))):(Rt.set(f&&0===u.length),g(),i(3,p=-1)))},[o,f,b,p,t=>"smartScan"===t.type||"SmartScan"===t.job?"#SmartScan":"#Scans/scan/"+t.id,u]}class un extends ht{constructor(t){super(),mt(this,t,dn,ln,v,{buttonSize:0})}}const pn=()=>{const t=c.getStatus(),n=c.getNotifications(),e=c.getState().issues;Mt.set(t),Ot.set(n),Ft.set(e)},fn=t=>("all"===t.id&&console.error('Issue "all" is no longer supported, specify proper issue ID.'),"some_shields_off"===t.id?mn("FixIssue",t):hn("FixIssue",t.id)),mn=(t,e,s)=>{const{shields:i}=e;Dt.set("all");const o=i.map((e=>{const i=e?{issueId:e}:void 0;return"boolean"==typeof s&&(i.ignore=s),n("app.avService."+t,i)}));Promise.all(o).then((()=>n("app.settings.ApplySettings"))).then((()=>c.update())).then((()=>{pn()})).catch((()=>{c.update().then((()=>{pn()}))})).then((()=>{Dt.set(!1)}))},hn=(t,e,s)=>{Dt.set(e);const i=e?{issueId:e}:void 0;return"boolean"==typeof s&&(i.ignore=s),n("app.avService."+t,i).then((()=>n("app.settings.ApplySettings"))).then((()=>c.update())).then((()=>{pn()})).catch((()=>{c.update().then((()=>{pn()}))})).then((()=>{"passive_mode"===e?n("app.passivemode.GetStatus").then((t=>{t&&t.changeInProgress||Dt.set(!1)})):Dt.set(!1)}))},gn=t=>({}),_n=t=>({}),bn=t=>({}),$n=t=>({}),yn=t=>({problem:64&t}),vn=t=>({problem:t[6]});function xn(t){let n,e,s=Jt(t[6].id)+"";return{c(){e=L(),n=new R(e)},m(t,i){n.m(s,t,i),P(t,e,i)},p(t,e){64&e&&s!==(s=Jt(t[6].id)+"")&&n.p(s)},d(t){t&&z(e),t&&n.d()}}}function Sn(t){let n,e,s=p(t[4])+"";return{c(){e=L(),n=new R(e)},m(t,i){n.m(s,t,i),P(t,e,i)},p(t,e){16&e&&s!==(s=p(t[4])+"")&&n.p(s)},d(t){t&&z(e),t&&n.d()}}}function wn(t){let n,e,s,i,o;n=new un({props:{buttonSize:t[1]}});let r=!t[12]&&Cn(t),c=!t[12]&&!t[15]&&Pn(t);return{c(){dt(n.$$.fragment),e=j(),r&&r.c(),s=j(),c&&c.c(),i=L()},m(t,a){ut(n,t,a),P(t,e,a),r&&r.m(t,a),P(t,s,a),c&&c.m(t,a),P(t,i,a),o=!0},p(t,e){const o={};2&e&&(o.buttonSize=t[1]),n.$set(o),t[12]?r&&(rt(),lt(r,1,1,(()=>{r=null})),ct()):r?(r.p(t,e),4096&e&&at(r,1)):(r=Cn(t),r.c(),at(r,1),r.m(s.parentNode,s)),t[12]||t[15]?c&&(rt(),lt(c,1,1,(()=>{c=null})),ct()):c?(c.p(t,e),36864&e&&at(c,1)):(c=Pn(t),c.c(),at(c,1),c.m(i.parentNode,i))},i(t){o||(at(n.$$.fragment,t),at(r),at(c),o=!0)},o(t){lt(n.$$.fragment,t),lt(r),lt(c),o=!1},d(t){pt(n,t),t&&z(e),r&&r.d(t),t&&z(s),c&&c.d(t),t&&z(i)}}}function kn(t){let n,e,s,i;function o(t,n){return"some_shields_off"===t[6].id?En:zn}let r=o(t),c=r(t),a="passive_mode_locked"!==t[6].id&&Nn(t);return{c(){n=E("p"),c.c(),e=j(),a&&a.c(),s=L(),T(n,"class","dsh_status__desc")},m(t,o){P(t,n,o),c.m(n,null),P(t,e,o),a&&a.m(t,o),P(t,s,o),i=!0},p(t,e){r===(r=o(t))&&c?c.p(t,e):(c.d(1),c=r(t),c&&(c.c(),c.m(n,null))),"passive_mode_locked"!==t[6].id?a?(a.p(t,e),64&e&&at(a,1)):(a=Nn(t),a.c(),at(a,1),a.m(s.parentNode,s)):a&&(rt(),lt(a,1,1,(()=>{a=null})),ct())},i(t){i||(at(a),i=!0)},o(t){lt(a),i=!1},d(t){t&&z(n),c.d(),t&&z(e),a&&a.d(t),t&&z(s)}}}function In(t){let n,e,s,i,o,r,c,a,l=p("dashboard.finishingInstallation")+"";return{c(){n=E("div"),e=N(l),s=j(),i=E("kin-progress"),o=j(),r=E("span"),c=N(t[5]),a=N("%"),A(i,"percentage",t[5]),A(i,"small","true"),A(i,"class","dsh_status__progress"),T(r,"dir","ltr"),T(n,"class","dsh_status__desc")},m(t,l){P(t,n,l),C(n,e),C(n,s),C(n,i),C(n,o),C(n,r),C(r,c),C(r,a)},p(t,n){32&n&&A(i,"percentage",t[5]),32&n&&O(c,t[5])},i:g,o:g,d(t){t&&z(n)}}}function Cn(t){let n;const e=t[19].Installation,s=w(e,t,t[18],$n);return{c(){s&&s.c()},m(t,e){s&&s.m(t,e),n=!0},p(t,n){s&&s.p&&262144&n&&I(s,e,t,t[18],n,bn,$n)},i(t){n||(at(s,t),n=!0)},o(t){lt(s,t),n=!1},d(t){s&&s.d(t)}}}function Pn(t){let n;const e=t[19].SmartScan,s=w(e,t,t[18],_n);return{c(){s&&s.c()},m(t,e){s&&s.m(t,e),n=!0},p(t,n){s&&s.p&&262144&n&&I(s,e,t,t[18],n,gn,_n)},i(t){n||(at(s,t),n=!0)},o(t){lt(s,t),n=!1},d(t){s&&s.d(t)}}}function zn(t){let n,e=Zt(t[6].id)+"";return{c(){n=N(e)},m(t,e){P(t,n,e)},p(t,s){64&s&&e!==(e=Zt(t[6].id)+"")&&O(n,e)},d(t){t&&z(n)}}}function En(t){let n,e=Kt(t[6].id,t[6].shields)+"";return{c(){n=N(e)},m(t,e){P(t,n,e)},p(t,s){64&s&&e!==(e=Kt(t[6].id,t[6].shields)+"")&&O(n,e)},d(t){t&&z(n)}}}function Nn(t){let n,e,s,i,o,r,c;const a=[Mn,Ln,jn],l=[];function d(t,n){return t[14]?0:t[10]?t[10]&&t[7].length>1?2:-1:1}~(e=d(t))&&(s=l[e]=a[e](t));let u=t[2]&&(!0===t[6].ignorable||t[7].length>1)&&!t[10]&&Tn(t),p=t[13]===t[6].id&&Fn();return{c(){n=E("div"),s&&s.c(),i=j(),u&&u.c(),o=j(),p&&p.c(),T(n,"class",r="dsh_status__cta "+(t[13]===t[6].id?"-fixing":""))},m(t,s){P(t,n,s),~e&&l[e].m(n,null),C(n,i),u&&u.m(n,null),C(n,o),p&&p.m(n,null),c=!0},p(t,f){let m=e;e=d(t),e===m?~e&&l[e].p(t,f):(s&&(rt(),lt(l[m],1,1,(()=>{l[m]=null})),ct()),~e?(s=l[e],s?s.p(t,f):(s=l[e]=a[e](t),s.c()),at(s,1),s.m(n,i)):s=null),t[2]&&(!0===t[6].ignorable||t[7].length>1)&&!t[10]?u?u.p(t,f):(u=Tn(t),u.c(),u.m(n,o)):u&&(u.d(1),u=null),t[13]===t[6].id?p?p.p(t,f):(p=Fn(),p.c(),p.m(n,null)):p&&(p.d(1),p=null),(!c||8256&f&&r!==(r="dsh_status__cta "+(t[13]===t[6].id?"-fixing":"")))&&T(n,"class",r)},i(t){c||(at(s),c=!0)},o(t){lt(s),c=!1},d(t){t&&z(n),~e&&l[e].d(),u&&u.d(),p&&p.d()}}}function jn(t){let n,e,s,i=p("dashboard.viewAllIssues")+"";return{c(){n=E("kin-button"),e=N(i),A(n,"type","secondary"),A(n,"link","#Notifications"),A(n,"size",t[1]),A(n,"title",s=p("dashboard.viewAllIssues"))},m(t,s){P(t,n,s),C(n,e)},p(t,e){2&e&&A(n,"size",t[1])},i:g,o:g,d(t){t&&z(n)}}}function Ln(t){let n,e,s,i,r,c=Xt(t[6].id)+"";return{c(){n=E("kin-button"),e=N(c),A(n,"type",t[0]),A(n,"size",t[1]),A(n,"title",s=o.stripHtml(Jt(t[6].id))+" - "+Xt(t[6].id))},m(s,o){P(s,n,o),C(n,e),i||(r=M(n,"click",t[20]),i=!0)},p(t,i){64&i&&c!==(c=Xt(t[6].id)+"")&&O(e,c),1&i&&A(n,"type",t[0]),2&i&&A(n,"size",t[1]),64&i&&s!==(s=o.stripHtml(Jt(t[6].id))+" - "+Xt(t[6].id))&&A(n,"title",s)},i:g,o:g,d(t){t&&z(n),i=!1,r()}}}function Mn(t){let n;const e=t[19].SMB,s=w(e,t,t[18],vn);return{c(){s&&s.c()},m(t,e){s&&s.m(t,e),n=!0},p(t,n){s&&s.p&&262208&n&&I(s,e,t,t[18],n,yn,vn)},i(t){n||(at(s,t),n=!0)},o(t){lt(s,t),n=!1},d(t){s&&s.d(t)}}}function Tn(t){let n,e,s,i,o,r,c,a,l=!0===t[6].ignorable&&An(t),d=t[7].length>1&&On();return{c(){n=E("kin-dropdown"),e=E("div"),s=E("kin-button"),i=E("kin-icon"),r=j(),c=E("div"),l&&l.c(),a=j(),d&&d.c(),A(i,"name","icon-s-controls-menu-more"),A(i,"size","16"),A(s,"type","secondary"),A(s,"icononly","true"),A(s,"size",t[1]),A(s,"title",o=p("global.showMoreActions")),T(e,"slot","dropdown-activator"),A(n,"class","g-margin-left--10")},m(t,o){P(t,n,o),C(n,e),C(e,s),C(s,i),C(n,r),C(n,c),l&&l.m(c,null),C(c,a),d&&d.m(c,null)},p(t,n){2&n&&A(s,"size",t[1]),!0===t[6].ignorable?l?l.p(t,n):(l=An(t),l.c(),l.m(c,a)):l&&(l.d(1),l=null),t[7].length>1?d?d.p(t,n):(d=On(),d.c(),d.m(c,null)):d&&(d.d(1),d=null)},d(t){t&&z(n),l&&l.d(),d&&d.d()}}}function An(t){let n,e,s;return{c(){n=E("kin-dropdown-item"),n.textContent=`${p("dashboard.ignore")}`},m(i,o){P(i,n,o),e||(s=M(n,"click",t[21]),e=!0)},p:g,d(t){t&&z(n),e=!1,s()}}}function On(t){let n;return{c(){n=E("kin-dropdown-item"),n.textContent=`${p("dashboard.viewAllIssues")}`,A(n,"link","#Notifications")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Fn(t){let n,e,s,i;return{c(){n=E("div"),e=E("p"),e.textContent=`${p("global.fixing")}`,s=j(),i=E("kin-progress"),T(e,"class","g-margin-bottom--5"),A(i,"percentage","-1"),A(i,"small","true"),T(n,"class","dsh_status__fixing")},m(t,o){P(t,n,o),C(n,e),C(n,s),C(n,i)},p:g,d(t){t&&z(n)}}}function Dn(t){let n,e,s,i,o,r,c,a,l,d,u;function p(t,n){return 0===t[7].length?Sn:xn}let f=p(t),m=f(t);const h=[In,kn,wn],g=[];function _(t,n){return t[9]?0:t[7].length>0&&t[6]?1:t[14]||0!==t[7].length?-1:2}return~(a=_(t))&&(l=g[a]=h[a](t)),{c(){n=E("div"),e=E("kin-icon"),i=j(),o=E("h1"),m.c(),c=j(),l&&l.c(),A(e,"name",s="circle-"+t[11]),A(e,"size",t[3]),A(e,"class","dsh_status__icon"),T(o,"class",r="dsh_status__title "+(0!==t[7].length||t[9]||t[12]?"":"-solo")+" h1 color-"+t[11]+" -text"),T(n,"class","dsh_status"),T(n,"data-test",d=`dashboard-status_${t[8]}`)},m(t,s){P(t,n,s),C(n,e),C(n,i),C(n,o),m.m(o,null),C(n,c),~a&&g[a].m(n,null),u=!0},p(t,[i]){(!u||2048&i&&s!==(s="circle-"+t[11]))&&A(e,"name",s),(!u||8&i)&&A(e,"size",t[3]),f===(f=p(t))&&m?m.p(t,i):(m.d(1),m=f(t),m&&(m.c(),m.m(o,null))),(!u||6784&i&&r!==(r="dsh_status__title "+(0!==t[7].length||t[9]||t[12]?"":"-solo")+" h1 color-"+t[11]+" -text"))&&T(o,"class",r);let c=a;a=_(t),a===c?~a&&g[a].p(t,i):(l&&(rt(),lt(g[c],1,1,(()=>{g[c]=null})),ct()),~a?(l=g[a],l?l.p(t,i):(l=g[a]=h[a](t),l.c()),at(l,1),l.m(n,null)):l=null),(!u||256&i&&d!==(d=`dashboard-status_${t[8]}`))&&T(n,"data-test",d)},i(t){u||(at(l),u=!0)},o(t){lt(l),u=!1},d(t){t&&z(n),m.d(),~a&&g[a].d()}}}function Rn(t,s,i){let o,r,a,l,d,u,p;S(t,Gt,(t=>i(7,o=t))),S(t,Tt,(t=>i(17,r=t))),S(t,At,(t=>i(11,a=t))),S(t,Rt,(t=>i(12,l=t))),S(t,Dt,(t=>i(13,d=t))),S(t,Et,(t=>i(14,u=t))),S(t,Ut,(t=>i(15,p=t)));let{$$slots:f={},$$scope:m}=s,{problemId:h=0}=s,{buttonSeverity:g=""}=s,{buttonSize:_="large"}=s,{hasSecondaryAction:b=!0}=s,{iconSize:$="100"}=s,{nlsProductLicense:y="dashboard.status.green"}=s,v=null,x=[];function w(){x.forEach((t=>{t()})),x=[]}B((()=>{w(),"omni"===c.getProduct()?n("app.ring.stateInfo").then((t=>{Tt.set(["CHILD_PAIRING","CHILD_FINISHED"].includes(t.state))})).catch((()=>{Tt.set(!1)})):Tt.set(!1),c.update().then((()=>{pn()})),x.push(e.on("product.change.state",(()=>{c.update().then((()=>{pn()}))}))),x.push(e.on("setup.onStatusChanged.secondPhaseInstallationProgress",(t=>{i(5,v=t)})))})),V((()=>{w()}));let k,I,C,P;return t.$$set=t=>{"problemId"in t&&i(16,h=t.problemId),"buttonSeverity"in t&&i(0,g=t.buttonSeverity),"buttonSize"in t&&i(1,_=t.buttonSize),"hasSecondaryAction"in t&&i(2,b=t.hasSecondaryAction),"iconSize"in t&&i(3,$=t.iconSize),"nlsProductLicense"in t&&i(4,y=t.nlsProductLicense),"$$scope"in t&&i(18,m=t.$$scope)},t.$$.update=()=>{65664&t.$$.dirty&&i(6,k=o[h]),192&t.$$.dirty&&i(8,I=0===o.length?"ok":k.id),32&t.$$.dirty&&i(9,C=null!==v&&v>0&&v<100),131136&t.$$.dirty&&i(10,P=r&&k&&("expiring"===k.id||"subscription_paid_expired"===k.id))},[g,_,b,$,y,v,k,o,I,C,P,a,l,d,u,p,h,r,m,f,()=>fn(k),()=>{return"some_shields_off"===(t=k).id?mn("IgnoreIssue",t,!0):hn("IgnoreIssue",t.id,!0);var t}]}class Un extends ht{constructor(t){super(),mt(this,t,Rn,Dn,v,{problemId:16,buttonSeverity:0,buttonSize:1,hasSecondaryAction:2,iconSize:3,nlsProductLicense:4})}}function Gn(t){let n,e,s,i,o=Xt(t[0].id)+"";return{c(){n=E("kin-button"),e=N(o),A(n,"size","large")},m(o,r){P(o,n,r),C(n,e),s||(i=M(n,"click",t[4]),s=!0)},p(t,n){1&n&&o!==(o=Xt(t[0].id)+"")&&O(e,o)},d(t){t&&z(n),s=!1,i()}}}function Hn(t){let n,e=Xt("subscription_business_reseller")+"";return{c(){n=N(e)},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Bn(t){let n;function e(t,n){return t[3]?Wn:Vn}let s=e(t),i=s(t);return{c(){i.c(),n=L()},m(t,e){i.m(t,e),P(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&z(n)}}}function Vn(t){let n,e=Xt("subscription_business")+"";return{c(){n=N(e)},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Wn(t){let n,e=Xt("subscription_business_reseller")+"";return{c(){n=N(e)},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Yn(t){let n,e,s;function i(t,s){return(null==n||7&s)&&(n=!(t[1]||!t[2](t[0].id))),n?Bn:((null==e||13&s)&&(e=!(!t[3]||!t[2](t[0].id))),e?Hn:Gn)}let o=i(t,-1),r=o(t);return{c(){r.c(),s=L()},m(t,n){r.m(t,n),P(t,s,n)},p(t,[n]){o===(o=i(t,n))&&r?r.p(t,n):(r.d(1),r=o(t),r&&(r.c(),r.m(s.parentNode,s)))},i:g,o:g,d(t){r.d(t),t&&z(s)}}}function qn(t,n,e){let s,i,o;S(t,jt,(t=>e(1,s=t))),S(t,Nt,(t=>e(2,i=t))),S(t,Lt,(t=>e(3,o=t)));let{problem:r}=n;return t.$$set=t=>{"problem"in t&&e(0,r=t.problem)},[r,s,i,o,()=>fn(r)]}class Jn extends ht{constructor(t){super(),mt(this,t,qn,Yn,v,{problem:0})}}function Zn(t){let n,e;return{c(){n=E("div"),e=E("kin-button"),e.textContent=`${p("dashboard.runSmartScan")}`,A(e,"size","large"),A(e,"link","#SmartScan"),T(n,"class","dsh_status__cta"),T(n,"id","dashboard-runSmartScan")},m(t,s){P(t,n,s),C(n,e)},p:g,d(t){t&&z(n)}}}function Kn(t){let n,e,s,i;return{c(){n=E("p"),n.textContent=`${sn(t[1])}`,e=j(),s=E("div"),i=E("kin-button"),i.textContent=`${p("scans.seeResults")}`,T(n,"class","dsh_status__desc"),A(i,"size","large"),A(i,"link","#SmartScan"),T(s,"class","dsh_status__cta")},m(t,o){P(t,n,o),P(t,e,o),P(t,s,o),C(s,i)},p:g,d(t){t&&z(n),t&&z(e),t&&z(s)}}}function Qn(t){let n;function e(t,n){return t[0]?Kn:Zn}let s=e(t),i=s(t);return{c(){i.c(),n=L()},m(t,e){i.m(t,e),P(t,n,e)},p(t,[o]){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},i:g,o:g,d(t){i.d(t),t&&z(n)}}}function Xn(t,e,s){let i=!1;const o={type:"smartScan"};return B((()=>{n("app.smartScan.GetStatus").then((t=>{s(0,i="scan_report"===t.statusPrimary)}))})),[i,o]}class te extends ht{constructor(t){super(),mt(this,t,Xn,Qn,v,{})}}function ne(t){let n,e,s,i,o,r,c,a;const l=t[15].default,d=w(l,t,t[14],null);return{c(){n=E("div"),e=E("div"),s=E("iframe"),r=j(),c=E("div"),d&&d.c(),s.src!==(i=t[2])&&T(s,"src",i),T(s,"data-test",o="ipm-elm-"+t[0]),T(s,"title",t[1]),T(e,"class","sve_ipm"),F(e,"display",t[4]?"block":"none"),T(c,"data-slot",""),F(c,"display",t[4]?"none":"block"),T(n,"class","svelte wrap")},m(i,o){P(i,n,o),C(n,e),C(e,s),t[16](s),C(n,r),C(n,c),d&&d.m(c,null),a=!0},p(t,n){(!a||4&n[0]&&s.src!==(i=t[2]))&&T(s,"src",i),(!a||1&n[0]&&o!==(o="ipm-elm-"+t[0]))&&T(s,"data-test",o),(!a||2&n[0])&&T(s,"title",t[1]),(!a||16&n[0])&&F(e,"display",t[4]?"block":"none"),d&&d.p&&16384&n[0]&&I(d,l,t,t[14],n,null,null),(!a||16&n[0])&&F(c,"display",t[4]?"none":"block")},i(t){a||(at(d,t),a=!0)},o(t){lt(d,t),a=!1},d(e){e&&z(n),t[16](null),d&&d.d(e)}}}m();const ee=7e3;function se(t,n){if(!t)return t;try{const e=new URL(t);return Object.entries(n).forEach((([t,n])=>e.searchParams.set(t,encodeURIComponent(n)))),e.href}catch(e){return console.log(e),t}}function ie(t,o,c){let a;S(t,s,(t=>c(13,a=t)));let{$$slots:u={},$$scope:p}=o,{id:f}=o,{opmUrl:m}=o,{title:h}=o,{params:g={}}=o,{condition:_=!0}=o,{timeout:b=ee}=o,{route:$}=o;const y=r.createLogger("component.ipm"),v=W(),x="true"===localStorage.getItem("automationDisableIpm"),w=[];let k,I,C,P,z,E,N,j,L,M=null;function T(){!C&&M&&n("opm.message_shown",{message_id:M})}function A(t){y.debug({isIframe:k,ipmUrl:I,event:t,id:f,impId:t&&t.data?t.data.elmId:null}),k&&t&&t.data&&("windowLoaded"!==t.data.action||""===t.data.elmId||t.data.elmId!=f&&t.data.placement!=f||(y.info("ipm content loaded"),F(),O(Math.round((performance.now()-E)/1e3)),f==parseInt(f)&&n("app.ipm_tracking.track",{elem_id:parseInt(f),response_time:-1}),v("success",f)))}function O(t){l.getValueCached("avdef://config/GuiCache/TrackIpmLoadTime",!0).then((n=>{var e;n&&i.timing("IPM loading",!1===t?66666:t,f,!1===(e=t)?"timeout":e>=6e4?"> 60s":e>=3e4?"30-60 s":e>=15e3?"15-30 s":e>=1e4?"10-15 s":e>=5e3?"5-10 s":e>=4e3?"4-5 s":e>=3e3?"3-4 s":e>=2e3?"2-3 s":e>=1e3?"1-2 s":"0-1 s")}))}function F(){N&&clearTimeout(N)}function D(){const t=null!=f?P[f]:null;return t?Promise.resolve(t):m?Promise.resolve(m):!f&&0!==f||"object"==typeof f?Promise.resolve("about:blank"):"string"==typeof f?function(){if(Number.isInteger(parseInt(f)))return console.error("IPM Component tried to load OPM component with an integer in a string:",f),d.getUrl(parseInt(f),g);return n("av.opm.GetUrlForPlacement",{id:f}).then((t=>t?(M=t.msg_id||null,se(t.url||t,g)):(console.warn("OPM URL empty, for ID:",f),""))).catch((t=>(console.error("Ipm component, av.opm.GetUrlForPlacement failed:",t),U("opmCallFailed"),"")))}():Number.isInteger(f)?d.getUrl(parseInt(f),g):(console.error("IPM component could not recognize id:",f,"of type:",typeof f),U("wrongParam"),Promise.resolve(""))}function R(t=null){y.info("updateFrame",{isIframe:k,ipmUrl:I}),c(11,C=null),t&&t.url&&M!=t.msg_id&&(T(),M=t.msg_id),k&&(F(),(t&&t.url?Promise.resolve(t.url):D()).then((t=>{t=se(t,g),E=performance.now(),y.info("loading ipm url: "+t),I!==t&&(N=setTimeout((()=>{O(!1),U("timeout")}),b),c(2,I=t))})))}function U(t,n=0){c(11,C=t),console.warn("Ipm component error:",C,"for id:",f),v("error",{message:t,code:n,id:f})}return B((()=>{R()})),V((()=>{F(),w.forEach((t=>t())),window.removeEventListener("message",A),window.removeEventListener("beforeunload",T)})),function(){let t;try{t=JSON.parse(localStorage.getItem("IPM_OVERRIDE")),P=t||{},t&&y.info("using override",t)}catch{y.error("Failed to parse localStorage.IPM_OVERRIDE"),P={}}}(),window.addEventListener("beforeunload",T,!1),window.addEventListener("message",A,!1),w.push(e.on("ASW_NOTIF_RELOAD_IPM",(()=>R())),e.on("ipm.reload."+f,(t=>R(t)))),t.$$set=t=>{"id"in t&&c(0,f=t.id),"opmUrl"in t&&c(5,m=t.opmUrl),"title"in t&&c(1,h=t.title),"params"in t&&c(6,g=t.params),"condition"in t&&c(7,_=t.condition),"timeout"in t&&c(8,b=t.timeout),"route"in t&&c(9,$=t.route),"$$scope"in t&&c(14,p=t.$$scope)},t.$$.update=()=>{12288&t.$$.dirty[0]&&null!=a&&(a?!1===j&&(y.debug("went online"),R()):(y.debug("went offline"),F(),U("offline")),c(12,j=a)),2176&t.$$.dirty[0]&&c(10,k=!C&&!x&&_),1544&t.$$.dirty[0]&&null!=$&&k&&(y.debug("change of route: "+$),z.contentWindow&&z.contentWindow.postMessage&&z.contentWindow.postMessage("route:"+$,"*")),1028&t.$$.dirty[0]&&c(4,L=k&&I)},[f,h,I,z,L,m,g,_,b,$,k,C,j,a,p,u,function(t){q[t?"unshift":"push"]((()=>{z=t,c(3,z)}))}]}class oe extends ht{constructor(t){super(),mt(this,t,ie,ne,v,{id:0,opmUrl:5,title:1,params:6,condition:7,timeout:8,route:9},[-1,-1])}}var re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ce="object"==typeof re&&re&&re.Object===Object&&re,ae="object"==typeof self&&self&&self.Object===Object&&self;ce||ae||Function("return this")();function le(t){let n,e,s;return e=new oe({props:{id:t[0]}}),{c(){n=E("div"),dt(e.$$.fragment),T(n,"class","dsh_banner")},m(t,i){P(t,n,i),ut(e,n,null),s=!0},p(t,[n]){const s={};1&n&&(s.id=t[0]),e.$set(s)},i(t){s||(at(e.$$.fragment,t),s=!0)},o(t){lt(e.$$.fragment,t),s=!1},d(t){t&&z(n),pt(e)}}}function de(t,n,e){let{id:s=0}=n;return t.$$set=t=>{"id"in t&&e(0,s=t.id)},[s]}class ue extends ht{constructor(t){super(),mt(this,t,de,le,v,{id:0})}}function pe(t){let n,e,s;return e=new Jn({props:{problem:t[1]}}),{c(){n=E("div"),dt(e.$$.fragment),T(n,"slot","SMB")},m(t,i){P(t,n,i),ut(e,n,null),s=!0},p(t,n){const s={};2&n&&(s.problem=t[1]),e.$set(s)},i(t){s||(at(e.$$.fragment,t),s=!0)},o(t){lt(e.$$.fragment,t),s=!1},d(t){t&&z(n),pt(e)}}}function fe(t){let n,e,s;return e=new te({}),{c(){n=E("div"),dt(e.$$.fragment),T(n,"slot","SmartScan")},m(t,i){P(t,n,i),ut(e,n,null),s=!0},i(t){s||(at(e.$$.fragment,t),s=!0)},o(t){lt(e.$$.fragment,t),s=!1},d(t){t&&z(n),pt(e)}}}function me(t){let n;return{c(){n=j()},m(t,e){P(t,n,e)},p:g,i:g,o:g,d(t){t&&z(n)}}}function he(t){let n,e;return n=new ue({props:{id:t[0]}}),{c(){dt(n.$$.fragment)},m(t,s){ut(n,t,s),e=!0},p(t,e){const s={};1&e&&(s.id=t[0]),n.$set(s)},i(t){e||(at(n.$$.fragment,t),e=!0)},o(t){lt(n.$$.fragment,t),e=!1},d(t){pt(n,t)}}}function ge(t){let n,e,s,i;n=new Un({props:{$$slots:{default:[me],SmartScan:[fe],SMB:[pe,({problem:t})=>({1:t}),({problem:t})=>t?2:0]},$$scope:{ctx:t}}});let o=null!=t[0]&&he(t);return{c(){dt(n.$$.fragment),e=j(),o&&o.c(),s=L()},m(t,r){ut(n,t,r),P(t,e,r),o&&o.m(t,r),P(t,s,r),i=!0},p(t,e){const i={};6&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i),null!=t[0]?o?(o.p(t,e),1&e&&at(o,1)):(o=he(t),o.c(),at(o,1),o.m(s.parentNode,s)):o&&(rt(),lt(o,1,1,(()=>{o=null})),ct())},i(t){i||(at(n.$$.fragment,t),at(o),i=!0)},o(t){lt(n.$$.fragment,t),lt(o),i=!1},d(t){pt(n,t),t&&z(e),o&&o.d(t),t&&z(s)}}}function _e(t){let n,e;return n=new $t({props:{$$slots:{default:[ge]},$$scope:{ctx:t}}}),{c(){dt(n.$$.fragment)},m(t,s){ut(n,t,s),e=!0},p(t,[e]){const s={};5&e&&(s.$$scope={dirty:e,ctx:t}),n.$set(s)},i(t){e||(at(n.$$.fragment,t),e=!0)},o(t){lt(n.$$.fragment,t),e=!1},d(t){pt(n,t)}}}function be(t,s,i){let o=null;return e.emit("nui.mainLayout.view","menu"),e.emit("nui.mainLayout.circles","landing-page"),B((()=>{n("app.settings.Get","avdef://config/GuiCache/placement_banner_main").then((t=>{i(0,o=t||0)}))})),[o]}gt(".sta {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n text-align: start;\n height: 100%;\n}\n.sta .sta_header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 2vh 0 0;\n}\n.sta .sta_block {\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: start;\n text-align: center;\n padding: 3vh 0 1vh;\n}\n.sta .sta_icon {\n border-radius: 100%;\n background-color: rgba(255,255,255,0.1);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 3rem;\n transform: scale(0.7);\n}\n.sta .sta_icon__cont {\n position: relative;\n display: inline-block;\n margin: 0 auto;\n}\n.sta .sta_count {\n color: var(--color-ok);\n line-height: 1;\n text-align: center;\n font-weight: 700;\n}\n.sta .sta_tip {\n padding-bottom: 1rem;\n display: flex;\n justify-content: flex-start;\n}\n.sta .sta_tip__badge {\n white-space: nowrap;\n}\n.sta .sta_info {\n position: absolute;\n bottom: 1rem;\n right: 1rem;\n color: var(--color-text-secondary);\n}\n.sta .sta_tooltip {\n width: 190px;\n}\n.sta .sta_update {\n display: flex;\n flex-direction: row;\n}\n.sta .sta_status-dot {\n flex-shrink: 0;\n width: 7px;\n height: 7px;\n border-radius: 7px;\n display: inline-block;\n vertical-align: middle;\n position: relative;\n margin-top: 2px;\n background-color: var(--color-ok);\n}\n");function $e(t){let n;function e(t,n){return t[2]===Pt?Ie:ke}let s=e(t),i=s(t);return{c(){i.c(),n=L()},m(t,e){i.m(t,e),P(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&z(n)}}}function ye(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.scannedSites.info")}`,T(n,"class","p -small")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function ve(t){let n;function e(t,n){return t[2]===Pt?Pe:Ce}let s=e(t),i=s(t);return{c(){i.c(),n=L()},m(t,e){i.m(t,e),P(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&z(n)}}}function xe(t){let n,e,s;return{c(){n=E("p"),n.textContent=`${p("statistics.threats.info")}`,e=j(),s=E("p"),s.textContent=`${p("statistics.threats.info.desc")}`,T(n,"class","p -small"),T(s,"class","p -tiny -secondary g-margin-top--15")},m(t,i){P(t,n,i),P(t,e,i),P(t,s,i)},p:g,d(t){t&&z(n),t&&z(e),t&&z(s)}}}function Se(t){let n,e,s,i,o,r,a,l,d,u,m;return{c(){n=E("p"),n.textContent=`${p("statistics.updates.info")}`,e=j(),s=E("div"),i=E("span"),o=j(),r=E("div"),a=E("p"),a.textContent=`${p("statistics.updates.info.virus")}`,l=j(),d=E("p"),d.textContent=`${p("statistics.updates.info.virus.desc")}`,u=j(),m=E("p"),m.textContent=`${p("statistics.updates.info.virus.date",(()=>{const t=1e3*c.getState().lastUpdateTime,n=f(t);return f().diff(n,"days")>1?n.format("MMM Do YYYY"):f().startOf("day")>n?p("statistics.updates.info.virus.date.yesterday",n.format("LT")):p("statistics.updates.info.virus.date.today",n.format("LT"))})())}`,T(n,"class","p -small"),T(i,"class","sta_status-dot g-margin-right--5"),T(a,"class","p -tiny -strong"),T(d,"class","p -tiny -secondary"),T(m,"class","p -tiny color-ok -text"),T(s,"class","sta_update g-margin-top--15")},m(t,c){P(t,n,c),P(t,e,c),P(t,s,c),C(s,i),C(s,o),C(s,r),C(r,a),C(r,l),C(r,d),C(r,u),C(r,m)},p:g,d(t){t&&z(n),t&&z(e),t&&z(s)}}}function we(t){let n;function e(t,n){return t[1]?Ee:ze}let s=e(t),i=s(t);return{c(){i.c(),n=L()},m(t,e){i.m(t,e),P(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&z(n)}}}function ke(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.smartscans.info.overall")}`,T(n,"class","p -small")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Ie(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.smartscans.info")}`,T(n,"class","p -small")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Ce(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.scannedFiles.info.overall")}`,T(n,"class","p -small")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Pe(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.scannedFiles.info")}`,T(n,"class","p -small")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function ze(t){let n,e,s;function i(t,n){return t[2]===Pt?je:Ne}let o=i(t),r=o(t);return{c(){n=E("p"),n.textContent=`${p("statistics.attacks.info.ok")}`,e=j(),r.c(),s=L(),T(n,"class","p -small")},m(t,i){P(t,n,i),P(t,e,i),r.m(t,i),P(t,s,i)},p(t,n){o===(o=i(t))&&r?r.p(t,n):(r.d(1),r=o(t),r&&(r.c(),r.m(s.parentNode,s)))},d(t){t&&z(n),t&&z(e),r.d(t),t&&z(s)}}}function Ee(t){let n;function e(t,n){return t[2]===Pt?Me:Le}let s=e(t),i=s(t);return{c(){i.c(),n=L()},m(t,e){i.m(t,e),P(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&z(n)}}}function Ne(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.attacks.info.ok.desc.overall")}`,T(n,"class","p -tiny -secondary g-margin-top--15")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function je(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.attacks.info.ok.desc")}`,T(n,"class","p -tiny -secondary g-margin-top--15")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Le(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.attacks.info.overall")}`,T(n,"class","p -small")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Me(t){let n;return{c(){n=E("p"),n.textContent=`${p("statistics.attacks.info")}`,T(n,"class","p -small")},m(t,e){P(t,n,e)},p:g,d(t){t&&z(n)}}}function Te(t){let n;function e(t,n){return"attacks"===t[0]?we:"updates"===t[0]?Se:"threats"===t[0]?xe:"scannedFiles"===t[0]?ve:"scannedSites"===t[0]?ye:"smartscans"===t[0]?$e:void 0}let s=e(t),i=s&&s(t);return{c(){n=E("div"),i&&i.c(),T(n,"class","sta_tooltip")},m(t,e){P(t,n,e),i&&i.m(n,null)},p(t,[o]){s===(s=e(t))&&i?i.p(t,o):(i&&i.d(1),i=s&&s(t),i&&(i.c(),i.m(n,null)))},i:g,o:g,d(t){t&&z(n),i&&i.d()}}}function Ae(t,n,e){let{id:s=null}=n,{count:i=null}=n,{filter:o=Pt}=n;return t.$$set=t=>{"id"in t&&e(0,s=t.id),"count"in t&&e(1,i=t.count),"filter"in t&&e(2,o=t.filter)},[s,i,o]}class Oe extends ht{constructor(t){super(),mt(this,t,Ae,Te,v,{id:0,count:1,filter:2})}}function Fe(t,n,e){const s=t.slice();return s[11]=n[e].id,s[12]=n[e].desc,s[13]=n[e].icon,s[14]=n[e].action,s[15]=n[e].info,s[16]=n[e].count,s[17]=n[e].actionText,s[4]=n[e].data,s}function De(t){let n,e,s=t[1],i=[];for(let r=0;r<s.length;r+=1)i[r]=Ue(Fe(t,s,r));const o=t=>lt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();n=L()},m(t,s){for(let n=0;n<i.length;n+=1)i[n].m(t,s);P(t,n,s),e=!0},p(t,e){if(3&e){let r;for(s=t[1],r=0;r<s.length;r+=1){const o=Fe(t,s,r);i[r]?(i[r].p(o,e),at(i[r],1)):(i[r]=Ue(o),i[r].c(),at(i[r],1),i[r].m(n.parentNode,n))}for(rt(),r=s.length;r<i.length;r+=1)o(r);ct()}},i(t){if(!e){for(let t=0;t<s.length;t+=1)at(i[t]);e=!0}},o(t){i=i.filter(Boolean);for(let n=0;n<i.length;n+=1)lt(i[n]);e=!1},d(t){!function(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(i,t),t&&z(n)}}}function Re(t){let n,e,s,i,o,r,c=t[17]+"";function a(){return t[7](t[14])}return{c(){n=E("br"),e=j(),s=E("button"),i=N(c),T(s,"class","a -small")},m(t,c){P(t,n,c),P(t,e,c),P(t,s,c),C(s,i),o||(r=M(s,"click",a),o=!0)},p(n,e){t=n,2&e&&c!==(c=t[17]+"")&&O(i,c)},d(t){t&&z(n),t&&z(e),t&&z(s),o=!1,r()}}}function Ue(t){let n,e,s,i,o,r,c,a,l,d,u,p,f,m,h,g,_,b,$,y=He(t[16])+"",v=t[12]+"";d=new Oe({props:{id:t[11],filter:t[0],count:t[16]}});let x=t[14]&&Re(t);return{c(){n=E("div"),e=E("div"),s=E("kin-icon"),o=j(),r=E("kin-tooltip"),c=E("div"),c.innerHTML='<kin-icon name="icon-m-action-info" size="18"></kin-icon>',a=j(),l=E("div"),dt(d.$$.fragment),u=j(),p=E("div"),f=N(y),m=j(),h=E("div"),g=N(v),_=j(),x&&x.c(),b=j(),A(s,"name",i=t[13]),A(s,"size","80"),A(s,"class","sta_icon"),T(c,"slot","tooltip-activator"),T(l,"slot","tooltip"),A(r,"class","sta_info"),T(e,"class","sta_icon__cont"),T(p,"class","sta_count h1"),T(h,"class","sta_desc"),T(n,"class","sixpack__2 sta_block")},m(t,i){P(t,n,i),C(n,e),C(e,s),C(e,o),C(e,r),C(r,c),C(r,a),C(r,l),ut(d,l,null),C(n,u),C(n,p),C(p,f),C(n,m),C(n,h),C(h,g),C(h,_),x&&x.m(h,null),C(n,b),$=!0},p(t,n){(!$||2&n&&i!==(i=t[13]))&&A(s,"name",i);const e={};2&n&&(e.id=t[11]),1&n&&(e.filter=t[0]),2&n&&(e.count=t[16]),d.$set(e),(!$||2&n)&&y!==(y=He(t[16])+"")&&O(f,y),(!$||2&n)&&v!==(v=t[12]+"")&&O(g,v),t[14]?x?x.p(t,n):(x=Re(t),x.c(),x.m(h,null)):x&&(x.d(1),x=null)},i(t){$||(at(d.$$.fragment,t),$=!0)},o(t){lt(d.$$.fragment,t),$=!1},d(t){t&&z(n),pt(d),x&&x.d()}}}function Ge(t){let n,e,s,i,o,r,c,a,l,d,u,f,m,_,b,v,x,S,w,k,I,L,A,O=p("statistics.filter.30")+"",F=p("statistics.filter.total")+"",R=p("statistics.security.blog")+"",U=t[1]&&De(t);return{c(){n=E("div"),e=E("div"),s=E("h3"),s.textContent=`${p("statistics.claim",p(t[2]))}`,i=j(),o=E("div"),r=E("button"),c=N(O),l=j(),d=E("button"),u=N(F),m=j(),_=E("div"),U&&U.c(),b=j(),v=E("div"),x=E("span"),x.textContent=`${p("statistics.security.badge")}`,S=j(),w=E("p"),T(s,"class","h3"),T(r,"data-test","stats-30day"),r.disabled=a=t[0]===Pt,D(r,"-active",t[0]===Pt),T(d,"data-test","stats-overall"),d.disabled=f="overall"===t[0],D(d,"-active","overall"===t[0]),T(o,"class","linkgroup g-margin-left--10"),T(e,"class","sta_header"),T(_,"class","sixpack -wrap"),T(x,"class","sta_tip__badge badge -small -tip g-margin-right--10"),T(w,"class","span -small -secondary"),T(v,"class","sta_tip"),T(n,"class","sta")},m(a,p){var f;P(a,n,p),C(n,e),C(e,s),C(e,i),C(e,o),C(o,r),C(r,c),C(o,l),C(o,d),C(d,u),C(n,m),C(n,_),U&&U.m(_,null),C(n,b),C(n,v),C(v,x),C(v,S),C(v,w),w.innerHTML=R,I=!0,L||(A=[M(r,"click",t[5]),M(d,"click",t[6]),(f=k=h.call(null,w),f&&y(f.destroy)?f.destroy:g)],L=!0)},p(t,[n]){(!I||1&n&&a!==(a=t[0]===Pt))&&(r.disabled=a),1&n&&D(r,"-active",t[0]===Pt),(!I||1&n&&f!==(f="overall"===t[0]))&&(d.disabled=f),1&n&&D(d,"-active","overall"===t[0]),t[1]?U?(U.p(t,n),2&n&&at(U,1)):(U=De(t),U.c(),at(U,1),U.m(_,null)):U&&(rt(),lt(U,1,1,(()=>{U=null})),ct())},i(t){I||(at(U),I=!0)},o(t){lt(U),I=!1},d(t){t&&z(n),U&&U.d(),L=!1,$(A)}}}function He(t){return t.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g,",")}function Be(t,e,s){let i=null,o=null,r=Pt;const c=u.getProductStringId();let a=null;function l(){Promise.all([n("avService.Stats.Get"),n("app.scanViruses.GetHistory")]).then((t=>{s(4,i=t[0]),s(3,o=t[1])}))}B((()=>{l(),a=setInterval((()=>l()),5e3)})),V((()=>{clearInterval(a)}));let d;return t.$$.update=()=>{25&t.$$.dirty&&s(1,d=function(t,n,e="overall"){if(!t)return null;const s=t[e];return[{id:"attacks",desc:p("statistics.attacks"),icon:"icon-l-pc-ok",action:null,count:s.fileShield.infectedCount+s.webShield.infectedCount},{id:"updates",desc:p("statistics.updates"),icon:"icon-l-realtime-updates",action:null,count:s.updates.vps+s.updates.streaming},{id:"threats",desc:p("statistics.threats"),icon:"icon-l-virus-chest",actionText:p("statistics.openchest"),action(){location.hash="#VirusChest"},count:t.chestItemCount},{id:"scannedFiles",desc:p("statistics.scannedFiles"),icon:"icon-l-file-scan",action:null,count:s.fileShield.scannedCount},{id:"scannedSites",desc:p("statistics.scannedSites"),icon:"icon-l-website-scan",action:null,count:s.webShield.scannedCount},{id:"smartscans",desc:p("statistics.smartscans"),icon:"icon-l-smart-scan",actionText:p("statistics.runsmartscan"),action(){location.hash="#SmartScan"},count:s.odDemandScanner.sessionCount}]}(i,0,r))},[r,d,c,o,i,()=>s(0,r=Pt),()=>s(0,r="overall"),t=>t()]}class Ve extends ht{constructor(t){super(),mt(this,t,Be,Ge,v,{})}}function We(t){let n,e;return n=new Ve({}),{c(){dt(n.$$.fragment)},m(t,s){ut(n,t,s),e=!0},p:g,i(t){e||(at(n.$$.fragment,t),e=!0)},o(t){lt(n.$$.fragment,t),e=!1},d(t){pt(n,t)}}}class Ye extends ht{constructor(t){super(),mt(this,t,null,We,v,{})}}export default class extends ht{constructor(t){super(),mt(this,t,be,_e,v,{})}}export{Ye as stats};const qe={name:"Dashboard",version:"1.2.524",created:"2021-03-10T09:57:10.153Z"};export{qe as metadata};