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":"Firewall","version":"1.2.463","created":"2021-03-10T09:07:21.250Z"} import{productModel as e,napiUtils as t,ipmService as n,settingsService as i}from"./napiExtensions.js";import l from"./ractive.js";import{eventer as o,napiTracker as s,serviceRequest as a,onlineChecker as r,windowApi as c}from"./napi.js";import{nls as d,format as p,moment as u}from"./i18n.js";import{logger as m,trapTabNavigation as f,TabableToggler as g,TabTrapper as h,ipValidator as _,Router as v,stringUtils as w}from"./libs.js";import{modals as b}from"./ractiveComponents.js";import{objectFromEntriesPolyfill as k}from"./plugins.js";var y=".frw_half {\n width: 50%;\n float: left;\n position: relative;\n}\n.frw_network {\n padding: 15px 0;\n clear: both;\n width: 100%;\n position: relative;\n border-bottom: solid 1px var(--table-border);\n}\n.frw_network:first-of-type {\n border-top: solid 1px var(--table-border);\n}\n.frw_network:hover {\n background-color: var(--table-hover);\n}\n.frw_network__wrap {\n padding: 15px 0;\n}\n.frw_network__icon {\n display: inline-block;\n vertical-align: middle;\n font-size: 50px;\n}\n.frw_network__details {\n display: inline-block;\n vertical-align: top;\n padding: 8px 15 0;\n max-width: 75%;\n}\n.frw_label {\n display: inline-block;\n min-width: 40px;\n}\n.frw_toggle {\n position: absolute;\n right: 5px;\n top: 25px;\n}\n.frw_connected,\n.frw_mode {\n display: block;\n vertical-align: middle;\n float: left;\n}\n.frw_mode {\n padding-top: 10px;\n padding-bottom: 10px;\n}\n.frw_connected {\n padding: 0 5px;\n}\n.frw_links {\n text-align: end;\n margin-top: 8px;\n}\n.frw_links a,\n.frw_links button {\n margin: 0 10px;\n}\n.frw_links a:last-child,\n.frw_links button:last-child {\n margin-right: 0;\n}\n.frw_apps {\n display: flex;\n flex-flow: row;\n}\n.frw_app {\n float: left;\n width: 16.67%;\n padding: 15px 3px 10px;\n text-align: center;\n position: relative;\n cursor: pointer;\n border-radius: var(--cube-radius);\n}\n.frw_app:focus,\n.frw_app:hover {\n background-color: var(--table-hover);\n transform: scale(1.08);\n}\n.frw_app__icon {\n font-size: 32px;\n margin-bottom: 8px;\n}\n.frw_app__blocked {\n position: absolute;\n top: 38px;\n left: 50%;\n margin-left: 5px;\n font-size: 18px;\n background-color: #fff;\n border-radius: 50px;\n width: 20px;\n height: 20px;\n line-height: 20px;\n text-align: center;\n}\n.frw_switch {\n margin-top: 8px;\n margin-bottom: 12px;\n padding-left: 8px;\n}\n.frw_switch .switch__label {\n min-width: 120px;\n}\n.frw_empty {\n width: 100%;\n padding: 20px;\n text-align: center;\n clear: both;\n}\n[dir=rtl] .frw_links a:last-child,\n[dir=rtl] .frw_links button:last-child {\n margin-right: 10px;\n margin-left: 0;\n}\n[dir=rtl] h3.frw_half {\n left: 15px;\n}\n[dir=rtl] .frw_toggle {\n right: auto;\n left: 5px;\n}\n";const x="ais_cmp_fw",$={invalid:"invalid",inactive:"inactive",wating:"wating",running:"running",notInstalled:"not_installed"},S={private:1,public:0},I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKsAAACrCAMAAAAuNpwrAAAAilBMVEUAAACyuP2Wp92OpeSMn9SKn9SLn9SOotiKntOQo9iOpNqLn9SLn9WNotaKn9SNodWKn9WYq+KLn9SLoNWLn9SLoNWModaMoNWLn9SMoNWLn9SLn9WLn9SLn9SNodaKn9SMoNWOo9iLn9SLn9SKn9SLn9SMoNWMoNWKn9WKn9SLn9SLn9SLn9SKntR95PdyAAAALXRSTlMAAxALcPlkNPAcFs9+KZskqAh4R5ZVL0yPUMlqXq0+4kIgsqHY0zlZg8GI6bh8ayLtAAAFbUlEQVR42uzY226CQBSF4YVQLCggLSieqtJYj/P+r9cY1NCaJnunmAm6vot1PRf8ITMgIiIiIiIiIiIiIvpDbnrAxkyA2XX8anbnmVZzPI9XTVmfNzOvT98MrvMJbK+zN/FlDh5UEhdBP0c1q9qMgeT3jM4T1ea9PsPaLG+m2/+oz1fsQyN58WCT60BscwghMZpCZ+lBYr2HnAORwRo68QIS5Q6Nm221wRaQCFcQG0VojUUGq9IOxI4erLaVTaBgt62sh5NWtNVhWxfP21YPJ2yr6baCB20rhlVpCLGSbT19W2O2JeYq2/I919Zov9fO60vX1qjbchxbo2xriNa4batIoOAUARTSLPxXWz8FxodCYmZQiEze4L/AKYdQSMsICm6Z3Jy1NVy2Zb2t+ZRtPWRbIcRytiVvK2BbbIttNduW/h47YFtP39amZW1ZfB9QtsX3Adncpy23c59H4FTTVhci8QQ6xRpNW8T3Out3u2a2pCYUBcBmUwFlFRRUBgX3Of//eykGymhWqWRKSOiHfvKcug/TUl6m/OvvDb0Rre90/+wQ/X0WzFOAnrSlDm0NbdEb/tW21kNbz7fl8jTFi9tyhraGtoa2/vu2lim9oU1bo8NL7wdatvXa+wGrVVuvvR9w9vwB5ud+/G+2pRoRLbBkQQtMCXlAadfWI6oc2501oQXb+qx/67k1U2jBH368VVvOmhcytPVpbWlDW5/S1mxoa2hraGtoa2jr5W3l/WnrfH5tW3mbO6IlrySTNX3hePZpg3cdwcVeP+oIy1pRo3mt5F6OvbhXYYf38uz8pqzR5kFtyeYhrDYP0jf5o7J7BbUO32m6Gd/r5MX3utxpVqlH/xMyMNAaUwN/5jfSaimN1DvRyHJ/InN7k0mj7U2u9b1mKuDyLIlsoBAPPHFgJ3N4lyWc5QSpTMGWAErR4U1GcJU1TCRCmcgC35AQzZAMVWSMJRKzFXGZiZjEIhYHEZVMDI1QDJ9EJgpHucJa3mAlc57kcHHBjLawjUxwa1kwq6VC/KFEhXGiNTokfqNs8SEF8krhh0JQPrTIb8rA/1ByAK3WGFR9xb/GuBzTAbSJzm/ZlSpdoHjjt1ga3UDj16gJHWJ14BecDZ/ucJ6o/BwnpENYgcIz5CPwdV2Bla7BOrAgCUwIgxkcgjHEQQ5usKiWHkHVP0ZWvx7JbiPR/YjSjKgQRXzF9/khJ4evbCYarmFs6zdOypuxAFtGsJMAHJnDSTawkhQieYPMmGjMjInZjFyNEPayhvdqpJAlXMQDXc7VSFmNXP16xJoYMc1IyVe8H38rxXLijsfXTjyjvzLyyOH647468Qx4htiio+RLhQcOxomOkojOA+GuG0/WHxGa9AglhgZr1/EfuqGENCyuLp1G0Xv1Z1Cz2cBh/64Q22cf105VzDS1UFN7i3+2Y5T3/Rh2+xy8/QLm5REu5QimpQ56OYVRuYSodGCx9yDb72BsnxVm9lljm6YqVpqaaKk9QznbY3jfZ9XCEJwygmW18FQtDMoAVuUF1uUckn0BuZ0D1wJmxQXMYqlgFXMf1XE0/LljocwLE5aFC6cihsAbg+5lMPJCOHoJJN4RQm8EmafD2AuqhSdwi2W1da7UCzXHUauFVrVwC5diBlMvrhYeYOXlsPYWEHnRbeGqWRhPVoCq0Ae6+536E+Ku/Gh54phGQB/4OOakH/cGEx1QoQ91NW1pE+OAf62V1VLejPymsBalsbgpabQ3IrCNI9hyhFTWN43gXGvV6L2WDrubNhI08mTaqJBTI0cucKrGGkaBCqubRneyGq2/0dSE46OiWttGSS230eJOs0bhnWLIH5VNx420bT/6HxgY+HS+ALUTm6fdnCOSAAAAAElFTkSuQmCC",C=l.extend({template:{v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["nls"],s:'_0("firewall")'}}],cssCls:"frw",settingsUrl:"#Settings/Firewall",upsell:[{t:2,x:{r:["licensed"],s:"!_0"}}],inactive:[{t:2,x:{r:["firewallActive"],s:"!_0"}}],inactiveMsg:[{t:2,x:{r:["nls"],s:'_0("firewall.inactive.tooltip")'}}],backHash:"#security"},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:7,e:"Crumbs",a:{customBreadcrumbs:0,section:"security",moduleId:"firewall",moduleTranslationId:"firewall"}}]}," ",{t:7,e:"div",a:{slot:"controls"},f:[{t:7,e:"Switch",a:{attr:"{id:'firewallSwitch'}",checked:[{t:2,r:"firewallActive"}],disabled:[{t:2,r:"firewallSwitchDisabled"}],isCheckbox:"false",cssCls:[{t:4,f:["-waiting"],n:50,r:"firewallSwitchDisabled"}],title:[{t:3,x:{r:["nls"],s:'_0("firewall")'}}]},v:{domClick:"toggleFirewall"}}]}," ",{t:4,f:[{t:7,e:"div",a:{slot:"upsell"},f:[{t:7,e:"Upsell",a:{desc:[{t:2,x:{r:["nls"],s:'_0("upsell.desc.firewall")'}}],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:"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("firewall.settings.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"h3",a:{class:"h3 -margins frw_half g-margin-top--30"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.currentNetwork")'}}]}," ",{t:4,f:[{t:7,e:"h3",a:{class:"h3 -margins frw_half g-margin-top--30"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.mode")'}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"frw_network g-clearfix"},f:[{t:7,e:"div",a:{class:"frw_connected frw_half"},f:[{t:4,f:[{t:7,e:"Icon",a:{name:["network-",{t:2,x:{r:["byLAN"],s:'_0===1?"lan":"wifi"'}}],cssCls:"frw_network__icon color-ok -text"}}],n:50,r:"_isConnected"},{t:4,n:51,f:[{t:7,e:"Icon",a:{name:"x",cssCls:"frw_network__icon color-critical -text"}}],r:"_isConnected"}," ",{t:7,e:"div",a:{class:"frw_network__details"},f:[{t:7,e:"h4",a:{class:"h4"},f:[{t:2,r:"network_friendly_name"}]}," ",{t:4,f:[{t:7,e:"p",a:{class:"p -small color-ok -text"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.network.connected")'}}]}],n:50,r:"_isConnected"},{t:4,n:51,f:[{t:7,e:"p",a:{class:"p -small color-critical -text"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.network.notConnected")'}}]}],r:"_isConnected"}," ",{t:4,f:[{t:7,e:"div",a:{class:"text -small -secondary g-margin-top--10"},t0:"slide",f:[{t:4,f:[{t:7,e:"p",a:{class:"p g-margin-bottom--10"},f:[{t:7,e:"span",a:{class:"frw_label"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.adapterDescription")'}},":"]}," ",{t:7,e:"br"},{t:2,r:"adapter_description"}]}],n:50,r:"adapter_description"}," ",{t:4,f:[{t:7,e:"p",a:{class:"p"},f:[{t:7,e:"span",a:{class:"frw_label"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.macAddress")'}},":"]},{t:2,r:"gw_mac"}]}],n:50,r:"gw_mac"}]}],n:50,x:{r:["_expanded","_isConnected"],s:"_0&&_1"}}]}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"frw_mode frw_half"},f:[{t:7,e:"Switch",a:{attr:["{id: '",{t:2,r:"MODE_SWITCH_ID_PREFIX"},{t:2,r:"i"},"'}"],txt:["{left:'",{t:3,x:{r:["nls"],s:'_0("firewall.mode.private")'}},"',right:'",{t:3,x:{r:["nls"],s:'_0("firewall.mode.public")'}},"'}"],checked:[{t:2,r:"_mode"}],isCheckbox:"false",preventToggle:"true",values:["{left:'",{t:2,r:"MODES.private"},"',right:'",{t:2,r:"MODES.public"},"'}"],disabled:[{t:2,r:"_modeSwitchDisabled"}],cssCls:[{t:4,f:["-waiting"],n:50,r:"_modeSwitchDisabled"}],title:[{t:2,x:{r:["_mode","MODES.private","nls"],s:'_0==_1?_2("firewall.mode.private"):_2("firewall.mode.public")'}}]},v:{domClick:"toggleMode"}}," ",{t:4,f:[{t:7,e:"p",a:{class:"p -small g-margin-top--10"},t0:"slide",f:[{t:4,f:[{t:3,x:{r:["nls"],s:'_0("firewall.mode.home.desc")'}}],n:50,x:{r:["_mode","MODES.private"],s:"_0==_1"}},{t:4,n:51,f:[{t:3,x:{r:["nls"],s:'_0("firewall.mode.public.desc")'}}],x:{r:["_mode","MODES.private"],s:"_0==_1"}}]}],n:50,r:"_expanded"}]}," ",{t:7,e:"kin-button",a:{size:"small",type:"blank",icononly:0,class:"frw_toggle",title:[{t:2,x:{r:["nls"],s:'_0("global.showDetails")'}}," - ",{t:2,r:"network_friendly_name"}," -"]},v:{click:{n:"toggleNetworkDetails",d:[{t:2,r:"i"}]}},f:[{t:7,e:"kin-icon",a:{name:[{t:2,x:{r:["_expanded"],s:'_0?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down"'}}],size:"12"}}]}],n:50,r:"_isConnected"}]}],n:52,i:"i",r:"connectedNets"}],n:50,x:{r:["connectedNets.length"],s:"_0>0"}},{t:4,n:51,f:[{t:7,e:"div",a:{class:"frw_empty color-white -bg g-margin-bottom--5","data-test":"frw_noConnectedNets"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.noConnectedNetworkFound")'}}]}],x:{r:["connectedNets.length"],s:"_0>0"}}," ",{t:7,e:"div",a:{class:"frw_links text -small"},f:[{t:4,f:[{t:7,e:"button",v:{click:"showNetConnections"},a:{class:"a","data-test":"frw_connections"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.networkConnections")'}}]},"|"],n:50,r:"showNetworkConnections"}," ",{t:7,e:"button",v:{click:"showFirewallLogs"},a:{class:"a","data-test":"frw_logs"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.firewallLogs")'}}]},"|",{t:7,e:"button",v:{click:"openSettings"},a:{class:"a","data-test":"frw_settings"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.settings")'}}]}]}," ",{t:7,e:"h3",a:{class:"h3 -margins g-margin-top--20"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.recentAppsManagedByFirewall")'}}]}," ",{t:7,e:"div",a:{class:"frw_apps"},f:[{t:4,f:[{t:4,f:[{t:7,e:"button",v:{click:"showAppRules"},a:{class:"frw_app"},f:[{t:7,e:"ImgIcon",a:{src:["data:image/png;base64,",{t:2,r:"icon"}],cssCls:"frw_app__icon"}}," ",{t:4,f:[{t:7,e:"Icon",a:{name:"blocked",cssCls:"color-danger -text frw_app__blocked"}}],n:50,r:"blocked"}," ",{t:7,e:"p",a:{class:"p -small"},f:[{t:2,r:"name"}]}," ",{t:7,e:"p",a:{class:"p -small -secondary"},f:[{t:4,f:[{t:7,e:"span",a:{class:"color-danger -text"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.app.blocked")'}}]}],n:50,r:"blocked"},{t:4,n:51,f:[{t:7,e:"span",a:{class:"color-ok -text"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.app.allowed")'}}]}],r:"blocked"}]}]}],n:52,r:"apps"}],n:50,x:{r:["apps","apps.length"],s:"_0&&_1"}},{t:4,n:51,f:[{t:7,e:"div",a:{class:"frw_empty color-white -bg"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.noManagedAppFound")'}}]}],x:{r:["apps","apps.length"],s:"_0&&_1"}}]}," ",{t:7,e:"div",a:{class:"frw_links text -small"},f:[{t:7,e:"button",v:{click:"showAppRules"},a:{class:"a","data-test":"frw_rules"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.applicationRules")'}}]}]}]}]}]}]}]},css:y,data:()=>({UPSELL_ANIMATION:I,MODES:S,STATUSES:$,MODE_SWITCH_ID_PREFIX:"firewallModeSwitch",status:{status:$.running},firewallSwitchDisabled:!0,connectedNets:[],apps:[],product:e.getProduct(),licensed:e.isLicensed("firewall"),showNetworkConnections:t.isVersionSupported("20.5")}),computed:{firewallActive:{set:function(){},get:function(){return this.get("status.status")===$.running}}},oninit(){this.listeners=[],this.listeners.push(o.on("app.fwserv.networks_changed_event",(e=>{this._setConnectedNets(e)}))),this.listeners.push(o.on("product.change.state.product",(e=>{this.log.debug("product changed; product: "+e),this.set("product",e)}))),this.listeners.push(o.on("product.change.feature.firewall.licensed",(e=>{this.set("licensed",e)}))),this.log=m.createLogger("firewall"),this.log.debug("oninit"),this.netExpansions={},this.observe("licensed",((e,t)=>{this.log.info('licensed changed from "'+t+'" to "'+e+'"'),e?this.initialize():this.terminate()})),this.on("Upsell.init",(()=>{s.event("Upsell","View")})),this.on("Upsell.buy",(function(){n.openWindow(343)})),this.on("toggleFirewall",this.onToggleFirewall.bind(this)),this.on("toggleMode",this.onToggleMode.bind(this)),this.on("toggleNetworkDetails",((e,t)=>{const n=this.get("connectedNets."+t),i=!n._expanded;this.netExpansions[n.network_id]=i,this.set("connectedNets."+t+"._expanded",i)})),this.on("showNetConnections",(()=>{a("av.command","show_network_connections")})),this.on("showFirewallLogs",(()=>{this.log.debug("opening firewall logs"),a("av.command","show_fw_logs")})),this.on("showAppRules",(()=>{this.log.debug("opening app rulez"),a("av.command","show_fw_app_rules")})),this.on("openSettings",(()=>{this.log.debug("opening settings"),window.location.hash="Settings/Firewall"})),this.initialize()},onteardown(){this.log.debug("onteardown"),this.terminate(),this.listeners.forEach((e=>{e()}))},initialize(){this.get("licensed")&&(this.offStatusChanged=o.on("product.change.feature.ais_cmp_fw.enabled",(e=>{this.onStatusChanged({status:e?$.running:$.inactive})})),this.pollStatus(),this.startAppPolling(),this._getConnectedNets())},_getConnectedNets(){a("app.fwserv.get_net_profiles",{only_connected:1}).then((e=>{this._setConnectedNets(e)})).catch((e=>{this.log.error("app.fwserv.get_net_profiles",JSON.stringify(e))}))},_setConnectedNets(e){const t=[];for(const n of e)1===n.connected&&(n._modeSwitchDisabled=1===n.read_only,n._isConnected=!0,n._mode=n.mode,n._expanded=this.netExpansions[n.network_id],t.push(n));this.set("connectedNets",t)},terminate(){this.stopAppPolling&&this.stopAppPolling(),this.offStatusChanged&&this.offStatusChanged(),this.offStatusChanged=null},onToggleFirewall(t){t.original.preventDefault();const n=this.get("firewallActive"),i=n?"app.features.Stop":"app.features.Start",l=e=>{this.set("firewallSwitchDisabled",!0),(e=e||{}).featureId="Firewall",a(i,e).then((()=>{this.log.info("firewall successfully "+(n?"stopped":"started"))})).catch((e=>{this.log.error("error while executing "+i+"; error: "+e),this.set("firewallSwitchDisabled",!1)}))};n?(this.log.info("opening the stop option dialog"),b.stopOptions({title:d("firewall.stopOptions.title"),desc:d("firewall.stopOptions.desc")}).then((e=>{const t={time:e.time};this.log.info("stopping firewall; option: "+JSON.stringify(e)),l(t)})).catch((()=>{this.log.info("no stop option selected.. doing nothing")}))):e.isPassiveMode()?(this.log.info("opening passive mode dialog"),b.passiveMode().then((()=>{this.log.info("starting firewall"),l()}))):(this.log.info("starting firewall"),l())},onToggleMode(e){e.original.preventDefault();const t=e.node,n=this.get("connectedNets."+t.id.replace("firewallModeSwitch","")),i=n._mode==S.private?S.public:S.private;this._setMode(n,i)},_setMode(e,t){const n={network_id:e.network_id,mode:parseInt(t)};a("app.fwserv.set_net_profile_full",n).then((()=>{e._mode=t,this.update("connectedNets")})).catch((e=>{console.error("app.fwserv.set_net_profile_full",JSON.stringify(e))}))},onStatusChanged(e){this.log.info("status changed"),this.log.debug("status data: "+JSON.stringify(e)),this.set("status",e),this.set("firewallSwitchDisabled",!1)},pollStatus(){this.log.info("polling status data"),a("app.firewall.GetStatus").then((e=>{this.log.info("status data polled"),this.onStatusChanged(e)})).catch((e=>{this.log.error("error while executing app.firewall.GetStatus; error: "+e)}))},pollApps(e=!0){e&&this.log.info("polling apps"),a("app.firewall.GetLastFwApps").then((n=>{e&&this.log.info("apps polled"),e&&this.log.debug("apps: "+JSON.stringify(n));let i=n.blocked.slice(0,3).map((e=>(e.blocked=!0,e)));i=i.concat(n.allowed.slice(0,6-i.length)),this.set("apps",i),i.forEach(((e,n)=>{t.loadAppIcon(e.path,{iconSize:"large"}).then((e=>{this.set("apps."+n+".icon",e)}))}))})).catch((e=>{this.log.error("error while executing app.firewall.GetLastFwApps; error: "+e)}))},startAppPolling(){this.log.info("starting app polling; interval: 1000 ms"),this.stopAppPolling&&this.stopAppPolling();const e=setInterval(this.pollApps.bind(this,!1),1e3);this.stopAppPolling=()=>{this.log.info("stopping app polling"),clearInterval(e),this.stopAppPolling=null},this.pollApps()}});function P(){}const N=e=>e;function A(e){return e()}function T(){return Object.create(null)}function R(e){e.forEach(A)}function M(e){return"function"==typeof e}function E(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function O(e,...t){if(null==e)return P;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function D(e,t,n){e.$$.on_destroy.push(O(t,n))}function z(e,t,n,i){if(e){const l=L(e,t,n,i);return e[0](l)}}function L(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 B(e,t,n,i,l,o,s){const a=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,o);if(a){const l=L(t,n,i,s);e.p(l,a)}}function F(e){return e&&M(e.destroy)?e.destroy:P}const j="undefined"!=typeof window;let q=j?()=>window.performance.now():()=>Date.now(),G=j?e=>requestAnimationFrame(e):P;const W=new Set;function H(e){W.forEach((t=>{t.c(e)||(W.delete(t),t.f())})),0!==W.size&&G(H)}function U(e){let t;return 0===W.size&&G(H),{promise:new Promise((n=>{W.add(t={c:e,f:n})})),abort(){W.delete(t)}}}function V(e,t){e.appendChild(t)}function Y(e,t,n){e.insertBefore(t,n||null)}function X(e){e.parentNode.removeChild(e)}function J(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function Q(e){return document.createElement(e)}function K(e){return document.createTextNode(e)}function Z(){return K(" ")}function ee(){return K("")}function te(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function ne(e){return function(t){return t.preventDefault(),e.call(this,t)}}function ie(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e,t,n){t in e?e[t]=n:ie(e,t,n)}function oe(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function se(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function ae(e,t,n){e.classList[n?"add":"remove"](t)}function re(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}class ce{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=Q(t.nodeName),this.t=t,this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)Y(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(X)}}const de=new Set;let pe,ue=0;function me(e,t,n,i,l,o,s,a=0){const r=16.666/i;let c="{\n";for(let h=0;h<=1;h+=r){const e=t+(n-t)*o(h);c+=100*h+`%{${s(e,1-e)}}\n`}const d=c+`100% {${s(n,1-n)}}\n}`,p=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(d)}_${a}`,u=e.ownerDocument;de.add(u);const m=u.__svelte_stylesheet||(u.__svelte_stylesheet=u.head.appendChild(Q("style")).sheet),f=u.__svelte_rules||(u.__svelte_rules={});f[p]||(f[p]=!0,m.insertRule(`@keyframes ${p} ${d}`,m.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${p} ${i}ms linear ${l}ms 1 both`,ue+=1,p}function fe(e,t){const n=(e.style.animation||"").split(", "),i=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),l=n.length-i.length;l&&(e.style.animation=i.join(", "),ue-=l,ue||G((()=>{ue||(de.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),de.clear())})))}function ge(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:i}=t,l=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=i,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const i=getComputedStyle(e),l="none"===i.transform?"":i.transform;e.style.transform=`${l} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,l)}}function he(e){pe=e}function _e(){if(!pe)throw new Error("Function called outside component initialization");return pe}function ve(e){_e().$$.on_mount.push(e)}function we(e){_e().$$.on_destroy.push(e)}function be(){const e=_e();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const l=re(t,n);i.slice().forEach((t=>{t.call(e,l)}))}}}function ke(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const ye=[],xe=[],$e=[],Se=[],Ie=Promise.resolve();let Ce=!1;function Pe(e){$e.push(e)}let Ne=!1;const Ae=new Set;function Te(){if(!Ne){Ne=!0;do{for(let e=0;e<ye.length;e+=1){const t=ye[e];he(t),Re(t.$$)}for(he(null),ye.length=0;xe.length;)xe.pop()();for(let e=0;e<$e.length;e+=1){const t=$e[e];Ae.has(t)||(Ae.add(t),t())}$e.length=0}while(ye.length);for(;Se.length;)Se.pop()();Ce=!1,Ne=!1,Ae.clear()}}function Re(e){if(null!==e.fragment){e.update(),R(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Pe)}}let Me;function Ee(){return Me||(Me=Promise.resolve(),Me.then((()=>{Me=null}))),Me}function Oe(e,t,n){e.dispatchEvent(re(`${t?"intro":"outro"}${n}`))}const De=new Set;let ze;function Le(){ze={r:0,c:[],p:ze}}function Be(){ze.r||R(ze.c),ze=ze.p}function Fe(e,t){e&&e.i&&(De.delete(e),e.i(t))}function je(e,t,n,i){if(e&&e.o){if(De.has(e))return;De.add(e),ze.c.push((()=>{De.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}const qe={duration:0};const Ge="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function We(e,t){je(e,1,1,(()=>{t.delete(e.key)}))}function He(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function Ue(e,t,n,i,l,o,s,a,r,c,d,p){let u=e.length,m=o.length,f=u;const g={};for(;f--;)g[e[f].key]=f;const h=[],_=new Map,v=new Map;for(f=m;f--;){const e=p(l,o,f),a=n(e);let r=s.get(a);r?i&&r.p(e,t):(r=c(a,e),r.c()),_.set(a,h[f]=r),a in g&&v.set(a,Math.abs(f-g[a]))}const w=new Set,b=new Set;function k(e){Fe(e,1),e.m(a,d),s.set(e.key,e),d=e.first,m--}for(;u&&m;){const t=h[m-1],n=e[u-1],i=t.key,l=n.key;t===n?(d=t.first,u--,m--):_.has(l)?!s.has(i)||w.has(i)?k(t):b.has(l)?u--:v.get(i)>v.get(l)?(b.add(i),k(t)):(w.add(l),u--):(r(n,s),u--)}for(;u--;){const t=e[u];_.has(t.key)||r(t,s)}for(;m;)k(h[m-1]);return h}function Ve(e){e&&e.c()}function Ye(e,t,n){const{fragment:i,on_mount:l,on_destroy:o,after_update:s}=e.$$;i&&i.m(t,n),Pe((()=>{const t=l.map(A).filter(M);o?o.push(...t):R(t),e.$$.on_mount=[]})),s.forEach(Pe)}function Xe(e,t){const n=e.$$;null!==n.fragment&&(R(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Je(e,t){-1===e.$$.dirty[0]&&(ye.push(e),Ce||(Ce=!0,Ie.then(Te)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Qe(e,t,n,i,l,o,s=[-1]){const a=pe;he(e);const r=t.props||{},c=e.$$={fragment:null,ctx:null,props:o,update:P,not_equal:l,bound:T(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:[]),callbacks:T(),dirty:s,skip_bound:!1};let d=!1;if(c.ctx=n?n(e,r,((t,n,...i)=>{const o=i.length?i[0]:n;return c.ctx&&l(c.ctx[t],c.ctx[t]=o)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](o),d&&Je(e,t)),n})):[],c.update(),d=!0,R(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(X)}else c.fragment&&c.fragment.c();t.intro&&Fe(e.$$.fragment),Ye(e,t.target,t.anchor),Te()}he(a)}class Ke{$destroy(){Xe(this,1),this.$destroy=P}$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)}}function Ze(e){let t,n,i,l,o,s,a,r;const c=e[15].default,d=z(c,e,e[14],null);return{c(){t=Q("div"),n=Q("div"),i=Q("iframe"),s=Z(),a=Q("div"),d&&d.c(),i.src!==(l=e[2])&&ie(i,"src",l),ie(i,"data-test",o="ipm-elm-"+e[0]),ie(i,"title",e[1]),ie(n,"class","sve_ipm"),se(n,"display",e[4]?"block":"none"),ie(a,"data-slot",""),se(a,"display",e[4]?"none":"block"),ie(t,"class","svelte wrap")},m(l,o){Y(l,t,o),V(t,n),V(n,i),e[16](i),V(t,s),V(t,a),d&&d.m(a,null),r=!0},p(e,t){(!r||4&t[0]&&i.src!==(l=e[2]))&&ie(i,"src",l),(!r||1&t[0]&&o!==(o="ipm-elm-"+e[0]))&&ie(i,"data-test",o),(!r||2&t[0])&&ie(i,"title",e[1]),(!r||16&t[0])&&se(n,"display",e[4]?"block":"none"),d&&d.p&&16384&t[0]&&B(d,c,e,e[14],t,null,null),(!r||16&t[0])&&se(a,"display",e[4]?"none":"block")},i(e){r||(Fe(d,e),r=!0)},o(e){je(d,e),r=!1},d(n){n&&X(t),e[16](null),d&&d.d(n)}}}k();const et=7e3;function tt(e,t){if(!e)return e;try{const n=new URL(e);return Object.entries(t).forEach((([e,t])=>n.searchParams.set(e,encodeURIComponent(t)))),n.href}catch(n){return console.log(n),e}}function nt(e,t,l){let c;D(e,r,(e=>l(13,c=e)));let{$$slots:d={},$$scope:p}=t,{id:u}=t,{opmUrl:f}=t,{title:g}=t,{params:h={}}=t,{condition:_=!0}=t,{timeout:v=et}=t,{route:w}=t;const b=m.createLogger("component.ipm"),k=be(),y="true"===localStorage.getItem("automationDisableIpm"),x=[];let $,S,I,C,P,N,A,T,R,M=null;function E(){!I&&M&&a("opm.message_shown",{message_id:M})}function O(e){b.debug({isIframe:$,ipmUrl:S,event:e,id:u,impId:e&&e.data?e.data.elmId:null}),$&&e&&e.data&&("windowLoaded"!==e.data.action||""===e.data.elmId||e.data.elmId!=u&&e.data.placement!=u||(b.info("ipm content loaded"),L(),z(Math.round((performance.now()-N)/1e3)),u==parseInt(u)&&a("app.ipm_tracking.track",{elem_id:parseInt(u),response_time:-1}),k("success",u)))}function z(e){i.getValueCached("avdef://config/GuiCache/TrackIpmLoadTime",!0).then((t=>{var n;t&&s.timing("IPM loading",!1===e?66666:e,u,!1===(n=e)?"timeout":n>=6e4?"> 60s":n>=3e4?"30-60 s":n>=15e3?"15-30 s":n>=1e4?"10-15 s":n>=5e3?"5-10 s":n>=4e3?"4-5 s":n>=3e3?"3-4 s":n>=2e3?"2-3 s":n>=1e3?"1-2 s":"0-1 s")}))}function L(){A&&clearTimeout(A)}function B(){const e=null!=u?C[u]:null;return e?Promise.resolve(e):f?Promise.resolve(f):!u&&0!==u||"object"==typeof u?Promise.resolve("about:blank"):"string"==typeof u?function(){if(Number.isInteger(parseInt(u)))return console.error("IPM Component tried to load OPM component with an integer in a string:",u),n.getUrl(parseInt(u),h);return a("av.opm.GetUrlForPlacement",{id:u}).then((e=>e?(M=e.msg_id||null,tt(e.url||e,h)):(console.warn("OPM URL empty, for ID:",u),""))).catch((e=>(console.error("Ipm component, av.opm.GetUrlForPlacement failed:",e),j("opmCallFailed"),"")))}():Number.isInteger(u)?n.getUrl(parseInt(u),h):(console.error("IPM component could not recognize id:",u,"of type:",typeof u),j("wrongParam"),Promise.resolve(""))}function F(e=null){b.info("updateFrame",{isIframe:$,ipmUrl:S}),l(11,I=null),e&&e.url&&M!=e.msg_id&&(E(),M=e.msg_id),$&&(L(),(e&&e.url?Promise.resolve(e.url):B()).then((e=>{e=tt(e,h),N=performance.now(),b.info("loading ipm url: "+e),S!==e&&(A=setTimeout((()=>{z(!1),j("timeout")}),v),l(2,S=e))})))}function j(e,t=0){l(11,I=e),console.warn("Ipm component error:",I,"for id:",u),k("error",{message:e,code:t,id:u})}return ve((()=>{F()})),we((()=>{L(),x.forEach((e=>e())),window.removeEventListener("message",O),window.removeEventListener("beforeunload",E)})),function(){let e;try{e=JSON.parse(localStorage.getItem("IPM_OVERRIDE")),C=e||{},e&&b.info("using override",e)}catch{b.error("Failed to parse localStorage.IPM_OVERRIDE"),C={}}}(),window.addEventListener("beforeunload",E,!1),window.addEventListener("message",O,!1),x.push(o.on("ASW_NOTIF_RELOAD_IPM",(()=>F())),o.on("ipm.reload."+u,(e=>F(e)))),e.$$set=e=>{"id"in e&&l(0,u=e.id),"opmUrl"in e&&l(5,f=e.opmUrl),"title"in e&&l(1,g=e.title),"params"in e&&l(6,h=e.params),"condition"in e&&l(7,_=e.condition),"timeout"in e&&l(8,v=e.timeout),"route"in e&&l(9,w=e.route),"$$scope"in e&&l(14,p=e.$$scope)},e.$$.update=()=>{12288&e.$$.dirty[0]&&null!=c&&(c?!1===T&&(b.debug("went online"),F()):(b.debug("went offline"),L(),j("offline")),l(12,T=c)),2176&e.$$.dirty[0]&&l(10,$=!I&&!y&&_),1544&e.$$.dirty[0]&&null!=w&&$&&(b.debug("change of route: "+w),P.contentWindow&&P.contentWindow.postMessage&&P.contentWindow.postMessage("route:"+w,"*")),1028&e.$$.dirty[0]&&l(4,R=$&&S)},[u,g,S,P,R,f,h,_,v,w,$,I,T,c,p,d,function(e){xe[e?"unshift":"push"]((()=>{P=e,l(3,P)}))}]}class it extends Ke{constructor(e){super(),Qe(this,e,nt,Ze,E,{id:0,opmUrl:5,title:1,params:6,condition:7,timeout:8,route:9},[-1,-1])}}const lt=e=>({}),ot=e=>({}),st=e=>({}),at=e=>({}),rt=e=>({}),ct=e=>({}),dt=e=>({}),pt=e=>({});function ut(e){let t,n,i;return{c(){t=Q("div"),ie(t,"class","sve_modal__overlay__close")},m(l,o){Y(l,t,o),n||(i=te(t,"click",e[14]),n=!0)},p:P,d(e){e&&X(t),n=!1,i()}}}function mt(e){let t,n;return{c(){t=Q("h2"),n=K(e[0]),ie(t,"class","sve_modal__title")},m(e,i){Y(e,t,i),V(t,n)},p(e,t){1&t&&oe(n,e[0])},d(e){e&&X(t)}}}function ft(e){let t,n;return{c(){t=Q("p"),n=K(e[1]),ie(t,"class","sve_modal__subtitle")},m(e,i){Y(e,t,i),V(t,n)},p(e,t){2&t&&oe(n,e[1])},d(e){e&&X(t)}}}function gt(e){let t,n,i,l,o;return{c(){t=Q("button"),n=Q("kin-icon"),le(n,"name","icon-s-controls-close"),le(n,"size","12"),ie(t,"class","sve_modal__close"),ie(t,"data-test","close"),ie(t,"title",i=d("global.closeModalWindow"))},m(i,s){Y(i,t,s),V(t,n),l||(o=te(t,"click",e[15]),l=!0)},p:P,d(e){e&&X(t),l=!1,o()}}}function ht(e){let t,n,i;const l=e[13]["modal-ipm"],o=z(l,e,e[12],ot);return{c(){t=Q("div"),o&&o.c(),ie(t,"class","sve_modal__ipm"),ie(t,"style",n=`${e[7]} margin-top: 0;`)},m(e,n){Y(e,t,n),o&&o.m(t,null),i=!0},p(e,s){o&&o.p&&4096&s&&B(o,l,e,e[12],s,lt,ot),(!i||128&s&&n!==(n=`${e[7]} margin-top: 0;`))&&ie(t,"style",n)},i(e){i||(Fe(o,e),i=!0)},o(e){je(o,e),i=!1},d(e){e&&X(t),o&&o.d(e)}}}function _t(e){let t,n,i,l,o,s,a,r,c,d,p,u,m,g,h,_,v,w,b=e[3]&&ut(e),k=e[0]&&mt(e),y=e[1]&&ft(e);const x=e[13]["modal-header"],$=z(x,e,e[12],pt);let S=e[3]&>(e);const I=e[13]["modal-content"],C=z(I,e,e[12],ct),P=e[13]["modal-footer"],N=z(P,e,e[12],at);let A=e[5]&&ht(e);return{c(){t=Q("div"),b&&b.c(),n=Z(),i=Q("div"),l=Q("div"),k&&k.c(),o=Z(),y&&y.c(),s=Z(),$&&$.c(),a=Z(),S&&S.c(),r=Z(),c=Q("div"),C&&C.c(),d=Z(),p=Q("div"),N&&N.c(),u=Z(),A&&A.c(),ie(l,"class","sve_modal__header"),ie(c,"class","sve_modal__content"),ie(p,"class","sve_modal__footer"),ie(i,"class","sve_modal"),ie(i,"style",m=`${e[6]}`),ie(t,"class",g="sve_modal__overlay "+e[4]),ie(t,"data-test",e[2])},m(m,g){Y(m,t,g),b&&b.m(t,null),V(t,n),V(t,i),V(i,l),k&&k.m(l,null),V(l,o),y&&y.m(l,null),V(l,s),$&&$.m(l,null),V(i,a),S&&S.m(i,null),V(i,r),V(i,c),C&&C.m(c,null),V(i,d),V(i,p),N&&N.m(p,null),V(i,u),A&&A.m(i,null),_=!0,v||(w=[te(window,"keydown",e[9],!0),F(h=f.call(null,t))],v=!0)},p(e,[a]){e[3]?b?b.p(e,a):(b=ut(e),b.c(),b.m(t,n)):b&&(b.d(1),b=null),e[0]?k?k.p(e,a):(k=mt(e),k.c(),k.m(l,o)):k&&(k.d(1),k=null),e[1]?y?y.p(e,a):(y=ft(e),y.c(),y.m(l,s)):y&&(y.d(1),y=null),$&&$.p&&4096&a&&B($,x,e,e[12],a,dt,pt),e[3]?S?S.p(e,a):(S=gt(e),S.c(),S.m(i,r)):S&&(S.d(1),S=null),C&&C.p&&4096&a&&B(C,I,e,e[12],a,rt,ct),N&&N.p&&4096&a&&B(N,P,e,e[12],a,st,at),e[5]?A?(A.p(e,a),32&a&&Fe(A,1)):(A=ht(e),A.c(),Fe(A,1),A.m(i,null)):A&&(Le(),je(A,1,1,(()=>{A=null})),Be()),(!_||64&a&&m!==(m=`${e[6]}`))&&ie(i,"style",m),(!_||16&a&&g!==(g="sve_modal__overlay "+e[4]))&&ie(t,"class",g),(!_||4&a)&&ie(t,"data-test",e[2])},i(e){_||(Fe($,e),Fe(C,e),Fe(N,e),Fe(A),_=!0)},o(e){je($,e),je(C,e),je(N,e),je(A),_=!1},d(e){e&&X(t),b&&b.d(),k&&k.d(),y&&y.d(),$&&$.d(e),S&&S.d(),C&&C.d(e),N&&N.d(e),A&&A.d(),v=!1,R(w)}}}function vt(e,t,n){let{$$slots:i={},$$scope:l}=t;const o=be();let s,{title:a=null}=t,{subtitle:r=null}=t,{testId:c=""}=t,{closable:d=!0}=t,{cssCls:p=""}=t,{ipm:u=!1}=t,{width:m}=t,{ipmHeight:f}=t,g="",h="";ve((()=>{s=document.activeElement})),we((()=>{document.body.contains(s)&&s.focus()}));return e.$$set=e=>{"title"in e&&n(0,a=e.title),"subtitle"in e&&n(1,r=e.subtitle),"testId"in e&&n(2,c=e.testId),"closable"in e&&n(3,d=e.closable),"cssCls"in e&&n(4,p=e.cssCls),"ipm"in e&&n(5,u=e.ipm),"width"in e&&n(10,m=e.width),"ipmHeight"in e&&n(11,f=e.ipmHeight),"$$scope"in e&&n(12,l=e.$$scope)},e.$$.update=()=>{1024&e.$$.dirty&&m&&n(6,g=`width: ${m}px;`),2080&e.$$.dirty&&u&&f&&n(7,h=`height: ${f}px;`)},[a,r,c,d,p,u,g,h,o,function(e){"Escape"===e.code&&(o("close"),e.preventDefault(),e.stopPropagation())},m,f,l,i,()=>o("close"),()=>o("close")]}class wt extends Ke{constructor(e){super(),Qe(this,e,vt,_t,E,{title:0,subtitle:1,testId:2,closable:3,cssCls:4,ipm:5,width:10,ipmHeight:11})}}const{document:bt}=Ge;const kt=e=>({}),yt=e=>({}),xt=e=>({}),$t=e=>({}),St=e=>({}),It=e=>({}),Ct=e=>({}),Pt=e=>({}),Nt=e=>({}),At=e=>({}),Tt=e=>({}),Rt=e=>({});function Mt(e){let t,n,i,l,o;const s=[Ot,Et],a=[];function r(e,t){return""!=e[0]?0:1}return t=r(e),n=a[t]=s[t](e),{c(){n.c(),i=Z(),l=Q("kin-loading"),le(l,"fullscreen","true"),le(l,"class","svelte-kh5tai")},m(e,n){a[t].m(e,n),Y(e,i,n),Y(e,l,n),o=!0},p(e,l){let o=t;t=r(e),t===o?a[t].p(e,l):(Le(),je(a[o],1,1,(()=>{a[o]=null})),Be(),n=a[t],n?n.p(e,l):(n=a[t]=s[t](e),n.c()),Fe(n,1),n.m(i.parentNode,i))},i(e){o||(Fe(n),o=!0)},o(e){je(n),o=!1},d(e){a[t].d(e),e&&X(i),e&&X(l)}}}function Et(e){let t,n;const i=e[16]["page-title"],l=z(i,e,e[15],Rt);return{c(){t=Q("div"),l&&l.c(),ie(t,"class","kin_loading__title svelte-kh5tai"),se(t,"color","transparent")},m(e,i){Y(e,t,i),l&&l.m(t,null),n=!0},p(e,t){l&&l.p&&32768&t&&B(l,i,e,e[15],t,Tt,Rt)},i(e){n||(Fe(l,e),n=!0)},o(e){je(l,e),n=!1},d(e){e&&X(t),l&&l.d(e)}}}function Ot(e){let t;return{c(){t=Q("h1"),ie(t,"class","kin_loading__title svelte-kh5tai"),se(t,"color","transparent")},m(n,i){Y(n,t,i),t.innerHTML=e[0]},p(e,n){1&n&&(t.innerHTML=e[0])},i:P,o:P,d(e){e&&X(t)}}}function Dt(e){let t,n;const i=e[16]["page-title"],l=z(i,e,e[15],Pt);return{c(){t=Q("div"),l&&l.c(),ie(t,"class","kin_header__title svelte-kh5tai")},m(e,i){Y(e,t,i),l&&l.m(t,null),n=!0},p(e,t){l&&l.p&&32768&t&&B(l,i,e,e[15],t,Ct,Pt)},i(e){n||(Fe(l,e),n=!0)},o(e){je(l,e),n=!1},d(e){e&&X(t),l&&l.d(e)}}}function zt(e){let t;return{c(){t=Q("h1"),ie(t,"class","kin_header__title svelte-kh5tai")},m(n,i){Y(n,t,i),t.innerHTML=e[0]},p(e,n){1&n&&(t.innerHTML=e[0])},i:P,o:P,d(e){e&&X(t)}}}function Lt(e){let t,n,i;const l=e[16].controls,o=z(l,e,e[15],It);let s=e[4]&&e[5]&&Bt(e);return{c(){t=Q("div"),o&&o.c(),n=Z(),s&&s.c(),ie(t,"class","kin_header__controls svelte-kh5tai")},m(e,l){Y(e,t,l),o&&o.m(t,null),V(t,n),s&&s.m(t,null),i=!0},p(e,n){o&&o.p&&32768&n&&B(o,l,e,e[15],n,St,It),e[4]&&e[5]?s?s.p(e,n):(s=Bt(e),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i(e){i||(Fe(o,e),i=!0)},o(e){je(o,e),i=!1},d(e){e&&X(t),o&&o.d(e),s&&s.d()}}}function Bt(e){let t,n;return{c(){t=Q("div"),n=K(e[5]),ie(t,"class","kin_header__tooltip tooltip -onboarding -arrow-top svelte-kh5tai")},m(e,i){Y(e,t,i),V(t,n)},p(e,t){32&t&&oe(n,e[5])},d(e){e&&X(t)}}}function Ft(e){let t,n,i,l,o;return{c(){t=Q("button"),n=Q("kin-icon"),le(n,"name","icon-s-controls-arrow-left"),le(n,"size","20"),le(n,"class","svelte-kh5tai"),ie(t,"class","kin_back-btn svelte-kh5tai"),ie(t,"title",i=d("global.goBack"))},m(i,s){Y(i,t,s),V(t,n),l||(o=te(t,"click",e[17]),l=!0)},p:P,d(e){e&&X(t),l=!1,o()}}}function jt(e){let t,n,i,l;return{c(){t=Q("a"),n=Q("kin-icon"),le(n,"name","icon-s-controls-arrow-left"),le(n,"size","20"),le(n,"class","svelte-kh5tai"),ie(t,"class","kin_back-btn svelte-kh5tai"),ie(t,"href",i=e[9]||"#Dashboard"),ie(t,"title",l=d("global.goBack"))},m(e,i){Y(e,t,i),V(t,n)},p(e,n){512&n&&i!==(i=e[9]||"#Dashboard")&&ie(t,"href",i)},d(e){e&&X(t)}}}function qt(e){let t,n,i;return{c(){t=Q("a"),n=Q("kin-icon"),le(n,"name","icon-s-settings-button"),le(n,"size","20"),le(n,"class","svelte-kh5tai"),ie(t,"class","kin_settings-btn svelte-kh5tai"),ie(t,"href",e[1]),ie(t,"title",i=d("settings"))},m(e,i){Y(e,t,i),V(t,n)},p(e,n){2&n&&ie(t,"href",e[1])},d(e){e&&X(t)}}}function Gt(e){let t,n,i,l,o;const s=e[16]["page-content"],a=z(s,e,e[15],yt);return{c(){t=Q("div"),a&&a.c(),ie(t,"class","kin_page__content svelte-kh5tai"),ae(t,"-disabled",e[4])},m(s,r){Y(s,t,r),a&&a.m(t,null),i=!0,l||(o=F(n=e[13].call(null,t)),l=!0)},p(e,n){a&&a.p&&32768&n&&B(a,s,e,e[15],n,kt,yt),16&n&&ae(t,"-disabled",e[4])},i(e){i||(Fe(a,e),i=!0)},o(e){je(a,e),i=!1},d(e){e&&X(t),a&&a.d(e),l=!1,o()}}}function Wt(e){let t,n;const i=e[16].upsell,l=z(i,e,e[15],$t);return{c(){t=Q("div"),l&&l.c(),ie(t,"class","kin_page__content svelte-kh5tai")},m(e,i){Y(e,t,i),l&&l.m(t,null),n=!0},p(e,t){l&&l.p&&32768&t&&B(l,i,e,e[15],t,xt,$t)},i(e){n||(Fe(l,e),n=!0)},o(e){je(l,e),n=!1},d(e){e&&X(t),l&&l.d(e)}}}function Ht(e){let t,n,i,l,o,s,a,r,c,d,p,u,m,f,g,h,_,v=e[10]&&Mt(e);const w=e[16].breadcrumbs,b=z(w,e,e[15],At),k=[zt,Dt],y=[];function x(e,t){return e[0]?0:1}r=x(e),c=y[r]=k[r](e);let $=!e[3]&&Lt(e);function S(e,t){return e[7]&&!e[8]?jt:e[8]?Ft:void 0}let I=S(e),C=I&&I(e),P=e[1]&&!e[3]&&qt(e);const N=[Wt,Gt],A=[];function T(e,t){return e[3]?0:1}return f=T(e),g=A[f]=N[f](e),{c(){t=Q("div"),v&&v.c(),n=Z(),i=Q("div"),l=Q("header"),o=Q("div"),b&&b.c(),s=Z(),a=Q("div"),c.c(),d=Z(),$&&$.c(),p=Z(),C&&C.c(),u=Z(),P&&P.c(),m=Z(),g.c(),ie(o,"class","kin_header__crumbs crumbs svelte-kh5tai"),ie(a,"class","kin_header__content svelte-kh5tai"),ie(l,"class","kin_header svelte-kh5tai"),ie(i,"class","svelte-kh5tai"),ae(i,"invisible",e[10]),ie(t,"class",h="kin_page "+("ltr"!=e[11]?"-"+e[11]:"")+" "+(e[6]?"-"+e[6]:"")+" "+e[2]+" svelte-kh5tai")},m(e,c){Y(e,t,c),v&&v.m(t,null),V(t,n),V(t,i),V(i,l),V(l,o),b&&b.m(o,null),V(l,s),V(l,a),y[r].m(a,null),V(a,d),$&&$.m(a,null),V(l,p),C&&C.m(l,null),V(l,u),P&&P.m(l,null),V(i,m),A[f].m(i,null),_=!0},p(e,[o]){e[10]?v?(v.p(e,o),1024&o&&Fe(v,1)):(v=Mt(e),v.c(),Fe(v,1),v.m(t,n)):v&&(Le(),je(v,1,1,(()=>{v=null})),Be()),b&&b.p&&32768&o&&B(b,w,e,e[15],o,Nt,At);let s=r;r=x(e),r===s?y[r].p(e,o):(Le(),je(y[s],1,1,(()=>{y[s]=null})),Be(),c=y[r],c?c.p(e,o):(c=y[r]=k[r](e),c.c()),Fe(c,1),c.m(a,d)),e[3]?$&&(Le(),je($,1,1,(()=>{$=null})),Be()):$?($.p(e,o),8&o&&Fe($,1)):($=Lt(e),$.c(),Fe($,1),$.m(a,null)),I===(I=S(e))&&C?C.p(e,o):(C&&C.d(1),C=I&&I(e),C&&(C.c(),C.m(l,u))),e[1]&&!e[3]?P?P.p(e,o):(P=qt(e),P.c(),P.m(l,null)):P&&(P.d(1),P=null);let p=f;f=T(e),f===p?A[f].p(e,o):(Le(),je(A[p],1,1,(()=>{A[p]=null})),Be(),g=A[f],g?g.p(e,o):(g=A[f]=N[f](e),g.c()),Fe(g,1),g.m(i,null)),1024&o&&ae(i,"invisible",e[10]),(!_||2116&o&&h!==(h="kin_page "+("ltr"!=e[11]?"-"+e[11]:"")+" "+(e[6]?"-"+e[6]:"")+" "+e[2]+" svelte-kh5tai"))&&ie(t,"class",h)},i(e){_||(Fe(v),Fe(b,e),Fe(c),Fe($),Fe(g),_=!0)},o(e){je(v),je(b,e),je(c),je($),je(g),_=!1},d(e){e&&X(t),v&&v.d(),b&&b.d(e),y[r].d(),$&&$.d(),C&&C.d(),P&&P.d(),A[f].d()}}}function Ut(e,t,n){let{$$slots:i={},$$scope:l}=t,{heading:o}=t,{settingsUrl:s}=t,{cssCls:a}=t,{upsell:r=!1}=t,{inactive:c=!1}=t,{inactiveMsg:d}=t,{layout:p}=t,{back:u=!0}=t,{backEvent:m=!1}=t,{backHash:f}=t,{loading:h=!1}=t;const _=be();let v,w="ltr";ve((()=>{n(11,w=document.body.dir)}));return e.$$set=e=>{"heading"in e&&n(0,o=e.heading),"settingsUrl"in e&&n(1,s=e.settingsUrl),"cssCls"in e&&n(2,a=e.cssCls),"upsell"in e&&n(3,r=e.upsell),"inactive"in e&&n(4,c=e.inactive),"inactiveMsg"in e&&n(5,d=e.inactiveMsg),"layout"in e&&n(6,p=e.layout),"back"in e&&n(7,u=e.back),"backEvent"in e&&n(8,m=e.backEvent),"backHash"in e&&n(9,f=e.backHash),"loading"in e&&n(10,h=e.loading),"$$scope"in e&&n(15,l=e.$$scope)},e.$$.update=()=>{16400&e.$$.dirty&&v&&v.set(!c)},[o,s,a,r,c,d,p,u,m,f,h,w,_,function(e){return n(14,v=new g(e)),{destroy:v.destroy.bind(v)}},v,l,i,()=>_("backClick")]}class Vt extends Ke{constructor(e){var t;super(),bt.getElementById("svelte-kh5tai-style")||((t=Q("style")).id="svelte-kh5tai-style",t.textContent=".invisible.svelte-kh5tai.svelte-kh5tai{display:none}.svelte-kh5tai.svelte-kh5tai,.svelte-kh5tai.svelte-kh5tai:before,.svelte-kh5tai.svelte-kh5tai:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.kin_page.svelte-kh5tai.svelte-kh5tai{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--page-background);overflow:hidden}.kin_loading__title.svelte-kh5tai.svelte-kh5tai{position:absolute;opacity:0.01}.kin_header.svelte-kh5tai.svelte-kh5tai{padding:1.5rem var(--page-padding) 0;height:var(--header-height);position:relative;text-align:var(--page-header-align)}.kin_header__crumbs.svelte-kh5tai.svelte-kh5tai,.kin_header__content.svelte-kh5tai.svelte-kh5tai{position:absolute;left:var(--page-padding);right:var(--page-padding)}.kin_header__crumbs.svelte-kh5tai.svelte-kh5tai{display:var(--breadcrumbs-vis)}.kin_header__content.svelte-kh5tai.svelte-kh5tai{bottom:1.1rem}.kin_header__title.svelte-kh5tai.svelte-kh5tai,.kin_header__controls.svelte-kh5tai.svelte-kh5tai{display:inline-block;vertical-align:middle;position:relative}.kin_header__title.svelte-kh5tai.svelte-kh5tai{margin-top:0;margin-bottom:0;padding:0;line-height:1.1;font-size:var(--font-size-header);font-weight:var(--font-weight-h1);max-width:100%}.kin_header__tooltip.svelte-kh5tai.svelte-kh5tai{position:absolute;width:24rem;margin-top:calc(var(--switch-height) + 1.5rem);padding-top:1.2rem;padding-bottom:1.2rem;z-index:20;transform:translateX(-50%);left:50%}.kin_back-btn.svelte-kh5tai.svelte-kh5tai,.kin_settings-btn.svelte-kh5tai.svelte-kh5tai{position:absolute;left:0;top:var(--back-button-top);border:0;background-color:rgba(213,211,230,0.1);transition:background-color 0.2s;cursor:pointer;color:inherit;text-decoration:none;width:4rem;height:var(--back-button-height);border-radius:0 var(--back-button-height) var(--back-button-height) 0;display:flex;align-items:center;justify-content:center;z-index:9}.kin_back-btn.svelte-kh5tai kin-icon.svelte-kh5tai,.kin_settings-btn.svelte-kh5tai kin-icon.svelte-kh5tai{opacity:0.8}.kin_back-btn.svelte-kh5tai.svelte-kh5tai:hover,.kin_settings-btn.svelte-kh5tai.svelte-kh5tai:hover{transform:scale(1.1)}.kin_back-btn.svelte-kh5tai.svelte-kh5tai:focus,.kin_settings-btn.svelte-kh5tai.svelte-kh5tai:focus,.kin_back-btn.svelte-kh5tai.svelte-kh5tai:hover,.kin_settings-btn.svelte-kh5tai.svelte-kh5tai:hover{background-color:rgba(213,211,230,0.3);outline:0}.kin_back-btn.svelte-kh5tai:focus kin-icon.svelte-kh5tai,.kin_settings-btn.svelte-kh5tai:focus kin-icon.svelte-kh5tai,.kin_back-btn.svelte-kh5tai:hover kin-icon.svelte-kh5tai,.kin_settings-btn.svelte-kh5tai:hover kin-icon.svelte-kh5tai{opacity:1}.kin_settings-btn.svelte-kh5tai.svelte-kh5tai{left:auto;right:0;border-radius:var(--back-button-height) 0 0 var(--back-button-height)}.kin_settings-btn__tooltip.svelte-kh5tai.svelte-kh5tai{display:none;position:absolute;right:105%}.kin_back-btn.svelte-kh5tai.svelte-kh5tai{display:var(--back-btn-vis)}.kin_back-btn.-static.svelte-kh5tai.svelte-kh5tai{position:fixed;top:6.4rem}.kin_page__content.svelte-kh5tai.svelte-kh5tai{position:absolute;top:var(--header-height);right:0;bottom:0;left:0;display:block}.kin_page__content.-disabled.svelte-kh5tai.svelte-kh5tai{opacity:0.2;pointer-events:none}.kin_upsell.svelte-kh5tai.svelte-kh5tai{top:var(--header-height);bottom:0;left:0;right:0;position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center}.kin_upsell__icon.svelte-kh5tai.svelte-kh5tai{font-size:18rem;margin-bottom:2rem}.kin_upsell__cta.svelte-kh5tai.svelte-kh5tai{margin-top:1rem}.kin_page.-no-header.svelte-kh5tai .kin_header.svelte-kh5tai{display:none}.kin_page.-no-header.svelte-kh5tai .kin_page__content.svelte-kh5tai{top:0}.kin_page.-cover-header.svelte-kh5tai .kin_header.svelte-kh5tai{position:absolute;width:100%;z-index:1}.kin_page.-cover-header.svelte-kh5tai .kin_page__content.svelte-kh5tai{top:0}.kin_page.-large-header.svelte-kh5tai .kin_header.svelte-kh5tai{height:var(--header-height-large)}.kin_page.-large-header.svelte-kh5tai .kin_header__title.svelte-kh5tai{display:block}.kin_page.-large-header.svelte-kh5tai .kin_page__content.svelte-kh5tai{top:var(--header-height-large)}.kin_page.-medium-header.svelte-kh5tai .kin_header.svelte-kh5tai{height:var(--header-height-medium)}.kin_page.-medium-header.svelte-kh5tai .kin_header__title.svelte-kh5tai{display:block}.kin_page.-medium-header.svelte-kh5tai .kin_page__content.svelte-kh5tai{top:var(--header-height-medium)}.kin_page.-tabs-page.svelte-kh5tai .kin_header.svelte-kh5tai{height:var(--header-height-tabs);text-align:center}.kin_page.-tabs-page.svelte-kh5tai .kin_header__title.svelte-kh5tai{display:block;text-align:center}.kin_page.-tabs-page.svelte-kh5tai .kin_header__controls.svelte-kh5tai{display:block;text-align:center;padding:0}.kin_page.-tabs-page.svelte-kh5tai .kin_page__content.svelte-kh5tai{top:var(--header-height-tabs);text-align:center}.kin_page.-center-header.svelte-kh5tai .kin_header__controls.svelte-kh5tai,.kin_page.-center-header.svelte-kh5tai .kin_header__title.svelte-kh5tai{display:block;text-align:center}.kin_page.-center.svelte-kh5tai.svelte-kh5tai,.kin_page.-center-all.svelte-kh5tai.svelte-kh5tai{text-align:center}.kin_page.-center.svelte-kh5tai .kin_header__controls.svelte-kh5tai,.kin_page.-center-all.svelte-kh5tai .kin_header__controls.svelte-kh5tai{display:none}.kin_page.-center.svelte-kh5tai .kin_header__title.svelte-kh5tai,.kin_page.-center-all.svelte-kh5tai .kin_header__title.svelte-kh5tai{display:block}.kin_page.-center-all.svelte-kh5tai .kin_page__content.svelte-kh5tai{display:flex;align-items:center;justify-content:center;text-align:center}.kin_page.-flex-between.svelte-kh5tai .kin_header__controls.svelte-kh5tai{display:none}.kin_page.-flex-between.svelte-kh5tai .kin_header__title.svelte-kh5tai{display:block}.kin_page.-flex-between.svelte-kh5tai .kin_page__content.svelte-kh5tai{display:flex;align-items:center;justify-content:space-between;text-align:center}.kin_page.-profile.svelte-kh5tai .kin_header.svelte-kh5tai{position:static;height:auto;text-align:start}.kin_page.-profile.svelte-kh5tai .kin_header__content.svelte-kh5tai{position:static}.kin_page.-profile.svelte-kh5tai .kin_header__controls.svelte-kh5tai{position:static;display:block;padding:0;max-height:none}.kin_page.-profile.svelte-kh5tai .kin_header__title.svelte-kh5tai{max-height:none;max-width:100%}.kin_page.-profile.svelte-kh5tai .kin_page__content.svelte-kh5tai{top:calc(var(--header-height) + 6rem)}.kin_page.-detail.svelte-kh5tai .kin_header.svelte-kh5tai{text-align:center;height:calc(var(--header-height-large) + 4rem)}.kin_page.-detail.svelte-kh5tai .kin_header__content.svelte-kh5tai{display:block}.kin_page.-detail.svelte-kh5tai .kin_header__title.svelte-kh5tai{max-height:none;display:block;font-weight:var(--font-weight-h1);padding:0 8%}.kin_page.-detail.svelte-kh5tai .kin_header__controls.svelte-kh5tai{padding:1rem 0 0;position:static;display:block;max-height:none}.kin_page.-detail.svelte-kh5tai .kin_page__content.svelte-kh5tai{top:calc(var(--header-height-large) + 4rem)}.kin_page.-rtl.svelte-kh5tai .kin_header__tooltip.svelte-kh5tai{transform:translateX(50%);left:auto;right:50%}.kin_page.-rtl.svelte-kh5tai .kin_back-btn.svelte-kh5tai,.kin_page.-rtl.svelte-kh5tai .kin_settings-btn.svelte-kh5tai{transform:scale(-1)}.kin_page.-rtl.svelte-kh5tai .kin_back-btn.svelte-kh5tai:hover,.kin_page.-rtl.svelte-kh5tai .kin_settings-btn.svelte-kh5tai:hover{transform:scale(-1.1)}.kin_page.-rtl.svelte-kh5tai .kin_back-btn.svelte-kh5tai{left:auto;right:0}.kin_page.-rtl.svelte-kh5tai .kin_settings-btn.svelte-kh5tai{right:auto;left:0}",V(bt.head,t)),Qe(this,e,Ut,Ht,E,{heading:0,settingsUrl:1,cssCls:2,upsell:3,inactive:4,inactiveMsg:5,layout:6,back:7,backEvent:8,backHash:9,loading:10})}get heading(){return this.$$.ctx[0]}set heading(e){this.$set({heading:e}),Te()}get settingsUrl(){return this.$$.ctx[1]}set settingsUrl(e){this.$set({settingsUrl:e}),Te()}get cssCls(){return this.$$.ctx[2]}set cssCls(e){this.$set({cssCls:e}),Te()}get upsell(){return this.$$.ctx[3]}set upsell(e){this.$set({upsell:e}),Te()}get inactive(){return this.$$.ctx[4]}set inactive(e){this.$set({inactive:e}),Te()}get inactiveMsg(){return this.$$.ctx[5]}set inactiveMsg(e){this.$set({inactiveMsg:e}),Te()}get layout(){return this.$$.ctx[6]}set layout(e){this.$set({layout:e}),Te()}get back(){return this.$$.ctx[7]}set back(e){this.$set({back:e}),Te()}get backEvent(){return this.$$.ctx[8]}set backEvent(e){this.$set({backEvent:e}),Te()}get backHash(){return this.$$.ctx[9]}set backHash(e){this.$set({backHash:e}),Te()}get loading(){return this.$$.ctx[10]}set loading(e){this.$set({loading:e}),Te()}}const Yt=e=>({}),Xt=e=>({}),Jt=e=>({}),Qt=e=>({}),Kt=e=>({}),Zt=e=>({}),en=e=>({}),tn=e=>({}),nn=e=>({}),ln=e=>({});function on(e){let t,n;const i=e[10].input,l=z(i,e,e[9],ln);return{c(){t=Q("div"),l&&l.c(),ie(t,"class","row__input sve-one_row__input svelte-11y2jvb"),ae(t,"-disabled",e[2]||e[3])},m(e,i){Y(e,t,i),l&&l.m(t,null),n=!0},p(e,n){l&&l.p&&512&n&&B(l,i,e,e[9],n,nn,ln),12&n&&ae(t,"-disabled",e[2]||e[3])},i(e){n||(Fe(l,e),n=!0)},o(e){je(l,e),n=!1},d(e){e&&X(t),l&&l.d(e)}}}function sn(e){let t,n,i,l;const o=[rn,an],s=[];function a(e,t){return e[2]?0:1}return n=a(e),i=s[n]=o[n](e),{c(){t=Q("div"),i.c(),ie(t,"class","row__icon sve-one_row__icon svelte-11y2jvb")},m(e,i){Y(e,t,i),s[n].m(t,null),l=!0},p(e,l){let r=n;n=a(e),n===r?s[n].p(e,l):(Le(),je(s[r],1,1,(()=>{s[r]=null})),Be(),i=s[n],i?i.p(e,l):(i=s[n]=o[n](e),i.c()),Fe(i,1),i.m(t,null))},i(e){l||(Fe(i),l=!0)},o(e){je(i),l=!1},d(e){e&&X(t),s[n].d()}}}function an(e){let t;const n=e[10].icon,i=z(n,e,e[9],tn);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,t){i&&i.p&&512&t&&B(i,n,e,e[9],t,en,tn)},i(e){t||(Fe(i,e),t=!0)},o(e){je(i,e),t=!1},d(e){i&&i.d(e)}}}function rn(e){let t;return{c(){t=Q("kin-loading"),le(t,"inline",""),le(t,"size","small")},m(e,n){Y(e,t,n)},p:P,i:P,o:P,d(e){e&&X(t)}}}function cn(e){let t;const n=e[10]["actions-content"],i=z(n,e,e[9],Qt);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,t){i&&i.p&&512&t&&B(i,n,e,e[9],t,Jt,Qt)},i(e){t||(Fe(i,e),t=!0)},o(e){je(i,e),t=!1},d(e){i&&i.d(e)}}}function dn(e){let t,n,i,l,o,s;return{c(){t=Q("kin-button"),n=Q("kin-icon"),le(n,"name",i=e[0]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down"),le(n,"size","16"),le(t,"size","small"),le(t,"type","blank"),le(t,"icononly","true"),le(t,"title",l=e[0]?d("global.showLess"):d("global.showMore"))},m(i,l){Y(i,t,l),V(t,n),o||(s=te(t,"click",e[7]),o=!0)},p(e,o){1&o&&i!==(i=e[0]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down")&&le(n,"name",i),1&o&&l!==(l=e[0]?d("global.showLess"):d("global.showMore"))&&le(t,"title",l)},i:P,o:P,d(e){e&&X(t),o=!1,s()}}}function pn(e){let t,n,i,l,o,s,a,r,c,d,p,u,m=e[4]&&on(e),f=!e[6]&&sn(e);const g=e[10]["main-content"],h=z(g,e,e[9],Zt),_=[dn,cn],v=[];function w(e,t){return e[1]&&!e[2]?0:1}r=w(e),c=v[r]=_[r](e);const b=e[10]["expanded-content"],k=z(b,e,e[9],Xt);return{c(){t=Q("div"),n=Q("div"),m&&m.c(),i=Z(),f&&f.c(),l=Z(),o=Q("div"),h&&h.c(),s=Z(),a=Q("div"),c.c(),d=Z(),p=Q("div"),k&&k.c(),ie(o,"class","row__main sve-one_row__main svelte-11y2jvb"),ie(a,"class","row__actions sve-one_row__actions svelte-11y2jvb"),ie(n,"class","row sve-one_row svelte-11y2jvb"),ae(n,"-expanded",e[0]),ae(n,"-selectable",e[4]),ae(n,"-disabled",e[3]),ae(n,"-faq",e[6]),ie(p,"class","row_expanded sve-one_row__expanded svelte-11y2jvb"),ae(p,"-selectable",e[4]),ae(p,"-invisible",!e[0]||e[2]),ae(p,"-faq",e[6]),ie(t,"class","sve-one_row__wrap svelte-11y2jvb"),ae(t,"-bg",e[5])},m(e,c){Y(e,t,c),V(t,n),m&&m.m(n,null),V(n,i),f&&f.m(n,null),V(n,l),V(n,o),h&&h.m(o,null),V(n,s),V(n,a),v[r].m(a,null),V(t,d),V(t,p),k&&k.m(p,null),u=!0},p(e,[o]){e[4]?m?(m.p(e,o),16&o&&Fe(m,1)):(m=on(e),m.c(),Fe(m,1),m.m(n,i)):m&&(Le(),je(m,1,1,(()=>{m=null})),Be()),e[6]?f&&(Le(),je(f,1,1,(()=>{f=null})),Be()):f?(f.p(e,o),64&o&&Fe(f,1)):(f=sn(e),f.c(),Fe(f,1),f.m(n,l)),h&&h.p&&512&o&&B(h,g,e,e[9],o,Kt,Zt);let s=r;r=w(e),r===s?v[r].p(e,o):(Le(),je(v[s],1,1,(()=>{v[s]=null})),Be(),c=v[r],c?c.p(e,o):(c=v[r]=_[r](e),c.c()),Fe(c,1),c.m(a,null)),1&o&&ae(n,"-expanded",e[0]),16&o&&ae(n,"-selectable",e[4]),8&o&&ae(n,"-disabled",e[3]),64&o&&ae(n,"-faq",e[6]),k&&k.p&&512&o&&B(k,b,e,e[9],o,Yt,Xt),16&o&&ae(p,"-selectable",e[4]),5&o&&ae(p,"-invisible",!e[0]||e[2]),64&o&&ae(p,"-faq",e[6]),32&o&&ae(t,"-bg",e[5])},i(e){u||(Fe(m),Fe(f),Fe(h,e),Fe(c),Fe(k,e),u=!0)},o(e){je(m),je(f),je(h,e),je(c),je(k,e),u=!1},d(e){e&&X(t),m&&m.d(),f&&f.d(),h&&h.d(e),v[r].d(),k&&k.d(e)}}}function un(e,t,n){let{$$slots:i={},$$scope:l}=t,{expandable:o=!1}=t,{expanded:s=!1}=t,{loading:a=!1}=t,{disabled:r=!1}=t,{selectable:c=!1}=t,{background:d=!1}=t,{faq:p=!1}=t;const u=be();return e.$$set=e=>{"expandable"in e&&n(1,o=e.expandable),"expanded"in e&&n(0,s=e.expanded),"loading"in e&&n(2,a=e.loading),"disabled"in e&&n(3,r=e.disabled),"selectable"in e&&n(4,c=e.selectable),"background"in e&&n(5,d=e.background),"faq"in e&&n(6,p=e.faq),"$$scope"in e&&n(9,l=e.$$scope)},[s,o,a,r,c,d,p,function(){n(0,s=!s),u("propUpdate",{keyPath:"expanded",value:s})},["expandable","expanded","loading","selectable","background","faq"],l,i]}class mn extends Ke{constructor(e){var t;super(),document.getElementById("svelte-11y2jvb-style")||((t=Q("style")).id="svelte-11y2jvb-style",t.textContent=".sve-one_row.svelte-11y2jvb{position:relative;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;text-align:start;width:100%;min-height:7.2rem;padding:0.6rem;border-bottom:1px solid var(--table-border)}.sve-one_row__wrap.svelte-11y2jvb{display:block}.sve-one_row__wrap.-bg.svelte-11y2jvb{background:var(--table-selected)}.sve-one_row.-expanded.svelte-11y2jvb{border-bottom:1px solid transparent}.sve-one_row.-faq.svelte-11y2jvb{min-height:4.2rem}.sve-one_row__icon.svelte-11y2jvb,.sve-one_row__input.svelte-11y2jvb{flex-grow:0;margin-right:1rem;margin-bottom:1rem;position:relative}.sve-one_row__input.-disabled.svelte-11y2jvb{pointer-events:none;opacity:0.5}.sve-one_row__main.svelte-11y2jvb{flex-grow:1;margin:0 0.6rem;width:54%}.sve-one_row__actions.svelte-11y2jvb{flex-shrink:0}.sve-one_row__expanded.svelte-11y2jvb{padding-left:4rem}.sve-one_row__expanded.-selectable.svelte-11y2jvb{padding-left:8rem}.sve-one_row__expanded.-invisible.svelte-11y2jvb{display:none}.sve-one_row__expanded.-faq.svelte-11y2jvb{padding:0 4rem 2rem 1.2rem;border-bottom:1px solid var(--table-border);color:var(--color-text-secondary);text-align:left}.sve-one_row__title{font-weight:bold !important;font-size:var(--font-size) !important}.sve-one_row__desc{margin-top:0.5rem !important;color:var(--color-text-secondary) !important;font-size:var(--font-size-small) !important}.sve-one_row__expanded [slot='table-header']{padding-top:0}.sve-one_row__status{position:absolute;top:20%;left:20%;margin:1rem 0 0 1rem}",V(document.head,t)),Qe(this,e,un,pn,E,{expandable:1,expanded:0,loading:2,disabled:3,selectable:4,background:5,faq:6,exportedProps:8})}get expandable(){return this.$$.ctx[1]}set expandable(e){this.$set({expandable:e}),Te()}get expanded(){return this.$$.ctx[0]}set expanded(e){this.$set({expanded:e}),Te()}get loading(){return this.$$.ctx[2]}set loading(e){this.$set({loading:e}),Te()}get disabled(){return this.$$.ctx[3]}set disabled(e){this.$set({disabled:e}),Te()}get selectable(){return this.$$.ctx[4]}set selectable(e){this.$set({selectable:e}),Te()}get background(){return this.$$.ctx[5]}set background(e){this.$set({background:e}),Te()}get faq(){return this.$$.ctx[6]}set faq(e){this.$set({faq:e}),Te()}get exportedProps(){return this.$$.ctx[8]}}function fn(e){const t=e-1;return t*t*t+1}function gn(e,{delay:t=0,duration:n=400,easing:i=fn,x:l=0,y:o=0,opacity:s=0}){const a=getComputedStyle(e),r=+a.opacity,c="none"===a.transform?"":a.transform,d=r*(1-s);return{delay:t,duration:n,easing:i,css:(e,t)=>`\n\t\t\ttransform: ${c} translate(${(1-e)*l}px, ${(1-e)*o}px);\n\t\t\topacity: ${r-d*t}`}}const{document:hn}=Ge;function _n(e){let t;return{c(){t=Q("kin-loading"),le(t,"fullscreen","true")},m(e,n){Y(e,t,n)},d(e){e&&X(t)}}}function vn(e){let t,n,i,l,o,s,a,r,c,d,p,u,m,f,g,h,_,v,w,b,k,y,x=e[1]&&_n();const $=e[11].default,S=z($,e,e[10],null);return{c(){t=Q("div"),n=Q("div"),i=Q("header"),l=Q("button"),o=Q("kin-icon"),a=Z(),r=Q("div"),c=K(e[2]),d=Z(),p=Q("div"),x&&x.c(),u=Z(),m=Q("div"),S&&S.c(),h=Z(),_=Q("div"),le(o,"name","icon-s-controls-close"),le(o,"size","14"),ie(l,"class","sve_overlay__cross nui_caption_client nui_caption_client-overlay"),ie(l,"title",s=e[4].close),ie(l,"data-test","sve_overlay_close"),ie(r,"class","sve_overlay__title nui_caption_client nui_caption_client-overlay"),ie(i,"class","sve_overlay__titlebar"),ie(m,"class","svelte-1stpe6u"),ae(m,"invisible",e[1]),ie(p,"class","sve_overlay__contents"),ie(n,"class","sve_overlay__holder"),ie(n,"data-test","sve_overlay"),ie(_,"class","sve_overlay__close"),ie(t,"class",v="sve_overlay "+(e[3]?"-"+e[3]:"")+" "+("rtl"===e[0]?"-rtl":"")+" svelte-1stpe6u")},m(s,f){Y(s,t,f),V(t,n),V(n,i),V(i,l),V(l,o),V(i,a),V(i,r),V(r,c),V(n,d),V(n,p),x&&x.m(p,null),V(p,u),V(p,m),S&&S.m(m,null),V(t,h),V(t,_),b=!0,k||(y=[te(window,"keydown",e[7]),te(window,"vNextVisibilityChanged",e[6]),te(window,"kin-isActionBarVisible",e[6]),te(l,"click",e[5]),te(r,"click",e[5]),te(_,"click",e[5]),F(w=e[8].call(null,t))],k=!0)},p(e,[n]){(!b||16&n&&s!==(s=e[4].close))&&ie(l,"title",s),(!b||4&n)&&oe(c,e[2]),e[1]?x||(x=_n(),x.c(),x.m(p,u)):x&&(x.d(1),x=null),S&&S.p&&1024&n&&B(S,$,e,e[10],n,null,null),2&n&&ae(m,"invisible",e[1]),(!b||9&n&&v!==(v="sve_overlay "+(e[3]?"-"+e[3]:"")+" "+("rtl"===e[0]?"-rtl":"")+" svelte-1stpe6u"))&&ie(t,"class",v)},i(e){b||(Fe(S,e),Pe((()=>{g&&g.end(1),f||(f=function(e,t,n){let i,l,o=t(e,n),s=!1,a=0;function r(){i&&fe(e,i)}function c(){const{delay:t=0,duration:n=300,easing:c=N,tick:d=P,css:p}=o||qe;p&&(i=me(e,0,1,n,t,c,p,a++)),d(0,1);const u=q()+t,m=u+n;l&&l.abort(),s=!0,Pe((()=>Oe(e,!0,"start"))),l=U((t=>{if(s){if(t>=m)return d(1,0),Oe(e,!0,"end"),r(),s=!1;if(t>=u){const e=c((t-u)/n);d(e,1-e)}}return s}))}let d=!1;return{start(){d||(fe(e),M(o)?(o=o(),Ee().then(c)):c())},invalidate(){d=!1},end(){s&&(r(),s=!1)}}}(n,gn,{duration:400,x:500})),f.start()})),b=!0)},o(e){je(S,e),f&&f.invalidate(),g=function(e,t,n){let i,l=t(e,n),o=!0;const s=ze;function a(){const{delay:t=0,duration:n=300,easing:a=N,tick:r=P,css:c}=l||qe;c&&(i=me(e,1,0,n,t,a,c));const d=q()+t,p=d+n;Pe((()=>Oe(e,!1,"start"))),U((t=>{if(o){if(t>=p)return r(0,1),Oe(e,!1,"end"),--s.r||R(s.c),!1;if(t>=d){const e=a((t-d)/n);r(1-e,e)}}return o}))}return s.r+=1,M(l)?Ee().then((()=>{l=l(),a()})):a(),{end(t){t&&l.tick&&l.tick(1,0),o&&(i&&fe(e,i),o=!1)}}}(n,gn,{duration:400,x:500}),b=!1},d(e){e&&X(t),x&&x.d(),S&&S.d(e),e&&g&&g.end(),k=!1,R(y)}}}function wn(e,t,n){let{$$slots:i={},$$scope:l}=t;const o=be();let s=!0,{loading:a=!1}=t,{dir:r="ltr"}=t,{title:p=d("global.close")}=t,{type:u=""}=t,{txt:m={close:d("global.closeOverlayPage")}}=t,{focuser:f}=t;function g(){setTimeout(c.setCaption,1e3)}function _(){o("close")}return ve((()=>{n(0,r=document.body.dir),g()})),e.$$set=e=>{"loading"in e&&n(1,a=e.loading),"dir"in e&&n(0,r=e.dir),"title"in e&&n(2,p=e.title),"type"in e&&n(3,u=e.type),"txt"in e&&n(4,m=e.txt),"focuser"in e&&n(9,f=e.focuser),"$$scope"in e&&n(10,l=e.$$scope)},e.$$.update=()=>{8&e.$$.dirty&&g()},[r,a,p,u,m,_,function(e){s=!e.detail.isVisible},function(e){!s||"Escape"!==e.key&&27!==e.keyCode||(_(),e.preventDefault(),e.stopPropagation())},function(e){const t=new h(e);return n(9,f=t.getFocuser()),{destroy:t.destroy.bind(t)}},f,l,i]}class bn extends Ke{constructor(e){var t;super(),hn.getElementById("svelte-1stpe6u-style")||((t=Q("style")).id="svelte-1stpe6u-style",t.textContent=".invisible.svelte-1stpe6u{visibility:hidden}",V(hn.head,t)),Qe(this,e,wn,vn,E,{loading:1,dir:0,title:2,type:3,txt:4,focuser:9})}}var kn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},yn="object"==typeof kn&&kn&&kn.Object===Object&&kn,xn="object"==typeof self&&self&&self.Object===Object&&self;yn||xn||Function("return this")();function $n(e){let t,n,i,l,o,s,a,r,c;const d=e[6].default,p=z(d,e,e[5],null);return{c(){t=Q("div"),n=Q("kin-icon"),i=Z(),p&&p.c(),l=Z(),o=Q("kin-button"),s=K(e[2]),le(n,"name",e[0]),le(n,"size",e[1]),le(n,"class","sve_upsell__icon"),le(o,"size","large"),le(o,"class","sve_upsell__cta"),le(o,"data-test",e[3]),ie(t,"class","sve_upsell")},m(d,u){Y(d,t,u),V(t,n),V(t,i),p&&p.m(t,null),V(t,l),V(t,o),V(o,s),a=!0,r||(c=te(o,"click",e[7]),r=!0)},p(e,[t]){(!a||1&t)&&le(n,"name",e[0]),(!a||2&t)&&le(n,"size",e[1]),p&&p.p&&32&t&&B(p,d,e,e[5],t,null,null),(!a||4&t)&&oe(s,e[2]),(!a||8&t)&&le(o,"data-test",e[3])},i(e){a||(Fe(p,e),a=!0)},o(e){je(p,e),a=!1},d(e){e&&X(t),p&&p.d(e),r=!1,c()}}}function Sn(e,t,n){let{$$slots:i={},$$scope:l}=t;const o=be();let{icon:s="icon-l-upgrade"}=t,{iconSize:a=160}=t,{ctaText:r=d("global.upgradeNow")}=t,{testId:c="upsell_buy"}=t;return e.$$set=e=>{"icon"in e&&n(0,s=e.icon),"iconSize"in e&&n(1,a=e.iconSize),"ctaText"in e&&n(2,r=e.ctaText),"testId"in e&&n(3,c=e.testId),"$$scope"in e&&n(5,l=e.$$scope)},[s,a,r,c,o,l,i,()=>o("buy")]}class In extends Ke{constructor(e){super(),Qe(this,e,Sn,$n,E,{icon:0,iconSize:1,ctaText:2,testId:3})}}function Cn(e){let t,n,i,l;const o=[Nn,Pn],s=[];function a(e,t){return e[4]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),i=ee()},m(e,n){s[t].m(e,n),Y(e,i,n),l=!0},p(e,l){let r=t;t=a(e),t===r?s[t].p(e,l):(Le(),je(s[r],1,1,(()=>{s[r]=null})),Be(),n=s[t],n?n.p(e,l):(n=s[t]=o[t](e),n.c()),Fe(n,1),n.m(i.parentNode,i))},i(e){l||(Fe(n),l=!0)},o(e){je(n),l=!1},d(e){s[t].d(e),e&&X(i)}}}function Pn(e){let t,n;return t=new In({props:{ctaText:e[2],testId:e[3],icon:e[0],iconSize:e[1],$$slots:{default:[An]},$$scope:{ctx:e}}}),t.$on("buy",e[9]),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};4&n&&(i.ctaText=e[2]),8&n&&(i.testId=e[3]),1&n&&(i.icon=e[0]),2&n&&(i.iconSize=e[1]),1024&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function Nn(e){let t,n,i,l;t=new it({props:{id:322,$$slots:{default:[Rn]},$$scope:{ctx:e}}}),t.$on("success",e[6]),t.$on("error",e[6]);let o=e[5]&&Mn();return{c(){Ve(t.$$.fragment),n=Z(),o&&o.c(),i=ee()},m(e,s){Ye(t,e,s),Y(e,n,s),o&&o.m(e,s),Y(e,i,s),l=!0},p(e,n){const l={};1039&n&&(l.$$scope={dirty:n,ctx:e}),t.$set(l),e[5]?o||(o=Mn(),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},i(e){l||(Fe(t.$$.fragment,e),l=!0)},o(e){je(t.$$.fragment,e),l=!1},d(e){Xe(t,e),e&&X(n),o&&o.d(e),e&&X(i)}}}function An(e){let t;const n=e[7].default,i=z(n,e,e[10],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,t){i&&i.p&&1024&t&&B(i,n,e,e[10],t,null,null)},i(e){t||(Fe(i,e),t=!0)},o(e){je(i,e),t=!1},d(e){i&&i.d(e)}}}function Tn(e){let t;const n=e[7].default,i=z(n,e,e[10],null);return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,t){i&&i.p&&1024&t&&B(i,n,e,e[10],t,null,null)},i(e){t||(Fe(i,e),t=!0)},o(e){je(i,e),t=!1},d(e){i&&i.d(e)}}}function Rn(e){let t,n;return t=new In({props:{ctaText:e[2],testId:e[3],icon:e[0],iconSize:e[1],$$slots:{default:[Tn]},$$scope:{ctx:e}}}),t.$on("buy",e[8]),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};4&n&&(i.ctaText=e[2]),8&n&&(i.testId=e[3]),1&n&&(i.icon=e[0]),2&n&&(i.iconSize=e[1]),1024&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function Mn(e){let t;return{c(){t=Q("div"),t.innerHTML="<kin-loading></kin-loading>",ie(t,"class","sve_upsell")},m(e,n){Y(e,t,n)},d(e){e&&X(t)}}}function En(e){let t,n,i=null!=e[4]&&Cn(e);return{c(){i&&i.c(),t=ee()},m(e,l){i&&i.m(e,l),Y(e,t,l),n=!0},p(e,[n]){null!=e[4]?i?(i.p(e,n),16&n&&Fe(i,1)):(i=Cn(e),i.c(),Fe(i,1),i.m(t.parentNode,t)):i&&(Le(),je(i,1,1,(()=>{i=null})),Be())},i(e){n||(Fe(i),n=!0)},o(e){je(i),n=!1},d(e){i&&i.d(e),e&&X(t)}}}function On(e,t,n){let l,{$$slots:o={},$$scope:s}=t,{icon:a="upsell-general"}=t,{iconSize:r}=t,{ctaText:c=d("global.upgradeNow")}=t,{testId:p="upsell_buy"}=t,u=!0;return ve((()=>{i.getValue("avdef://config/GuiCache/IpmContent322").then((e=>n(4,l="1"==e)))})),e.$$set=e=>{"icon"in e&&n(0,a=e.icon),"iconSize"in e&&n(1,r=e.iconSize),"ctaText"in e&&n(2,c=e.ctaText),"testId"in e&&n(3,p=e.testId),"$$scope"in e&&n(10,s=e.$$scope)},[a,r,c,p,l,u,function(){n(5,u=!1)},o,function(t){ke(e,t)},function(t){ke(e,t)},s]}class Dn extends Ke{constructor(e){super(),Qe(this,e,On,En,E,{icon:0,iconSize:1,ctaText:2,testId:3})}}const zn=[];function Ln(e,t=P){let n;const i=[];function l(t){if(E(e,t)&&(e=t,n)){const t=!zn.length;for(let n=0;n<i.length;n+=1){const t=i[n];t[1](),zn.push(t,e)}if(t){for(let e=0;e<zn.length;e+=2)zn[e][0](zn[e+1]);zn.length=0}}}return{set:l,update:function(t){l(t(e))},subscribe:function(o,s=P){const a=[o,s];return i.push(a),1===i.length&&(n=t(l)||P),o(e),()=>{const e=i.indexOf(a);-1!==e&&i.splice(e,1),0===i.length&&(n(),n=null)}}}}function Bn(e,t,n){const i=!Array.isArray(e),l=i?[e]:e,o=t.length<2;return{subscribe:Ln(n,(e=>{let n=!1;const s=[];let a=0,r=P;const c=()=>{if(a)return;r();const n=t(i?s[0]:s,e);o?e(n):r=M(n)?n:P},d=l.map(((e,t)=>O(e,(e=>{s[t]=e,a&=~(1<<t),n&&c()}),(()=>{a|=1<<t}))));return n=!0,c(),function(){R(d),r()}})).subscribe}}const Fn={},jn=[],qn=Ln(null,(e=>{let t=null;a("app.firewall.SubscribeNetEvents",{REFRESH_INTERVAL_SEC:5,KEEP_ALIVE_INTERVAL_SEC:20}).then((n=>{Un(n).then((()=>{e(jn)})),t=setInterval((()=>{a("app.firewall.KeepAlive")}),2e4)})).catch((t=>{console.error("app.firewall.SubscribeNetEvents",t),e([])}));const n=o.on("app.firewall.processUpdate",(t=>{t&&Un([t]).then((()=>e(jn)))}));return function(){clearInterval(t),n()}})),Gn=Bn(qn,(e=>e&&e.filter((e=>!e.blocked)))),Wn=Bn(qn,(e=>e&&e.filter((e=>e.blocked)))),Hn=Bn(qn,(e=>!e),!0);function Un(e){const t=[];for(const n of e){const e=n.guid,i=n.name;let l=Jn(i);l||(l={name:i,processes:[],icon:null,blocked:!1,isRunning:!1,timestamp:null},jn.push(l));const o=l.processes.find((t=>t.guid===e));if(o){const e=l.processes.indexOf(o);e>-1&&l.processes.splice(e,1)}const s={guid:e,name:n.name,path:n.path,desc:n.desc,isRunning:n.isrunning,bytesIn:n.bytesIn,bytesOut:n.bytesOut,speedIn:n.speedIn,speedOut:n.speedOut,timestamp:n.timestamp,blocked:n.simpleRule&&n.simpleRule.simpleRulePos&&"blockAll"===n.simpleRule.simpleRulePos};l.processes.push(s),l.blocked=l.processes.some((e=>!1==!e.blocked)),l.isRunning=l.processes.some((e=>e.isRunning)),l.path=l.processes.find((e=>e.path)).path,l.bytesIn=Qn(l.processes,"bytesIn"),l.bytesOut=Qn(l.processes,"bytesOut"),l.bytesTotal=l.bytesIn+l.bytesOut,l.speedIn=Qn(l.processes,"speedIn"),l.speedOut=Qn(l.processes,"speedOut");const a=l.processes.filter((e=>e.timestamp)).sort(((e,t)=>e.timestamp-t.timestamp));a.length&&(l.timestamp=a[0].timestamp),Fn[i]?l.icon=Fn[i]:n.path&&t.push(Vn(i,n.path).then((e=>{e&&(l.icon=e)})))}return Promise.allSettled(t)}function Vn(e,t){if(e&&t)return Fn[e]?Fn[e]instanceof Promise||(Fn[e]=Promise.resolve(Fn[e])):Fn[e]=function(e,t){return a("app.utils.GetShellIcon",{path:e,size:t}).then((e=>e)).catch((t=>{console.error("app.utils.GetShellIcon - "+e,JSON.stringify(t))}))}(t,"large").then((t=>{if(t&&t.data)return Fn[e]=t.data,t.data})),Fn[e]}function Yn(e,t){return a("app.firewall.SetAppSimpleRule",{guid:e,simpleRule:{action:"update",items:{simpleRulePos:t?"blockAll":"allowAll",defaultRule:t?"block":"allow"}}})}function Xn(e,t){const n=[],i=Jn(e);if(i&&i.processes)for(const l of i.processes)n.push(Yn(l.guid,t));return Promise.all(n)}function Jn(e){return jn.find((t=>t.name===e))}function Qn(e,t){let n=null;if(!e||0===e.length)return n;for(const i of e.filter((e=>null!=e[t])))null==i[t]&&(n=0),n+=i[t];return n}function Kn(e,t,n){const i=e.slice();return i[10]=t[n],i}function Zn(e,t,n){const i=e.slice();return i[13]=t[n],i}function ei(e,t,n){const i=e.slice();return i[16]=t[n],i}function ti(e){let t,n,i,l,o,s,a,r=e[4],c=[];for(let m=0;m<r.length;m+=1)c[m]=li(ei(e,r,m));let d=e[1],p=[];for(let m=0;m<d.length;m+=1)p[m]=di(Zn(e,d,m));let u=e[3].length&&pi(e);return{c(){t=Q("kin-table"),n=Q("div");for(let e=0;e<c.length;e+=1)c[e].c();i=Z(),l=Q("div");for(let e=0;e<p.length;e+=1)p[e].c();o=Z(),u&&u.c(),s=ee(),ie(n,"slot","table-header"),ie(n,"role","row"),ie(n,"class","frw_allowed__header svelte-1lljne4"),ie(l,"slot","table-body")},m(e,r){Y(e,t,r),V(t,n);for(let t=0;t<c.length;t+=1)c[t].m(n,null);V(t,i),V(t,l);for(let t=0;t<p.length;t+=1)p[t].m(l,null);Y(e,o,r),u&&u.m(e,r),Y(e,s,r),a=!0},p(e,t){if(49&t){let i;for(r=e[4],i=0;i<r.length;i+=1){const l=ei(e,r,i);c[i]?c[i].p(l,t):(c[i]=li(l),c[i].c(),c[i].m(n,null))}for(;i<c.length;i+=1)c[i].d(1);c.length=r.length}if(2&t){let n;for(d=e[1],n=0;n<d.length;n+=1){const i=Zn(e,d,n);p[n]?p[n].p(i,t):(p[n]=di(i),p[n].c(),p[n].m(l,null))}for(;n<p.length;n+=1)p[n].d(1);p.length=d.length}e[3].length?u?(u.p(e,t),8&t&&Fe(u,1)):(u=pi(e),u.c(),Fe(u,1),u.m(s.parentNode,s)):u&&(Le(),je(u,1,1,(()=>{u=null})),Be())},i(e){a||(Fe(u),a=!0)},o(e){je(u),a=!1},d(e){e&&X(t),J(c,e),J(p,e),e&&X(o),u&&u.d(e),e&&X(s)}}}function ni(e){let t;return{c(){t=Q("div"),t.innerHTML="<kin-loading></kin-loading>",ie(t,"class","g-margin-top--20 g-align--center")},m(e,n){Y(e,t,n)},p:P,i:P,o:P,d(e){e&&X(t)}}}function ii(e){let t,n;return{c(){t=Q("kin-icon"),le(t,"name",n=e[0].ascending?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down"),le(t,"class","g-margin-right--5"),le(t,"size","16")},m(e,n){Y(e,t,n)},p(e,i){1&i&&n!==(n=e[0].ascending?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down")&&le(t,"name",n)},d(e){e&&X(t)}}}function li(e){let t,n,i,l,o,s,a,r,c=e[16].label+"",p=e[0].sortBy===e[16].sortBy&&ii(e);function u(){return e[7](e[16])}return{c(){t=Q("button"),n=K(c),i=Z(),p&&p.c(),l=Z(),ie(t,"role","columnheader"),ie(t,"title",o=d("firewall.apps.sortTableBy")+" "+e[16].label),ie(t,"aria-sort",s=e[0].sortBy===e[16].sortBy?"other":"none")},m(e,o){Y(e,t,o),V(t,n),V(t,i),p&&p.m(t,null),V(t,l),a||(r=te(t,"click",u),a=!0)},p(n,i){(e=n)[0].sortBy===e[16].sortBy?p?p.p(e,i):(p=ii(e),p.c(),p.m(t,l)):p&&(p.d(1),p=null),1&i&&s!==(s=e[0].sortBy===e[16].sortBy?"other":"none")&&ie(t,"aria-sort",s)},d(e){e&&X(t),p&&p.d(),a=!1,r()}}}function oi(e){let t,n,i,l,o,s,a,r,c=p.formatBytes(e[13].bytesIn,0,1e3)+"",u=null!=e[13].speedIn&&si(e);return{c(){t=Q("p"),t.textContent=`${d("global.download")}`,n=Z(),i=Q("kin-icon"),l=Z(),o=Q("span"),s=K(c),a=Z(),r=Q("span"),u&&u.c(),ie(t,"class","p -small -secondary g-margin-top--20 g-margin-bottom--5"),le(i,"name","icon-m-action-download"),le(i,"size","18"),le(i,"class","g-margin-right--5"),ie(o,"class","span g-font--bold"),ie(r,"class","span")},m(e,c){Y(e,t,c),Y(e,n,c),Y(e,i,c),Y(e,l,c),Y(e,o,c),V(o,s),Y(e,a,c),Y(e,r,c),u&&u.m(r,null)},p(e,t){2&t&&c!==(c=p.formatBytes(e[13].bytesIn,0,1e3)+"")&&oe(s,c),null!=e[13].speedIn?u?u.p(e,t):(u=si(e),u.c(),u.m(r,null)):u&&(u.d(1),u=null)},d(e){e&&X(t),e&&X(n),e&&X(i),e&&X(l),e&&X(o),e&&X(a),e&&X(r),u&&u.d()}}}function si(e){let t,n=d("firewall.apps.atSpeed",p.formatBytes(e[13].speedIn,0,1e3))+"";return{c(){t=K(n)},m(e,n){Y(e,t,n)},p(e,i){2&i&&n!==(n=d("firewall.apps.atSpeed",p.formatBytes(e[13].speedIn,0,1e3))+"")&&oe(t,n)},d(e){e&&X(t)}}}function ai(e){let t,n,i,l,o,s,a,r,c=p.formatBytes(e[13].bytesOut,0,1e3)+"",u=null!=e[13].speedOut&&ri(e);return{c(){t=Q("p"),t.textContent=`${d("firewall.apps.upload")}`,n=Z(),i=Q("kin-icon"),l=Z(),o=Q("span"),s=K(c),a=Z(),r=Q("span"),u&&u.c(),ie(t,"class","p -small -secondary g-margin-top--20 g-margin-bottom--5"),le(i,"name","icon-m-action-upload"),le(i,"size","18"),le(i,"class","g-margin-right--5"),ie(o,"class","span g-font--bold"),ie(r,"class","span")},m(e,c){Y(e,t,c),Y(e,n,c),Y(e,i,c),Y(e,l,c),Y(e,o,c),V(o,s),Y(e,a,c),Y(e,r,c),u&&u.m(r,null)},p(e,t){2&t&&c!==(c=p.formatBytes(e[13].bytesOut,0,1e3)+"")&&oe(s,c),null!=e[13].speedOut?u?u.p(e,t):(u=ri(e),u.c(),u.m(r,null)):u&&(u.d(1),u=null)},d(e){e&&X(t),e&&X(n),e&&X(i),e&&X(l),e&&X(o),e&&X(a),e&&X(r),u&&u.d()}}}function ri(e){let t,n=d("firewall.apps.atSpeed",p.formatBytes(e[13].speedOut,0,1e3))+"";return{c(){t=K(n)},m(e,n){Y(e,t,n)},p(e,i){2&i&&n!==(n=d("firewall.apps.atSpeed",p.formatBytes(e[13].speedOut,0,1e3))+"")&&oe(t,n)},d(e){e&&X(t)}}}function ci(e){let t,n=p.formatBytes(e[13].bytesTotal,0,1e3)+"";return{c(){t=K(n)},m(e,n){Y(e,t,n)},p(e,i){2&i&&n!==(n=p.formatBytes(e[13].bytesTotal,0,1e3)+"")&&oe(t,n)},d(e){e&&X(t)}}}function di(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$,S,I,C,P,N,A,T,R=e[13].name+"",M=e[13].name+"",E=e[13].path+"",O=null!=e[13].bytesIn&&oi(e),D=null!=e[13].bytesOut&&ai(e),z=e[13].bytesTotal&&ci(e);function L(){return e[8](e[13])}return{c(){t=Q("div"),n=Q("div"),i=Q("img"),s=Z(),a=Q("div"),r=Q("div"),c=K(R),p=Z(),u=Q("kin-tooltip"),m=Q("kin-icon"),f=Z(),g=Q("div"),h=Q("div"),_=Q("p"),v=K(M),w=Z(),b=Q("p"),k=K(E),y=Z(),O&&O.c(),x=Z(),D&&D.c(),$=Z(),S=Q("div"),z&&z.c(),I=Z(),C=Q("div"),P=Q("kin-button"),P.textContent=`${d("global.block")}`,N=Z(),ie(i,"class","kin-img"),ie(i,"height","24"),i.src!==(l="data:image/png;base64,"+e[13].icon)&&ie(i,"src",l),ie(i,"alt",o=e[13].name),ie(n,"class","kin_table__icon"),ie(r,"class","g-ellipsis"),ie(r,"dir","ltr"),le(m,"name","icon-m-action-info"),le(m,"size","20"),le(m,"slot","tooltip-activator"),ie(_,"class","p g-font--bold"),ie(b,"class","p -small -secondary"),ie(g,"slot","tooltip"),le(u,"class","kin_table__show-on-hover g-margin-left--5 g-margin-right--5"),ie(a,"class","kin_table__name"),le(P,"type","secondary"),le(P,"size","small"),ie(C,"class","kin_table__end"),ie(t,"role","row"),ie(t,"class","kin_table__row frw_allowed__row svelte-1lljne4")},m(e,l){Y(e,t,l),V(t,n),V(n,i),V(t,s),V(t,a),V(a,r),V(r,c),V(a,p),V(a,u),V(u,m),V(u,f),V(u,g),V(g,h),V(h,_),V(_,v),V(h,w),V(h,b),V(b,k),V(h,y),O&&O.m(h,null),V(h,x),D&&D.m(h,null),V(t,$),V(t,S),z&&z.m(S,null),V(t,I),V(t,C),V(C,P),V(t,N),A||(T=te(P,"click",L),A=!0)},p(t,n){e=t,2&n&&i.src!==(l="data:image/png;base64,"+e[13].icon)&&ie(i,"src",l),2&n&&o!==(o=e[13].name)&&ie(i,"alt",o),2&n&&R!==(R=e[13].name+"")&&oe(c,R),2&n&&M!==(M=e[13].name+"")&&oe(v,M),2&n&&E!==(E=e[13].path+"")&&oe(k,E),null!=e[13].bytesIn?O?O.p(e,n):(O=oi(e),O.c(),O.m(h,x)):O&&(O.d(1),O=null),null!=e[13].bytesOut?D?D.p(e,n):(D=ai(e),D.c(),D.m(h,null)):D&&(D.d(1),D=null),e[13].bytesTotal?z?z.p(e,n):(z=ci(e),z.c(),z.m(S,null)):z&&(z.d(1),z=null)},d(e){e&&X(t),O&&O.d(),D&&D.d(),z&&z.d(),A=!1,T()}}}function pi(e){let t,n,i,l;return i=new mn({props:{expandable:"true",$$slots:{default:[hi],"expanded-content":[gi],"main-content":[mi],icon:[ui]},$$scope:{ctx:e}}}),{c(){t=Q("div"),t.textContent=`${d("firewall.apps.blockedApps")}`,n=Z(),Ve(i.$$.fragment),ie(t,"class","g-margin-top--40")},m(e,o){Y(e,t,o),Y(e,n,o),Ye(i,e,o),l=!0},p(e,t){const n={};524296&t&&(n.$$scope={dirty:t,ctx:e}),i.$set(n)},i(e){l||(Fe(i.$$.fragment,e),l=!0)},o(e){je(i.$$.fragment,e),l=!1},d(e){e&&X(t),e&&X(n),Xe(i,e)}}}function ui(e){let t;return{c(){t=Q("div"),t.innerHTML='<kin-icon name="icon-m-action-block" size="24"></kin-icon>',ie(t,"slot","icon")},m(e,n){Y(e,t,n)},d(e){e&&X(t)}}}function mi(e){let t,n,i,l,o,s,a=d("firewall.appsBlockedFromInternet",e[3].length)+"",r=p.getArrayEllipsis(e[3].map(vi))+"";return{c(){t=Q("div"),n=Q("div"),i=K(a),l=Z(),o=Q("div"),s=K(r),ie(n,"class","sve-one_row__title"),ie(o,"class","sve-one_row__desc"),ie(t,"slot","main-content")},m(e,a){Y(e,t,a),V(t,n),V(n,i),V(t,l),V(t,o),V(o,s)},p(e,t){8&t&&a!==(a=d("firewall.appsBlockedFromInternet",e[3].length)+"")&&oe(i,a),8&t&&r!==(r=p.getArrayEllipsis(e[3].map(vi))+"")&&oe(s,r)},d(e){e&&X(t)}}}function fi(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$,S,I,C,P,N,A=e[10].name+"",T=e[10].name+"",R=e[10].path+"",M=d("firewall.apps.unblock")+"";function E(){return e[9](e[10])}return{c(){t=Q("div"),n=Q("div"),i=Q("img"),s=Z(),a=Q("div"),r=K(A),c=Z(),p=Q("div"),u=Q("kin-tooltip"),m=Q("div"),m.innerHTML='<span class="kin_table__show-on-hover g-margin-left--10 g-margin-right--10"><kin-icon name="icon-m-action-info" size="20"></kin-icon></span>',f=Z(),g=Q("div"),h=Q("div"),_=Q("p"),v=K(T),w=Z(),b=Q("p"),k=K(R),y=Z(),x=Q("div"),$=Q("kin-button"),S=K(M),C=Z(),ie(i,"class","kin-img"),ie(i,"height","24"),i.src!==(l="data:image/png;base64,"+e[10].icon)&&ie(i,"src",l),ie(i,"alt",o=e[10].name),ie(n,"size","small"),ie(n,"type","secondary"),ie(n,"class","kin_table__icon"),ie(m,"slot","tooltip-activator"),ie(_,"class","p g-font--bold"),ie(b,"class","p -small -secondary"),ie(g,"slot","tooltip"),le($,"size","small"),le($,"type","secondary"),le($,"title",I="Unblock"+e[10].name),ie(x,"class","kin_table__end"),ie(t,"class","kin_table__row frw_blocked__row svelte-1lljne4")},m(e,l){Y(e,t,l),V(t,n),V(n,i),V(t,s),V(t,a),V(a,r),V(a,c),V(a,p),V(p,u),V(u,m),V(u,f),V(u,g),V(g,h),V(h,_),V(_,v),V(h,w),V(h,b),V(b,k),V(t,y),V(t,x),V(x,$),V($,S),V(t,C),P||(N=te($,"click",E),P=!0)},p(t,n){e=t,8&n&&i.src!==(l="data:image/png;base64,"+e[10].icon)&&ie(i,"src",l),8&n&&o!==(o=e[10].name)&&ie(i,"alt",o),8&n&&A!==(A=e[10].name+"")&&oe(r,A),8&n&&T!==(T=e[10].name+"")&&oe(v,T),8&n&&R!==(R=e[10].path+"")&&oe(k,R),8&n&&I!==(I="Unblock"+e[10].name)&&le($,"title",I)},d(e){e&&X(t),P=!1,N()}}}function gi(e){let t,n,i,l=e[3],o=[];for(let s=0;s<l.length;s+=1)o[s]=fi(Kn(e,l,s));return{c(){t=Q("div"),n=Q("kin-table"),i=Q("div");for(let e=0;e<o.length;e+=1)o[e].c();ie(i,"slot","table-body"),ie(t,"slot","expanded-content")},m(e,l){Y(e,t,l),V(t,n),V(n,i);for(let t=0;t<o.length;t+=1)o[t].m(i,null)},p(e,t){if(8&t){let n;for(l=e[3],n=0;n<l.length;n+=1){const s=Kn(e,l,n);o[n]?o[n].p(s,t):(o[n]=fi(s),o[n].c(),o[n].m(i,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=l.length}},d(e){e&&X(t),J(o,e)}}}function hi(e){let t,n;return{c(){t=Z(),n=Z()},m(e,i){Y(e,t,i),Y(e,n,i)},p:P,d(e){e&&X(t),e&&X(n)}}}function _i(e){let t,n,i,l;const o=[ni,ti],s=[];function a(e,t){return e[2]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),i=ee()},m(e,n){s[t].m(e,n),Y(e,i,n),l=!0},p(e,[l]){let r=t;t=a(e),t===r?s[t].p(e,l):(Le(),je(s[r],1,1,(()=>{s[r]=null})),Be(),n=s[t],n?n.p(e,l):(n=s[t]=o[t](e),n.c()),Fe(n,1),n.m(i.parentNode,i))},i(e){l||(Fe(n),l=!0)},o(e){je(n),l=!1},d(e){s[t].d(e),e&&X(i)}}}const vi=e=>e.name;function wi(e,t,n){let i,l,o;D(e,Gn,(e=>n(6,i=e))),D(e,Hn,(e=>n(2,l=e))),D(e,Wn,(e=>n(3,o=e)));let s=[];const a={sortBy:"bytesTotal",ascending:!1},r=[{label:d("firewall.apps.runningApps"),sortBy:"name",ascending:!0},{label:d("firewall.apps.dataUsage"),sortBy:"bytesTotal",ascending:!1}];function c(e,t){e===a.sortBy?n(0,a.ascending=!a.ascending,a):(n(0,a.sortBy=e,a),n(0,a.ascending=t,a))}return e.$$.update=()=>{65&e.$$.dirty&&n(1,s=function(e,t={sortBy:"bytesTotal",ascending:!1},n){n||(n=jn);let i=[];switch(e){case"running":i=n.filter((e=>e.isRunning));break;default:i=n}return t&&"name"===t.sortBy?i=i.sort(((e,n)=>(t.ascending&&([e,n]=[n,e]),n[t.sortBy].localeCompare(e[t.sortBy])))):t&&(i=i.sort(((e,n)=>(t.ascending||([e,n]=[n,e]),e[t.sortBy]-n[t.sortBy])))),i}("running",a,i))},[a,s,l,o,r,c,i,e=>c(e.sortBy,e.ascending),e=>Xn(e.name,!0),e=>Xn(e.name,!1)]}class bi extends Ke{constructor(e){var t;super(),document.getElementById("svelte-1lljne4-style")||((t=Q("style")).id="svelte-1lljne4-style",t.textContent=".frw_blocked__row.svelte-1lljne4{grid-template-columns:7% 68% 25%}.frw_allowed__header.svelte-1lljne4{grid-template-columns:60% 40%;top:3rem}.frw_allowed__row.svelte-1lljne4{grid-template-columns:7% 53% 15% 25%}",V(document.head,t)),Qe(this,e,wi,_i,E,{})}}const ki=Ln(null,(e=>{function t(t){for(const e of t)e._modeSwitchDisabled=1===e.read_only,e._isConnected=1===e.connected,e._mode=e.mode,e._isWiFi=1===e.byWiFi;e(t)}return a("app.fwserv.get_net_profiles",{only_connected:0}).then(t).catch((t=>{console.error("app.fwserv.get_net_profiles",t),e([])})),o.on("app.fwserv.networks_changed_event",t)})),yi=Bn(ki,(e=>e&&e.filter((e=>e._isConnected)))),xi=Bn(ki,(e=>e&&e.filter((e=>!e._isConnected)))),$i=Bn(ki,(e=>!e),!0);function Si(e,t){ki.update((n=>{const i=n.find((t=>e===t.network_id));return i&&(Number.isInteger(i[t])?i[t]=i[t]?0:1:i[t]=!i[t]),n}))}function Ii(e){const t=e._mode===S.private?S.public:S.private;Si(e.network_id,"_mode"),function(e,t){const n={network_id:e.network_id,mode:parseInt(t)};return a("app.fwserv.set_net_profile_full",n)}(e,t).catch((t=>{console.error("app.fwserv.set_net_profile_full",t),Si(e.network_id,"_mode")}))}function Ci(e){let t,n,i=d("firewall.net.mode.public.desc")+"";return{c(){n=ee(),t=new ce(n)},m(e,l){t.m(i,e,l),Y(e,n,l)},p:P,d(e){e&&X(n),e&&t.d()}}}function Pi(e){let t,n,i=d("firewall.net.mode.private.desc")+"";return{c(){n=ee(),t=new ce(n)},m(e,l){t.m(i,e,l),Y(e,n,l)},p:P,d(e){e&&X(n),e&&t.d()}}}function Ni(e){let t,n,i,l,o,s,a,r,c,p,u=ji(e[0].geo);function m(e,t){return e[0]._isWiFi?Ti:Ai}let f=m(e),g=f(e),h=e[0]._isWiFi&&e[0].wifi&&e[0].wifi.quality&&Ri(e),_=e[0].adapter_description&&Mi(e),v=e[0].geo&&e[0].geo.ip&&Ei(e),w=e[0].addresses&&e[0].geo&&e[0].geo.ip&&Oi(e),b=e[0].gw_mac&&Di(e),k=u&&zi(e),y=e[0]._isWiFi&&e[0].wifi&&e[0].wifi.auth&&Li(e);return{c(){t=Q("dl"),n=Q("dt"),n.textContent=`${d("firewall.typeOfConnection")}:`,i=Q("dd"),g.c(),l=Z(),h&&h.c(),o=ee(),_&&_.c(),s=ee(),v&&v.c(),a=ee(),w&&w.c(),r=ee(),b&&b.c(),c=ee(),k&&k.c(),p=ee(),y&&y.c(),ie(t,"class","desclist -short g-margin-top--20")},m(e,d){Y(e,t,d),V(t,n),V(t,i),g.m(i,null),V(i,l),h&&h.m(t,null),V(t,o),_&&_.m(t,null),V(t,s),v&&v.m(t,null),V(t,a),w&&w.m(t,null),V(t,r),b&&b.m(t,null),V(t,c),k&&k.m(t,null),V(t,p),y&&y.m(t,null)},p(e,n){f===(f=m(e))&&g?g.p(e,n):(g.d(1),g=f(e),g&&(g.c(),g.m(i,l))),e[0]._isWiFi&&e[0].wifi&&e[0].wifi.quality?h?h.p(e,n):(h=Ri(e),h.c(),h.m(t,o)):h&&(h.d(1),h=null),e[0].adapter_description?_?_.p(e,n):(_=Mi(e),_.c(),_.m(t,s)):_&&(_.d(1),_=null),e[0].geo&&e[0].geo.ip?v?v.p(e,n):(v=Ei(e),v.c(),v.m(t,a)):v&&(v.d(1),v=null),e[0].addresses&&e[0].geo&&e[0].geo.ip?w?w.p(e,n):(w=Oi(e),w.c(),w.m(t,r)):w&&(w.d(1),w=null),e[0].gw_mac?b?b.p(e,n):(b=Di(e),b.c(),b.m(t,c)):b&&(b.d(1),b=null),1&n&&(u=ji(e[0].geo)),u?k?k.p(e,n):(k=zi(e),k.c(),k.m(t,p)):k&&(k.d(1),k=null),e[0]._isWiFi&&e[0].wifi&&e[0].wifi.auth?y?y.p(e,n):(y=Li(e),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},d(e){e&&X(t),g.d(),h&&h.d(),_&&_.d(),v&&v.d(),w&&w.d(),b&&b.d(),k&&k.d(),y&&y.d()}}}function Ai(e){let t,n=d("firewall.localAreaConnection")+"";return{c(){t=K(n)},m(e,n){Y(e,t,n)},p:P,d(e){e&&X(t)}}}function Ti(e){let t,n=d("firewall.wifiConnection")+"";return{c(){t=K(n)},m(e,n){Y(e,t,n)},p:P,d(e){e&&X(t)}}}function Ri(e){let t,n,i,l,o=e[2](e[0].wifi.quality)+"";return{c(){t=Q("dt"),t.textContent=`${d("firewall.wifiSignalStrength")}:`,n=Q("dd"),i=K(o),l=Z()},m(e,o){Y(e,t,o),Y(e,n,o),V(n,i),V(n,l)},p(e,t){1&t&&o!==(o=e[2](e[0].wifi.quality)+"")&&oe(i,o)},d(e){e&&X(t),e&&X(n)}}}function Mi(e){let t,n,i,l,o=e[0].adapter_description+"";return{c(){t=Q("dt"),t.textContent=`${d("firewall.adapterDescription")}:`,n=Q("dd"),i=K(o),l=Z()},m(e,o){Y(e,t,o),Y(e,n,o),V(n,i),V(n,l)},p(e,t){1&t&&o!==(o=e[0].adapter_description+"")&&oe(i,o)},d(e){e&&X(t),e&&X(n)}}}function Ei(e){let t,n,i,l,o,s,a=(e[0].geo&&e[0].geo.ip)+"",r=d("global.public")+"";return{c(){t=Q("dt"),t.textContent=`${d("global.ipAddress")}:`,n=Q("dd"),i=K(a),l=K(" ("),o=K(r),s=K(")\n\t\t\t\t\t")},m(e,a){Y(e,t,a),Y(e,n,a),V(n,i),V(n,l),V(n,o),V(n,s)},p(e,t){1&t&&a!==(a=(e[0].geo&&e[0].geo.ip)+"")&&oe(i,a)},d(e){e&&X(t),e&&X(n)}}}function Oi(e){let t,n,i,l,o,s,a=e[0].addresses+"",r=d("global.private")+"";return{c(){t=Q("dt"),t.textContent=`${d("firewall.givenIpAddress")}:`,n=Q("dd"),i=K(a),l=K(" ("),o=K(r),s=K(")\n\t\t\t\t\t")},m(e,a){Y(e,t,a),Y(e,n,a),V(n,i),V(n,l),V(n,o),V(n,s)},p(e,t){1&t&&a!==(a=e[0].addresses+"")&&oe(i,a)},d(e){e&&X(t),e&&X(n)}}}function Di(e){let t,n,i,l,o=e[0].gw_mac+"";return{c(){t=Q("dt"),t.textContent=`${d("firewall.macAddress")}:`,n=Q("dd"),i=K(o),l=Z()},m(e,o){Y(e,t,o),Y(e,n,o),V(n,i),V(n,l)},p(e,t){1&t&&o!==(o=e[0].gw_mac+"")&&oe(i,o)},d(e){e&&X(t),e&&X(n)}}}function zi(e){let t,n,i,l,o=ji(e[0].geo)+"";return{c(){t=Q("dt"),t.textContent=`${d("global.location")}:`,n=Q("dd"),i=K(o),l=Z()},m(e,o){Y(e,t,o),Y(e,n,o),V(n,i),V(n,l)},p(e,t){1&t&&o!==(o=ji(e[0].geo)+"")&&oe(i,o)},d(e){e&&X(t),e&&X(n)}}}function Li(e){let t,n,i,l=e[0].wifi.auth+"";return{c(){t=Q("dt"),t.textContent=`${d("firewall.securityType")}:`,n=Q("dd"),i=K(l)},m(e,l){Y(e,t,l),Y(e,n,l),V(n,i)},p(e,t){1&t&&l!==(l=e[0].wifi.auth+"")&&oe(i,l)},d(e){e&&X(t),e&&X(n)}}}function Bi(e){let t,n,i,l,o,s;return{c(){t=Q("kin-button"),n=Q("kin-icon"),le(n,"name",i=e[1]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down"),le(n,"size","12"),le(t,"size","small"),le(t,"type","blank"),le(t,"icononly",""),le(t,"class","frw_toggle"),le(t,"title",l=d("global.showDetails")+" - "+e[0].network_friendly_name)},m(i,l){Y(i,t,l),V(t,n),o||(s=te(t,"click",e[5]),o=!0)},p(e,o){2&o&&i!==(i=e[1]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down")&&le(n,"name",i),1&o&&l!==(l=d("global.showDetails")+" - "+e[0].network_friendly_name)&&le(t,"title",l)},d(e){e&&X(t),o=!1,s()}}}function Fi(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$,I,C,N,A=e[0].network_friendly_name+"",T=d("firewall.mode.public.short")+"",M=d("firewall.mode.private.short")+"";function E(e,t){return e[0]._mode===S.private?Pi:Ci}let O=E(e),D=O(e),z=e[0]._isConnected&&e[1]&&Ni(e),L=e[0]._isConnected&&Bi(e);return{c(){t=Q("div"),n=Q("div"),i=Q("kin-icon"),o=Z(),s=Q("div"),a=Q("h4"),r=K(A),c=Z(),p=Q("p"),D.c(),u=Z(),z&&z.c(),m=Z(),f=Q("div"),g=Q("div"),h=Q("div"),_=Q("button"),v=K(T),b=Z(),k=Q("button"),y=K(M),$=Z(),I=Q("div"),L&&L.c(),le(i,"name",l=e[0]._mode===S.public?"icon-l-scan-public":"icon-l-scan-home"),le(i,"size","24"),ie(n,"class","frw_net__icon svelte-grkc4g"),ie(a,"class","h4"),ie(p,"class","p -small g-margin-top--10"),ie(s,"class","frw_net__text svelte-grkc4g"),ie(_,"class","frw_net__btn svelte-grkc4g"),_.disabled=w=e[0]._modeSwitchDisabled,ae(_,"-active",e[0]._mode===S.public),ae(_,"-disabled",e[0]._modeSwitchDisabled),ie(k,"class","frw_net__btn -disabled svelte-grkc4g"),k.disabled=x=e[0]._modeSwitchDisabled,ae(k,"-active",e[0]._mode===S.private),ae(k,"-disabled",e[0]._modeSwitchDisabled),ie(h,"class","linkgroup -disabled"),ie(I,"class","frw_net__toggle svelte-grkc4g"),ie(g,"class","frw_net__controls svelte-grkc4g"),ie(t,"class","frw_net svelte-grkc4g")},m(l,d){Y(l,t,d),V(t,n),V(n,i),V(t,o),V(t,s),V(s,a),V(a,r),V(s,c),V(s,p),D.m(p,null),V(s,u),z&&z.m(s,null),V(t,m),V(t,f),V(f,g),V(g,h),V(h,_),V(_,v),V(h,b),V(h,k),V(k,y),V(g,$),V(g,I),L&&L.m(I,null),C||(N=[te(_,"click",e[3]),te(k,"click",e[4])],C=!0)},p(e,[t]){1&t&&l!==(l=e[0]._mode===S.public?"icon-l-scan-public":"icon-l-scan-home")&&le(i,"name",l),1&t&&A!==(A=e[0].network_friendly_name+"")&&oe(r,A),O===(O=E(e))&&D?D.p(e,t):(D.d(1),D=O(e),D&&(D.c(),D.m(p,null))),e[0]._isConnected&&e[1]?z?z.p(e,t):(z=Ni(e),z.c(),z.m(s,null)):z&&(z.d(1),z=null),1&t&&w!==(w=e[0]._modeSwitchDisabled)&&(_.disabled=w),1&t&&ae(_,"-active",e[0]._mode===S.public),1&t&&ae(_,"-disabled",e[0]._modeSwitchDisabled),1&t&&x!==(x=e[0]._modeSwitchDisabled)&&(k.disabled=x),1&t&&ae(k,"-active",e[0]._mode===S.private),1&t&&ae(k,"-disabled",e[0]._modeSwitchDisabled),e[0]._isConnected?L?L.p(e,t):(L=Bi(e),L.c(),L.m(I,null)):L&&(L.d(1),L=null)},i:P,o:P,d(e){e&&X(t),D.d(),z&&z.d(),L&&L.d(),C=!1,R(N)}}}function ji(e){if(!e)return null;let t="";return e.city&&"null"!==e.city&&(t+=e.city),e.country&&"null"!==e.country&&(""===t?t=e.country:t+=" ("+e.country+")"),t}function qi(e,t,n){let{net:i}=t,l=!1;return e.$$set=e=>{"net"in e&&n(0,i=e.net)},[i,l,function(e){let t=d("firewall.wifiSignalStrength.veryWeak");return e>80?t=d("firewall.wifiSignalStrength.veryStrong"):e>60?t=d("firewall.wifiSignalStrength.strong"):e>40?t=d("firewall.wifiSignalStrength.good"):e>20&&(t=d("firewall.wifiSignalStrength.weak")),t},()=>Ii(i),()=>Ii(i),()=>n(1,l=!l)]}class Gi extends Ke{constructor(e){var t;super(),document.getElementById("svelte-grkc4g-style")||((t=Q("style")).id="svelte-grkc4g-style",t.textContent=".frw_net.svelte-grkc4g{display:flex;justify-content:space-between;background:var(--app-bg-simple);padding:2rem;margin-top:2rem;margin-bottom:2rem}.frw_net__icon.svelte-grkc4g{min-width:4rem;height:4rem;border-radius:4rem;padding-top:0.7rem;background:var(--app-bg-darker);margin-right:2rem;flex-grow:0}.frw_net__text.svelte-grkc4g{text-align:left;flex-grow:1;margin-right:4rem}.frw_net__controls.svelte-grkc4g{display:flex;margin-top:1rem}.frw_net__toggle.svelte-grkc4g{width:4rem;text-align:right}.frw_net__btn.-disabled.svelte-grkc4g{opacity:0.5}",V(document.head,t)),Qe(this,e,qi,Fi,E,{net:0})}}function Wi(e,t,n){const i=e.slice();return i[3]=t[n],i}function Hi(e,t,n){const i=e.slice();return i[3]=t[n],i}function Ui(e){let t,n,i,l,o;const s=[Xi,Yi],a=[];function r(e,t){return 0===e[1].length?0:1}t=r(e),n=a[t]=s[t](e);let c=e[2].length&&Qi(e);return{c(){n.c(),i=Z(),c&&c.c(),l=ee()},m(e,n){a[t].m(e,n),Y(e,i,n),c&&c.m(e,n),Y(e,l,n),o=!0},p(e,o){let d=t;t=r(e),t===d?a[t].p(e,o):(Le(),je(a[d],1,1,(()=>{a[d]=null})),Be(),n=a[t],n?n.p(e,o):(n=a[t]=s[t](e),n.c()),Fe(n,1),n.m(i.parentNode,i)),e[2].length?c?(c.p(e,o),4&o&&Fe(c,1)):(c=Qi(e),c.c(),Fe(c,1),c.m(l.parentNode,l)):c&&(Le(),je(c,1,1,(()=>{c=null})),Be())},i(e){o||(Fe(n),Fe(c),o=!0)},o(e){je(n),je(c),o=!1},d(e){a[t].d(e),e&&X(i),c&&c.d(e),e&&X(l)}}}function Vi(e){let t;return{c(){t=Q("kin-loading")},m(e,n){Y(e,t,n)},p:P,i:P,o:P,d(e){e&&X(t)}}}function Yi(e){let t,n,i,l,o=[],s=new Map,a=e[1];const r=e=>e[3].network_id;for(let c=0;c<a.length;c+=1){let t=Hi(e,a,c),n=r(t);s.set(n,o[c]=Ji(n,t))}return{c(){t=Q("div"),n=Q("h6"),n.textContent=`${d("firewall.connectedNetworks")}`,i=Z();for(let e=0;e<o.length;e+=1)o[e].c();ie(n,"class","h6 g-align--left")},m(e,s){Y(e,t,s),V(t,n),V(t,i);for(let n=0;n<o.length;n+=1)o[n].m(t,null);l=!0},p(e,n){if(2&n){const i=e[1];Le(),o=Ue(o,n,r,1,e,i,s,t,We,Ji,null,Hi),Be()}},i(e){if(!l){for(let e=0;e<a.length;e+=1)Fe(o[e]);l=!0}},o(e){for(let t=0;t<o.length;t+=1)je(o[t]);l=!1},d(e){e&&X(t);for(let t=0;t<o.length;t+=1)o[t].d()}}}function Xi(e){let t,n=d("firewall.noConnectedNetworkFound")+"";return{c(){t=K(n)},m(e,n){Y(e,t,n)},p:P,i:P,o:P,d(e){e&&X(t)}}}function Ji(e,t){let n,i,l;return i=new Gi({props:{net:t[3]}}),{key:e,first:null,c(){n=ee(),Ve(i.$$.fragment),this.first=n},m(e,t){Y(e,n,t),Ye(i,e,t),l=!0},p(e,t){const n={};2&t&&(n.net=e[3]),i.$set(n)},i(e){l||(Fe(i.$$.fragment,e),l=!0)},o(e){je(i.$$.fragment,e),l=!1},d(e){e&&X(n),Xe(i,e)}}}function Qi(e){let t,n,i,l,o=[],s=new Map,a=e[2];const r=e=>e[3].network_id;for(let c=0;c<a.length;c+=1){let t=Wi(e,a,c),n=r(t);s.set(n,o[c]=Ki(n,t))}return{c(){t=Q("h6"),t.textContent=`${d("firewall.recentNetworks")}`,n=Z();for(let e=0;e<o.length;e+=1)o[e].c();i=ee(),ie(t,"class","h6 g-align--left g-margin-top--40")},m(e,s){Y(e,t,s),Y(e,n,s);for(let t=0;t<o.length;t+=1)o[t].m(e,s);Y(e,i,s),l=!0},p(e,t){if(4&t){const n=e[2];Le(),o=Ue(o,t,r,1,e,n,s,i.parentNode,We,Ki,i,Wi),Be()}},i(e){if(!l){for(let e=0;e<a.length;e+=1)Fe(o[e]);l=!0}},o(e){for(let t=0;t<o.length;t+=1)je(o[t]);l=!1},d(e){e&&X(t),e&&X(n);for(let t=0;t<o.length;t+=1)o[t].d(e);e&&X(i)}}}function Ki(e,t){let n,i,l;return i=new Gi({props:{net:t[3]}}),{key:e,first:null,c(){n=ee(),Ve(i.$$.fragment),this.first=n},m(e,t){Y(e,n,t),Ye(i,e,t),l=!0},p(e,t){const n={};4&t&&(n.net=e[3]),i.$set(n)},i(e){l||(Fe(i.$$.fragment,e),l=!0)},o(e){je(i.$$.fragment,e),l=!1},d(e){e&&X(n),Xe(i,e)}}}function Zi(e){let t,n,i,l;const o=[Vi,Ui],s=[];function a(e,t){return e[0]?0:1}return n=a(e),i=s[n]=o[n](e),{c(){t=Q("div"),i.c(),ie(t,"class","g-margin-top--20 g-align--center")},m(e,i){Y(e,t,i),s[n].m(t,null),l=!0},p(e,[l]){let r=n;n=a(e),n===r?s[n].p(e,l):(Le(),je(s[r],1,1,(()=>{s[r]=null})),Be(),i=s[n],i?i.p(e,l):(i=s[n]=o[n](e),i.c()),Fe(i,1),i.m(t,null))},i(e){l||(Fe(i),l=!0)},o(e){je(i),l=!1},d(e){e&&X(t),s[n].d()}}}function el(e,t,n){let i,l,o;return D(e,$i,(e=>n(0,i=e))),D(e,yi,(e=>n(1,l=e))),D(e,xi,(e=>n(2,o=e))),[i,l,o]}class tl extends Ke{constructor(e){super(),Qe(this,e,el,Zi,E,{})}}var nl=/^\s+|\s+$/g,il=/^[-+]0x[0-9a-f]+$/i,ll=/^0b[01]+$/i,ol=/^0o[0-7]+$/i,sl=parseInt,al="object"==typeof kn&&kn&&kn.Object===Object&&kn,rl="object"==typeof self&&self&&self.Object===Object&&self,cl=al||rl||Function("return this")(),dl=Object.prototype.toString,pl=Math.max,ul=Math.min,ml=function(){return cl.Date.now()};function fl(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function gl(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==dl.call(e)}(e))return NaN;if(fl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=fl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(nl,"");var n=ll.test(e);return n||ol.test(e)?sl(e.slice(2),n?2:8):il.test(e)?NaN:+e}var hl=function(e,t,n){var i,l,o,s,a,r,c=0,d=!1,p=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=i,o=l;return i=l=void 0,c=t,s=e.apply(o,n)}function f(e){return c=e,a=setTimeout(h,t),d?m(e):s}function g(e){var n=e-r;return void 0===r||n>=t||n<0||p&&e-c>=o}function h(){var e=ml();if(g(e))return _(e);a=setTimeout(h,function(e){var n=t-(e-r);return p?ul(n,o-(e-c)):n}(e))}function _(e){return a=void 0,u&&i?m(e):(i=l=void 0,s)}function v(){var e=ml(),n=g(e);if(i=arguments,l=this,r=e,n){if(void 0===a)return f(r);if(p)return a=setTimeout(h,t),m(r)}return void 0===a&&(a=setTimeout(h,t)),s}return t=gl(t)||0,fl(n)&&(d=!!n.leading,o=(p="maxWait"in n)?pl(gl(n.maxWait)||0,t):o,u="trailing"in n?!!n.trailing:u),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=r=l=a=void 0},v.flush=function(){return void 0===a?s:_(ml())},v};const _l={"avcfg://Firewall/SystemRules/AllowDHCP":d("firewall.rules.dhcp"),"avcfg://Firewall/SystemRules/AllowDNS":d("firewall.rules.dns"),"avcfg://Firewall/SystemRules/WindowsFileAndPrintersSharingServer":d("firewall.rules.windowsFileAndPrinterSharing"),"avcfg://Firewall/SystemRules/AllowVpnClientL2TP_IPSec":d("firewall.rules.vpn"),"avcfg://Firewall/SystemRules/AllowRemoteDesktopServer":d("firewall.rules.remoteDesktopConnectionsOnThisComputer"),"avcfg://Firewall/SystemRules/OutgoingPingAndTrace":d("firewall.rules.outgoingPingAndTraceRequest"),"avcfg://Firewall/SystemRules/IncomingPingAndTrace":d("firewall.rules.incomingPingAndTraceRequest"),"avcfg://Firewall/SystemRules/AllowIGMPTraffic":d("firewall.rules.igmpTraffic"),"avcfg://Firewall/SystemRules/AllowMulticastTraffic":d("firewall.rules.multicastTraffic"),"avcfg://Firewall/SystemRules/AllowVpnClientPPTP":d("firewall.rules.msVPnPptpGre")},vl="0",wl="1",bl="2",kl=Ln(null,(function(e){const t=o.on("app.settings.onSettingsApplied",l),n=hl(Il,1e3),i=kl.subscribe(n);return l(),()=>{t(),i(),n.flush()};function l(){a("app.firewall.GetPacketRules").catch((e=>(console.error("Loading packet rules failed",e),{rules:[]}))).then((t=>{xl=JSON.stringify(t.rules),e(t.rules)}))}})),yl=Bn(kl,(function(e,t){if(null==e)return null;const n=[{id:1,name:d("firewall.rules.publicRules"),rules:e.filter((e=>e.read_only&&"public"===e.profile))}];e.forEach((e=>{if(e.system_rule&&e.associated_property){(function(e){let t=n.find((t=>t.path===e));t||(t={id:n.length+1,name:_l[e],path:e,rules:[]},n.push(t));return t})(e.associated_property).rules.push(e)}}));const l=n.map((e=>e.path?i.getValue(e.path):void 0));return Promise.all(l).then((e=>{n.forEach(((t,n)=>{t.state=e[n]})),t(n)})).catch((e=>{console.error("Failed to get enabled states of system rules",e),t(n)})),n}));let xl;function $l(e){return e.state===vl?e.state=wl:e.state=vl,i.set(e.path,e.state).then((()=>a("app.settings.ApplySettings")))}function Sl(e){const t=e&&e.rules.map((e=>e.id)).join(","),n=new URL(location.href);n.search="?module=MainLayout&view=window&ruleIds="+t,n.hash="#Firewall/rules/list",a("app.windowManager.ShowWindow",{url:n.toString(),width:1600,height:800})}function Il(e){const t=JSON.stringify(e);xl!==t&&a("app.firewall.SetPacketRules",{rules:e}).then((()=>xl=t))}function Cl(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$=d("global.denied")+"",S=d("global.allowed")+"";return{c(){t=Q("div"),n=Q("button"),i=K($),o=Z(),s=Q("button"),a=K(S),c=Z(),p=Q("div"),u=Q("kin-dropdown"),m=Q("span"),f=Q("kin-button"),g=Q("kin-icon"),v=Z(),w=Q("kin-dropdown-item"),w.textContent=`${d("global.showDetails")}`,b=Z(),k=Q("kin-dropdown-item"),k.textContent=`${d("firewall.rules.restoreToRuleLibrary")}`,ie(n,"class","frw_ruleGroup__btn svelte-cmemw8"),n.disabled=l=null==e[1],ae(n,"-active",!e[1]),ae(n,"-disabled",null==e[1]),ie(s,"class","frw_ruleGroup__btn svelte-cmemw8"),s.disabled=r=null==e[1],ae(s,"-active",e[1]),ae(s,"-disabled",null==e[1]),ie(t,"class","linkgroup"),le(g,"name","icon-s-controls-menu-more"),le(g,"size","14"),le(f,"icononly",""),le(f,"type","blank"),le(f,"size","small"),le(f,"class",h="moreOptions-tooltip-"+e[0].id+" svelte-cmemw8"),le(f,"title",_=d("global.moreOptions")),le(f,"data-test","kin_table-item-options"),ie(m,"slot","dropdown-activator"),ie(p,"class","frw_ruleGroup__actions svelte-cmemw8")},m(l,r){Y(l,t,r),V(t,n),V(n,i),V(t,o),V(t,s),V(s,a),Y(l,c,r),Y(l,p,r),V(p,u),V(u,m),V(m,f),V(f,g),V(u,v),V(u,w),V(u,b),V(u,k),y||(x=[te(n,"click",e[5]),te(s,"click",e[6]),te(w,"click",e[7]),te(k,"click",e[8])],y=!0)},p(e,t){2&t&&l!==(l=null==e[1])&&(n.disabled=l),2&t&&ae(n,"-active",!e[1]),2&t&&ae(n,"-disabled",null==e[1]),2&t&&r!==(r=null==e[1])&&(s.disabled=r),2&t&&ae(s,"-active",e[1]),2&t&&ae(s,"-disabled",null==e[1]),1&t&&h!==(h="moreOptions-tooltip-"+e[0].id+" svelte-cmemw8")&&le(f,"class",h)},d(e){e&&X(t),e&&X(c),e&&X(p),y=!1,R(x)}}}function Pl(e){let t,n,i,l,o;return{c(){t=Q("button"),t.textContent=`${d("firewall.useGlobalRule")}`,n=Z(),i=Q("button"),i.textContent=`${d("global.showDetails")}`,ie(t,"class","btn -secondary g-margin-right--20"),ie(i,"class","a")},m(s,a){Y(s,t,a),Y(s,n,a),Y(s,i,a),l||(o=[te(t,"click",e[3]),te(i,"click",e[4])],l=!0)},p:P,d(e){e&&X(t),e&&X(n),e&&X(i),l=!1,R(o)}}}function Nl(e){let t,n,i;return{c(){t=Q("button"),t.textContent=`${d("global.showDetails")}`,ie(t,"class","a")},m(l,o){Y(l,t,o),n||(i=te(t,"click",e[2]),n=!0)},p:P,d(e){e&&X(t),n=!1,i()}}}function Al(e){let t,n,i,l,o,s,a,r,c,d=e[0].name+"";function p(e,t){return null==e[0].state?Nl:e[0].state===bl?Pl:Cl}let u=p(e),m=u(e);return{c(){t=Q("div"),n=Q("div"),n.innerHTML='<kin-icon name="icon-l-scan-home" size="24"></kin-icon>',i=Z(),l=Q("div"),o=Q("h4"),s=K(d),a=Z(),r=Q("div"),c=Q("div"),m.c(),ie(n,"class","frw_ruleGroup__icon svelte-cmemw8"),ie(o,"class","h4"),ie(l,"class","frw_ruleGroup__text svelte-cmemw8"),ie(c,"class","frw_ruleGroup__controls svelte-cmemw8"),ie(t,"class","frw_ruleGroup svelte-cmemw8")},m(e,d){Y(e,t,d),V(t,n),V(t,i),V(t,l),V(l,o),V(o,s),V(t,a),V(t,r),V(r,c),m.m(c,null)},p(e,[t]){1&t&&d!==(d=e[0].name+"")&&oe(s,d),u===(u=p(e))&&m?m.p(e,t):(m.d(1),m=u(e),m&&(m.c(),m.m(c,null)))},i:P,o:P,d(e){e&&X(t),m.d()}}}function Tl(e,t,n){let{ruleGroup:l}=t;let o;return e.$$set=e=>{"ruleGroup"in e&&n(0,l=e.ruleGroup)},e.$$.update=()=>{1&e.$$.dirty&&n(1,o=null!=l.state&&l.state===wl)},[l,o,()=>Sl(l),()=>function(e){return e.state=wl,i.set(e.path,e.state).then((()=>a("app.settings.ApplySettings")))}(l),()=>Sl(l),()=>$l(l),()=>$l(l),()=>Sl(l),()=>function(e){return e.state=bl,i.set(e.path,e.state).then((()=>a("app.settings.ApplySettings")))}(l)]}class Rl extends Ke{constructor(e){var t;super(),document.getElementById("svelte-cmemw8-style")||((t=Q("style")).id="svelte-cmemw8-style",t.textContent=".frw_ruleGroup.svelte-cmemw8{display:flex;justify-content:space-between;background:var(--app-bg-simple);padding:2rem;margin-top:2rem;margin-bottom:2rem}.frw_ruleGroup__icon.svelte-cmemw8{min-width:4rem;height:4rem;border-radius:4rem;padding-top:0.7rem;background:var(--app-bg-darker);margin-right:2rem;flex-grow:0}.frw_ruleGroup__text.svelte-cmemw8{text-align:left;flex-grow:1;margin-right:4rem;padding-top:12px}.frw_ruleGroup__controls.svelte-cmemw8{display:flex;margin-top:1rem}.frw_ruleGroup__actions.svelte-cmemw8{width:4rem;text-align:right}.frw_ruleGroup__btn.-disabled.svelte-cmemw8{opacity:0.5}",V(document.head,t)),Qe(this,e,Tl,Al,E,{ruleGroup:0})}}function Ml(e,t,n){const i=e.slice();return i[2]=t[n],i}function El(e){let t,n,i,l,o=e[0],s=[];for(let r=0;r<o.length;r+=1)s[r]=Dl(Ml(e,o,r));const a=e=>je(s[e],1,1,(()=>{s[e]=null}));return{c(){t=Q("div"),n=Q("h6"),n.textContent=`${d("firewall.rules.unusedGlobalRules")}`,i=Z();for(let e=0;e<s.length;e+=1)s[e].c();ie(n,"class","h6 g-align--left")},m(e,o){Y(e,t,o),V(t,n),V(t,i);for(let n=0;n<s.length;n+=1)s[n].m(t,null);l=!0},p(e,n){if(1&n){let i;for(o=e[0],i=0;i<o.length;i+=1){const l=Ml(e,o,i);s[i]?(s[i].p(l,n),Fe(s[i],1)):(s[i]=Dl(l),s[i].c(),Fe(s[i],1),s[i].m(t,null))}for(Le(),i=o.length;i<s.length;i+=1)a(i);Be()}},i(e){if(!l){for(let e=0;e<o.length;e+=1)Fe(s[e]);l=!0}},o(e){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)je(s[t]);l=!1},d(e){e&&X(t),J(s,e)}}}function Ol(e){let t;return{c(){t=Q("kin-loading")},m(e,n){Y(e,t,n)},p:P,i:P,o:P,d(e){e&&X(t)}}}function Dl(e){let t,n;return t=new Rl({props:{ruleGroup:e[2]}}),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.ruleGroup=e[2]),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function zl(e){let t,n,i,l;const o=[Ol,El],s=[];function a(e,t){return null==e[0]?0:1}return n=a(e),i=s[n]=o[n](e),{c(){t=Q("div"),i.c(),ie(t,"class","g-margin-top--20 g-align--center")},m(e,i){Y(e,t,i),s[n].m(t,null),l=!0},p(e,[l]){let r=n;n=a(e),n===r?s[n].p(e,l):(Le(),je(s[r],1,1,(()=>{s[r]=null})),Be(),i=s[n],i?i.p(e,l):(i=s[n]=o[n](e),i.c()),Fe(i,1),i.m(t,null))},i(e){l||(Fe(i),l=!0)},o(e){je(i),l=!1},d(e){e&&X(t),s[n].d()}}}function Ll(e,t,n){let i,l;return D(e,yl,(e=>n(1,i=e))),e.$$.update=()=>{2&e.$$.dirty&&n(0,l=i&&i.filter((e=>e.state===bl)))},[l,i]}class Bl extends Ke{constructor(e){super(),Qe(this,e,Ll,zl,E,{})}}function Fl(e,t,n){const i=e.slice();return i[5]=t[n],i}function jl(e){let t,n,i,l,o,s,a=e[1],r=[];for(let d=0;d<a.length;d+=1)r[d]=Gl(Fl(e,a,d));const c=e=>je(r[e],1,1,(()=>{r[e]=null}));return{c(){t=Q("div"),n=Q("a"),n.textContent=`${d("firewall.showRuleLibrary")}`,i=Z(),l=Q("h6"),l.textContent=`${d("firewall.globalRules")}`,o=Z();for(let e=0;e<r.length;e+=1)r[e].c();ie(n,"class","a frw_rulesLib svelte-mcjfpm"),ie(n,"href","#Firewall/rules/library"),ie(l,"class","h6 g-align--left")},m(e,a){Y(e,t,a),V(t,n),V(t,i),V(t,l),V(t,o);for(let n=0;n<r.length;n+=1)r[n].m(t,null);s=!0},p(e,n){if(2&n){let i;for(a=e[1],i=0;i<a.length;i+=1){const l=Fl(e,a,i);r[i]?(r[i].p(l,n),Fe(r[i],1)):(r[i]=Gl(l),r[i].c(),Fe(r[i],1),r[i].m(t,null))}for(Le(),i=a.length;i<r.length;i+=1)c(i);Be()}},i(e){if(!s){for(let e=0;e<a.length;e+=1)Fe(r[e]);s=!0}},o(e){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)je(r[t]);s=!1},d(e){e&&X(t),J(r,e)}}}function ql(e){let t;return{c(){t=Q("kin-loading")},m(e,n){Y(e,t,n)},p:P,i:P,o:P,d(e){e&&X(t)}}}function Gl(e){let t,n;return t=new Rl({props:{ruleGroup:e[5]}}),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};2&n&&(i.ruleGroup=e[5]),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function Wl(e){let t,n;return t=new bn({props:{$$slots:{default:[Hl]},$$scope:{ctx:e}}}),t.$on("close",e[4]),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};256&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function Hl(e){let t,n;return t=new Bl({}),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function Ul(e){let t,n,i,l,o,s;const a=[ql,jl],r=[];function c(e,t){return null==e[1]?0:1}n=c(e),i=r[n]=a[n](e);let d=e[0]&&Wl(e);return{c(){t=Q("div"),i.c(),l=Z(),d&&d.c(),o=ee(),ie(t,"class","g-margin-top--20 g-align--center")},m(e,i){Y(e,t,i),r[n].m(t,null),Y(e,l,i),d&&d.m(e,i),Y(e,o,i),s=!0},p(e,[l]){let s=n;n=c(e),n===s?r[n].p(e,l):(Le(),je(r[s],1,1,(()=>{r[s]=null})),Be(),i=r[n],i?i.p(e,l):(i=r[n]=a[n](e),i.c()),Fe(i,1),i.m(t,null)),e[0]?d?(d.p(e,l),1&l&&Fe(d,1)):(d=Wl(e),d.c(),Fe(d,1),d.m(o.parentNode,o)):d&&(Le(),je(d,1,1,(()=>{d=null})),Be())},i(e){s||(Fe(i),Fe(d),s=!0)},o(e){je(i),je(d),s=!1},d(e){e&&X(t),r[n].d(),e&&X(l),d&&d.d(e),e&&X(o)}}}function Vl(e,t,n){let i;D(e,yl,(e=>n(3,i=e)));let{router:l}=t,o=!1;l.on("",(()=>n(0,o=!1))),l.on("library",(()=>n(0,o=!0))),we((()=>{l.removeAllListeners()}));let s;return e.$$set=e=>{"router"in e&&n(2,l=e.router)},e.$$.update=()=>{8&e.$$.dirty&&n(1,s=i&&i.filter((e=>e.state!==bl)))},[o,s,l,i,()=>location.hash="#Firewall/rules"]}class Yl extends Ke{constructor(e){var t;super(),document.getElementById("svelte-mcjfpm-style")||((t=Q("style")).id="svelte-mcjfpm-style",t.textContent=".frw_rulesLib.svelte-mcjfpm{float:right}",V(document.head,t)),Qe(this,e,Vl,Ul,E,{router:2})}}function Xl(e,t,n){const i=getComputedStyle(e),l="none"===i.transform?"":i.transform,o=t.from.width/e.clientWidth,s=t.from.height/e.clientHeight,a=(t.from.left-t.to.left)/o,r=(t.from.top-t.to.top)/s,c=Math.sqrt(a*a+r*r),{delay:d=0,duration:p=(e=>120*Math.sqrt(e)),easing:u=fn}=n;return{delay:d,duration:M(p)?p(c):p,easing:u,css:(e,t)=>`transform: ${l} translate(${t*a}px, ${t*r}px);`}}const Jl=[{id:"in",name:d("firewall.direction.in")},{id:"out",name:d("firewall.direction.out")},{id:"both",name:d("firewall.direction.inOut")}],Ql=[{id:"all",name:d("global.all")},{id:"private",name:d("global.private")},{id:"public",name:d("global.public")}],Kl=[{id:"autodecide",name:d("global.autoDecide")},{id:"allow",name:d("global.allow")},{id:"block",name:d("global.block")},{id:"ask",name:d("global.ask")}],Zl=[{id:1,name:"ICMP (1)"},{id:58,name:"ICMPv6 (58)"},{id:6,name:"TCP (6)"},{id:17,name:"UDP (17)"},{id:257,name:"TCP/UDP"},{id:256,name:d("global.all")},{id:0,name:"HOPOPT (0)"},{id:2,name:"IGMP (2)"},{id:3,name:"GGP (3)"},{id:4,name:"IP (4)"},{id:5,name:"ST (5)"},{id:7,name:"CBT (7)"},{id:8,name:"EGP (8)"},{id:9,name:"IGP (9)"},{id:10,name:"B-R-M (10)"},{id:11,name:"NVP-II (11)"},{id:12,name:"PUP (12)"},{id:13,name:"ARGUS (13)"},{id:14,name:"EMCON (14)"},{id:15,name:"XNET (15)"},{id:16,name:"CHAOS (16)"},{id:18,name:"MUX (18)"},{id:19,name:"DCN-MES (19)"},{id:20,name:"HMP (20)"},{id:21,name:"PRM (21)"},{id:22,name:"XNS-IDP (22)"},{id:23,name:"TRUNK-1 (23)"},{id:24,name:"TRUNK-2 (24)"},{id:25,name:"LEAF-1 (25)"},{id:26,name:"LEAF-2 (26)"},{id:27,name:"RDP (27)"},{id:28,name:"IRTP (28)"},{id:29,name:"ISO-TP4 (29)"},{id:30,name:"NETBLT (30)"},{id:31,name:"MFE-NSP (31)"},{id:32,name:"MRT-INP (32)"},{id:33,name:"DCCP (33)"},{id:34,name:"3PC (34)"},{id:35,name:"IDPR (35)"},{id:36,name:"XTP (36)"},{id:37,name:"DDP (37)"},{id:38,name:"IDP-CMT (38)"},{id:39,name:"TP++ (39)"},{id:40,name:"IL (40)"},{id:41,name:"IPv6 (41)"},{id:42,name:"SDRP (42)"},{id:43,name:"IPv6-Rout(43)"},{id:44,name:"IPv6-Frag(44)"},{id:45,name:"IDRP (45)"},{id:46,name:"RSVP (46)"},{id:47,name:"GRE (47)"},{id:48,name:"DSR (48)"},{id:49,name:"BNA (49)"},{id:50,name:"ESP (50)"},{id:51,name:"AH (51)"},{id:52,name:"I-NLSP (52)"},{id:53,name:"SWIPE (53)"},{id:54,name:"NARP (54)"},{id:55,name:"MOBILE (55)"},{id:56,name:"TLSP (56)"},{id:57,name:"SKIP (57)"},{id:59,name:"IPv6-NoNxt (59)"},{id:60,name:"IPv6-Opts (60)"},{id:61,name:" (61)"},{id:62,name:"CFTP (62)"},{id:63,name:" (63)"},{id:64,name:"SAT-EXP (64)"},{id:65,name:"KRYP2LN (65)"},{id:66,name:"RVD (66)"},{id:67,name:"IPPC (67)"},{id:68,name:" (68)"},{id:69,name:"SAT-MON (69)"},{id:70,name:"VISA (70)"},{id:71,name:"IPCV (71)"},{id:72,name:"CPNX (72)"},{id:73,name:"CPHB (73)"},{id:74,name:"WSN (74)"},{id:75,name:"PVP (75)"},{id:76,name:"BrSatMon (76)"},{id:77,name:"SUN-ND (77)"},{id:78,name:"WB-MON (78)"},{id:79,name:"WB-EXPK (79)"},{id:80,name:"ISO-IP (80)"},{id:81,name:"VMTP (81)"},{id:82,name:"SecVMTP(82)"},{id:83,name:"VINES (83)"},{id:84,name:"TTP (84)"},{id:85,name:"NSF-IGP (85)"},{id:86,name:"DGP (86)"},{id:87,name:"TCF (87)"},{id:88,name:"EIGRP (88)"},{id:89,name:"OSPFIGP (89)"},{id:90,name:"SprtRPC (90)"},{id:91,name:"LARP (91)"},{id:92,name:"MTP (92)"},{id:93,name:"AX.25 (93)"},{id:94,name:"IPIP (94)"},{id:95,name:"MICP (95)"},{id:96,name:"SCC-SP (96)"},{id:97,name:"ETHERIP (97)"},{id:98,name:"ENCAP (98)"},{id:99,name:"99"},{id:100,name:"GMTP (100)"},{id:101,name:"IFMP (101)"},{id:102,name:"PNNI (102)"},{id:103,name:"PIM (103)"},{id:104,name:"ARIS (104)"},{id:105,name:"SCPS (105)"},{id:106,name:"QNX (106)"},{id:107,name:"A/N (107)"},{id:108,name:"IPComp (108)"},{id:109,name:"SNP (109)"},{id:110,name:"Cpq-Pr (110)"},{id:111,name:"IPX-IP (111)"},{id:112,name:"VRRP (112)"},{id:113,name:"PGM (113)"},{id:114,name:"114 (114)"},{id:115,name:"L2TP (115)"},{id:116,name:"DDX (116)"},{id:117,name:"IATP (117)"},{id:118,name:"STP (118)"},{id:119,name:"SRP (119)"},{id:120,name:"UTI (120)"},{id:121,name:"SMP (121)"},{id:122,name:"SM (122)"},{id:123,name:"PTP (123)"},{id:124,name:"ISIS-IP (124)"},{id:125,name:"FIRE (125)"},{id:126,name:"CRTP (126)"},{id:127,name:"CRUDP (127)"},{id:128,name:"SSCPMCE (128)"},{id:129,name:"IPLT (129)"},{id:130,name:"SPS (130)"},{id:131,name:"PIPE (131)"},{id:132,name:"SCTP (132)"},{id:133,name:"FC (133)"},{id:134,name:"RSVP-Ign (134)"},{id:135,name:"Mobil-H (135)"},{id:136,name:"UDPLite (136)"},{id:137,name:"MPLS-IP (137)"},{id:138,name:"manet (138)"},{id:139,name:"HIP (139)"},{id:140,name:"Shim6 (140)"},{id:141,name:"141"},{id:142,name:"142"},{id:143,name:"143"},{id:144,name:"144"},{id:145,name:"145"},{id:146,name:"146"},{id:147,name:"147"},{id:148,name:"148"},{id:149,name:"149"},{id:150,name:"150"},{id:151,name:"151"},{id:152,name:"152"},{id:153,name:"153"},{id:154,name:"154"},{id:155,name:"155"},{id:156,name:"156"},{id:157,name:"157"},{id:158,name:"158"},{id:159,name:"159"},{id:160,name:"160"},{id:161,name:"161"},{id:162,name:"162"},{id:163,name:"163"},{id:164,name:"164"},{id:165,name:"165"},{id:166,name:"166"},{id:167,name:"167"},{id:168,name:"168"},{id:169,name:"169"},{id:170,name:"170"},{id:171,name:"171"},{id:172,name:"172"},{id:173,name:"173"},{id:174,name:"174"},{id:175,name:"175"},{id:176,name:"176"},{id:177,name:"177"},{id:178,name:"178"},{id:179,name:"179"},{id:180,name:"180"},{id:181,name:"181"},{id:182,name:"182"},{id:183,name:"183"},{id:184,name:"184"},{id:185,name:"185"},{id:186,name:"186"},{id:187,name:"187"},{id:188,name:"188"},{id:189,name:"189"},{id:190,name:"190"},{id:191,name:"191"},{id:192,name:"192"},{id:193,name:"193"},{id:194,name:"194"},{id:195,name:"195"},{id:196,name:"196"},{id:197,name:"197"},{id:198,name:"198"},{id:199,name:"199"},{id:200,name:"200"},{id:201,name:"201"},{id:202,name:"202"},{id:203,name:"203"},{id:204,name:"204"},{id:205,name:"205"},{id:206,name:"206"},{id:207,name:"207"},{id:208,name:"208"},{id:209,name:"209"},{id:210,name:"210"},{id:211,name:"211"},{id:212,name:"212"},{id:213,name:"213"},{id:214,name:"214"},{id:215,name:"215"},{id:216,name:"216"},{id:217,name:"217"},{id:218,name:"218"},{id:219,name:"219"},{id:220,name:"220"},{id:221,name:"221"},{id:222,name:"222"},{id:223,name:"223"},{id:224,name:"224"},{id:225,name:"225"},{id:226,name:"226"},{id:227,name:"227"},{id:228,name:"228"},{id:229,name:"229"},{id:230,name:"230"},{id:231,name:"231"},{id:232,name:"232"},{id:233,name:"233"},{id:234,name:"234"},{id:235,name:"235"},{id:236,name:"236"},{id:237,name:"237"},{id:238,name:"238"},{id:239,name:"239"},{id:240,name:"240"},{id:241,name:"241"},{id:242,name:"242"},{id:243,name:"243"},{id:244,name:"244"},{id:245,name:"245"},{id:246,name:"246"},{id:247,name:"247"},{id:248,name:"248"},{id:249,name:"249"},{id:250,name:"250"},{id:251,name:"251"},{id:252,name:"252"},{id:253,name:"253"},{id:254,name:"254"}];function eo(e,t,n){const i=e.slice();return i[26]=t[n].id,i[27]=t[n].name,i}function to(e,t,n){const i=e.slice();return i[26]=t[n].id,i[27]=t[n].name,i}function no(e,t,n){const i=e.slice();return i[26]=t[n].id,i[27]=t[n].name,i}function io(e,t,n){const i=e.slice();return i[26]=t[n].id,i[27]=t[n].name,i}function lo(e){let t,n,i,l=e[27]+"";return{c(){t=Q("option"),n=K(l),t.__value=i=e[26],t.value=t.__value},m(e,i){Y(e,t,i),V(t,n)},p:P,d(e){e&&X(t)}}}function oo(e){let t,n,i,l=e[27]+"";return{c(){t=Q("option"),n=K(l),t.__value=i=e[26],t.value=t.__value,ae(t,"-separator",256===e[26])},m(e,i){Y(e,t,i),V(t,n)},p(e,n){0&n&&ae(t,"-separator",256===e[26])},d(e){e&&X(t)}}}function so(e){let t,n,i,l=e[27]+"";return{c(){t=Q("option"),n=K(l),t.__value=i=e[26],t.value=t.__value},m(e,i){Y(e,t,i),V(t,n)},p:P,d(e){e&&X(t)}}}function ao(e){let t,n,i,l=e[27]+"";return{c(){t=Q("option"),n=K(l),t.__value=i=e[26],t.value=t.__value},m(e,i){Y(e,t,i),V(t,n)},p:P,d(e){e&&X(t)}}}function ro(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$,S,I,C,P,N,A,T,M,E,O,D,z,L,B,F,j,q,G,W,H,U,K,ee,ne,oe,se,ae,re=Kl,ce=[];for(let d=0;d<re.length;d+=1)ce[d]=lo(io(e,re,d));let de=Zl,pe=[];for(let d=0;d<de.length;d+=1)pe[d]=oo(no(e,de,d));let ue=Jl,me=[];for(let d=0;d<ue.length;d+=1)me[d]=so(to(e,ue,d));let fe=Ql,ge=[];for(let d=0;d<fe.length;d+=1)ge[d]=ao(eo(e,fe,d));return{c(){t=Q("div"),n=Q("h2"),n.textContent=`${d("firewall.editRule")}`,i=Z(),l=Q("div"),o=Q("label"),o.textContent=`${d("global.enabled")}`,s=Z(),a=Q("kin-switch"),c=Z(),p=Q("kin-input"),f=Z(),g=Q("kin-select"),h=Q("div");for(let e=0;e<ce.length;e+=1)ce[e].c();v=Z(),w=Q("kin-select"),b=Q("div");for(let e=0;e<pe.length;e+=1)pe[e].c();y=Z(),x=Q("kin-select"),$=Q("div");for(let e=0;e<me.length;e+=1)me[e].c();I=Z(),C=Q("kin-input"),T=Z(),M=Q("kin-input"),z=Z(),L=Q("kin-input"),q=Z(),G=Q("kin-input"),K=Z(),ee=Q("kin-select"),ne=Q("div");for(let e=0;e<ge.length;e+=1)ge[e].c();ie(n,"class","h2 modal__title"),ie(o,"class","svelte-pkexwm"),le(a,"checked",r=e[1].enabled),ie(l,"class","frw_enabled svelte-pkexwm"),le(p,"simplerow",""),le(p,"value",u=e[1].name),le(p,"label",m=d("firewall.name")),le(g,"simplerow",""),le(g,"label",_=d("global.action")),le(w,"simplerow",""),le(w,"label",k=d("firewall.protocol")),le(x,"simplerow",""),le(x,"label",S=d("global.direction")),le(C,"simplerow",""),le(C,"value",P=e[1].remote_address),le(C,"error",N=e[0].remote_address),le(C,"label",A=d("firewall.address")),le(M,"simplerow",""),le(M,"value",E=e[1].local_port),le(M,"error",O=e[0].local_port),le(M,"label",D=d("firewall.localPort")),le(L,"simplerow",""),le(L,"value",B=e[1].remote_port),le(L,"error",F=e[0].remote_port),le(L,"label",j=d("firewall.remotePort")),le(G,"simplerow",""),le(G,"value",W=e[1].icmp_type),le(G,"error",H=e[0].icmp_type),le(G,"label",U=d("firewall.icmpType")),le(ee,"simplerow",""),le(ee,"label",oe=d("firewall.profile")),ie(t,"slot","modal-content"),ie(t,"class","frw_list__modal")},m(r,d){Y(r,t,d),V(t,n),V(t,i),V(t,l),V(l,o),V(l,s),V(l,a),V(t,c),V(t,p),V(t,f),V(t,g),V(g,h);for(let e=0;e<ce.length;e+=1)ce[e].m(h,null);V(t,v),V(t,w),V(w,b);for(let e=0;e<pe.length;e+=1)pe[e].m(b,null);V(t,y),V(t,x),V(x,$);for(let e=0;e<me.length;e+=1)me[e].m($,null);V(t,I),V(t,C),V(t,T),V(t,M),V(t,z),V(t,L),V(t,q),V(t,G),V(t,K),V(t,ee),V(ee,ne);for(let e=0;e<ge.length;e+=1)ge[e].m(ne,null);se||(ae=[te(a,"click",e[6]),te(p,"keyup",e[7]),te(g,"change",e[8]),te(w,"change",e[9]),te(x,"change",e[10]),te(C,"keyup",e[11]),te(M,"keyup",e[12]),te(L,"keyup",e[13]),te(G,"keyup",e[14]),te(ee,"change",e[15])],se=!0)},p(e,t){if(2&t[0]&&r!==(r=e[1].enabled)&&le(a,"checked",r),2&t[0]&&u!==(u=e[1].name)&&le(p,"value",u),0&t){let n;for(re=Kl,n=0;n<re.length;n+=1){const i=io(e,re,n);ce[n]?ce[n].p(i,t):(ce[n]=lo(i),ce[n].c(),ce[n].m(h,null))}for(;n<ce.length;n+=1)ce[n].d(1);ce.length=re.length}if(0&t){let n;for(de=Zl,n=0;n<de.length;n+=1){const i=no(e,de,n);pe[n]?pe[n].p(i,t):(pe[n]=oo(i),pe[n].c(),pe[n].m(b,null))}for(;n<pe.length;n+=1)pe[n].d(1);pe.length=de.length}if(0&t){let n;for(ue=Jl,n=0;n<ue.length;n+=1){const i=to(e,ue,n);me[n]?me[n].p(i,t):(me[n]=so(i),me[n].c(),me[n].m($,null))}for(;n<me.length;n+=1)me[n].d(1);me.length=ue.length}if(2&t[0]&&P!==(P=e[1].remote_address)&&le(C,"value",P),1&t[0]&&N!==(N=e[0].remote_address)&&le(C,"error",N),2&t[0]&&E!==(E=e[1].local_port)&&le(M,"value",E),1&t[0]&&O!==(O=e[0].local_port)&&le(M,"error",O),2&t[0]&&B!==(B=e[1].remote_port)&&le(L,"value",B),1&t[0]&&F!==(F=e[0].remote_port)&&le(L,"error",F),2&t[0]&&W!==(W=e[1].icmp_type)&&le(G,"value",W),1&t[0]&&H!==(H=e[0].icmp_type)&&le(G,"error",H),0&t){let n;for(fe=Ql,n=0;n<fe.length;n+=1){const i=eo(e,fe,n);ge[n]?ge[n].p(i,t):(ge[n]=ao(i),ge[n].c(),ge[n].m(ne,null))}for(;n<ge.length;n+=1)ge[n].d(1);ge.length=fe.length}},d(e){e&&X(t),J(ce,e),J(pe,e),J(me,e),J(ge,e),se=!1,R(ae)}}}function co(e){let t,n,i,l,o,s,a,r=d("global.save")+"";return{c(){t=Q("div"),n=Q("kin-button"),i=K(r),l=Z(),o=Q("kin-button"),o.textContent=`${d("global.cancel")}`,le(n,"kin-disabled",e[2]),le(o,"type","secondary"),ie(t,"slot","modal-footer")},m(r,c){Y(r,t,c),V(t,n),V(n,i),V(t,l),V(t,o),s||(a=[te(n,"click",e[16]),te(o,"click",e[17])],s=!0)},p(e,t){4&t[0]&&le(n,"kin-disabled",e[2])},d(e){e&&X(t),s=!1,R(a)}}}function po(e){let t;return{c(){t=Z()},m(e,n){Y(e,t,n)},p:P,d(e){e&&X(t)}}}function uo(e){let t,n;return t=new wt({props:{$$slots:{default:[po],"modal-footer":[co],"modal-content":[ro]},$$scope:{ctx:e}}}),t.$on("close",e[18]),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};7&n[0]|32&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function mo(e,t,n){let{rule:i}=t;const l={remote_address:null,local_port:null,remote_port:null,icmp_type:null},o=Object.assign({},i),s=be(),a=hl((function(e){null==e||""===e||_(e,{range:!0,list:!0})?n(0,l.remote_address=null,l):n(0,l.remote_address=d("firewall.invalidRemoteAddress"),l)}),1e3),r=hl(u.bind(null,"local_port"),1e3),c=hl(u.bind(null,"remote_port"),1e3),p=hl((function(e){if(null==e||""===e)n(0,l.icmp_type=null,l);else{const t=Number.isInteger(+e)&&parseInt(e);n(0,l.icmp_type=t>0&&t<1e3?null:d("firewall.invalidIcmpType"),l)}}),1e3);function u(e,t){if(null==t||""===t)n(0,l[e]=null,l);else{const i=t.split(",").every((e=>{if(Number.isInteger(+e)){const t=parseInt(e);return t>0&&t<65536}}));n(0,l[e]=i?null:d("firewall.invalidPort"),l)}}function m(){Object.assign(i,o),function(e){kl.update((t=>{const n=t.findIndex((t=>t.id===e.id));return t[n]=e,t}))}(i),s("close")}let f;return e.$$set=e=>{"rule"in e&&n(5,i=e.rule)},e.$$.update=()=>{2&e.$$.dirty[0]&&a(o.remote_address),2&e.$$.dirty[0]&&r(o.local_port),2&e.$$.dirty[0]&&c(o.remote_port),2&e.$$.dirty[0]&&p(o.icmp_type),1&e.$$.dirty[0]&&n(2,f=Object.values(l).some((e=>null!=e)))},[l,o,f,s,m,i,e=>n(1,o.enabled=e.target.checked,o),e=>n(1,o.name=e.target.value,o),e=>n(1,o.action=e.target.value,o),e=>n(1,o.protocol=e.target.value,o),e=>n(1,o.direction=e.target.value,o),e=>n(1,o.remote_address=e.target.value,o),e=>n(1,o.local_port=e.target.value,o),e=>n(1,o.remote_port=e.target.value,o),e=>n(1,o.icmp_type=e.target.value,o),e=>n(1,o.profile=e.target.value,o),()=>m(),()=>s("close"),function(t){ke(e,t)}]}class fo extends Ke{constructor(e){var t;super(),document.getElementById("svelte-pkexwm-style")||((t=Q("style")).id="svelte-pkexwm-style",t.textContent=".frw_enabled.svelte-pkexwm.svelte-pkexwm{display:flex;padding:0.5rem 0;align-items:center}.frw_enabled.svelte-pkexwm label.svelte-pkexwm{width:25%;text-align:end;padding:0 0.8rem;color:var(--color-text-secondary);font-size:var(--input-label-size);text-transform:var(--input-label-transform)}",V(document.head,t)),Qe(this,e,mo,uo,E,{rule:5},[-1,-1])}}function go(e,t,n){const i=e.slice();return i[18]=t[n],i[19]=t,i[20]=n,i}function ho(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$,S,I,C,P,N,A,T,R,M,E=[],O=new Map,D=e[2];const z=e=>e[18].id;for(let d=0;d<D.length;d+=1){let t=go(e,D,d),n=z(t);O.set(n,E[d]=wo(n,t))}return{c(){t=Q("table"),n=Q("thead"),i=Q("tr"),l=Q("th"),o=Z(),s=Q("th"),a=Q("kin-tooltip"),r=Q("span"),r.textContent=`${d("firewall.enabled.short")}`,c=Z(),p=Q("span"),p.textContent=`${d("global.enabled")}`,u=Z(),m=Q("th"),m.textContent=`${d("firewall.name")}`,f=Z(),g=Q("th"),g.textContent=`${d("global.action")}`,h=Z(),_=Q("th"),_.textContent=`${d("firewall.protocol")}`,v=Z(),w=Q("th"),w.textContent=`${d("global.direction")}`,b=Z(),k=Q("th"),k.textContent=`${d("firewall.address")}`,y=Z(),x=Q("th"),x.textContent=`${d("firewall.localPort")}`,$=Z(),S=Q("th"),S.textContent=`${d("firewall.remotePort")}`,I=Z(),C=Q("th"),C.textContent=`${d("firewall.icmpType")}`,P=Z(),N=Q("th"),N.textContent=`${d("firewall.profile")}`,A=Z(),T=Q("th"),R=Z(),M=Q("tbody");for(let e=0;e<E.length;e+=1)E[e].c();ie(l,"class","svelte-1tz8xqi"),ie(r,"slot","tooltip-activator"),ie(r,"class","svelte-1tz8xqi"),ie(p,"slot","tooltip"),ie(p,"class","svelte-1tz8xqi"),le(a,"class","svelte-1tz8xqi"),ie(s,"class","svelte-1tz8xqi"),ie(m,"class","svelte-1tz8xqi"),ie(g,"class","svelte-1tz8xqi"),ie(_,"class","svelte-1tz8xqi"),ie(w,"class","svelte-1tz8xqi"),ie(k,"class","svelte-1tz8xqi"),ie(x,"class","svelte-1tz8xqi"),ie(S,"class","svelte-1tz8xqi"),ie(C,"class","svelte-1tz8xqi"),ie(N,"class","svelte-1tz8xqi"),ie(T,"class","svelte-1tz8xqi"),ie(i,"class","svelte-1tz8xqi"),ie(n,"class","svelte-1tz8xqi"),ie(M,"class","svelte-1tz8xqi"),ie(t,"class","table -fixed-header svelte-1tz8xqi")},m(e,d){Y(e,t,d),V(t,n),V(n,i),V(i,l),V(i,o),V(i,s),V(s,a),V(a,r),V(a,c),V(a,p),V(i,u),V(i,m),V(i,f),V(i,g),V(i,h),V(i,_),V(i,v),V(i,w),V(i,b),V(i,k),V(i,y),V(i,x),V(i,$),V(i,S),V(i,I),V(i,C),V(i,P),V(i,N),V(i,A),V(i,T),V(t,R),V(t,M);for(let t=0;t<E.length;t+=1)E[t].m(M,null)},p(e,t){if(111&t){const n=e[2];for(let e=0;e<E.length;e+=1)E[e].r();E=Ue(E,t,z,1,e,n,O,M,He,wo,null,go);for(let e=0;e<E.length;e+=1)E[e].a()}},d(e){e&&X(t);for(let t=0;t<E.length;t+=1)E[t].d()}}}function _o(e){let t;return{c(){t=Q("kin-loading"),le(t,"fullscreen",""),le(t,"class","svelte-1tz8xqi")},m(e,n){Y(e,t,n)},p:P,d(e){e&&X(t)}}}function vo(e){let t,n,i,l,o;function s(){return e[10](e[18])}return{c(){t=Q("kin-button"),n=Q("kin-icon"),le(n,"name","icon-m-action-pen"),le(n,"size","16"),le(n,"class","svelte-1tz8xqi"),le(t,"icononly","true"),le(t,"type","blank"),le(t,"size","small"),le(t,"title",i=d("global.edit")+" "+e[18].name),le(t,"class","svelte-1tz8xqi")},m(e,i){Y(e,t,i),V(t,n),l||(o=te(t,"click",s),l=!0)},p(n,l){e=n,4&l&&i!==(i=d("global.edit")+" "+e[18].name)&&le(t,"title",i)},d(e){e&&X(t),l=!1,o()}}}function wo(e,t){let n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$,S,I,C,A,T,E,O,D,z,L,B,j,G,W,H,J,ee,se,re,ce,de,pe,ue,he=(t[18].name||"")+"",_e=(t[6]("action",t[18].action)||"")+"",ve=(t[6]("protocol",t[18].protocol)||"")+"",we=(t[6]("direction",t[18].direction)||"")+"",be=(t[18].remote_address||"")+"",ke=(t[18].local_port||"")+"",ye=(t[18].remote_port||"")+"",xe=(t[18].icmp_type||"")+"",$e=(t[6]("profile",t[18].profile)||"")+"",Se=P;function Ie(){t[8].call(s,t[19],t[20])}function Ce(){return t[9](t[18])}let Pe=!t[18].read_only&&vo(t);function Ne(...e){return t[11](t[20],...e)}function Ae(...e){return t[12](t[20],...e)}function Te(){return t[13](t[20])}return{key:e,first:null,c(){n=Q("tr"),i=Q("td"),i.innerHTML='<kin-icon name="navigate" size="16" class="svelte-1tz8xqi"></kin-icon>',l=Z(),o=Q("td"),s=Q("input"),r=Z(),c=Q("td"),p=K(he),u=Z(),m=Q("td"),f=K(_e),g=Z(),h=Q("td"),_=K(ve),v=Z(),w=Q("td"),b=K(we),k=Z(),y=Q("td"),x=K(be),$=Z(),S=Q("td"),I=K(ke),C=Z(),A=Q("td"),T=K(ye),E=Z(),O=Q("td"),D=K(xe),z=Z(),L=Q("td"),B=K($e),j=Z(),G=Q("td"),W=Q("kin-button"),H=Q("kin-icon"),ee=Z(),Pe&&Pe.c(),se=Z(),ie(i,"class","svelte-1tz8xqi"),ie(s,"class","checkbox -small svelte-1tz8xqi"),ie(s,"type","checkbox"),s.disabled=a=t[18].read_only&&!t[18].associated_property,ie(o,"class","svelte-1tz8xqi"),ie(c,"class","svelte-1tz8xqi"),ie(m,"class","svelte-1tz8xqi"),ie(h,"class","svelte-1tz8xqi"),ie(w,"class","svelte-1tz8xqi"),ie(y,"class","svelte-1tz8xqi"),ie(S,"class","svelte-1tz8xqi"),ie(A,"class","svelte-1tz8xqi"),ie(O,"class","svelte-1tz8xqi"),ie(L,"class","svelte-1tz8xqi"),le(H,"name","icon-s-controls-bin"),le(H,"size","16"),le(H,"class","svelte-1tz8xqi"),le(W,"icononly","true"),le(W,"type","blank"),le(W,"size","small"),le(W,"title",J=d("global.remove")+" "+t[18].name),le(W,"class","svelte-1tz8xqi"),ie(G,"class","svelte-1tz8xqi"),ie(n,"draggable",re=!0),ie(n,"class","svelte-1tz8xqi"),ae(n,"-active",t[0]===t[20]),ae(n,"-highlight",t[3](t[18])),ae(n,"-selected",t[18].enabled),this.first=n},m(e,a){Y(e,n,a),V(n,i),V(n,l),V(n,o),V(o,s),s.checked=t[18].enabled,V(n,r),V(n,c),V(c,p),V(n,u),V(n,m),V(m,f),V(n,g),V(n,h),V(h,_),V(n,v),V(n,w),V(w,b),V(n,k),V(n,y),V(y,x),V(n,$),V(n,S),V(S,I),V(n,C),V(n,A),V(A,T),V(n,E),V(n,O),V(O,D),V(n,z),V(n,L),V(L,B),V(n,j),V(n,G),V(G,W),V(W,H),V(G,ee),Pe&&Pe.m(G,null),V(n,se),pe||(ue=[te(s,"change",Ie),te(W,"click",Ce),F(ce=t[4].call(null,n,t[18])),te(n,"dragstart",Ne),te(n,"drop",ne(Ae)),te(n,"dragover",ne(t[7])),te(n,"dragenter",Te)],pe=!0)},p(e,i){t=e,4&i&&a!==(a=t[18].read_only&&!t[18].associated_property)&&(s.disabled=a),4&i&&(s.checked=t[18].enabled),4&i&&he!==(he=(t[18].name||"")+"")&&oe(p,he),4&i&&_e!==(_e=(t[6]("action",t[18].action)||"")+"")&&oe(f,_e),4&i&&ve!==(ve=(t[6]("protocol",t[18].protocol)||"")+"")&&oe(_,ve),4&i&&we!==(we=(t[6]("direction",t[18].direction)||"")+"")&&oe(b,we),4&i&&be!==(be=(t[18].remote_address||"")+"")&&oe(x,be),4&i&&ke!==(ke=(t[18].local_port||"")+"")&&oe(I,ke),4&i&&ye!==(ye=(t[18].remote_port||"")+"")&&oe(T,ye),4&i&&xe!==(xe=(t[18].icmp_type||"")+"")&&oe(D,xe),4&i&&$e!==($e=(t[6]("profile",t[18].profile)||"")+"")&&oe(B,$e),4&i&&J!==(J=d("global.remove")+" "+t[18].name)&&le(W,"title",J),t[18].read_only?Pe&&(Pe.d(1),Pe=null):Pe?Pe.p(t,i):(Pe=vo(t),Pe.c(),Pe.m(G,null)),ce&&M(ce.update)&&4&i&&ce.update.call(null,t[18]),5&i&&ae(n,"-active",t[0]===t[20]),12&i&&ae(n,"-highlight",t[3](t[18])),4&i&&ae(n,"-selected",t[18].enabled)},r(){de=n.getBoundingClientRect()},f(){ge(n),Se()},a(){Se(),Se=function(e,t,n,i){if(!t)return P;const l=e.getBoundingClientRect();if(t.left===l.left&&t.right===l.right&&t.top===l.top&&t.bottom===l.bottom)return P;const{delay:o=0,duration:s=300,easing:a=N,start:r=q()+o,end:c=r+s,tick:d=P,css:p}=n(e,{from:t,to:l},i);let u,m=!0,f=!1;function g(){p&&fe(e,u),m=!1}return U((e=>{if(!f&&e>=r&&(f=!0),f&&e>=c&&(d(1,0),g()),!m)return!1;if(f){const t=0+1*a((e-r)/s);d(t,1-t)}return!0})),p&&(u=me(e,0,1,s,o,a,p)),o||(f=!0),d(0,1),g}(n,de,Xl,{})},d(e){e&&X(n),Pe&&Pe.d(),pe=!1,R(ue)}}}function bo(e){let t,n;return t=new fo({props:{rule:e[1]}}),t.$on("close",e[14]),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};2&n&&(i.rule=e[1]),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function ko(e){let t,n,i,l,o,s,a;function r(e,t){return null==e[2]?_o:ho}let c=r(e),p=c(e),u=e[1]&&bo(e);return{c(){t=Q("div"),n=Q("h1"),n.textContent=`${d("firewall.ruleList")}`,i=Z(),l=Q("div"),p.c(),o=Z(),u&&u.c(),s=ee(),ie(n,"class","nui_header__title h1 frw_list__title svelte-1tz8xqi"),ie(t,"class","nui_header svelte-1tz8xqi"),ie(l,"class","frw_list nui_page__scroll svelte-1tz8xqi")},m(e,r){Y(e,t,r),V(t,n),Y(e,i,r),Y(e,l,r),p.m(l,null),Y(e,o,r),u&&u.m(e,r),Y(e,s,r),a=!0},p(e,[t]){c===(c=r(e))&&p?p.p(e,t):(p.d(1),p=c(e),p&&(p.c(),p.m(l,null))),e[1]?u?(u.p(e,t),2&t&&Fe(u,1)):(u=bo(e),u.c(),Fe(u,1),u.m(s.parentNode,s)):u&&(Le(),je(u,1,1,(()=>{u=null})),Be())},i(e){a||(Fe(u),a=!0)},o(e){je(u),a=!1},d(e){e&&X(t),e&&X(i),e&&X(l),p.d(),e&&X(o),u&&u.d(e),e&&X(s)}}}function yo(e,t,n){let i;D(e,kl,(e=>n(2,i=e)));const l=new URLSearchParams(location.search).get("ruleIds").split(",");let o,s,a=!1;function r(e){return l.includes(e.id)}function c(e,t){e.dataTransfer.dropEffect="move";!function(e,t){kl.update((n=>{const i=n;return e<t?(i.splice(t+1,0,i[e]),i.splice(e,1)):(i.splice(t,0,i[e]),i.splice(e+1,1)),i}))}(parseInt(e.dataTransfer.getData("text/plain")),t),n(0,a=null)}return[a,s,i,r,function(e,t){!o&&r(t)&&(o=e,console.log(e),setTimeout((()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})))},c,function(e,t){let n;switch(e){case"action":n=Kl;break;case"protocol":n=Zl;break;case"direction":n=Jl;break;case"profile":n=Ql;break;default:n={}}return n.find((e=>e.id===t))?.name||t},function(t){ke(e,t)},function(e,t){e[t].enabled=this.checked,kl.set(i)},e=>{return t=e.id,void kl.update((e=>{const n=e.findIndex((e=>e.id===t));return e.splice(n,1),e}));var t},e=>n(1,s=Object.assign(e)),(e,t)=>function(e,t){e.dataTransfer.effectAllowed="move",e.dataTransfer.dropEffect="move",e.dataTransfer.setData("text/plain",t)}(t,e),(e,t)=>c(t,e),e=>n(0,a=e),()=>n(1,s=null)]}class xo extends Ke{constructor(e){var t;super(),document.getElementById("svelte-1tz8xqi-style")||((t=Q("style")).id="svelte-1tz8xqi-style",t.textContent=":root{--navbar-width-visible:0}.frw_list.svelte-1tz8xqi.svelte-1tz8xqi{overflow:auto;width:auto;padding-top:0;padding-bottom:0}.frw_list__title.svelte-1tz8xqi.svelte-1tz8xqi{padding:3rem 0}.frw_list.svelte-1tz8xqi table.svelte-1tz8xqi{min-width:100rem}.frw_list.svelte-1tz8xqi table td.svelte-1tz8xqi,.frw_list.svelte-1tz8xqi table th.svelte-1tz8xqi{word-break:unset}.frw_list.svelte-1tz8xqi tr.-highlight.svelte-1tz8xqi,.frw_list.svelte-1tz8xqi tr.-highlight.-selected.svelte-1tz8xqi{background-color:var(--color-highlight);color:var(--color-highlight-text)}.frw_list.svelte-1tz8xqi tr.-active.svelte-1tz8xqi{background:var(--table-hover)}",V(document.head,t)),Qe(this,e,yo,ko,E,{})}}function $o(e={}){const n={type:e.type,time_ms:e.time,sort:"time_ms",sort_desc:!0,count:e.count||30,offset:e.offset||0};return a("app.firewall.GetLogs",n).then((n=>{const i=n?.logs||[];return"packet"===e.type?function(e){const n=e.map((e=>t.injectAppData({path:e.path,time:e.time_ms,protocol:e.protocol_name,direction:e.direction,remoteAddress:e.remote,remotePort:e.remote_port,localAddress:e.local,localPort:e.local_port,ruleId:e.rule_guid})));return Promise.allSettled(n).then((e=>e.map((e=>"fulfilled"===e.status?e.value:(console.error("Injecting app data failed",e.reason),e.reason.app)))))}(i):"event"===e.type?function(e){const t=[];return e.forEach((e=>{if(e.message_id<1||e.message_id>4)return;const n={time:e.time_ms,messageId:e.message_id};switch(e.message_id){case 1:case 2:n.app=e.params&&e.params[2];break;case 3:n.network=e.params&&e.params[2],n.profileId=e.params&&e.params[0];break;case 4:n.ip=e.params&&e.params[2]}t.push(n)})),t}(i):void 0}))}function So(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v,w,b,k,y,x,$,S,I=e[0].path+"",C=e[0].remoteAddress+"",P=e[0].remotePort+"",N=e[2][e[0].direction]+"",A=e[0].localAddress+"",T=e[0].localPort+"";return{c(){t=Q("dl"),n=Q("dt"),n.textContent=`${d("firewall.path")}:`,i=Q("dd"),l=K(I),o=Q("dt"),o.textContent=`${d("firewall.remoteAddress")}:`,s=Q("dd"),a=K(C),r=Q("dt"),r.textContent=`${d("firewall.remotePort")}:`,c=Q("dd"),p=K(P),u=Q("dt"),u.textContent=`${d("global.direction")}:`,m=Q("dd"),f=K(N),g=Q("dt"),g.textContent=`${d("firewall.localAddress")}:`,h=Q("dd"),_=K(A),v=Q("dt"),v.textContent=`${d("firewall.localPort")}:`,w=Q("dd"),b=K(T),k=Q("dt"),k.textContent=`${d("firewall.rule")}:`,y=Q("dd"),x=Q("button"),x.textContent=`${d("firewall.defaultRule")}`,ie(x,"class","a"),ie(t,"class","desclist -short g-margin--20 frw_dl svelte-1utcor7")},m(d,I){Y(d,t,I),V(t,n),V(t,i),V(i,l),V(t,o),V(t,s),V(s,a),V(t,r),V(t,c),V(c,p),V(t,u),V(t,m),V(m,f),V(t,g),V(t,h),V(h,_),V(t,v),V(t,w),V(w,b),V(t,k),V(t,y),V(y,x),$||(S=te(x,"click",e[4]),$=!0)},p(e,t){1&t&&I!==(I=e[0].path+"")&&oe(l,I),1&t&&C!==(C=e[0].remoteAddress+"")&&oe(a,C),1&t&&P!==(P=e[0].remotePort+"")&&oe(p,P),1&t&&N!==(N=e[2][e[0].direction]+"")&&oe(f,N),1&t&&A!==(A=e[0].localAddress+"")&&oe(_,A),1&t&&T!==(T=e[0].localPort+"")&&oe(b,T)},d(e){e&&X(t),$=!1,S()}}}function Io(e){let t,n,i,l,o,s,a,r,c,p,m,f,g,h,_,v,w,b,k,y,x,$,S,I,C,N,A,T,R,M,E,O,D,z,L,B,F,j,q,G=e[0].name+"",W=e[0].name+"",H=u(e[0].time).format("DD/MM/YYYY h:mm:ss")+"",U=e[0].protocol+"",J=e[2][e[0].direction]+"",ee=e[0].remoteAddress+"",ne=e[1]&&So(e);return{c(){t=Q("div"),n=Q("div"),i=Q("img"),s=Z(),a=Q("div"),r=Q("kin-tooltip"),c=Q("div"),p=K(G),m=Z(),f=Q("div"),g=K(W),h=Z(),_=Q("div"),v=K(H),w=Z(),b=Q("div"),k=K(U),y=Z(),x=Q("div"),$=Q("kin-tooltip"),S=Q("kin-icon"),C=Z(),N=Q("span"),A=K(J),T=Z(),R=Q("div"),M=K(ee),E=Z(),O=Q("div"),D=Q("kin-button"),z=Q("kin-icon"),F=Z(),ne&&ne.c(),ie(i,"class","kin-img"),ie(i,"height","24"),i.src!==(l="data:image/png;base64,"+e[0].icon)&&ie(i,"src",l),ie(i,"alt",o=e[0].name),ie(n,"class","kin_table__icon"),ie(c,"slot","tooltip-activator"),ie(f,"slot","tooltip"),le(r,"ellipsis",""),ie(a,"class","kin_table__name"),ie(a,"dir","ltr"),le(S,"slot","tooltip-activator"),le(S,"name","switch-arrow"),le(S,"class","-text"),le(S,"rtlflip","true"),le(S,"size","20"),le(S,"title",I=e[2][e[0].direction]),ae(S,"g-rotate--180","out"===e[0].direction),ae(S,"color-critical","in"===e[0].direction),ae(S,"color-ok","out"===e[0].direction),ie(N,"slot","tooltip"),le(z,"name",L=e[1]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down"),le(z,"size","12"),le(D,"size","small"),le(D,"type","blank"),le(D,"icononly",""),le(D,"class","frw_toggle"),le(D,"title",B=d("global.showDetails")+" - "+e[0].file),ie(O,"class","kin_table__end"),ie(t,"role","row"),ie(t,"class","kin_table__row frw_logs__row svelte-1utcor7")},m(l,o){Y(l,t,o),V(t,n),V(n,i),V(t,s),V(t,a),V(a,r),V(r,c),V(c,p),V(r,m),V(r,f),V(f,g),V(t,h),V(t,_),V(_,v),V(t,w),V(t,b),V(b,k),V(t,y),V(t,x),V(x,$),V($,S),V($,C),V($,N),V(N,A),V(t,T),V(t,R),V(R,M),V(t,E),V(t,O),V(O,D),V(D,z),V(t,F),ne&&ne.m(t,null),j||(q=te(D,"click",e[3]),j=!0)},p(e,[n]){1&n&&i.src!==(l="data:image/png;base64,"+e[0].icon)&&ie(i,"src",l),1&n&&o!==(o=e[0].name)&&ie(i,"alt",o),1&n&&G!==(G=e[0].name+"")&&oe(p,G),1&n&&W!==(W=e[0].name+"")&&oe(g,W),1&n&&H!==(H=u(e[0].time).format("DD/MM/YYYY h:mm:ss")+"")&&oe(v,H),1&n&&U!==(U=e[0].protocol+"")&&oe(k,U),1&n&&I!==(I=e[2][e[0].direction])&&le(S,"title",I),1&n&&ae(S,"g-rotate--180","out"===e[0].direction),1&n&&ae(S,"color-critical","in"===e[0].direction),1&n&&ae(S,"color-ok","out"===e[0].direction),1&n&&J!==(J=e[2][e[0].direction]+"")&&oe(A,J),1&n&&ee!==(ee=e[0].remoteAddress+"")&&oe(M,ee),2&n&&L!==(L=e[1]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down")&&le(z,"name",L),1&n&&B!==(B=d("global.showDetails")+" - "+e[0].file)&&le(D,"title",B),e[1]?ne?ne.p(e,n):(ne=So(e),ne.c(),ne.m(t,null)):ne&&(ne.d(1),ne=null)},i:P,o:P,d(e){e&&X(t),ne&&ne.d(),j=!1,q()}}}function Co(e,t,n){let{data:i}=t;const l={in:d("firewall.direction.in"),out:d("firewall.direction.out")};let o=!1;return e.$$set=e=>{"data"in e&&n(0,i=e.data)},[i,o,l,()=>n(1,o=!o),()=>{Sl({rules:[{id:i.ruleId}]})}]}class Po extends Ke{constructor(e){var t;super(),document.getElementById("svelte-1utcor7-style")||((t=Q("style")).id="svelte-1utcor7-style",t.textContent=".frw_logs__row.svelte-1utcor7{grid-template-columns:7% 23% 20% 8% 5% 32% 5%}.frw_dl.svelte-1utcor7{grid-column:span 7}",V(document.head,t)),Qe(this,e,Co,Io,E,{data:0})}}function No(e,t,n){const i=e.slice();return i[3]=t[n],i}function Ao(e){let t,n;return t=new Po({props:{data:e[3]}}),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.data=e[3]),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function To(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v=e[0],w=[];for(let d=0;d<v.length;d+=1)w[d]=Ao(No(e,v,d));const b=e=>je(w[e],1,1,(()=>{w[e]=null}));return{c(){t=Q("kin-table"),n=Q("div"),i=Q("div"),l=Z(),o=Q("div"),o.textContent=`${d("global.app")}`,s=Z(),a=Q("div"),a.textContent=`${d("global.time")}`,r=Z(),c=Q("div"),c.textContent=`${d("firewall.connectionDetails")}`,p=Z(),u=Q("div");for(let e=0;e<w.length;e+=1)w[e].c();ie(n,"slot","table-header"),ie(n,"role","row"),ie(n,"class","frw_logs__header svelte-1ne8u19"),ie(u,"slot","table-body"),le(t,"datalength",m=e[0].length),le(t,"scrollrootselector","kin-view"),le(t,"watchscrollpos",f=!0),le(t,"bottomloading",e[1])},m(d,m){Y(d,t,m),V(t,n),V(n,i),V(n,l),V(n,o),V(n,s),V(n,a),V(n,r),V(n,c),V(t,p),V(t,u);for(let e=0;e<w.length;e+=1)w[e].m(u,null);g=!0,h||(_=te(t,"scrollPos",e[2]),h=!0)},p(e,[n]){if(1&n){let t;for(v=e[0],t=0;t<v.length;t+=1){const i=No(e,v,t);w[t]?(w[t].p(i,n),Fe(w[t],1)):(w[t]=Ao(i),w[t].c(),Fe(w[t],1),w[t].m(u,null))}for(Le(),t=v.length;t<w.length;t+=1)b(t);Be()}(!g||1&n&&m!==(m=e[0].length))&&le(t,"datalength",m),(!g||2&n)&&le(t,"bottomloading",e[1])},i(e){if(!g){for(let e=0;e<v.length;e+=1)Fe(w[e]);g=!0}},o(e){w=w.filter(Boolean);for(let t=0;t<w.length;t+=1)je(w[t]);g=!1},d(e){e&&X(t),J(w,e),h=!1,_()}}}function Ro(e,t,n){let{logs:i}=t,{loadingNextItems:l=!1}=t;return e.$$set=e=>{"logs"in e&&n(0,i=e.logs),"loadingNextItems"in e&&n(1,l=e.loadingNextItems)},[i,l,function(t){ke(e,t)}]}class Mo extends Ke{constructor(e){var t;super(),document.getElementById("svelte-1ne8u19-style")||((t=Q("style")).id="svelte-1ne8u19-style",t.textContent=".frw_logs__header.svelte-1ne8u19{grid-template-columns:7% 23% 20% 50%;top:3rem}",V(document.head,t)),Qe(this,e,Ro,To,E,{logs:0,loadingNextItems:1})}}function Eo(e,t,n){const i=e.slice();return i[5]=t[n],i}function Oo(e){let t,n,i,l,o,s,a,r=u(e[5].time).format("DD/MM/YYYY h:mm:ss")+"",c=e[2](e[5])+"";return{c(){t=Q("div"),n=Q("div"),i=K(r),l=Z(),o=Q("div"),s=K(c),a=Z(),ie(t,"role","row"),ie(t,"class","kin_table__row frw_logs__row svelte-j9mpo5")},m(e,r){Y(e,t,r),V(t,n),V(n,i),V(t,l),V(t,o),V(o,s),V(t,a)},p(e,t){1&t&&r!==(r=u(e[5].time).format("DD/MM/YYYY h:mm:ss")+"")&&oe(i,r),1&t&&c!==(c=e[2](e[5])+"")&&oe(s,c)},d(e){e&&X(t)}}}function Do(e){let t,n,i,l,o,s,a,r,c,p,u,m=e[0],f=[];for(let d=0;d<m.length;d+=1)f[d]=Oo(Eo(e,m,d));return{c(){t=Q("kin-table"),n=Q("div"),i=Q("div"),i.textContent=`${d("global.time")}`,l=Z(),o=Q("div"),o.textContent=`${d("global.message")}`,s=Z(),a=Q("div");for(let e=0;e<f.length;e+=1)f[e].c();ie(n,"slot","table-header"),ie(n,"role","row"),ie(n,"class","frw_logs__header svelte-j9mpo5"),ie(a,"slot","table-body"),le(t,"datalength",r=e[0].length),le(t,"scrollrootselector","kin-view"),le(t,"watchscrollpos",c=!0),le(t,"bottomloading",e[1])},m(r,c){Y(r,t,c),V(t,n),V(n,i),V(n,l),V(n,o),V(t,s),V(t,a);for(let e=0;e<f.length;e+=1)f[e].m(a,null);p||(u=te(t,"scrollPos",e[3]),p=!0)},p(e,[n]){if(5&n){let t;for(m=e[0],t=0;t<m.length;t+=1){const i=Eo(e,m,t);f[t]?f[t].p(i,n):(f[t]=Oo(i),f[t].c(),f[t].m(a,null))}for(;t<f.length;t+=1)f[t].d(1);f.length=m.length}1&n&&r!==(r=e[0].length)&&le(t,"datalength",r),2&n&&le(t,"bottomloading",e[1])},i:P,o:P,d(e){e&&X(t),J(f,e),p=!1,u()}}}function zo(e,t,n){let{logs:i}=t,{loadingNextItems:l=!1}=t;const o={1:d("firewall.ruleLog.profile.low"),2:d("firewall.ruleLog.profile.medium"),3:d("firewall.ruleLog.profile.high")};return e.$$set=e=>{"logs"in e&&n(0,i=e.logs),"loadingNextItems"in e&&n(1,l=e.loadingNextItems)},[i,l,function(e){switch(e.messageId){case 1:return d("firewall.ruleLog.message.firewallAutomaticallyConfiguredAppToAccessNet",e.app);case 2:return d("firewall.ruleLog.message.firewallAutomaticallyBlockedAppFromAccessingNet",e.app);case 3:return d("firewall.ruleLog.message.firewallDetectedNetAndChangedMode",e.network,o[e.profileId]);case 4:return d("firewall.ruleLog.message.firewallAutomaticallyBlockedIp",e.ip)}},function(t){ke(e,t)}]}class Lo extends Ke{constructor(e){var t;super(),document.getElementById("svelte-j9mpo5-style")||((t=Q("style")).id="svelte-j9mpo5-style",t.textContent=".frw_logs__header.svelte-j9mpo5{top:3rem}.frw_logs__header.svelte-j9mpo5,.frw_logs__row.svelte-j9mpo5{grid-template-columns:20% 80%}",V(document.head,t)),Qe(this,e,zo,Do,E,{logs:0,loadingNextItems:1})}}function Bo(e,t,n){const i=e.slice();return i[14]=t[n],i}function Fo(e,t,n){const i=e.slice();return i[17]=t[n],i}function jo(e){let t,n,i,l,o,s,a,r=e[17].label+"";function c(){return e[8](e[17])}return{c(){t=Q("button"),n=K(r),i=Z(),ie(t,"aria-selected",l=e[17]===e[0]),t.disabled=o=e[17]===e[0],ae(t,"-active",e[17]===e[0])},m(e,l){Y(e,t,l),V(t,n),V(t,i),s||(a=te(t,"click",c),s=!0)},p(n,i){e=n,1&i&&l!==(l=e[17]===e[0])&&ie(t,"aria-selected",l),1&i&&o!==(o=e[17]===e[0])&&(t.disabled=o),17&i&&ae(t,"-active",e[17]===e[0])},d(e){e&&X(t),s=!1,a()}}}function qo(e){let t,n,i,l,o,s,a,r,c,p,u,m,f,g,h,_,v=e[1].title[e[0].id]+"",w=e[5],b=[];for(let d=0;d<w.length;d+=1)b[d]=Wo(Bo(e,w,d));var k=e[0].compo;function y(e){return{props:{logs:e[2],loadingNextItems:e[3]}}}return k&&(m=new k(y(e)),m.$on("scrollPos",e[7])),{c(){t=Q("h6"),n=K(v),i=Z(),l=Q("kin-dropdown"),o=Q("kin-icon"),s=Z();for(let e=0;e<b.length;e+=1)b[e].c();a=Z(),r=Q("kin-dropdown-item"),c=Z(),p=Q("kin-dropdown-item"),p.textContent=`${d("firewall.logs.clearLogs")}`,u=Z(),m&&Ve(m.$$.fragment),f=ee(),le(o,"name","icon-s-controls-arrow-down"),le(o,"size","12"),le(o,"slot","dropdown-activator"),le(r,"type","hr"),le(p,"type","button"),ie(t,"class","h6 g-align--left")},m(d,v){Y(d,t,v),V(t,n),V(t,i),V(t,l),V(l,o),V(l,s);for(let e=0;e<b.length;e+=1)b[e].m(l,null);V(l,a),V(l,r),V(l,c),V(l,p),Y(d,u,v),m&&Ye(m,d,v),Y(d,f,v),g=!0,h||(_=te(p,"click",e[10]),h=!0)},p(e,t){if((!g||3&t)&&v!==(v=e[1].title[e[0].id]+"")&&oe(n,v),34&t){let n;for(w=e[5],n=0;n<w.length;n+=1){const i=Bo(e,w,n);b[n]?b[n].p(i,t):(b[n]=Wo(i),b[n].c(),b[n].m(l,a))}for(;n<b.length;n+=1)b[n].d(1);b.length=w.length}const i={};if(4&t&&(i.logs=e[2]),8&t&&(i.loadingNextItems=e[3]),k!==(k=e[0].compo)){if(m){Le();const e=m;je(e.$$.fragment,1,0,(()=>{Xe(e,1)})),Be()}k?(m=new k(y(e)),m.$on("scrollPos",e[7]),Ve(m.$$.fragment),Fe(m.$$.fragment,1),Ye(m,f.parentNode,f)):m=null}else k&&m.$set(i)},i(e){g||(m&&Fe(m.$$.fragment,e),g=!0)},o(e){m&&je(m.$$.fragment,e),g=!1},d(e){e&&X(t),J(b,e),e&&X(u),e&&X(f),m&&Xe(m,e),h=!1,_()}}}function Go(e){let t;return{c(){t=Q("kin-loading")},m(e,n){Y(e,t,n)},p:P,i:P,o:P,d(e){e&&X(t)}}}function Wo(e){let t,n,i,l,o=e[14].label+"";function s(){return e[9](e[14])}return{c(){t=Q("kin-dropdown-item"),n=K(o),le(t,"type","button")},m(e,o){Y(e,t,o),V(t,n),i||(l=te(t,"click",s),i=!0)},p(t,n){e=t},d(e){e&&X(t),i=!1,l()}}}function Ho(e){let t,n,i,l,o,s,a,r=Object.values(e[4]),c=[];for(let m=0;m<r.length;m+=1)c[m]=jo(Fo(e,r,m));const d=[Go,qo],p=[];function u(e,t){return null==e[2]?0:1}return o=u(e),s=p[o]=d[o](e),{c(){t=Q("div"),n=Q("div"),i=Q("div");for(let e=0;e<c.length;e+=1)c[e].c();l=Z(),s.c(),ie(i,"class","linkgroup"),ie(n,"class","frw_logs__linkgroup svelte-1375r73"),ie(t,"class","g-margin-top--20 g-align--center g-relative")},m(e,s){Y(e,t,s),V(t,n),V(n,i);for(let t=0;t<c.length;t+=1)c[t].m(i,null);V(t,l),p[o].m(t,null),a=!0},p(e,[n]){if(81&n){let t;for(r=Object.values(e[4]),t=0;t<r.length;t+=1){const l=Fo(e,r,t);c[t]?c[t].p(l,n):(c[t]=jo(l),c[t].c(),c[t].m(i,null))}for(;t<c.length;t+=1)c[t].d(1);c.length=r.length}let l=o;o=u(e),o===l?p[o].p(e,n):(Le(),je(p[l],1,1,(()=>{p[l]=null})),Be(),s=p[o],s?s.p(e,n):(s=p[o]=d[o](e),s.c()),Fe(s,1),s.m(t,null))},i(e){a||(Fe(s),a=!0)},o(e){je(s),a=!1},d(e){e&&X(t),J(c,e),p[o].d()}}}function Uo(e,t,n){const i={apps:{id:"packet",label:d("firewall.apps"),compo:Mo},rules:{id:"event",label:d("firewall.rules"),compo:Lo}},l=[{time:6e4,label:d("firewall.logs.pastMinute"),title:{packet:d("firewall.logs.appsBlockedInThePastMinute"),event:d("firewall.logs.ruleActivitiesInThePastMinute")}},{time:36e5,label:d("firewall.logs.pastHour"),title:{packet:d("firewall.logs.appsBlockedInThePastHour"),event:d("firewall.logs.ruleActivitiesInThePastHour")}},{time:864e5,label:d("firewall.logs.pastDay"),title:{packet:d("firewall.logs.appsBlockedInThePastDay"),event:d("firewall.logs.ruleActivitiesInThePastDay")}},{time:2592e6,label:d("firewall.logs.pastMonth"),title:{packet:d("firewall.logs.appsBlockedInThePastMonth"),event:d("firewall.logs.ruleActivitiesInThePastMonth")}},{time:31536e6,label:d("firewall.logs.pastYear"),title:{packet:d("firewall.logs.appsBlockedInThePastYear"),event:d("firewall.logs.ruleActivitiesInThePastYear")}}];let o,s=i.apps,r=l[3],c=!1,p=null,u=null;function m(e){e&&n(3,c=!0),$o({type:s.id,time:Date.now()-r.time}).then((t=>{n(2,o=e?o.concat(t):t)})).catch((e=>{console.error("Loading firewall logs failed",e),n(2,o=[])})).finally((()=>{e&&n(3,c=!1)}))}function f(e){n(2,o=null),n(0,s=e)}return e.$$.update=()=>{3&e.$$.dirty&&s&&r&&m()},[s,r,o,c,i,l,f,function(e){u=e.detail.scrollTo,e.detail.current>=e.detail.max&&e.detail.max>p&&(p=e.detail.current,m(!0))},e=>f(e),e=>n(1,r=e),()=>{return e=s.id,a("app.firewall.ClearLogs",{type:e});var e}]}class Vo extends Ke{constructor(e){var t;super(),document.getElementById("svelte-1375r73-style")||((t=Q("style")).id="svelte-1375r73-style",t.textContent=".frw_logs__linkgroup.svelte-1375r73{position:absolute;right:0;top:-1rem;z-index:2}[dir='rtl'] .frw_logs__linkgroup.svelte-1375r73{right:auto;left:0}",V(document.head,t)),Qe(this,e,Uo,Ho,E,{})}}function Yo(e,t,n){const i=e.slice();return i[10]=t[n],i}function Xo(e){let t,n;return t=new Vt({props:{heading:d("firewall"),settingsUrl:"#Settings/Firewall",upsell:!e[3],inactive:!e[2].checked,inactiveMsg:d("firewall.inactive.tooltip"),backHash:"#security",$$slots:{default:[ns],"page-content":[ts],upsell:[Zo],controls:[Ko],breadcrumbs:[Qo]},$$scope:{ctx:e}}}),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p(e,n){const i={};4&n&&(i.inactive=!e[2].checked),8197&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function Jo(e){let t,n;return t=new xo({}),{c(){Ve(t.$$.fragment)},m(e,i){Ye(t,e,i),n=!0},p:P,i(e){n||(Fe(t.$$.fragment,e),n=!0)},o(e){je(t.$$.fragment,e),n=!1},d(e){Xe(t,e)}}}function Qo(e){let t,n,i,l;return{c(){t=Q("div"),n=Q("kin-crumbs"),le(n,"section","security"),le(n,"sectionlabel",i=d("security")),le(n,"modulelabel",l=d("firewall")),ie(t,"slot","breadcrumbs")},m(e,i){Y(e,t,i),V(t,n)},p:P,d(e){e&&X(t)}}}function Ko(e){let t,n,i,l,o,s,a;return{c(){t=Q("div"),n=Q("kin-switch"),le(n,"data-test","frw_switch"),le(n,"checked",i=e[2].checked),le(n,"processing",l=e[2].processing),le(n,"title",o=d("firewall")),ie(t,"slot","controls")},m(i,l){Y(i,t,l),V(t,n),s||(a=te(n,"click",e[5]),s=!0)},p(e,t){4&t&&i!==(i=e[2].checked)&&le(n,"checked",i),4&t&&l!==(l=e[2].processing)&&le(n,"processing",l)},d(e){e&&X(t),s=!1,a()}}}function Zo(e){let t,n,i;return n=new Dn({props:{desc:d("upsell.desc.firewall"),animation:I}}),{c(){t=Q("div"),Ve(n.$$.fragment),ie(t,"slot","upsell")},m(e,l){Y(e,t,l),Ye(n,t,null),i=!0},p:P,i(e){i||(Fe(n.$$.fragment,e),i=!0)},o(e){je(n.$$.fragment,e),i=!1},d(e){e&&X(t),Xe(n)}}}function es(e){let t,n,i,l,o,s,a,r=e[10].label+"";return{c(){t=Q("a"),n=Q("span"),i=K(r),l=Z(),ie(n,"class","text -large"),ie(t,"href",o="#Firewall/"+e[10].id),ie(t,"role","tab"),ie(t,"aria-selected",s=e[0].id===e[10].id),ie(t,"data-test",a=e[10].id),ie(t,"class","tab ntf_tab"),ae(t,"-active",e[0].id===e[10].id)},m(e,o){Y(e,t,o),V(t,n),V(n,i),V(t,l)},p(e,n){1&n&&s!==(s=e[0].id===e[10].id)&&ie(t,"aria-selected",s),17&n&&ae(t,"-active",e[0].id===e[10].id)},d(e){e&&X(t)}}}function ts(e){let t,n,i,l,o,s,a,r,c,p,u,m=e[4],f=[];for(let d=0;d<m.length;d+=1)f[d]=es(Yo(e,m,d));var g=e[0].compo;function h(e){return{props:{router:e[0].router}}}return g&&(p=new g(h(e))),{c(){t=Q("div"),n=Q("kin-view"),i=Q("div"),l=Q("p"),l.textContent=`${d("firewall.settings.desc")}`,o=Z(),s=Q("div"),a=Q("div");for(let e=0;e<f.length;e+=1)f[e].c();r=Z(),c=Q("div"),p&&Ve(p.$$.fragment),ie(l,"class","kin_description__text"),ie(i,"slot","description"),ie(a,"class","frw_tabs tab__wrap svelte-i6mnp5"),ie(c,"class","tab__pane frw_tabs__pane svelte-i6mnp5"),ie(s,"slot","view-content"),ie(t,"slot","page-content")},m(e,d){Y(e,t,d),V(t,n),V(n,i),V(i,l),V(n,o),V(n,s),V(s,a);for(let t=0;t<f.length;t+=1)f[t].m(a,null);V(s,r),V(s,c),p&&Ye(p,c,null),u=!0},p(e,t){if(17&t){let n;for(m=e[4],n=0;n<m.length;n+=1){const i=Yo(e,m,n);f[n]?f[n].p(i,t):(f[n]=es(i),f[n].c(),f[n].m(a,null))}for(;n<f.length;n+=1)f[n].d(1);f.length=m.length}const n={};if(1&t&&(n.router=e[0].router),g!==(g=e[0].compo)){if(p){Le();const e=p;je(e.$$.fragment,1,0,(()=>{Xe(e,1)})),Be()}g?(p=new g(h(e)),Ve(p.$$.fragment),Fe(p.$$.fragment,1),Ye(p,c,null)):p=null}else g&&p.$set(n)},i(e){u||(p&&Fe(p.$$.fragment,e),u=!0)},o(e){p&&je(p.$$.fragment,e),u=!1},d(e){e&&X(t),J(f,e),p&&Xe(p)}}}function ns(e){let t,n,i;return{c(){t=Z(),n=Z(),i=Z()},m(e,l){Y(e,t,l),Y(e,n,l),Y(e,i,l)},p:P,i:P,o:P,d(e){e&&X(t),e&&X(n),e&&X(i)}}}function is(e){let t,n,i,l;const o=[Jo,Xo],s=[];function a(e,t){return e[1]?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),i=ee()},m(e,n){s[t].m(e,n),Y(e,i,n),l=!0},p(e,[l]){let r=t;t=a(e),t===r?s[t].p(e,l):(Le(),je(s[r],1,1,(()=>{s[r]=null})),Be(),n=s[t],n?n.p(e,l):(n=s[t]=o[t](e),n.c()),Fe(n,1),n.m(i.parentNode,i))},i(e){l||(Fe(n),l=!0)},o(e){je(n),l=!1},d(e){s[t].d(e),e&&X(i)}}}function ls(t,n,i){const l=new v,s=e.isLicensed(x),a=[],r=[{id:"apps",label:d("firewall.apps"),compo:bi},{id:"nets",label:d("firewall.networks"),compo:tl},{id:"rules",label:d("firewall.rules"),compo:Yl,router:new v},{id:"logs",label:d("firewall.logs"),compo:Vo}];let c={},p=!1;const u={stopOptions:{title:d("firewall.stopOptions.title"),desc:d("firewall.stopOptions.desc")},change:(t,n)=>t?e.enableFeature(x):e.disableFeature(x,n),checked:e.isEnabled(x)};function m(e={}){i(1,p="rules"===e.tabId&&"list"===e.wildcard),p||(i(0,c=r.find((t=>t.id===e.tabId))||r[0]),setTimeout((()=>{c.router&&c.router.emit(e.wildcard)})))}function f(e){i(2,u.checked=!u.checked,u),i(2,u.processing=!0,u),u.change(u.checked,e).catch((()=>{i(2,u.checked=!u.checked,u),i(2,u.processing=!1,u)}))}return l.on("/",m),l.on(":tabId/*",m),ve((()=>{a.push(o.on("product.change.feature.ais_cmp_fw.enabled",(e=>{i(2,u.checked=e,u),i(2,u.processing=!1,u)})))})),we((()=>{a.forEach((e=>e())),l.removeAllListeners()})),[c,p,u,s,r,function(){u.checked&&u.stopOptions?b.stopOptions(u.stopOptions).then((e=>{f(e.time)})):e.isPassiveMode()?b.passiveMode().then((()=>{f()})):f()},l]}class os extends Ke{constructor(e){var t;super(),document.getElementById("svelte-i6mnp5-style")||((t=Q("style")).id="svelte-i6mnp5-style",t.textContent=".frw_tabs.svelte-i6mnp5{margin-top:2rem;padding-bottom:0;position:sticky;top:0;z-index:3;background:var(--table-header-bg);background-attachment:fixed;font-size:var(--font-size);border-bottom:0}.frw_tabs.svelte-i6mnp5::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;background:var(--table-header-bg-pseudo);background-attachment:fixed;opacity:0.5;pointer-events:none}.frw_tabs__pane.svelte-i6mnp5{position:relative;padding-top:0}",V(document.head,t)),Qe(this,e,ls,is,E,{router:6})}get router(){return this.$$.ctx[6]}}const ss={avast:{id:201,api:"public.AvastSecureLine"},avg:{id:202,api:"public.AVGSecureVPN"}}[e.getBrand()];const as=new class{getMyNetwork(){return a("app.anen.get_status",1).then((e=>Array.isArray(e)&&e[0]?e[0]:null))}getNetworks(){return a("app.anen.get_status",0).then((e=>Array.isArray(e)?e:null))}getNetworkType(e){return a("app.anen.storage.app.value.get",{network_id:e,app_id:"hns_general",key:"network_type"}).catch((()=>"unknown"))}getHnsInit(){return a("asw.hns.init",{protocol_version:6}).then((e=>{const t={protocol:e.protocol_version,networkInfo:{name:e.network_name?e.network_name:"",signal:e.wifi_quality,encryption:e.wifi_encryption,auth:e.wifi_auth,scanType:e.scan_type}};return e.scan_id&&e.scan&&(t.scanning={scanId:e.scan_id,category:e.scan.category,startType:e.scan.start_type,type:e.scan.type}),t}))}getLastScan(){return a("asw.hns.devices",{name:"CURRENT_SCAN",type:"full"}).then((e=>!(!e||"no_data"===e.status||!e.protocol_version)&&e))}stopScan(){return a("asw.hns.cancel")}isScanRunning(){return a("asw.hns.progress_r").then((e=>Boolean(e.scan_id)))}startScan(e){return a("asw.hns.start",{scan_type:e}).then((e=>!(!e||"ok"!==e.status)||Promise.reject()))}openVpn(){return a("app."+e.getProductId()+".lis.open.ui",{id:"svpn"})}isSecurelineRunning(){return a(ss.api+".GetState",{}).then((e=>e&&"connected"===e.vpnStatus)).catch((()=>!1))}isSecurelineInstalled(){return a("app."+e.getProductId()+".lis.get.install",{ids:["svpn"]}).then((e=>e&&e.products&&e.products.svpn&&e.products.svpn.installed)).catch((()=>!1))}isVpnDisabled(){return a("app.settings.Get","avdef://config/GuiCache/VpnDisabled").then((e=>Boolean(e))).catch((()=>!1))}isOtherVpnInstalled(){return a("app.settings.Get","avcfg://settings/Common/VpnIdList").then((e=>((e=e||"").split(","),e.some((function(e){return e!=ss.id}))))).catch((()=>!1))}updateDevice(e){return a("asw.hns.command",e)}},rs=l.extend({template:{v:3,t:[{t:7,e:"Toaster",a:{loading:[{t:2,r:"loading"}],windowWidth:[{t:2,r:"windowWidth"}],windowHeight:[{t:2,r:"windowHeight"}],customContent:"true",text:[{t:2,r:"text"}],autoResize:"true"},f:[{t:4,f:[{t:7,e:"div",a:{class:"switch__wrap frw_switch"},f:[{t:7,e:"Switch",a:{txt:["{left:'",{t:3,x:{r:["nls"],s:'_0("firewall.toaster.mode.private")'}},"',right:'",{t:3,x:{r:["nls"],s:'_0("firewall.toaster.mode.public")'}},"'}"],checked:[{t:2,r:"mode"}],values:["{left:'",{t:2,r:"MODES.private"},"',right:'",{t:2,r:"MODES.public"},"'}"],isCheckbox:"false",disabled:[{t:2,r:"switchDisabled"}],cssCls:[{t:4,f:["-waiting"],n:50,r:"switchDisabled"}],preventToggle:"true"},v:{domClick:"toggleSwitch"}}]}],n:50,x:{r:["networkDeleted","MODES.private","mode","MODES.public"],s:"!_0&&(_2==_1||_2==_3)"}},{t:4,f:[{t:7,e:"button",a:{class:"toaster__btn btn -small"},v:{click:"scanNetwork"},f:[{t:3,x:{r:["nls"],s:'_0("firewall.toasters.scanNetwork")'}}]}],n:50,x:{r:["networkDeleted","hnsInstalled"],s:"!_0&&_1"}},{t:4,n:51,f:[{t:7,e:"div",a:{class:"toaster__btn"}}],x:{r:["networkDeleted","hnsInstalled"],s:"!_0&&_1"}}]}]},css:y,asyncLoad:!0,data:()=>({MODES:S,toasterType:null,textId:null,text:null,nls:d,switchDisabled:!1,loading:!1,windowWidth:360,triggerScanOnClose:!0,mode:null,networkId:null,networkName:null,networkDeleted:!1,hnsInstalled:e.isInstalled("network")}),oninit:function(){if(this._modeSet=!1,this.listeners=[],this.listeners.push(o.on("app.fwserv.networks_changed_event",(e=>{this._setConnectedNet(e)}))),this.log=m.createLogger("firewall.toasters."+this.get("toasterType")),this.toasterCompo=this.findComponent("Toaster"),this.toasterCompo.gaTrack=s,this.set({networkId:this.get("params.network_id"),networkName:this.get("params.network_friendly_name"),mode:this.get("params.mode"),switchDisabled:1===this.get("params.read_only")}),!this.get("params.network_id")){console.error("OBSOLETE firewall toaster params",JSON.stringify(this.get("params")));let e=this.get("params.mode")||this.get("params.profile");null!=e&&(e="private"===e?S.private:S.public),this.set({mode:e,networkName:this.get("params.networkName")||this.get("params.ssid"),switchDisabled:!0})}this.on("Toaster.close",(function(){this.log.info("closing"),this.closeWindow(null)})),window.addEventListener("beforeunload",(()=>{this._setModeOnClose(),this.get("triggerScanOnClose")&&a("asw.hns.start",{scan_type:"quick",start_type:"router_changed"})}),!1),this.on("toggleSwitch",(function(e){s.event("Toaster","Click","Switch"),this.log.info("switching profile"),e.original.preventDefault();const t=this.get("mode")==S.private?S.public:S.private;this._setMode(t)})),this.on("scanNetwork",(function(e){e.original.stopPropagation(),s.event("Toaster","Click","ScanNetwork"),this.log.info("opening Wi-Fi Inspector"),this.set("triggerScanOnClose",!1);const t=this.get("mode")==S.private?"home":"public";as.startScan(t).then((()=>a("app.windowManager.ShowMainWindow",{route:"SecurityNetwork/runningScan"}))).then((()=>{a("app.windowManager.FocusMainWindow"),this.closeWindow(c.CLOSE_REASONS.navigateToOtherWindow)})).catch((e=>{this.log.error("opening Wi-Fi Inspector failed",e)}))}))},_setConnectedNet(e){const t=this.get("networkId"),n=e.find((e=>t&&e.network_id===t));n?this.set({networkId:n.network_id,networkName:n.network_friendly_name,mode:n.mode,switchDisabled:1===n.read_only}):this.log.error("Nework Id not found: ",t)},_setMode(e){this._modeSet=!0;const t={network_id:this.get("networkId"),mode:parseInt(e)};return a("app.fwserv.set_net_profile_full",t).then((()=>{this.set("mode",e)})).catch((e=>{e.code&&1168===e.code&&(this.set("networkDeleted",!0),this.setText()),this.log.error("app.fwserv.set_net_profile_full error",JSON.stringify(e))}))},onrender(){window.setTimeout((()=>{this.setText(),this.ready()}),0)},_goToFirewall(){s.event("Toaster","Click","GoToFirewall"),this.log.info("opening firewall"),a("app.windowManager.ShowMainWindow",{route:"Firewall"}).then((()=>{this.closeWindow(c.CLOSE_REASONS.navigateToOtherWindow)})).catch((e=>{this.log.error("opening firewall failed",e)}))},closeWindow(e=null){null!==e?c.close({reason:e}):c.close()},_setModeOnClose(){const e=this.get("mode");this._modeSet||e!=S.private&&e!=S.public||this._setMode(e)},setText(){const e=this.get("networkName");let t=d(this.get("textId")),n='<div class="toaster__item-name g-margin-bottom--15">'+w.escapeHtml(e)+"</div>";if(e&&0!==e.length||(t+=".",n='<div class="g-margin-bottom--15"></div>'),this.get("networkDeleted"))this.set("text",t+n+d("firewall.networkDeleted"));else if(this.get("mode")){this.set("text",t+n+d("firewall.toasters.text.profile"));const e=this.find("a[href=goToFirewall]");e&&(e.className+="a",e.addEventListener("click",(()=>{this._goToFirewall()})))}else this.set("text",t+n+d("firewall.toasters.text.firewallDisabled"))},onteardown(){this.listeners.forEach((e=>{e()}))}}),cs=rs.extend({data:()=>({toasterType:"netDetected",textId:"firewall.toasters.netDetected.text"})}),ds=rs.extend({data:()=>({toasterType:"profileChange",textId:"firewall.toasters.profileChange.text"})}),ps=m.createLogger("firewall.toasters.ruleApplied"),us=l.components.Toaster.extend({windowClose:c.close,asyncLoad:!0,gaTrack:s,data:()=>({text:null,buttonLabel:d("firewall.toasters.ruleApplied.buttonLabel"),buttonLabelGA:"Details",autoResize:!0}),oninit(){this._super();const e=this.get("params.appName"),t=this.get("params.appGuid"),n=this.get("params.action");ps.info("oninit; appName: "+e+", appGuid: "+t+", action: "+n),this.on("doAction",(function(){ps.info("opening app rules"),a("av.command","show_fw_app_rules:"+t).then((function(){c.close({reason:c.CLOSE_REASONS.navigateToOtherWindow})})).catch((function(e){ps.error("opening app rules failed",e)}))})),this.on("doAreaAction",(function(){ps.info("opening firewall"),a("app.windowManager.ShowMainWindow",{route:"Firewall"}).then((function(){c.close({reason:c.CLOSE_REASONS.navigateToOtherWindow})})).catch((function(e){ps.error("opening firewall failed",e)}))})),e&&t&&n?(this.set("text",d("firewall.toasters.ruleApplied.text."+n,e)),this.set("loading",!1),this.ready()):(ps.warn("no app name, guid or action"),c.close({reason:c.CLOSE_REASONS.error}))}}),ms=m.createLogger("firewall.toasters.automaticProfileSwitchToaster"),fs=l.components.Toaster.extend({windowClose:c.close,asyncLoad:!0,gaTrack:s,data:function(){return{text:null,buttonLabel:d("firewall.toaster.changeMode.btn"),autoResize:!0}},oninit:function(){this._super();const e=this.get("params.network_friendly_name"),t=1==this.get("params.mode")?d("firewall.mode.private.short"):d("firewall.mode.public.short"),n='<div class="text g-font--16 g-font--bold g-margin-bottom--15">'+d("firewall.toaster.modeChanged.title")+"</div>",i=d("firewall.toaster.modeChanged.desc",e,t);this.on("doAction",(function(){a("app.windowManager.ShowMainWindow",{route:"#Settings/Firewall"}).then((function(){c.close({reason:c.CLOSE_REASONS.navigateToOtherWindow})})).catch((function(e){ms.error("opening Firewall failed",e)}))})),this.on("doAreaAction",(function(){c.close({reason:c.CLOSE_REASONS.navigateToOtherWindow})})),this.set({text:n+i,loading:!1}),this.set("loading",!1),this.ready()}});const gs=m.createLogger("firewall.settings"),hs={title:"firewall",desc:"firewall.settings.desc",showNotifications:"firewall.settings.showNotifications",internetSharingMode:"firewall.settings.internetSharingMode",scanDetectionEnabled:"firewall.settings.scanDetectionEnabled",ipBlockTimeout:"firewall.settings.ipBlockTimeout",milliseconds:"global.units.milliseconds.standalone",listOfProfiles:"firewall.settings.listOfProfiles",noRuleBehaviour:"firewall.settings.noRuleBehaviour",noRuleBehaviourAutodecide:"firewall.settings.noRuleBehaviour.autodecide",noRuleBehaviourAllow:"firewall.settings.noRuleBehaviour.allow",noRuleBehaviourBlock:"firewall.settings.noRuleBehaviour.block",noRuleBehaviourAsk:"firewall.settings.noRuleBehaviour.ask",systemRules:"firewall.settings.systemRules",packetRules:"firewall.settings.packetRules",rulesDesc:"firewall.settings.packetRules.desc",netModePublic:"firewall.mode.public.short",netModePrivate:"firewall.mode.private.short"},_s={showNotifications:{label:d(hs.showNotifications),path:"avcfg://Firewall/Policies/NotificationNewAllowRule",track:{subject:"Show notifications about new allow rules"},search:hs.showNotifications},internetSharingMode:{label:d(hs.internetSharingMode),path:"avcfg://Firewall/Policies/InternetSharingMode",track:{subject:"Internet Connection Sharing mode"},search:hs.internetSharingMode},scanDetectionEnabled:{label:d(hs.scanDetectionEnabled),path:"avcfg://Firewall/ScanDetection/ScanDetectionEnabled",track:{subject:"Enable automatic port scan detection"},search:hs.scanDetectionEnabled},ipBlockTimeout:{label:d(hs.ipBlockTimeout),path:"avcfg://Firewall/ScanDetection/IpBlockTimeout",track:{subject:"IP block timeout (ms)"},search:hs.ipBlockTimeout},noRuleBehaviour:{label:d(hs.noRuleBehaviour),path:"avcfg://Firewall/Policies/CatchAllRuleReply",track:{subject:"What to do with programs with no defied rules"},options:[{label:d(hs.noRuleBehaviourAutodecide),value:"autodecide"},{label:d(hs.noRuleBehaviourAllow),value:"allow"},{label:d(hs.noRuleBehaviourBlock),value:"block"},{label:d(hs.noRuleBehaviourAsk),value:"ask"}],search:{title:hs.noRuleBehaviour,others:[hs.noRuleBehaviourAutodecide,hs.noRuleBehaviourAllow,hs.noRuleBehaviourBlock,hs.noRuleBehaviourAsk]}},systemRules:{id:"firewall_settings_systemRules",label:d(hs.systemRules),action:function(){o.emit("Settings.gaTrack","Open system rules"),a("av.command","settings:IDR_HTM_DIALOG_FW_SYSTEM_RULES")},search:{title:hs.systemRules,desc:hs.rulesDesc}},packetRules:{id:"firewall_settings_packetRules",label:d(hs.packetRules),action:function(){o.emit("Settings.gaTrack","Open packet rules"),a("av.command","settings:IDR_HTM_DIALOG_FW_PACKET_RULES")},search:{title:hs.packetRules,desc:hs.rulesDesc}},nets:{id:"firewall_settings_nets",list:[],search:{title:hs.listOfProfiles,others:[hs.netModePublic,hs.netModePrivate]}}},vs={title:hs.title,desc:hs.desc,items:_s},ws=l.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.showNotifications"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.internetSharingMode"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.scanDetectionEnabled"}]},f:[{t:7,e:"div",a:{class:"settings__indent"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.ipBlockTimeout"}],wrapCssCls:"frw_settings-text_input"},f:[],p:{labelRight:[{t:7,e:"span",a:{class:"g-margin-left--5"},f:[{t:3,x:{r:["nls","STRINGS.milliseconds"],s:"_0(_1)"}}]}]}}]}]}," ",{t:7,e:"SettingsSelect",a:{property:[{t:2,r:"properties.noRuleBehaviour"}],labelSmall:0}}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"p",a:{class:"p -small -secondary -margins g-margin-top--5"},f:[{t:3,x:{r:["nls","STRINGS.packetRulesDesc"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary",id:[{t:2,r:"properties.systemRules.id"}]},v:{click:{n:"doAction",d:[{t:2,r:"properties.systemRules"}]}},f:[{t:3,x:{r:["nls","STRINGS.systemRules"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary g-margin-left--5",id:[{t:2,r:"properties.packetRules.id"}]},v:{click:{n:"doAction",d:[{t:2,r:"properties.packetRules"}]}},f:[{t:3,x:{r:["nls","STRINGS.packetRules"],s:"_0(_1)"}}]}]}," ",{t:7,e:"div",a:{id:[{t:2,r:"properties.nets.id"}]},f:[{t:7,e:"p",a:{class:"p -small -secondary g-margin-top--15"},f:[{t:3,x:{r:["nls","STRINGS.listOfProfiles"],s:"_0(_1)"}}]}," ",{t:7,e:"table",a:{class:"table -small -fixed"},f:[{t:7,e:"colgroup",f:[{t:7,e:"col",a:{width:"5%"}}," ",{t:7,e:"col",a:{width:"40%"}}," ",{t:7,e:"col",a:{width:"30%"}}," ",{t:7,e:"col",a:{width:"30%"}}," "]}," ",{t:4,f:[{t:4,f:[{t:4,f:[{t:7,e:"tr",a:{class:"-hoverable"},f:[{t:7,e:"td",f:[{t:4,f:[{t:7,e:"Icon",a:{name:[{t:4,f:["lan"],n:50,x:{r:["byLAN"],s:"_0===1"}},{t:4,n:51,f:["wifi"],x:{r:["byLAN"],s:"_0===1"}}]}}],n:50,r:"_isConnected"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"frw_disconnected-icon-cont"},f:[{t:7,e:"Icon",a:{name:"lan"}}," ",{t:7,e:"Icon",a:{name:"x",cssCls:"frw_disconnected-icon color-critical -text"}}]}],r:"_isConnected"}]}," ",{t:7,e:"td",f:[{t:2,r:"network_friendly_name"}]}," ",{t:7,e:"td",f:[{t:2,r:"gw_mac"}]}," ",{t:7,e:"td",a:{class:"g-align--right"},f:[{t:7,e:"select",a:{class:"input -small",disabled:[{t:2,r:"_modeSwitchDisabled"}]},v:{change:"toggleMode"},f:[{t:7,e:"option",a:{selected:[{t:2,x:{r:["_mode","MODES.private"],s:"_0==_1"}}]},f:[{t:3,x:{r:["nls","STRINGS.netModePrivate"],s:"_0(_1)"}}]}," ",{t:7,e:"option",a:{selected:[{t:2,x:{r:["_mode","MODES.public"],s:"_0==_1"}}]},f:[{t:3,x:{r:["nls","STRINGS.netModePublic"],s:"_0(_1)"}}]}]}]}," "]}],n:50,x:{r:["properties.nets.list.length","showHiddenNets","@index","NETS_TO_DISPLAY"],s:"_0<=_3||_1||_2<_3"}}],n:52,r:"properties.nets.list"}],n:50,r:"properties.nets.list.length"},{t:4,n:51,f:[{t:7,e:"tr",f:[{t:7,e:"td",a:{colspan:"5"},f:[{t:3,x:{r:["nls"],s:'_0("global.emptyList")'}}]}]}],r:"properties.nets.list.length"}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"g-margin-top--10"},f:[{t:7,e:"button",a:{class:"a -small"},v:{click:"toggleHiddenNets"},f:[{t:4,f:[{t:3,x:{r:["nls"],s:'_0("firewall.seeLessNetworks")'}},{t:7,e:"Icon",a:{name:"chevron-down",cssCls:"g-rotate--180"}}],n:50,r:"showHiddenNets"},{t:4,n:51,f:[{t:3,x:{r:["nls","properties.nets.list.length","NETS_TO_DISPLAY"],s:'_0("firewall.seeMoreNetworks",_1-_2)'}},{t:7,e:"Icon",a:{name:"chevron-down"}}],r:"showHiddenNets"}]}]}],n:50,x:{r:["properties.nets.list.length","NETS_TO_DISPLAY"],s:"_0>_1"}}]}]}]},css:".frw_disconnected-icon-cont {\n position: relative;\n}\n.frw_disconnected-icon-cont .frw_disconnected-icon {\n position: absolute;\n right: -1;\n top: 5;\n}\n.frw_settings-text_input {\n display: flex;\n align-items: center;\n}\n.frw_settings-text_input .input__wrapper {\n white-space: nowrap;\n}\n",data:()=>({STRINGS:hs,properties:_s,component:"firewall",stopOptions:{title:d("firewall.stopOptions.title"),desc:d("firewall.stopOptions.desc")},ipmBuyElm:343,MODES:S,showHiddenNets:!1,NETS_TO_DISPLAY:5}),oninit(){this.listeners=[],this.listeners.push(o.on("app.fwserv.networks_changed_event",(e=>{this._setNets(e)}))),this.on("toggleHiddenNets",(()=>{this.toggle("showHiddenNets")})),this.on("removeNet",(e=>{o.emit("Settings.gaTrack","Remove network"),this._removeNet(e.context)})),this.on("doAction",((e,t)=>{t.action&&t.action()})),this.on("toggleMode",(e=>{const t=e.context,n=t._mode==S.private?S.public:S.private;o.emit("Settings.gaTrack","Network mode",n==S.private?"private":"public"),this._setMode(t.network_id,n)})),this._getNets()},_setMode(e,t){const n={network_id:e,mode:parseInt(t)};a("app.fwserv.set_net_profile_full",n).catch((e=>{gs.error("app.fwserv.set_net_profile_full",JSON.stringify(e))}))},_getNets(){return a("app.fwserv.get_net_profiles",{only_connected:0}).then((e=>{this._setNets(e)})).catch((e=>{gs.error("app.fwserv.get_net_profiles",JSON.stringify(e))}))},_setNets(e){const t=[];for(const n of e)n._modeSwitchDisabled=1===n.read_only,n._isConnected=1===n.connected,n._mode=n.mode,t.push(n);this.set("properties.nets.list",t)},_removeNet(e){a("app.fwserv.del_net_profile",{network_id:e.network_id}).catch((e=>{gs.error("app.fwserv.del_net_profile",JSON.stringify(e))}))},onteardown(){this.listeners.forEach((e=>e()))}}),bs=[{label:'Show notifications about newly created "block" rules',path:"avcfg://Firewall/Policies/NotificationNewBlockRule",type:"checkbox"},{label:"Internet Connection Sharing mode",path:"avcfg://Firewall/Policies/InternetSharingMode",type:"checkbox"},{label:"Allow all connections with Friends when in Private mode",path:"avcfg://Firewall/Firewall/AllowFriends",type:"checkbox"},{label:"Enable automatic profile switching",path:"avcfg://Firewall/Firewall/AutomaticFwModeChange",type:"checkbox"},{label:"Show notifications about automatic profile switching",path:"avcfg://Firewall/Firewall/ShowPopupFwModeChange",type:"checkbox"},{label:"Enable automatic port scan detection",path:"avcfg://Firewall/ScanDetection/ScanDetectionEnabled",type:"checkbox"},{label:"IP block timeout",path:"avcfg://Firewall/ScanDetection/IpBlockTimeout",type:"text",minValue:0,units:"milliseconds"},{label:"Enable raw sockets",path:"avcfg://Firewall/Firewall/RawEndpoint",type:"select",options:[{label:"Enabled",value:4},{label:"Disabled",value:1}]},{label:"Log all blocked packets",path:"avcfg://Firewall/Firewall/LogAllBlockedPackets",type:"checkbox"}];let ks;ks=null==localStorage.getItem("newFw")?i.getValue("avdef://config/GuiCache/NewFW").then((e=>1==e?os:C)):Promise.resolve("1"===localStorage.getItem("newFw")?os:C);export default ks;export{fs as automaticProfileSwitchToaster,cs as netDetectedToaster,ds as profileChangeToaster,us as ruleAppliedToaster,ws as settings,bs as settingsGeek,vs as settingsSearchStrings};const ys={name:"Firewall",version:"1.2.463",created:"2021-03-10T09:07:21.250Z"};export{ys as metadata};