zwave-js-ui
Version:
Z-Wave Control Panel and MQTT Gateway
4 lines • 89.5 kB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ColorScheme-RD00g_MN.js","./index-B9yS4Bcc.js","./index-Bm7DxUwf.css","./DialogGatewayValue-B6g9AkDd.js","./DialogGatewayValue-CXWOoXeb.css","./file-input-Byh4-tbi.js","./InvertedCheckbox-l9-OcxRF.js"])))=>i.map(i=>d[i]);
import{A as Ue,_ as Oe,L as De,I as Ee,d as ie,B as H,m as be,u as se,D as Le,E as qe,F as Ke,a as Ae,G as z,H as Re,C as de,J as Ie,l as k,w as r,V as Pe,r as ae,o as Z,b as l,e as D,f as a,k as w,h as A,p as P,i as K,K as _,M as j,N as J,O as Y,q as x,P as te,Q as N,R as ne,T as I,U as O,t as X,W as U,X as Xe,Y as Ne,Z as ze,$ as Ge,a0 as Be,a1 as We,z as ue}from"./index-B9yS4Bcc.js";import{V as Ve,a as G,b as B,c as W}from"./VExpansionPanels-BZZ3W0eQ.js";import{V as Se}from"./VDataTable-CKSj76XP.js";import"./sort-CSOGXH9I.js";import"./VTable-BXtGlLLl.js";var Q={},fe,ke;function je(){if(ke)return fe;ke=1;function o(e,h){return Object.prototype.hasOwnProperty.call(e,h)}return fe=function(e,h,V,t){h=h||"&",V=V||"=";var u={};if(typeof e!="string"||e.length===0)return u;var M=/\+/g;e=e.split(h);var y=1e3;t&&typeof t.maxKeys=="number"&&(y=t.maxKeys);var S=e.length;y>0&&S>y&&(S=y);for(var d=0;d<S;++d){var n=e[d].replace(M,"%20"),g=n.indexOf(V),s,i,p,f;g>=0?(s=n.substr(0,g),i=n.substr(g+1)):(s=n,i=""),p=decodeURIComponent(s),f=decodeURIComponent(i),o(u,p)?Array.isArray(u[p])?u[p].push(f):u[p]=[u[p],f]:u[p]=f}return u},fe}var pe,Ze;function Fe(){if(Ze)return pe;Ze=1;var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};return pe=function(e,h,V,t){return h=h||"&",V=V||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(u){var M=encodeURIComponent(o(u))+V;return Array.isArray(e[u])?e[u].map(function(y){return M+encodeURIComponent(o(y))}).join(h):M+encodeURIComponent(o(e[u]))}).filter(Boolean).join(h):t?encodeURIComponent(o(t))+V+encodeURIComponent(o(e)):""},pe}var xe;function He(){return xe||(xe=1,Q.decode=Q.parse=je(),Q.encode=Q.stringify=Fe()),Q}var Je=He();const Ce=Ue(Je);var Ye=/https?|ftp|gopher|file/;function ge(o){typeof o=="string"&&(o=le(o));var e=function(h,V,t){var u=h.auth,M=h.hostname,y=h.protocol||"",S=h.pathname||"",d=h.hash||"",n=h.query||"",g=!1;u=u?encodeURIComponent(u).replace(/%3A/i,":")+"@":"",h.host?g=u+h.host:M&&(g=u+(~M.indexOf(":")?"["+M+"]":M),h.port&&(g+=":"+h.port)),n&&typeof n=="object"&&(n=V.encode(n));var s=h.search||n&&"?"+n||"";return y&&y.substr(-1)!==":"&&(y+=":"),h.slashes||(!y||t.test(y))&&g!==!1?(g="//"+(g||""),S&&S[0]!=="/"&&(S="/"+S)):g||(g=""),d&&d[0]!=="#"&&(d="#"+d),s&&s[0]!=="?"&&(s="?"+s),{protocol:y,host:g,pathname:S=S.replace(/[?#]/g,encodeURIComponent),search:s=s.replace("#","%23"),hash:d}}(o,Ce,Ye);return""+e.protocol+e.host+e.pathname+e.search+e.hash}var ce="http://",ve="w.w",he=ce+ve,Qe=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,$e=/https?|ftp|gopher|file/;function Me(o,e){var h=typeof o=="string"?le(o):o;o=typeof o=="object"?ge(o):o;var V=le(e),t="";h.protocol&&!h.slashes&&(t=h.protocol,o=o.replace(h.protocol,""),t+=e[0]==="/"||o[0]==="/"?"/":""),t&&V.protocol&&(t="",V.slashes||(t=V.protocol,e=e.replace(V.protocol,"")));var u=o.match(Qe);u&&!V.protocol&&(o=o.substr((t=u[1]+(u[2]||"")).length),/^\/\/[^/]/.test(e)&&(t=t.slice(0,-1)));var M=new URL(o,he+"/"),y=new URL(e,M).toString().replace(he,""),S=V.protocol||h.protocol;return S+=h.slashes||V.slashes?"//":"",!t&&S?y=y.replace(ce,S):t&&(y=y.replace(ce,"")),$e.test(y)||~e.indexOf(".")||o.slice(-1)==="/"||e.slice(-1)==="/"||y.slice(-1)!=="/"||(y=y.slice(0,-1)),t&&(y=t+(y[0]==="/"?y.substr(1):y)),y}function $(){}$.prototype.parse=le,$.prototype.format=ge,$.prototype.resolve=Me,$.prototype.resolveObject=Me;var me=/^https?|ftp|gopher|file/,et=/^(.*?)([#?].*)/,tt=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,nt=/^([a-z0-9.+-]*:)?\/\/\/*/i,lt=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function le(o,e,h){if(e===void 0&&(e=!1),h===void 0&&(h=!1),o&&typeof o=="object"&&o instanceof $)return o;var V=(o=o.trim()).match(et);o=V?V[1].replace(/\\/g,"/")+V[2]:o.replace(/\\/g,"/"),lt.test(o)&&o.slice(-1)!=="/"&&(o+="/");var t=!/(^javascript)/.test(o)&&o.match(tt),u=nt.test(o),M="";t&&(me.test(t[1])||(M=t[1].toLowerCase(),o=""+t[2]+t[3]),t[2]||(u=!1,me.test(t[1])?(M=t[1],o=""+t[3]):o="//"+t[3]),t[2].length!==3&&t[2].length!==1||(M=t[1],o="/"+t[3]));var y,S=(V?V[1]:o).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),d=S&&S[1],n=new $,g="",s="";try{y=new URL(o)}catch(f){g=f,M||h||!/^\/\//.test(o)||/^\/\/.+[@.]/.test(o)||(s="/",o=o.substr(1));try{y=new URL(o,he)}catch{return n.protocol=M,n.href=M,n}}n.slashes=u&&!s,n.host=y.host===ve?"":y.host,n.hostname=y.hostname===ve?"":y.hostname.replace(/(\[|\])/g,""),n.protocol=g?M||null:y.protocol,n.search=y.search.replace(/\\/g,"%5C"),n.hash=y.hash.replace(/\\/g,"%5C");var i=o.split("#");!n.search&&~i[0].indexOf("?")&&(n.search="?"),n.hash||i[1]!==""||(n.hash="#"),n.query=e?Ce.decode(y.search.substr(1)):n.search.substr(1),n.pathname=s+(t?function(f){return f.replace(/['^|`]/g,function(m){return"%"+m.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(m,v){try{return decodeURIComponent(v).split("").map(function(c){var b=c.charCodeAt();return b>256||/^[a-z0-9]$/i.test(c)?c:"%"+b.toString(16).toUpperCase()}).join("")}catch{return v}})}(y.pathname):y.pathname),n.protocol==="about:"&&n.pathname==="blank"&&(n.protocol="",n.pathname=""),g&&o[0]!=="/"&&(n.pathname=n.pathname.substr(1)),M&&!me.test(M)&&o.slice(-1)!=="/"&&n.pathname==="/"&&(n.pathname=""),n.path=n.pathname+n.search,n.auth=[y.username,y.password].map(decodeURIComponent).filter(Boolean).join(":"),n.port=y.port,d&&!n.host.endsWith(d)&&(n.host+=d,n.port=d.slice(1)),n.href=s?""+n.pathname+n.search+n.hash:ge(n);var p=/^(file)/.test(n.href)?["host","hostname"]:[];return Object.keys(n).forEach(function(f){~p.indexOf(f)||(n[f]=n[f]||null)}),n}var ye={exports:{}},Te;function rt(){return Te||(Te=1,function(o,e){(function(V,t){o.exports=t()})(globalThis,()=>(()=>{var h={794:(M,y,S)=>{Object.defineProperty(y,"__esModule",{value:!0}),y.CronParser=void 0;var d=S(586),n=function(){function g(s,i,p){i===void 0&&(i=!0),p===void 0&&(p=!1),this.expression=s,this.dayOfWeekStartIndexZero=i,this.monthStartIndexZero=p}return g.prototype.parse=function(){var s,i,p=(s=this.expression)!==null&&s!==void 0?s:"";if(p.startsWith("@")){var f=this.parseSpecial(this.expression);i=this.extractParts(f)}else i=this.extractParts(this.expression);return this.normalize(i),this.validate(i),i},g.prototype.parseSpecial=function(s){var i={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},p=i[s];if(!p)throw new Error("Unknown special expression.");return p},g.prototype.extractParts=function(s){if(!this.expression)throw new Error("cron expression is empty");for(var i=s.trim().split(/[ ]+/),p=0;p<i.length;p++)if(i[p].includes(",")){var f=i[p].split(",").map(function(v){return v.trim()}).filter(function(v){return v!==""}).map(function(v){return isNaN(Number(v))?v:Number(v)}).filter(function(v){return v!==null&&v!==""});f.length===0&&f.push("*"),f.sort(function(v,c){return v!==null&&c!==null?v-c:0}),i[p]=f.map(function(v){return v!==null?v.toString():""}).join(",")}if(i.length<5)throw new Error("Expression has only ".concat(i.length," part").concat(i.length==1?"":"s",". At least 5 parts are required."));if(i.length==5)i.unshift(""),i.push("");else if(i.length==6){var m=/\d{4}$/.test(i[5])||i[4]=="?"||i[2]=="?";m?i.unshift(""):i.push("")}else if(i.length>7)throw new Error("Expression has ".concat(i.length," parts; too many!"));return i},g.prototype.normalize=function(s){var i=this;if(s[3]=s[3].replace("?","*"),s[5]=s[5].replace("?","*"),s[2]=s[2].replace("?","*"),s[0].indexOf("0/")==0&&(s[0]=s[0].replace("0/","*/")),s[1].indexOf("0/")==0&&(s[1]=s[1].replace("0/","*/")),s[2].indexOf("0/")==0&&(s[2]=s[2].replace("0/","*/")),s[3].indexOf("1/")==0&&(s[3]=s[3].replace("1/","*/")),s[4].indexOf("1/")==0&&(s[4]=s[4].replace("1/","*/")),s[6].indexOf("1/")==0&&(s[6]=s[6].replace("1/","*/")),s[5]=s[5].replace(/(^\d)|([^#/\s]\d)/g,function(C){var L=C.replace(/\D/,""),T=L;return i.dayOfWeekStartIndexZero?L=="7"&&(T="0"):T=(parseInt(L)-1).toString(),C.replace(L,T)}),s[5]=="L"&&(s[5]="6"),s[3]=="?"&&(s[3]="*"),s[3].indexOf("W")>-1&&(s[3].indexOf(",")>-1||s[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var p={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var f in p)s[5]=s[5].replace(new RegExp(f,"gi"),p[f].toString());s[4]=s[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(C){var L=C.replace(/\D/,""),T=L;return i.monthStartIndexZero&&(T=(parseInt(L)+1).toString()),C.replace(L,T)});var m={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var v in m)s[4]=s[4].replace(new RegExp(v,"gi"),m[v].toString());s[0]=="0"&&(s[0]=""),!/\*|\-|\,|\//.test(s[2])&&(/\*|\//.test(s[1])||/\*|\//.test(s[0]))&&(s[2]+="-".concat(s[2]));for(var c=0;c<s.length;c++)if(s[c].indexOf(",")!=-1&&(s[c]=s[c].split(",").filter(function(C){return C!==""}).join(",")||"*"),s[c]=="*/1"&&(s[c]="*"),s[c].indexOf("/")>-1&&!/^\*|\-|\,/.test(s[c])){var b=null;switch(c){case 4:b="12";break;case 5:b="6";break;case 6:b="9999";break;default:b=null;break}if(b!==null){var E=s[c].split("/");s[c]="".concat(E[0],"-").concat(b,"/").concat(E[1])}}},g.prototype.validate=function(s){this.assertNoInvalidCharacters("DOW",s[5]),this.assertNoInvalidCharacters("DOM",s[3]),this.validateRange(s)},g.prototype.validateRange=function(s){d.default.secondRange(s[0]),d.default.minuteRange(s[1]),d.default.hourRange(s[2]),d.default.dayOfMonthRange(s[3]),d.default.monthRange(s[4],this.monthStartIndexZero),d.default.dayOfWeekRange(s[5],this.dayOfWeekStartIndexZero)},g.prototype.assertNoInvalidCharacters=function(s,i){var p=i.match(/[A-KM-VX-Z]+/gi);if(p&&p.length)throw new Error("".concat(s," part contains invalid values: '").concat(p.toString(),"'"))},g}();y.CronParser=n},728:(M,y,S)=>{Object.defineProperty(y,"__esModule",{value:!0}),y.ExpressionDescriptor=void 0;var d=S(910),n=S(794),g=function(){function s(i,p){if(this.expression=i,this.options=p,this.expressionParts=new Array(5),!this.options.locale&&s.defaultLocale&&(this.options.locale=s.defaultLocale),!s.locales[this.options.locale]){var f=Object.keys(s.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(f,"'.")),this.options.locale=f}this.i18n=s.locales[this.options.locale],p.use24HourTimeFormat===void 0&&(p.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return s.toString=function(i,p){var f=p===void 0?{}:p,m=f.throwExceptionOnParseError,v=m===void 0?!0:m,c=f.verbose,b=c===void 0?!1:c,E=f.dayOfWeekStartIndexZero,C=E===void 0?!0:E,L=f.monthStartIndexZero,T=L===void 0?!1:L,R=f.use24HourTimeFormat,q=f.locale,re=q===void 0?null:q,F=f.tzOffset,oe=F===void 0?0:F,ee={throwExceptionOnParseError:v,verbose:b,dayOfWeekStartIndexZero:C,monthStartIndexZero:T,use24HourTimeFormat:R,locale:re,tzOffset:oe},_e=new s(i,ee);return _e.getFullDescription()},s.initialize=function(i,p){p===void 0&&(p="en"),s.specialCharacters=["/","-",",","*"],s.defaultLocale=p,i.load(s.locales)},s.prototype.getFullDescription=function(){var i="";try{var p=new n.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=p.parse();var f=this.getTimeOfDayDescription(),m=this.getDayOfMonthDescription(),v=this.getMonthDescription(),c=this.getDayOfWeekDescription(),b=this.getYearDescription();i+=f+m+c+v+b,i=this.transformVerbosity(i,!!this.options.verbose),i=i.charAt(0).toLocaleUpperCase()+i.substr(1)}catch(E){if(!this.options.throwExceptionOnParseError)i=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(E)}return i},s.prototype.getTimeOfDayDescription=function(){var i=this.expressionParts[0],p=this.expressionParts[1],f=this.expressionParts[2],m="";if(!d.StringUtilities.containsAny(p,s.specialCharacters)&&!d.StringUtilities.containsAny(f,s.specialCharacters)&&!d.StringUtilities.containsAny(i,s.specialCharacters))m+=this.i18n.atSpace()+this.formatTime(f,p,i);else if(!i&&p.indexOf("-")>-1&&!(p.indexOf(",")>-1)&&!(p.indexOf("/")>-1)&&!d.StringUtilities.containsAny(f,s.specialCharacters)){var v=p.split("-");m+=d.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(f,v[0],""),this.formatTime(f,v[1],""))}else if(!i&&f.indexOf(",")>-1&&f.indexOf("-")==-1&&f.indexOf("/")==-1&&!d.StringUtilities.containsAny(p,s.specialCharacters)){var c=f.split(",");m+=this.i18n.at();for(var b=0;b<c.length;b++)m+=" ",m+=this.formatTime(c[b],p,""),b<c.length-2&&(m+=","),b==c.length-2&&(m+=this.i18n.spaceAnd())}else{var E=this.getSecondsDescription(),C=this.getMinutesDescription(),L=this.getHoursDescription();if(m+=E,m&&C&&(m+=", "),m+=C,C===L)return m;m&&L&&(m+=", "),m+=L}return m},s.prototype.getSecondsDescription=function(){var i=this,p=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(f){return f},function(f){return d.StringUtilities.format(i.i18n.everyX0Seconds(f),f)},function(f){return i.i18n.secondsX0ThroughX1PastTheMinute()},function(f){return f=="0"?"":parseInt(f)<20?i.i18n.atX0SecondsPastTheMinute(f):i.i18n.atX0SecondsPastTheMinuteGt20()||i.i18n.atX0SecondsPastTheMinute(f)});return p},s.prototype.getMinutesDescription=function(){var i=this,p=this.expressionParts[0],f=this.expressionParts[2],m=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(v){return v},function(v){return d.StringUtilities.format(i.i18n.everyX0Minutes(v),v)},function(v){return i.i18n.minutesX0ThroughX1PastTheHour()},function(v){try{return v=="0"&&f.indexOf("/")==-1&&p==""?i.i18n.everyHour():parseInt(v)<20?i.i18n.atX0MinutesPastTheHour(v):i.i18n.atX0MinutesPastTheHourGt20()||i.i18n.atX0MinutesPastTheHour(v)}catch{return i.i18n.atX0MinutesPastTheHour(v)}});return m},s.prototype.getHoursDescription=function(){var i=this,p=this.expressionParts[2],f=this.getSegmentDescription(p,this.i18n.everyHour(),function(c){return i.formatTime(c,"0","")},function(c){return d.StringUtilities.format(i.i18n.everyX0Hours(c),c)},function(c){return i.i18n.betweenX0AndX1()},function(c){return i.i18n.atX0()});if(f&&p.includes("-")&&this.expressionParts[1]!="0"){var m=Array.from(f.matchAll(/:00/g));if(m.length>1){var v=m[m.length-1].index;f=f.substring(0,v)+":59"+f.substring(v+3)}}return f},s.prototype.getDayOfWeekDescription=function(){var i=this,p=this.i18n.daysOfTheWeek(),f=null;return this.expressionParts[5]=="*"?f="":f=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(m,v){var c=m;m.indexOf("#")>-1?c=m.substring(0,m.indexOf("#")):m.indexOf("L")>-1&&(c=c.replace("L",""));var b=parseInt(c);if(i.options.tzOffset){var E=i.expressionParts[2],C=parseInt(E)+(i.options.tzOffset?i.options.tzOffset:0);C>=24?b++:C<0&&b--,b>6?b=0:b<0&&(b=6)}var L=i.i18n.daysOfTheWeekInCase?i.i18n.daysOfTheWeekInCase(v)[b]:p[b];if(m.indexOf("#")>-1){var T=null,R=m.substring(m.indexOf("#")+1),q=m.substring(0,m.indexOf("#"));switch(R){case"1":T=i.i18n.first(q);break;case"2":T=i.i18n.second(q);break;case"3":T=i.i18n.third(q);break;case"4":T=i.i18n.fourth(q);break;case"5":T=i.i18n.fifth(q);break}L=T+" "+L}return L},function(m){return parseInt(m)==1?"":d.StringUtilities.format(i.i18n.commaEveryX0DaysOfTheWeek(m),m)},function(m){var v=m.substring(0,m.indexOf("-")),c=i.expressionParts[3]!="*";return c?i.i18n.commaAndX0ThroughX1(v):i.i18n.commaX0ThroughX1(v)},function(m){var v=null;if(m.indexOf("#")>-1){var c=m.substring(m.indexOf("#")+1);v=i.i18n.commaOnThe(c).trim()+i.i18n.spaceX0OfTheMonth()}else if(m.indexOf("L")>-1)v=i.i18n.commaOnTheLastX0OfTheMonth(m.replace("L",""));else{var b=i.expressionParts[3]!="*";v=b?i.i18n.commaAndOnX0():i.i18n.commaOnlyOnX0(m)}return v}),f},s.prototype.getMonthDescription=function(){var i=this,p=this.i18n.monthsOfTheYear(),f=this.getSegmentDescription(this.expressionParts[4],"",function(m,v){return v&&i.i18n.monthsOfTheYearInCase?i.i18n.monthsOfTheYearInCase(v)[parseInt(m)-1]:p[parseInt(m)-1]},function(m){return parseInt(m)==1?"":d.StringUtilities.format(i.i18n.commaEveryX0Months(m),m)},function(m){return i.i18n.commaMonthX0ThroughMonthX1()||i.i18n.commaX0ThroughX1()},function(m){return i.i18n.commaOnlyInMonthX0?i.i18n.commaOnlyInMonthX0():i.i18n.commaOnlyInX0()});return f},s.prototype.getDayOfMonthDescription=function(){var i=this,p=null,f=this.expressionParts[3];switch(f){case"L":p=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":p=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var m=f.match(/(\d{1,2}W)|(W\d{1,2})/);if(m){var v=parseInt(m[0].replace("W","")),c=v==1?this.i18n.firstWeekday():d.StringUtilities.format(this.i18n.weekdayNearestDayX0(),v.toString());p=d.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),c);break}else{var b=f.match(/L-(\d{1,2})/);if(b){var E=b[1];p=d.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(E),E);break}else{if(f=="*"&&this.expressionParts[5]!="*")return"";p=this.getSegmentDescription(f,this.i18n.commaEveryDay(),function(C){return C=="L"?i.i18n.lastDay():i.i18n.dayX0?d.StringUtilities.format(i.i18n.dayX0(),C):C},function(C){return C=="1"?i.i18n.commaEveryDay():i.i18n.commaEveryX0Days(C)},function(C){return i.i18n.commaBetweenDayX0AndX1OfTheMonth(C)},function(C){return i.i18n.commaOnDayX0OfTheMonth(C)})}break}}return p},s.prototype.getYearDescription=function(){var i=this,p=this.getSegmentDescription(this.expressionParts[6],"",function(f){return/^\d+$/.test(f)?new Date(parseInt(f),1).getFullYear().toString():f},function(f){return d.StringUtilities.format(i.i18n.commaEveryX0Years(f),f)},function(f){return i.i18n.commaYearX0ThroughYearX1()||i.i18n.commaX0ThroughX1()},function(f){return i.i18n.commaOnlyInYearX0?i.i18n.commaOnlyInYearX0():i.i18n.commaOnlyInX0()});return p},s.prototype.getSegmentDescription=function(i,p,f,m,v,c){var b=null,E=i.indexOf("/")>-1,C=i.indexOf("-")>-1,L=i.indexOf(",")>-1;if(!i)b="";else if(i==="*")b=p;else if(!E&&!C&&!L)b=d.StringUtilities.format(c(i),f(i));else if(L){for(var T=i.split(","),R="",q=0;q<T.length;q++)if(q>0&&T.length>2&&(R+=",",q<T.length-1&&(R+=" ")),q>0&&T.length>1&&(q==T.length-1||T.length==2)&&(R+="".concat(this.i18n.spaceAnd()," ")),T[q].indexOf("/")>-1||T[q].indexOf("-")>-1){var re=T[q].indexOf("-")>-1&&T[q].indexOf("/")==-1,F=this.getSegmentDescription(T[q],p,f,m,re?this.i18n.commaX0ThroughX1:v,c);re&&(F=F.replace(", ","")),R+=F}else E?R+=this.getSegmentDescription(T[q],p,f,m,v,c):R+=f(T[q]);E?b=R:b=d.StringUtilities.format(c(i),R)}else if(E){var T=i.split("/");if(b=d.StringUtilities.format(m(T[1]),T[1]),T[0].indexOf("-")>-1){var oe=this.generateRangeSegmentDescription(T[0],v,f);oe.indexOf(", ")!=0&&(b+=", "),b+=oe}else if(T[0].indexOf("*")==-1){var ee=d.StringUtilities.format(c(T[0]),f(T[0]));ee=ee.replace(", ",""),b+=d.StringUtilities.format(this.i18n.commaStartingX0(),ee)}}else C&&(b=this.generateRangeSegmentDescription(i,v,f));return b},s.prototype.generateRangeSegmentDescription=function(i,p,f){var m="",v=i.split("-"),c=f(v[0],1),b=f(v[1],2),E=p(i);return m+=d.StringUtilities.format(E,c,b),m},s.prototype.formatTime=function(i,p,f){var m=0,v=0;this.options.tzOffset&&(m=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),v=parseFloat((this.options.tzOffset%1).toFixed(2)),v!=0&&(v*=60));var c=parseInt(i)+m,b=parseInt(p)+v;b>=60?(b-=60,c+=1):b<0&&(b+=60,c-=1),c>=24?c=c-24:c<0&&(c=24+c);var E="",C=!1;this.options.use24HourTimeFormat||(C=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),E=C?"".concat(this.getPeriod(c)," "):" ".concat(this.getPeriod(c)),c>12&&(c-=12),c===0&&(c=12));var L="";return f&&(L=":".concat(("00"+f).substring(f.length))),"".concat(C?E:"").concat(("00"+c.toString()).substring(c.toString().length),":").concat(("00"+b.toString()).substring(b.toString().length)).concat(L).concat(C?"":E)},s.prototype.transformVerbosity=function(i,p){return p||(i=i.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),i=i.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),i=i.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),i=i.replace(/\, ?$/,"")),i},s.prototype.getPeriod=function(i){return i>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},s.locales={},s}();y.ExpressionDescriptor=g},336:(M,y,S)=>{Object.defineProperty(y,"__esModule",{value:!0}),y.enLocaleLoader=void 0;var d=S(751),n=function(){function g(){}return g.prototype.load=function(s){s.en=new d.en},g}();y.enLocaleLoader=n},751:(M,y)=>{Object.defineProperty(y,"__esModule",{value:!0}),y.en=void 0;var S=function(){function d(){}return d.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},d.prototype.atX0MinutesPastTheHourGt20=function(){return null},d.prototype.commaMonthX0ThroughMonthX1=function(){return null},d.prototype.commaYearX0ThroughYearX1=function(){return null},d.prototype.use24HourTimeFormatByDefault=function(){return!1},d.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},d.prototype.everyMinute=function(){return"every minute"},d.prototype.everyHour=function(){return"every hour"},d.prototype.atSpace=function(){return"At "},d.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},d.prototype.at=function(){return"At"},d.prototype.spaceAnd=function(){return" and"},d.prototype.everySecond=function(){return"every second"},d.prototype.everyX0Seconds=function(){return"every %s seconds"},d.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},d.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},d.prototype.everyX0Minutes=function(){return"every %s minutes"},d.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},d.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},d.prototype.everyX0Hours=function(){return"every %s hours"},d.prototype.betweenX0AndX1=function(){return"between %s and %s"},d.prototype.atX0=function(){return"at %s"},d.prototype.commaEveryDay=function(){return", every day"},d.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},d.prototype.commaX0ThroughX1=function(){return", %s through %s"},d.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},d.prototype.first=function(){return"first"},d.prototype.second=function(){return"second"},d.prototype.third=function(){return"third"},d.prototype.fourth=function(){return"fourth"},d.prototype.fifth=function(){return"fifth"},d.prototype.commaOnThe=function(){return", on the "},d.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},d.prototype.lastDay=function(){return"the last day"},d.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},d.prototype.commaOnlyOnX0=function(){return", only on %s"},d.prototype.commaAndOnX0=function(){return", and on %s"},d.prototype.commaEveryX0Months=function(){return", every %s months"},d.prototype.commaOnlyInX0=function(){return", only in %s"},d.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},d.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},d.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},d.prototype.firstWeekday=function(){return"first weekday"},d.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},d.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},d.prototype.commaEveryX0Days=function(){return", every %s days"},d.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},d.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},d.prototype.commaEveryHour=function(){return", every hour"},d.prototype.commaEveryX0Years=function(){return", every %s years"},d.prototype.commaStartingX0=function(){return", starting %s"},d.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},d.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},d}();y.en=S},586:(M,y)=>{Object.defineProperty(y,"__esModule",{value:!0});function S(n,g){if(!n)throw new Error(g)}var d=function(){function n(){}return n.secondRange=function(g){for(var s=g.split(","),i=0;i<s.length;i++)if(!isNaN(parseInt(s[i],10))){var p=parseInt(s[i],10);S(p>=0&&p<=59,"seconds part must be >= 0 and <= 59")}},n.minuteRange=function(g){for(var s=g.split(","),i=0;i<s.length;i++)if(!isNaN(parseInt(s[i],10))){var p=parseInt(s[i],10);S(p>=0&&p<=59,"minutes part must be >= 0 and <= 59")}},n.hourRange=function(g){for(var s=g.split(","),i=0;i<s.length;i++)if(!isNaN(parseInt(s[i],10))){var p=parseInt(s[i],10);S(p>=0&&p<=23,"hours part must be >= 0 and <= 23")}},n.dayOfMonthRange=function(g){for(var s=g.split(","),i=0;i<s.length;i++)if(!isNaN(parseInt(s[i],10))){var p=parseInt(s[i],10);S(p>=1&&p<=31,"DOM part must be >= 1 and <= 31")}},n.monthRange=function(g,s){for(var i=g.split(","),p=0;p<i.length;p++)if(!isNaN(parseInt(i[p],10))){var f=parseInt(i[p],10);S(f>=1&&f<=12,s?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},n.dayOfWeekRange=function(g,s){for(var i=g.split(","),p=0;p<i.length;p++)if(!isNaN(parseInt(i[p],10))){var f=parseInt(i[p],10);S(f>=0&&f<=6,s?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},n}();y.default=d},910:(M,y)=>{Object.defineProperty(y,"__esModule",{value:!0}),y.StringUtilities=void 0;var S=function(){function d(){}return d.format=function(n){for(var g=[],s=1;s<arguments.length;s++)g[s-1]=arguments[s];return n.replace(/%s/g,function(i){return g.shift()})},d.containsAny=function(n,g){return g.some(function(s){return n.indexOf(s)>-1})},d}();y.StringUtilities=S}},V={};function t(M){var y=V[M];if(y!==void 0)return y.exports;var S=V[M]={exports:{}};return h[M](S,S.exports,t),S.exports}var u={};return(()=>{var M=u;Object.defineProperty(M,"__esModule",{value:!0}),M.toString=void 0;var y=t(728),S=t(336);y.ExpressionDescriptor.initialize(new S.enLocaleLoader),M.default=y.ExpressionDescriptor;var d=y.ExpressionDescriptor.toString;M.toString=d})(),u})())}(ye)),ye.exports}var ot=rt();const it=Ue(ot),we=De.get("Settings"),st={name:"Settings",mixins:[Ee],components:{ColorScheme:ie(()=>ue(()=>import("./ColorScheme-RD00g_MN.js"),__vite__mapDeps([0,1,2]),import.meta.url)),DialogGatewayValue:ie(()=>ue(()=>import("./DialogGatewayValue-B6g9AkDd.js"),__vite__mapDeps([3,1,2,4]),import.meta.url)),fileInput:ie(()=>ue(()=>import("./file-input-Byh4-tbi.js"),__vite__mapDeps([5,1,2]),import.meta.url)),invertedCheckbox:ie(()=>ue(()=>import("./InvertedCheckbox-l9-OcxRF.js"),__vite__mapDeps([6,1,2]),import.meta.url))},props:{socket:{type:Object,required:!0}},computed:{internalColorScheme:{get(){return this.colorScheme},set(o){this.setColorScheme(o)}},internalNavTabs:{get(){return this.navTabs},set(o){this.setNavTabs(o)}},internalStreamerMode:{get(){return this.streamerMode},set(o){this.setStreamerMode(o)}},settingsChanged(){return!H(this.newMqtt,this.mqtt)||!H(this.newGateway,this.gateway)||!H(this.newZwave,this.zwave)||!H(this.newBackup,this.backup)||!H(this.newZniffer,this.zniffer)||!H(this.ui,this.prevUi)},filteredScales(){return this.newZwave.scales&&this.newZwave.scales.length>0?this.scales.filter(o=>!this.newZwave.scales.find(e=>e.key===o.key&&o.label!==e.label)):this.scales},visibleHeaders(){if(this.newMqtt.disabled){const o=[...this.headers];return o.splice(2,1),o}else return this.headers},secure(){if(!this.newMqtt.host)return!1;const o=le(this.newMqtt.host),e=["mqtts:","tls:"].indexOf(o.protocol)>=0;return e||(this.newMqtt.key=this.newMqtt._key=this.newMqtt.cert=this.newMqtt._cert=this.newMqtt.ca=this.newMqtt._ca=""),e},dialogTitle(){return this.editedIndex===-1?"New Item":"Edit Item"},requiredUser(){return this.newMqtt.auth&&!!this.newMqtt.username||"This field is required."},differentPorts(){return!this.newZwave.enabled||!this.newZniffer.enabled||this.newZwave.port!==this.newZniffer.port||"Zniffer and Z-Wave ports must be different."},validPayload(){return!this.newGateway.hassDiscovery||this.newGateway.payloadType!==2||"Hass discovery doesn't work with this payload type"},requiredPassword(){return this.newMqtt.auth&&!!this.newMqtt.password||"This field is required."},...be(se,["zwave","zniffer","mqtt","gateway","backup","devices","serial_ports","scales","ui"]),...be(se,{colorScheme:o=>o.ui.colorScheme,darkMode:o=>o.uiState.darkMode,navTabs:o=>o.ui.navTabs,streamerMode:o=>o.ui.streamerMode})},watch:{dialogValue(o){o||this.closeDialog()}},data(){return{rfRegions:Le,znifferRegions:qe,maxLRPowerLevels:Ke,valid_zwave:!0,dialogValue:!1,sslDisabled:!1,saving:!1,prevUi:null,newGateway:{},newMqtt:{},newZwave:{rf:{txPower:{}}},newZniffer:{},newBackup:{},editedValue:{},editedIndex:-1,defaultValue:{},logLevels:[{title:"Error",value:"error"},{title:"Warn",value:"warn"},{title:"Info",value:"info"},{title:"Verbose",value:"verbose"},{title:"Debug",value:"debug"},{title:"Silly",value:"silly"}],headers:[{title:"Device",key:"device"},{title:"Value",key:"value",sortable:!1},{title:"Topic",key:"topic"},{title:"Post Operation",key:"postOperation"},{title:"Poll",key:"enablePoll"},{title:"Actions",key:"actions",sortable:!1}],headersJobs:[{title:"Name",key:"name"},{title:"Enabled",key:"enabled"},{title:"On Init",key:"runOnInit"},{title:"Code",key:"code"},{title:"Cron",key:"cron"},{title:"Actions",key:"actions",sortable:!1}],e1:!0,gw_types:[{title:"ValueID topics",value:0},{title:"Named topics",value:1},{title:"Configured Manually",value:2}],py_types:[{title:"JSON Time-Value",value:0},{title:"Entire Z-Wave value Object",value:1},{title:"Just value",value:2}],rules:{required:o=>{let e=!1;return o instanceof Array?e=o.length>0:e=!!o||o===0,e||"This field is required."},positive:o=>o>0||"Value must be positive.",uniqueSensorType(o){return!o||o.length<2?!0:!o.some((e,h)=>o.findIndex((V,t)=>t>h&&e.key===V.key)>=0)||"Duplicated sensor type scale"},validNodeLog:o=>!o||o.every(e=>e>0&&e<4e3)||"Nodes must be between 1-4000",validName:o=>!/[!@#$%^&*)(+=:,;"'\\|?{}£°§<>[\]/.\s]/g.test(o)||'Name is not valid, only "a-z" "A-Z" "0-9" chars and "_" are allowed',validPrefix:o=>!/[!@#$%^&*)(+=:,;"'\\|?{}£°§<>[\].\s]/g.test(o)||'Prefix is not valid, only "a-z" "A-Z" "0-9", "_", "/" chars are allowed',validLength:o=>!o||o.length===32||"Key must be 32 characters length",validKey:o=>!o||!/[^A-F0-9]+/gi.test(o)||"Key not valid. Must contain only hex chars",validCron:o=>!o||!!this.parseCron(o)||"Not a valid cron string"}}},methods:{...Ae(se,["setColorScheme","setNavTabs","setStreamerMode","initSettings","init","showSnackbar"]),copyKeysZniffer(){this.newZniffer.securityKeys=z(this.newZwave.securityKeys),this.newZniffer.securityKeysLongRange=z(this.newZwave.securityKeysLongRange)},validTxPower(){var h;const{powerlevel:o,measured0dBm:e}=((h=this.newZwave.rf)==null?void 0:h.txPower)??{};if(typeof e=="number"&&(e<-10||e>10))return"Measured @ 0dBm must be between -10 and 10";if(!(Re(o)||o==="auto")&&(typeof o!="number"||o<-10||o>20))return"Powerlevel must be between -10 and 20"},parseCron(o){let e;try{e=it.toString(o,{use24HourTimeFormat:!0})}catch{}return e},differentKeys(o){return()=>{const e=Object.values(o);return e.length===new Set(e).size||"Keys must be different"}},fixKey(o,e,h){var t;let V=(t=o.clipboardData)==null?void 0:t.getData("Text");V&&(V=V.replace(/0x|,|\s/gi,""),h[e]=V.toUpperCase(),o.preventDefault())},openDocs(o){this.openUrl(`https://zwave-js.github.io/zwave-js-ui/#/usage/setup?id=${o}`)},openUrl(o){window.open(o,"_blank")},scaleName(o){return typeof o=="object"&&o?`${o.sensor}: ${o.label?" "+o.label+" ":""}${o.unit&&o.unit!==o.label?`(${o.unit})`:""}`:o},randomKey(o,e){let h="";for(;h.length<32;){const V=Math.round(Math.random()*255).toString(16).toUpperCase();h+=V.length===2?V:"0"+V}e[o]=h},readFile(o,e){const h=new FileReader;h.onload=V=>e(V.target.result),h.readAsText(o)},onFileSelect(o){const e=o.files[0];e?this.readFile(e,h=>this.newMqtt[o.key]=h):this.newMqtt[o.key]=""},async importSettings(){try{const{data:o}=await this.app.importFile("json");o.zwave&&o.mqtt&&o.gateway?(this.resetConfig(o),this.showSnackbar("Configuration imported successfully","success")):this.showSnackbar("Imported settings not valid","error")}catch{}},exportSettings(){const o=this.getSettingsJSON();this.app.exportConfiguration(o,"settings")},getSettingsJSON(){return{mqtt:this.newMqtt,gateway:this.newGateway,zwave:this.newZwave,backup:this.newBackup,zniffer:this.newZniffer,ui:this.ui}},async editJob(o){const{data:e}=await de.getSnippets(),h=await this.app.confirm(o?"Edit job":"New Job","","info",{width:900,inputs:[{type:"text",key:"name",label:"Name",default:o?o.name:"",rules:[this.rules.required]},{type:"boolean",key:"enabled",label:"Enabled",default:o?o.enabled:!0},{type:"boolean",key:"runOnInit",label:"Run on init",hint:"Run the job on gateway init",default:o?o.runOnInit:!1},{type:"text",key:"cron",label:"Cron string",default:o?o.cron:"0 0 * * *",hint:"Cron string. Default is '0 0 * * *' that means every day at midnight.",rules:[this.rules.validCron]},{type:"list",key:"snippet",label:"Snippets",default:"",items:e,itemText:"name",itemValue:"name",hint:"Select a snippet from library",onChange(V,t){var M;const u=t?(M=e.find(y=>y.name===t))==null?void 0:M.content:"";t&&(V.code=u)}},{type:"code",key:"code",label:"Code",default:o?o.code:"// Example:\n// const { logger, zwaveClient, require } = this\n// const node = driver.controller.nodes.get(35);\n// await node.refreshInfo();\n// logger.info(`Node ${node.id} is ready: ${node.ready}`);",rules:[this.rules.required],hint:`Write the function here. The only arg is:
<code>driver</code>. The function is <code>async</code>.`}],confirmText:o?"Edit":"Add"});h.code&&(delete h.snippet,o?Object.assign(o,h):this.newGateway.jobs.push(h))},async deleteJob(o){const e=this.newGateway.jobs.indexOf(o);e>=0&&await this.app.confirm("Attention","Are you sure you want to delete this item?","alert")&&this.newGateway.jobs.splice(e,1)},editItem(o){this.editedIndex=this.newGateway.values.indexOf(o),this.editedValue=Object.assign({},o),this.dialogValue=!0},async deleteItem(o){const e=this.newGateway.values.indexOf(o);await this.app.confirm("Attention","Are you sure you want to delete this item?","alert")&&this.newGateway.values.splice(e,1)},closeDialog(){this.dialogValue=!1,setTimeout(()=>{this.editedValue=Object.assign({},this.defaultValue),this.editedIndex=-1},300)},deviceName(o){const e=this.devices.find(h=>h.value===o);return e?e.name:o},saveValue(){this.editedIndex>-1?this.newGateway.values.splice(this.editedIndex,1,this.editedValue):this.newGateway.values.push(this.editedValue),this.closeDialog()},async update(){if(await Ie(200),(await this.$refs.form_settings.validate()).valid)try{this.saving=!0,se().resetNodes();const e=await de.updateConfig(this.getSettingsJSON());this.saving=!1,this.showSnackbar(e.message,e.success?"success":"error"),this.initSettings(e.data),this.resetConfig()}catch(e){we.error(e)}else this.showSnackbar("Your configuration contains errors, fix it","error")},resetConfig(o){const e={mqtt:this.mqtt,gateway:this.gateway,zwave:this.zwave,zniffer:this.zniffer,backup:this.backup,ui:this.ui,...o||{}};this.newGateway=z(e.gateway),this.newZwave=z(e.zwave),this.newZniffer=z(e.zniffer),this.newMqtt=z(e.mqtt),this.newBackup=z(e.backup),this.prevUi===null&&(this.prevUi=z(e.ui));const h=(o==null?void 0:o.ui)||this.prevUi;this.internalColorScheme=h.colorScheme,this.internalNavTabs=h.navTabs,this.internalStreamerMode=h.streamerMode},async getConfig(){try{const o=await de.getConfig();o.success?(this.init(o),this.sslDisabled=o.sslDisabled,this.resetConfig()):(this.showSnackbar("Error while retrieving configuration, check console","error"),we.error(o))}catch(o){this.showSnackbar(o.message,"error"),we.error(o)}}},beforeRouteLeave(o,e,h){this.settingsChanged?this.app.confirm("Attention","You have unsaved changes. Do you really want to leave?","alert").then(V=>{V&&h()}):h()},mounted(){this.$emit("updateStatus"),this.resetConfig(),this.getConfig()}},at=["modelValue"],ut=["modelValue"],dt=["modelValue"];function ft(o,e,h,V,t,u){const M=ae("color-scheme"),y=ae("inverted-checkbox"),S=ae("file-input"),d=ae("DialogGatewayValue");return Z(),k(Pe,{fluid:"","grid-list-md":"",class:"pt-8 px-0"},{default:r(()=>[l(Be,{id:"form_settings",onSubmit:P(u.update,["prevent"]),modelValue:t.valid_zwave,"onUpdate:modelValue":e[138]||(e[138]=n=>t.valid_zwave=n),ref:"form_settings",class:"pb-6 mx-2"},{default:r(()=>[l(Ve,{variant:"accordion",multiple:"",flat:"",class:"expansion-panels-outlined"},{default:r(()=>[l(G,{key:"UI"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>e[140]||(e[140]=[w(" UI ")])),_:1,__:[140]}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[0]||(e[0]=P(n=>u.openDocs("general"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[142]||(e[142]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[141]||(e[141]=[w("launch")])),_:1,__:[141]})]),_:1,__:[142]})]),_:1})]),_:1})]),_:1}),l(W,null,{default:r(()=>[l(D,{class:"mb-5"},{default:r(()=>[l(a,{cols:"12",sm:"6"},{default:r(()=>[l(M)]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable this to use Tabs in the top bar instead of a left menu for navigation (useful when integrated in Home Assistant)","persistent-hint":"",label:"Use tabs for navigation",modelValue:u.internalNavTabs,"onUpdate:modelValue":e[1]||(e[1]=n=>u.internalNavTabs=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable this to hide sensitive informations from the UI","persistent-hint":"",label:"Streamer mode",modelValue:u.internalStreamerMode,"onUpdate:modelValue":e[2]||(e[2]=n=>u.internalStreamerMode=n)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(j)]),_:1}),l(G,{key:"General"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>e[143]||(e[143]=[w(" General ")])),_:1,__:[143]}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[3]||(e[3]=P(n=>u.openDocs("general"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[145]||(e[145]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[144]||(e[144]=[w("launch")])),_:1,__:[144]})]),_:1,__:[145]})]),_:1})]),_:1})]),_:1}),l(W,null,{default:r(()=>[l(J,{flat:""},{default:r(()=>[l(Y,null,{default:r(()=>[l(D,{class:"mb-5"},{default:r(()=>[l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(_,{hint:"Enable this to password protect your application. Default username is `admin`, password is `zwave`","persistent-hint":"",label:"Auth",modelValue:t.newGateway.authEnabled,"onUpdate:modelValue":e[4]||(e[4]=n=>t.newGateway.authEnabled=n)},null,8,["modelValue"])]),_:1}),t.sslDisabled?x("",!0):(Z(),k(a,{key:0,cols:"12",sm:"6",md:"4"},{default:r(()=>[l(_,{hint:"Enable this to serve page using HTTPS. REQUIRES APP RELOAD","persistent-hint":"",label:"HTTPS",modelValue:t.newGateway.https,"onUpdate:modelValue":e[5]||(e[5]=n=>t.newGateway.https=n)},null,8,["modelValue"])]),_:1})),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(te,{hint:"You can select a plugin from the list or write the path to your custom plugin and press enter","persistent-hint":"",label:"Plugins",items:["@varet/zj2m-prom-exporter","@kvaster/zwavejs-prom"],multiple:"",chips:"","closable-chips":"",modelValue:t.newGateway.plugins,"onUpdate:modelValue":e[6]||(e[6]=n=>t.newGateway.plugins=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(_,{hint:"Enable logging","persistent-hint":"",label:"Log enabled",modelValue:t.newGateway.logEnabled,"onUpdate:modelValue":e[7]||(e[7]=n=>t.newGateway.logEnabled=n)},null,8,["modelValue"])]),_:1}),t.newGateway.logEnabled?(Z(),k(a,{key:1,cols:"12",sm:"6",md:"4"},{default:r(()=>[l(N,{items:t.logLevels,modelValue:t.newGateway.logLevel,"onUpdate:modelValue":e[8]||(e[8]=n=>t.newGateway.logLevel=n),label:"Log Level"},null,8,["items","modelValue"])]),_:1})):x("",!0),t.newGateway.logEnabled?(Z(),k(a,{key:2,cols:"12",sm:"6",md:"4"},{default:r(()=>[l(_,{hint:"Store logs in a file. Default: store/zwave-js-ui_%DATE%.log","persistent-hint":"",label:"Log to file",modelValue:t.newGateway.logToFile,"onUpdate:modelValue":e[9]||(e[9]=n=>t.newGateway.logToFile=n)},null,8,["modelValue"])]),_:1})):x("",!0),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(ne,{"persistent-hint":"",label:"Disable changelogs",hint:"Check this to disable changelogs dialogs on new versions",modelValue:t.newGateway.disableChangelog,"onUpdate:modelValue":e[10]||(e[10]=n=>t.newGateway.disableChangelog=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(ne,{"persistent-hint":"",label:"Notify new versions",hint:"Check this to show a notification when a new version is available",modelValue:t.newGateway.notifyNewVersions,"onUpdate:modelValue":e[11]||(e[11]=n=>t.newGateway.notifyNewVersions=n)},null,8,["modelValue"])]),_:1})]),_:1}),l(I,{class:"font-weight-bold"},{default:r(()=>e[146]||(e[146]=[w(" Devices values configuration ")])),_:1,__:[146]}),e[156]||(e[156]=O("div",{class:"mb-5 text-caption"}," Add here valueIds specific configurations for each device. This means that if you create an entry here this configuration will be applied to each valueId of each device of the same type in your Network. ",-1)),l(Se,{headers:u.visibleHeaders,items:t.newGateway.values,"items-per-page-options":[10,20,{title:"All",value:-1}],class:"elevation-1"},{top:r(()=>[l(A,{color:"primary",variant:"text",onClick:e[12]||(e[12]=n=>t.dialogValue=!0)},{default:r(()=>[l(K,null,{default:r(()=>e[147]||(e[147]=[w("add")])),_:1,__:[147]}),e[148]||(e[148]=w(" New Value "))]),_:1,__:[148]})]),"item.device":r(({item:n})=>[w(X(u.deviceName(n.device)),1)]),"item.value":r(({item:n})=>[w(X(n.value.label+" ("+n.value.id+")"),1)]),"item.topic":r(({item:n})=>[w(X(n.topic),1)]),"item.postOperation":r(({item:n})=>[w(X(n.postOperation||"No operation"),1)]),"item.enablePoll":r(({item:n})=>[w(X(n.enablePoll?"Interval: "+n.pollInterval+"s":"No"),1)]),"item.actions":r(({item:n})=>[l(K,{size:"small",class:"mr-2",color:"success",onClick:g=>u.editItem(n)},{default:r(()=>e[149]||(e[149]=[w(" edit ")])),_:2,__:[149]},1032,["onClick"]),l(K,{size:"small",color:"error",onClick:g=>u.deleteItem(n)},{default:r(()=>e[150]||(e[150]=[w(" delete ")])),_:2,__:[150]},1032,["onClick"])]),_:2},1032,["headers","items"]),l(I,{class:"font-weight-bold"},{default:r(()=>e[151]||(e[151]=[w(" Scheduled Jobs ")])),_:1,__:[151]}),e[157]||(e[157]=O("div",{class:"mb-5 text-caption"}," Add here a list of scheduled jobs that will run specified driver function based on a cron expression. ",-1)),l(Se,{headers:t.headersJobs,items:t.newGateway.jobs,"items-per-page-options":[10,20,{title:"All",value:-1}],class:"elevation-1"},{top:r(()=>[l(A,{color:"primary",variant:"text",onClick:e[13]||(e[13]=n=>u.editJob())},{default:r(()=>[l(K,null,{default:r(()=>e[152]||(e[152]=[w("add")])),_:1,__:[152]}),e[153]||(e[153]=w(" New Value "))]),_:1,__:[153]})]),"item.code":r(({item:n})=>[O("code",null,X(n.code.substring(0,30)),1)]),"item.enabled":r(({item:n})=>[l(K,{color:n.enabled?"success":"error"},{default:r(()=>[w(X(n.enabled?"check_circle":"cancel"),1)]),_:2},1032,["color"])]),"item.runOnInit":r(({item:n})=>[l(K,{color:n.runOnInit?"success":"error"},{default:r(()=>[w(X(n.runOnInit?"check_circle":"cancel"),1)]),_:2},1032,["color"])]),"item.actions":r(({item:n})=>[l(K,{size:"small",class:"mr-2",color:"warning",onClick:g=>u.editJob(n)},{default:r(()=>e[154]||(e[154]=[w(" edit ")])),_:2,__:[154]},1032,["onClick"]),l(K,{size:"small",color:"error",onClick:g=>u.deleteJob(n)},{default:r(()=>e[155]||(e[155]=[w(" delete ")])),_:2,__:[155]},1032,["onClick"])]),_:2},1032,["headers","items"])]),_:1,__:[156,157]})]),_:1})]),_:1}),l(j)]),_:1}),l(G,{key:"Backup"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>e[158]||(e[158]=[w(" Backup ")])),_:1,__:[158]}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[14]||(e[14]=P(n=>u.openDocs("backup"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[160]||(e[160]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[159]||(e[159]=[w("launch")])),_:1,__:[159]})]),_:1,__:[160]})]),_:1})]),_:1})]),_:1}),l(W,null,{default:r(()=>[l(I,null,{default:r(()=>e[161]||(e[161]=[O("strong",null,"STORE",-1)])),_:1,__:[161]}),l(D,{class:"mb-5"},{default:r(()=>[l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable/Disable backup","persistent-hint":"",label:"Backup",modelValue:t.newBackup.storeBackup,"onUpdate:modelValue":e[15]||(e[15]=n=>t.newBackup.storeBackup=n)},null,8,["modelValue"])]),_:1}),t.newBackup.storeBackup?(Z(),k(a,{key:0,cols:"12",sm:"6"},{default:r(()=>[l(U,{hint:"Cron string. Default is '0 0 * * *' that means every day at midnight. Press on help button for cron helper editor","persistent-hint":"","append-icon":"help","onClick:append":e[16]||(e[16]=n=>u.openUrl("https://crontab.guru/#"+t.newBackup.storeCron.split(" ").join("_"))),label:"Cron",rules:[t.rules.required,t.rules.validCron],modelValue:t.newBackup.storeCron,"onUpdate:modelValue":e[17]||(e[17]=n=>t.newBackup.storeCron=n)},null,8,["rules","modelValue"]),O("strong",null,X(u.parseCron(t.newBackup.storeCron)||""),1)]),_:1})):x("",!0),t.newBackup.storeBackup?(Z(),k(a,{key:1,cols:"12",sm:"6"},{default:r(()=>[l(U,{hint:"How many backups to keep","persistent-hint":"",rules:[t.rules.required,t.rules.positive],label:"Max backup files",modelValue:t.newBackup.storeKeep,"onUpdate:modelValue":e[18]||(e[18]=n=>t.newBackup.storeKeep=n),modelModifiers:{number:!0}},null,8,["rules","modelValue"])]),_:1})):x("",!0)]),_:1}),l(j),l(I,null,{default:r(()=>e[162]||(e[162]=[O("strong",null,"Controller (NVM) Backup",-1)])),_:1,__:[162]}),l(Xe,{density:"compact",text:"",type:"warning"},{default:r(()=>e[163]||(e[163]=[w(" Some 700 series controllers may stop functioning properly after an NVM backup. Z-Wave JS will try to restart (soft reset) the controller afterwards to restore normal operation. If that does not work, the controller will have to be re-plugged manually. ")])),_:1,__:[163]}),l(D,{class:"mb-5"},{default:r(()=>[l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable/Disable backup before node add/remove/replace operations.","persistent-hint":"",label:"Backup on event",modelValue:t.newBackup.nvmBackupOnEvent,"onUpdate:modelValue":e[19]||(e[19]=n=>t.newBackup.nvmBackupOnEvent=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable/Disable backup","persistent-hint":"",label:"Backup",modelValue:t.newBackup.nvmBackup,"onUpdate:modelValue":e[20]||(e[20]=n=>t.newBackup.nvmBackup=n)},null,8,["modelValue"])]),_:1}),t.newBackup.nvmBackup?(Z(),k(a,{key:0,cols:"12",sm:"6"},{default:r(()=>[l(U,{hint:"Cron string. Default is '0 0 * * *' that means every day at midnight. Press on help button for cron helper editor","persistent-hint":"","append-icon":"help","onClick:append":e[21]||(e[21]=n=>u.openUrl("https://crontab.guru/#"+t.newBackup.nvmCron.split(" ").join("_"))),label:"Cron",rules:[t.rules.required,t.rules.validCron],modelValue:t.newBackup.nvmCron,"onUpdate:modelValue":e[22]||(e[22]=n=>t.newBackup.nvmCron=n)},null,8,["rules","modelValue"]),O("strong",null,X(u.parseCron(t.newBackup.nvmCron)||""),1)]),_:1})):x("",!0),t.newBackup.nvmBackup?(Z(),k(a,{key:1,cols:"12",sm:"6"},{default:r(()=>[l(U,{hint:"How many backups to keep","persistent-hint":"",rules:[t.rules.required,t.rules.positive],label:"Max backup files",modelValue:t.newBackup.nvmKeep,"onUpdate:modelValue":e[23]||(e[23]=n=>t.newBackup.nvmKeep=n),modelModifiers:{number:!0}},null,8,["rules","modelValue"])]),_:1})):x("",!0)]),_:1})]),_:1}),l(j)]),_:1}),l(G,{key:"Zwave"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>[l(D,{"align-self":"center"},{default:r(()=>[e[164]||(e[164]=O("span",{class:"my-auto ml-3"}," Z-Wave ",-1)),l(ne,{class:"mt-0 ml-2","hide-details":"",onClick:e[24]||(e[24]=P(()=>{},["stop"])),label:"Enabled",modelValue:t.newZwave.enabled,"onUpdate:modelValue":e[25]||(e[25]=n=>t.newZwave.enabled=n)},null,8,["modelValue"])]),_:1,__:[164]})]),_:1}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[26]||(e[26]=P(n=>u.openDocs("zwave"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[166]||(e[166]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[165]||(e[165]=[w("launch")])),_:1,__:[165]})]),_:1,__:[166]})]),_:1})]),_:1})]),_:1}),t.newZwave.enabled?(Z(),k(W,{key:0},{default:r(()=>[l(J,{flat:""},{default:r(()=>[l(Y,null,{default:r(()=>[l(D,null,{default:r(()=>[l(a,{cols:"12",sm:"6"},{default:r(()=>[l(te,{modelValue:t.newZwave.port,"onUpdate:modelValue":e[27]||(e[27]=n=>t.newZwave.port=n),label:"Serial Port",hint:"Ex /dev/ttyUSB0. If your port is not listed here just write the port path here","persistent-hint":"",rules:[t.rules.required,u.differentPorts],required:"",items:o.serial_ports},null,8,["modelValue","rules","items"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.deviceConfigPriorityDir,"onUpdate:modelValue":e[28]||(e[28]=n=>t.newZwave.deviceConfigPriorityDir=n),modelModifiers:{trim:!0},label:"Config priority directory",hint:"Directory from where device configuration files can be loaded with higher priority than the included ones. This directory does not get indexed and should be used sparingly, e.g. when custom files are absolutely necessary or for testing",required:""},null,8,["modelValue"])]),_:1}),t.newZwave.securityKeys?(Z(),k(D,{key:0,class:"mt-0"},{default:r(()=>[l(a,{cols:"12"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary"},{default:r(()=>e[167]||(e[167]=[w(" Security Keys ")])),_:1,__:[167]})]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.securityKeys.S2_Unauthenticated,"onUpdate:modelValue":e[29]||(e[29]=n=>t.newZwave.securityKeys.S2_Unauthenticated=n),label:"S2 Unauthenticated","prepend-icon":"vpn_key",onPaste:e[30]||(e[30]=n=>u.fixKey(n,"S2_Unauthenticated",t.newZwave.securityKeys)),rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZwave.securityKeys)],"persistent-hint":"","append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[31]||(e[31]=n=>u.randomKey("S2_Unauthenticated",t.newZwave.securityKeys))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.securityKeys.S2_Authenticated,"onUpdate:modelValue":e[32]||(e[32]=n=>t.newZwave.securityKeys.S2_Authenticated=n),onPaste:e[33]||(e[33]=n=>u.fixKey(n,"S2_Authenticated",t.newZwave.securityKeys)),"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZwave.securityKeys)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[34]||(e[34]=n=>u.randomKey("S2_Authenticated",t.newZwave.securityKeys))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.securityKeys.S2_AccessControl,"onUpdate:modelValue":e[35]||(e[35]=n=>t.newZwave.securityKeys.S2_AccessControl=n),onPaste:e[36]||(e[36]=n=>u.fixKey(n,"S2_AccessControl",t.newZwave.securityKeys)),"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZwave.securityKeys)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[37]||(e[37]=n=>u.randomKey("S2_AccessControl",t.newZwave.securityKeys))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.securityKeys.S0_Legacy,"onUpdate:modelValue":e[38]||(e[38]=n=>t.newZwave.securityKeys.S0_Legacy=n),onPaste:e[39]||(e[39]=n=>u.fixKey(n,"S0_Legacy")),"prepend-icon":"vpn_key",label:"S0 Legacy",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZwave.securityKeys)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[40]||(e[40]=n=>u.randomKey("S0_Legacy",t.newZwave.securityKeys))},null,8,["modelValue","rules","type"])]),_:1})]),_:1})):x("",!0),t.newZwave.securityKeysLongRange?(Z(),k(D,{key:1,class:"mt-0"},{default:r(()=>[l(a,{cols:"12"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary"},{default:r(()=>e[168]||(e[168]=[w(" Security Keys (Long Range) ")])),_:1,__:[168]})]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.securityKeysLongRange.S2_Authenticated,"onUpdate:modelValue":e[41]||(e[41]=n=>t.newZwave.securityKeysLongRange.S2_Authenticated=n),onPaste:e[42]||(e[42]=n=>u.fixKey(n,"S2_Authenticated",t.newZwave.securityKeysLongRange)),"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZwave.securityKeysLongRange)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[43]||(e[43]=n=>u.randomKey("S2_Authenticated",t.newZwave.securityKeysLongRange))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.securityKeysLongRange.S2_AccessControl,"onUpdate:modelValue":e[44]||(e[44]=n=>t.newZwave.securityKeysLongRange.S2_AccessControl=n),onPaste:e[45]||(e[45]=n=>u.fixKey(n,"S2_AccessControl",t.newZwave.securityKeysLongRange)),"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZwave.securityKeysLongRange)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[46]||(e[46]=n=>u.randomKey("S2_AccessControl",t.newZwave.securityKeysLongRange))},null,8,["modelValue","rules","type"])]),_:1})]),_:1})):x("",!0),l(D,{class:"mt-0"},{default:r(()=>[l(a,{cols:"12",class:"mb-n8"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary mb-0"},{default:r(()=>e[169]||(e[169]=[w(" Default Radio configuration ")])),_:1,__:[169]})]),_:1}),l(a,{cols:"6"},{default:r(()=>[l(N,{label:"RF Region","persistent-hint":"",hint:"Will be used to automatically configure your controller for the region you are in. Not all controllers support changing the RF region.",items:t.rfRegions,rules:[t.rules.required],required:"",modelValue:t.newZwave.rf.region,"onUpdate:modelValue":e[47]||(e[47]=n=>t.newZwave.rf.region=n)},null,8,["items","rules","modelValue"])]),_:1}),l(a,{cols:"6"},{default:r(()=>[l(_,{hint:"When enabled, both normal and LR power levels will be automatically set to legal limits based on the RF region whenever the region is changed. Only supported for Europe and USA regions.","persistent-hint":"",label:"Automatic Power Level",modelValue:t.newZwave.rf.autoPowerlevels,"onUpdate:modelValue":e[48]||(e[48]=n=>t.newZwave.rf.autoPowerlevels=n)},null,8,["modelValue"])]),_:1})]),_:1}),l(D,{class:"mt-0"},{default:r(()=>[l(a,{cols:"12",sm:"6"},{default:r(()=>[t.newZwave.rf.autoPowerlevels?x("",!0):(Z(),k(U,{key:0,label:"Normal Power Level",modelValue:t.newZwave.rf.txPower.powerlevel,"onUpdate:modelValue":e[49]||(e[49]=n=>t.newZwave.rf.txPower.powerlevel=n),modelModifiers:{number:!0},"persistent-hint":"",min:-10,max:20,step:.1,hint:"Power level in dBm. Min -10, Max +14 or +20, depending on the Z-Wave chip. Will be applied on every startup if the current setting of your Z-Wave controller differs. Not all controllers support changing the powerlevel.",suffix:"dBm",type:"number",rules:[u.validTxPower]},null,8,["modelValue","rules"]))]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{label:"Measured output power at 0 dBm","persistent-hint":"",modelValue:t.newZwave.rf.txPower.measured0dBm,"onUpdate:modelValue":e[50]||(e[50]=n=>t.newZwave.rf.txPower.measured0dBm=n),modelModifiers:{number:!0},min:-10,max:10,step:.1,hint:"Measured output power at 0 dBm in dBm. Min -10, Max +10. Will be applied on every startup if the current setting of your Z-Wave controller differs. Not all controllers support changing the powerlevel.",suffix:"dBm",type:"number",rules:[u.validTxPower]},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[t.newZwave.rf.autoPowerlevels?x("",!0):(Z(),k(N,{key:0,label:"Maximum LR Power Level","persistent-hint":"",hint:"The maximum power level to be used by the dynamic power algorithm of Z-Wave LR. Will be applied on every startup if the current setting of your Z-Wave controller differs. Only LR-capable controllers support this setting.",items:t.maxLRPowerLevels,clearable:"",modelValue:t.newZwave.rf.maxLongRangePowerlevel,"onUpdate:modelValue":e[51]||(e[51]=n=>t.newZwave.rf.maxLongRangePowerlevel=n)},null,8,["items","modelValue"]))]),_:1})]),_:1}),l(D,{class:"mt-0"},{default:r(()=>[l(a,{cols:"12",class:"mb-n8"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary mb-0"},{default:r(()=>e[170]||(e[170]=[w(" Driver logs ")])),_:1,__:[170]})]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Required for debugging issue reports","persistent-hint":"",label:"Enable driver logs",modelValue:t.newZwave.logEnabled,"onUpdate:modelValue":e[52]||(e[52]=n=>t.newZwave.logEnabled=n)},null,8,["modelValue"])]),_:1}),t.newZwave.logEnabled?(Z(),k(a,{key:0,cols:"12",sm:"6"},{default:r(()=>[l(N,{items:t.logLevels,modelValue:t.newZwave.logLevel,"onUpdate:modelValue":e[53]||(e[53]=n=>t.newZwave.logLevel=n),label:"Log Level"},null,8,["items","modelValue"])]),_:1})):x("",!0),t.newZwave.logEnabled?(Z(),k(a,{key:1,cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Store zwave logs in a file (stored in store folder)","persistent-hint":"",label:"Log to file",modelValue:t.newZwave.logToFile,"onUpdate:modelValue":e[54]||(e[54]=n=>t.newZwave.logToFile=n)},null,8,["modelValue"])]),_:1})):x("",!0),t.newZwave.logEnabled?(Z(),k(a,{key:2,cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.maxFiles,"onUpdate:modelValue":e[55]||(e[55]=n=>t.newZwave.maxFiles=n),modelModifiers:{number:!0},label:"Max files",rules:[t.rules.required],required:"","persistent-hint":"",hint:"Maximum number of log files to keep",type:"number"},null,8,["modelValue","rules"])]),_:1})):x("",!0),t.newZwave.logEnabled?(Z(),k(a,{key:3,cols:"12",sm:"6"},{default:r(()=>[l(te,{hint:"Choose which nodes to log. Leave this empty to log all nodes","persistent-hint":"",label:"Log nodes",items:t.newZwave.nodeFilter||[],multiple:"",rules:[t.rules.validNodeLog],chips:"","closable-chips":"",modelValue:t.newZwave.nodeFilter,"onUpdate:modelValue":e[56]||(e[56]=n=>t.newZwave.nodeFilter=n)},null,8,["items","rules","modelValue"])]),_:1})):x("",!0)]),_:1}),l(D,{class:"mt-0"},{default:r(()=>[l(a,{cols:"12",class:"mb-n8"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary mb-0"},{default:r(()=>e[171]||(e[171]=[w(" Startup and recovery behavior ")])),_:1,__:[171]})]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{label:"Soft Reset",hint:"Soft Reset is required after some commands like changing the RF region or restoring an NVM backup. Because it may cause problems in Docker containers with certain Z-Wave sticks, this functionality may be disabled. NB: Disabling this functionality only affects 500 series and older controllers","persistent-hint":"",modelValue:t.newZwave.enableSoftReset,"onUpdate:modelValue":e[57]||(e[57]=n=>t.newZwave.enableSoftReset=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable this to start driver in bootloader only mode, useful to recover sticks when an FW upgrade fails. When this is enabled stick will NOT be able to communicate with the network.","persistent-hint":"",label:"Bootloader only",modelValue:t.newZwave.allowBootloaderOnly,"onUpdate:modelValue":e[58]||(e[58]=n=>t.newZwave.allowBootloaderOnly=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(y,{hint:"When disabled, commands will simply fail when the controller is unresponsive and nodes may get randomly marked as dead until the controller recovers on its own.","persistent-hint":"",label:"Controller recovery",modelValue:t.newZwave.disableControllerRecovery,"onUpdate:modelValue":e[59]||(e[59]=n=>t.newZwave.disableControllerRecovery=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(y,{"persistent-hint":"",label:"Watchdog",hint:"Controllers of the 700 series and newer have a hardware watchdog that can be enabled to automatically reset the chip in case it becomes unresponsive. This option controls whether the watchdog should be enabled",modelValue:t.newZwave.disableWatchdog,"onUpdate:modelValue":e[60]||(e[60]=n=>t.newZwave.disableWatchdog=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.responseTimeout,"onUpdate:modelValue":e[61]||(e[61]=n=>t.newZwave.responseTimeout=n),modelModifiers:{number:!0},label:"Response timeout",required:"","persistent-hint":"",suffix:"ms",hint:"How long to wait for a controller response. Leave blank to use default (10000ms)",type:"number"},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(ne,{hint:"This can help with the inclusion or interview of some devices, but can also slow down communication a lot.","persistent-hint":"",label:"Increase node report timeout",modelValue:t.newZwave.higherReportsTimeout,"onUpdate:modelValue":e[62]||(e[62]=n=>t.newZwave.higherReportsTimeout=n)},null,8,["modelValue"])]),_:1})]),_:1}),l(D,{class:"mt-0"},{default:r(()=>[l(a,{cols:"12",class:"mb-n8"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary mb-0"},{default:r(()=>e[172]||(e[172]=[w(" Misc settings ")])),_:1,__:[172]})]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Some SET-type commands optimistically update the current value to match the target value when the device acknowledges the command. While this generally makes UIs feel more responsive, it is not necessary for devices which report their status on their own and can lead to confusing behavior when dealing with slow devices like blinds.","persistent-hint":"",label:"Disable optimistic value updates",modelValue:t.newZwave.disableOptimisticValueUpdate,"onUpdate:modelValue":e[63]||(e[63]=n=>t.newZwave.disableOptimisticValueUpdate=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Usage statistics allows us to gain insight how `zwave-js` is used, which manufacturers and devices are most prevalent and where to best focus our efforts in order to improve `zwave-js` the most. We do not store any personal information. Details can be found under https://zwave-js.github.io/node-zwave-js/#/data-collection/data-collection?id=usage-statistics","persistent-hint":"",label:"Enable statistics",modelValue:t.newZwave.enableStatistics,"onUpdate:modelValue":e[64]||(e[64]=n=>t.newZwave.enableStatistics=n)},null,8,["modelValue"])]),_:1}),O("input",{type:"hidden",modelValue:t.newZwave.disclaimerVersion},null,8,at),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(Ne,{hint:"Select preferred sensors scales. You can select a scale For more info check https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json","persistent-hint":"",label:"Preferred scales",items:u.filteredScales,multiple:"","item-title":u.scaleName,rules:[t.rules.uniqueSensorType],chips:"","return-object":"","closable-chips":"",modelValue:t.newZwave.scales,"onUpdate:modelValue":e[65]||(e[65]=n=>t.newZwave.scales=n)},{item:r(({item:n,props:g})=>[l(ze,Ge(g,{title:u.scaleName(n.raw),subtitle:n.raw.description||""}),null,16,["title","subtitle"])]),_:1},8,["items","item-title","rules","modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.commandsTimeout,"onUpdate:modelValue":e[66]||(e[66]=n=>t.newZwave.commandsTimeout=n),modelModifiers:{number:!0},label:"Inclusion/Exclusion timeout",rules:[t.rules.required],required:"",suffix:"seconds",hint:"Seconds to wait before to stop inclusion/exclusion mode",type:"number"},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.sendToSleepTimeout,"onUpdate:modelValue":e[67]||(e[67]=n=>t.newZwave.sendToSleepTimeout=n),modelModifiers:{number:!0},label:"Send to sleep timeout",required:"","persistent-hint":"",suffix:"ms",hint:"How long to wait without pending commands before sending a node back to sleep. Leave blank to use default (250ms)",type:"number"},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.maxNodeEventsQueueSize,"onUpdate:modelValue":e[68]||(e[68]=n=>t.newZwave.maxNodeEventsQueueSize=n),modelModifiers:{number:!0},label:"Node events queue size",rules:[t.rules.required],required:"",hint:"Each node stores a queue of events. This is the maximum size of the queue",type:"number"},null,8,["modelValue","rules"])]),_:1})]),_:1}),O("input",{type:"hidden",modelValue:t.newZwave.options},null,8,ut)]),_:1})]),_:1})]),_:1})]),_:1})):x("",!0),l(j)]),_:1}),l(G,{key:"Zniffer"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>[l(D,{"align-self":"center"},{default:r(()=>[e[173]||(e[173]=O("span",{class:"my-auto ml-3"}," Zniffer ",-1)),l(ne,{class:"mt-0 ml-2","hide-details":"",label:"Enabled",onClick:e[69]||(e[69]=P(()=>{},["stop"])),modelValue:t.newZniffer.enabled,"onUpdate:modelValue":e[70]||(e[70]=n=>t.newZniffer.enabled=n)},null,8,["modelValue"])]),_:1,__:[173]})]),_:1}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[71]||(e[71]=P(n=>u.openDocs("zniffer"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[175]||(e[175]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[174]||(e[174]=[w("launch")])),_:1,__:[174]})]),_:1,__:[175]})]),_:1})]),_:1})]),_:1}),t.newZniffer.enabled?(Z(),k(W,{key:0},{default:r(()=>[l(J,{flat:""},{default:r(()=>[l(Y,null,{default:r(()=>[l(D,null,{default:r(()=>[l(a,{cols:"12",sm:"6"},{default:r(()=>[l(te,{modelValue:t.newZniffer.port,"onUpdate:modelValue":e[72]||(e[72]=n=>t.newZniffer.port=n),label:"Serial Port",hint:"Ex /dev/ttyUSB0. If your port is not listed here just write the port path here","persistent-hint":"",rules:[t.rules.required,u.differentPorts],required:"",items:o.serial_ports},null,8,["modelValue","rules","items"])]),_:1}),t.newZniffer.securityKeys?(Z(),k(D,{key:0,class:"mt-0"},{default:r(()=>[l(a,{cols:"12"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary"},{default:r(()=>[e[177]||(e[177]=w(" Security Keys ")),l(A,{class:"ml-2",size:"small",variant:"outlined",color:"warning",onClick:e[73]||(e[73]=n=>u.copyKeysZniffer())},{default:r(()=>e[176]||(e[176]=[w(" Copy from Driver ")])),_:1,__:[176]})]),_:1,__:[177]})]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZniffer.securityKeys.S2_Unauthenticated,"onUpdate:modelValue":e[74]||(e[74]=n=>t.newZniffer.securityKeys.S2_Unauthenticated=n),label:"S2 Unauthenticated","prepend-icon":"vpn_key",onPaste:e[75]||(e[75]=n=>u.fixKey(n,"S2_Unauthenticated",t.newZniffer.securityKeys)),rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZniffer.securityKeys)],"persistent-hint":"","append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[76]||(e[76]=n=>u.randomKey("S2_Unauthenticated",t.newZniffer.securityKeys))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZniffer.securityKeys.S2_Authenticated,"onUpdate:modelValue":e[77]||(e[77]=n=>t.newZniffer.securityKeys.S2_Authenticated=n),onPaste:e[78]||(e[78]=n=>u.fixKey(n,"S2_Authenticated",t.newZniffer.securityKeys)),"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZniffer.securityKeys)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[79]||(e[79]=n=>u.randomKey("S2_Authenticated",t.newZniffer.securityKeys))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZniffer.securityKeys.S2_AccessControl,"onUpdate:modelValue":e[80]||(e[80]=n=>t.newZniffer.securityKeys.S2_AccessControl=n),onPaste:e[81]||(e[81]=n=>u.fixKey(n,"S2_AccessControl",t.newZniffer.securityKeys)),"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZniffer.securityKeys)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[82]||(e[82]=n=>u.randomKey("S2_AccessControl",t.newZniffer.securityKeys))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZniffer.securityKeys.S0_Legacy,"onUpdate:modelValue":e[83]||(e[83]=n=>t.newZniffer.securityKeys.S0_Legacy=n),onPaste:e[84]||(e[84]=n=>u.fixKey(n,"S0_Legacy")),"prepend-icon":"vpn_key",label:"S0 Legacy",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZniffer.securityKeys)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[85]||(e[85]=n=>u.randomKey("S0_Legacy",t.newZniffer.securityKeys))},null,8,["modelValue","rules","type"])]),_:1})]),_:1})):x("",!0),t.newZniffer.securityKeysLongRange?(Z(),k(D,{key:1,class:"mt-0"},{default:r(()=>[l(a,{cols:"12"},{default:r(()=>[l(I,{class:"font-weight-bold text-primary"},{default:r(()=>e[178]||(e[178]=[w(" Security Keys (Long Range) ")])),_:1,__:[178]})]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZniffer.securityKeysLongRange.S2_Authenticated,"onUpdate:modelValue":e[86]||(e[86]=n=>t.newZniffer.securityKeysLongRange.S2_Authenticated=n),onPaste:e[87]||(e[87]=n=>u.fixKey(n,"S2_Authenticated",t.newZniffer.securityKeysLongRange)),"prepend-icon":"vpn_key",label:"S2 Authenticated","persistent-hint":"",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZniffer.securityKeysLongRange)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[88]||(e[88]=n=>u.randomKey("S2_Authenticated",t.newZniffer.securityKeysLongRange))},null,8,["modelValue","rules","type"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZniffer.securityKeysLongRange.S2_AccessControl,"onUpdate:modelValue":e[89]||(e[89]=n=>t.newZniffer.securityKeysLongRange.S2_AccessControl=n),onPaste:e[90]||(e[90]=n=>u.fixKey(n,"S2_AccessControl",t.newZniffer.securityKeysLongRange)),"prepend-icon":"vpn_key",label:"S2 Access Control",rules:[t.rules.validKey,t.rules.validLength,u.differentKeys(t.newZniffer.securityKeysLongRange)],"append-icon":"wifi_protected_setup",type:o.streamerMode?"password":"text","onClick:append":e[91]||(e[91]=n=>u.randomKey("S2_AccessControl",t.newZniffer.securityKeysLongRange))},null,8,["modelValue","rules","type"])]),_:1})]),_:1})):x("",!0),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"The RSSI values reported by the Zniffer are not actual RSSI values. They can be converted to dBm, but the conversion is chip dependent and not documented for 700/800 series Zniffers. Set this option to `true` enable the conversion. Otherwise the raw values from the Zniffer will be used.","persistent-hint":"",label:"Convert RSSI",modelValue:t.newZniffer.convertRSSI,"onUpdate:modelValue":e[92]||(e[92]=n=>t.newZniffer.convertRSSI=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(N,{label:"Default frequency","persistent-hint":"",hint:"The frequency to initialize the Zniffer with. If not specified, the current setting will be kept.",items:t.znifferRegions,clearable:"",modelValue:t.newZniffer.defaultFrequency,"onUpdate:modelValue":e[93]||(e[93]=n=>t.newZniffer.defaultFrequency=n)},null,8,["items","modelValue"])]),_:1}),l(a,{cols:"12"}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable zniffer logging","persistent-hint":"",label:"Log Enabled",modelValue:t.newZniffer.logEnabled,"onUpdate:modelValue":e[94]||(e[94]=n=>t.newZniffer.logEnabled=n)},null,8,["modelValue"])]),_:1}),t.newZniffer.logEnabled?(Z(),k(a,{key:2,cols:"12",sm:"6"},{default:r(()=>[l(N,{items:t.logLevels,modelValue:t.newZniffer.logLevel,"onUpdate:modelValue":e[95]||(e[95]=n=>t.newZniffer.logLevel=n),label:"Log Level"},null,8,["items","modelValue"])]),_:1})):x("",!0),t.newZniffer.logEnabled?(Z(),k(a,{key:3,cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Store zniffer logs in a file (stored in store folder)","persistent-hint":"",label:"Log to file",modelValue:t.newZniffer.logToFile,"onUpdate:modelValue":e[96]||(e[96]=n=>t.newZniffer.logToFile=n)},null,8,["modelValue"])]),_:1})):x("",!0),t.newZniffer.logEnabled?(Z(),k(a,{key:4,cols:"12",sm:"6"},{default:r(()=>[l(U,{modelValue:t.newZniffer.maxFiles,"onUpdate:modelValue":e[97]||(e[97]=n=>t.newZniffer.maxFiles=n),modelModifiers:{number:!0},label:"Max files",rules:[t.rules.required],required:"","persistent-hint":"",hint:"Maximum number of log files to keep",type:"number"},null,8,["modelValue","rules"])]),_:1})):x("",!0),t.newZniffer.logEnabled?(Z(),k(a,{key:5,cols:"12",sm:"6"},{default:r(()=>[l(te,{hint:"Choose which nodes to log. Leave this empty to log all nodes","persistent-hint":"",label:"Log nodes",items:t.newZniffer.nodeFilter||[],multiple:"",rules:[t.rules.validNodeLog],chips:"","closable-chips":"",modelValue:t.newZniffer.nodeFilter,"onUpdate:modelValue":e[98]||(e[98]=n=>t.newZniffer.nodeFilter=n)},null,8,["items","rules","modelValue"])]),_:1})):x("",!0)]),_:1})]),_:1})]),_:1})]),_:1})):x("",!0)]),_:1})]),_:1}),l(a,{cols:"12",sm:"6",class:"ml-1"},{default:r(()=>[l(y,{"persistent-hint":"",label:"MQTT Gateway",hint:"Enable MQTT gateway",modelValue:t.newMqtt.disabled,"onUpdate:modelValue":e[99]||(e[99]=n=>t.newMqtt.disabled=n)},null,8,["modelValue"])]),_:1}),l(Ve,{variant:"accordion",multiple:"",flat:"",class:"expansion-panels-outlined"},{default:r(()=>[t.newMqtt.disabled?x("",!0):(Z(),k(G,{key:"mqtt"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>e[179]||(e[179]=[w(" MQTT ")])),_:1,__:[179]}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[100]||(e[100]=P(n=>u.openDocs("mqtt"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[181]||(e[181]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[180]||(e[180]=[w("launch")])),_:1,__:[180]})]),_:1,__:[181]})]),_:1})]),_:1})]),_:1}),l(W,null,{default:r(()=>[l(J,{flat:""},{default:r(()=>[l(Y,null,{default:r(()=>[l(D,null,{default:r(()=>[l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(U,{modelValue:t.newMqtt.name,"onUpdate:modelValue":e[101]||(e[101]=n=>t.newMqtt.name=n),modelModifiers:{trim:!0},label:"Name",rules:[t.rules.required,t.rules.validName],hint:"Unique name that identify this gateway",required:""},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(U,{modelValue:t.newMqtt.host,"onUpdate:modelValue":e[102]||(e[102]=n=>t.newMqtt.host=n),modelModifiers:{trim:!0},label:"Host url",rules:[t.rules.required],hint:"The host url",required:""},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(U,{modelValue:t.newMqtt.port,"onUpdate:modelValue":e[103]||(e[103]=n=>t.newMqtt.port=n),modelModifiers:{number:!0},label:"Port",rules:[t.rules.required],hint:"Host Port",required:"",type:"number"},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(U,{modelValue:t.newMqtt.reconnectPeriod,"onUpdate:modelValue":e[104]||(e[104]=n=>t.newMqtt.reconnectPeriod=n),modelModifiers:{number:!0},label:"Reconnect period (ms)",hint:"Reconnection period",rules:[t.rules.required],required:"",type:"number"},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(U,{modelValue:t.newMqtt.prefix,"onUpdate:modelValue":e[105]||(e[105]=n=>t.newMqtt.prefix=n),modelModifiers:{trim:!0},label:"Prefix",rules:[t.rules.required,t.rules.validPrefix],hint:"The prefix to add to each topic",required:""},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6",md:"4"},{default:r(()=>[l(N,{modelValue:t.newMqtt.qos,"onUpdate:modelValue":e[106]||(e[106]=n=>t.newMqtt.qos=n),label:"QoS",rules:[t.rules.required],required:"",items:[0,1,2]},null,8,["modelValue","rules"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Set retain flag to true for outgoing messages","persistent-hint":"",label:"Retain",modelValue:t.newMqtt.retain,"onUpdate:modelValue":e[107]||(e[107]=n=>t.newMqtt.retain=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"If true the client does not have a persistent session and all information are lost when the client disconnects for any reason","persistent-hint":"",label:"Clean",modelValue:t.newMqtt.clean,"onUpdate:modelValue":e[108]||(e[108]=n=>t.newMqtt.clean=n)},null,8,["modelValue"])]),_:1}),l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable persistent storage of packets (QoS > 0) while client is offline. If disabled the in memory store will be used.","persistent-hint":"",label:"Store",modelValue:t.newMqtt.store,"onUpdate:modelValue":e[109]||(e[109]=n=>t.newMqtt.store=n)},null,8,["modelValue"])]),_:1}),u.secure?(Z(),k(a,{key:0,cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable this when using self signed certificates","persistent-hint":"",label:"Allow self signed certs",modelValue:t.newMqtt.allowSelfsigned,"onUpdate:modelValue":e[110]||(e[110]=n=>t.newMqtt.allowSelfsigned=n)},null,8,["modelValue"])]),_:1})):x("",!0),u.secure?(Z(),k(a,{key:1,cols:"12",sm:"6",md:"4"},{default:r(()=>[l(S,{label:"Key.pem",keyProp:"_key",modelValue:t.newMqtt.key,"onUpdate:modelValue":e[111]||(e[111]=n=>t.newMqtt.key=n),onOnFileSelect:u.onFileSelect},null,8,["modelValue","onOnFileSelect"])]),_:1})):x("",!0),u.secure?(Z(),k(a,{key:2,cols:"12",sm:"6",md:"4"},{default:r(()=>[l(S,{label:"Cert.pem",keyProp:"_cert",modelValue:t.newMqtt.cert,"onUpdate:modelValue":e[112]||(e[112]=n=>t.newMqtt.cert=n),onOnFileSelect:u.onFileSelect},null,8,["modelValue","onOnFileSelect"])]),_:1})):x("",!0),u.secure?(Z(),k(a,{key:3,cols:"12",sm:"6",md:"4"},{default:r(()=>[l(S,{label:"Ca.pem",keyProp:"_ca",modelValue:t.newMqtt.ca,"onUpdate:modelValue":e[113]||(e[113]=n=>t.newMqtt.ca=n),onOnFileSelect:u.onFileSelect},null,8,["modelValue","onOnFileSelect"])]),_:1})):x("",!0),l(a,{cols:"12",sm:"4"},{default:r(()=>[l(_,{hint:"Does this client require auth?","persistent-hint":"",label:"Auth",modelValue:t.newMqtt.auth,"onUpdate:modelValue":e[114]||(e[114]=n=>t.newMqtt.auth=n)},null,8,["modelValue"])]),_:1}),t.newMqtt.auth?(Z(),k(a,{key:4,cols:"12",sm:"4"},{default:r(()=>[l(U,{modelValue:t.newMqtt.username,"onUpdate:modelValue":e[115]||(e[115]=n=>t.newMqtt.username=n),label:"Username",rules:[u.requiredUser],required:""},null,8,["modelValue","rules"])]),_:1})):x("",!0),t.newMqtt.auth?(Z(),k(a,{key:5,cols:"12",sm:"4"},{default:r(()=>[l(U,{modelValue:t.newMqtt.password,"onUpdate:modelValue":e[116]||(e[116]=n=>t.newMqtt.password=n),label:"Password",rules:[u.requiredPassword],required:"","append-icon":t.e1?"visibility":"visibility_off","onClick:append":e[117]||(e[117]=()=>t.e1=!t.e1),type:t.e1?"password":"text"},null,8,["modelValue","rules","append-icon","type"])]),_:1})):x("",!0)]),_:1})]),_:1})]),_:1})]),_:1}),l(j)]),_:1})),t.newMqtt.disabled?x("",!0):(Z(),k(G,{key:"gateway"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>e[182]||(e[182]=[w(" Gateway ")])),_:1,__:[182]}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[118]||(e[118]=P(n=>u.openDocs("gateway"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[184]||(e[184]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[183]||(e[183]=[w("launch")])),_:1,__:[183]})]),_:1,__:[184]})]),_:1})]),_:1})]),_:1}),l(W,null,{default:r(()=>[l(J,{flat:""},{default:r(()=>[l(Y,null,{default:r(()=>[l(D,null,{default:r(()=>[l(a,{cols:"12"},{default:r(()=>[l(N,{modelValue:t.newGateway.type,"onUpdate:modelValue":e[119]||(e[119]=n=>t.newGateway.type=n),label:"Topic type",rules:[t.rules.required],required:"",items:t.gw_types},null,8,["modelValue","rules","items"])]),_:1}),l(a,{cols:"12"},{default:r(()=>[l(N,{modelValue:t.newGateway.payloadType,"onUpdate:modelValue":e[120]||(e[120]=n=>t.newGateway.payloadType=n),label:"Payload type",required:"",rules:[u.validPayload],items:t.py_types},null,8,["modelValue","rules","items"])]),_:1}),t.newGateway.type===0?(Z(),k(a,{key:0,cols:"6"},{default:r(()=>[l(_,{label:"Use nodes name instead of numeric nodeIDs",modelValue:t.newGateway.nodeNames,"onUpdate:modelValue":e[121]||(e[121]=n=>t.newGateway.nodeNames=n)},null,8,["modelValue"])]),_:1})):x("",!0),l(a,{cols:"6"},{default:r(()=>[l(_,{label:"Ignore location",hint:"Don't add nodes location to values topic",modelValue:t.newGateway.ignoreLoc,"onUpdate:modelValue":e[122]||(e[122]=n=>t.newGateway.ignoreLoc=n),"persistent-hint":""},null,8,["modelValue"])]),_:1}),l(a,{cols:"6"},{default:r(()=>[l(_,{label:"Send Z-Wave events",hint:"Enable this to get all zwave events in MQTT on _EVENTS topic",modelValue:t.newGateway.sendEvents,"onUpdate:modelValue":e[123]||(e[123]=n=>t.newGateway.sendEvents=n),"persistent-hint":""},null,8,["modelValue"])]),_:1}),l(a,{cols:"6"},{default:r(()=>[l(_,{label:"Ignore status updates",hint:"Prevent gateway to send updates when a node changes its status (dead/sleep, alive)",modelValue:t.newGateway.ignoreStatus,"onUpdate:modelValue":e[124]||(e[124]=n=>t.newGateway.ignoreStatus=n),"persistent-hint":""},null,8,["modelValue"])]),_:1}),t.newGateway.payloadType!==2?(Z(),k(a,{key:1,cols:"6"},{default:r(()=>[l(_,{label:"Include Node info",hint:"Include Node's Name and Location on Payload",modelValue:t.newGateway.includeNodeInfo,"onUpdate:modelValue":e[125]||(e[125]=n=>t.newGateway.includeNodeInfo=n),"persistent-hint":""},null,8,["modelValue"])]),_:1})):x("",!0),l(a,{cols:"6"},{default:r(()=>[l(_,{label:"Publish node details",hint:"Details published under a topic, can help automations receive device info",modelValue:t.newGateway.publishNodeDetails,"onUpdate:modelValue":e[126]||(e[126]=n=>t.newGateway.publishNodeDetails=n),"persistent-hint":""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),l(j)]),_:1})),l(G,{key:"Hass"},{default:r(()=>[l(B,null,{default:r(()=>[l(D,{"no-gutters":""},{default:r(()=>[l(a,{"align-self":"center"},{default:r(()=>e[185]||(e[185]=[w(" Home Assistant ")])),_:1,__:[185]}),l(a,{class:"text-right pr-5"},{default:r(()=>[l(A,{onClick:e[127]||(e[127]=P(n=>u.openDocs("home-assistant"),["stop"])),color:"primary",variant:"outlined",size:"x-small"},{default:r(()=>[e[187]||(e[187]=w(" Docs ")),l(K,{size:"x-small",end:""},{default:r(()=>e[186]||(e[186]=[w("launch")])),_:1,__:[186]})]),_:1,__:[187]})]),_:1})]),_:1})]),_:1}),l(W,null,{default:r(()=>[l(J,{flat:""},{default:r(()=>[l(Y,null,{default:r(()=>[l(D,null,{default:r(()=>[l(a,{cols:"12",sm:"6"},{default:r(()=>[l(_,{hint:"Enable Z-Wave JS websocket server. This can be used with Home Assistant Z-Wave JS integration to discover entities","persistent-hint":"",label:"WS Server",modelValue:t.newZwave.serverEnabled,"onUpdate:modelValue":e[128]||(e[128]=n=>t.newZwave.serverEnabled=n)},null,8,["modelValue"])]),_:1}),t.newZwave.serverEnabled?(Z(),k(a,{key:0,cols:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.serverPort,"onUpdate:modelValue":e[129]||(e[129]=n=>t.newZwave.serverPort=n),modelModifiers:{number:!0},label:"Server Port",rules:[t.rules.required],required:"",hint:"The port to bind the Z-Wave Server. Default: 3000",type:"number"},null,8,["modelValue","rules"]),O("input",{type:"hidden",modelValue:t.newZwave.serverServiceDiscoveryDisabled},null,8,dt)]),_:1})):x("",!0),t.newZwave.serverEnabled?(Z(),k(a,{key:1,cols:"6"},{default:r(()=>[l(U,{modelValue:t.newZwave.serverHost,"onUpdate:modelValue":e[130]||(e[130]=n=>t.newZwave.serverHost=n),label:"Server Host",hint:"(Optional) The host to bind the Z-Wave Server"},null,8,["modelValue"])]),_:1})):x("",!0),t.newZwave.serverEnabled?(Z(),k(a,{key:2,cols:"6"},{default:r(()=>[l(y,{hint:"Allows applications like Home Assistant to automatically detect and connect to your Z-Wave JS UI instance","persistent-hint":"",label:"DNS Discovery",modelValue:t.newZwave.serverServiceDiscoveryDisabled,"onUpdate:modelValue":e[131]||(e[131]=n=>t.newZwave.serverServiceDiscoveryDisabled=n)},null,8,["modelValue"])]),_:1})):x("",!0)]),_:1}),t.newMqtt.disabled?x("",!0):(Z(),k(D,{key:0},{default:r(()=>[l(a,{cols:"6"},{default:r(()=>[l(_,{label:"MQTT Discovery",hint:"Create devices in Home Assistant using MQTT discovery. This is an alternative to Home Assistant Z-Wave JS integration",modelValue:t.newGateway.hassDiscovery,"onUpdate:modelValue":e[132]||(e[132]=n=>t.newGateway.hassDiscovery=n),"persistent-hint":""},null,8,["modelValue"])]),_:1}),t.newGateway.hassDiscovery?(Z(),k(a,{key:0,cols:"6"},{default:r(()=>[l(U,{modelValue:t.newGateway.discoveryPrefix,"onUpdate:modelValue":e[133]||(e[133]=n=>t.newGateway.discoveryPrefix=n),label:"Discovery prefix",hint:"The prefix to use for Hass MQTT discovery. Leave empty to use the mqtt prefix"},null,8,["modelValue"])]),_:1})):x("",!0),t.newGateway.hassDiscovery?(Z(),k(a,{key:1,cols:"6"},{default:r(()=>[l(_,{label:"Retained discovery",hint:"Set retain flag to true in discovery messages",modelValue:t.newGateway.retainedDiscovery,"onUpdate:modelValue":e[134]||(e[134]=n=>t.newGateway.retainedDiscovery=n),"persistent-hint":""},null,8,["modelValue"])]),_:1})):x("",!0),t.newGateway.hassDiscovery?(Z(),k(a,{key:2,cols:"6"},{default:r(()=>[l(_,{label:"Manual discovery",hint:"Don't automatically send the discovery payloads when a device is discovered",modelValue:t.newGateway.manualDiscovery,"onUpdate:modelValue":e[135]||(e[135]=n=>t.newGateway.manualDiscovery=n),"persistent-hint":""},null,8,["modelValue"])]),_:1})):x("",!0),t.newGateway.hassDiscovery?(Z(),k(a,{key:3,cols:"6"},{default:r(()=>[l(U,{modelValue:t.newGateway.entityTemplate,"onUpdate:modelValue":e[136]||(e[136]=n=>t.newGateway.entityTemplate=n),label:"Entity name template","persistent-hint":"",hint:"Template which generates entity names"},null,8,["modelValue"])]),_:1})):x("",!0),t.newGateway.hassDiscovery?(Z(),k(a,{key:4,cols:"6"},{default:r(()=>e[188]||(e[188]=[O("div",null,[w(" Default: "),O("code",null,"%ln_%o"),O("br"),w(" -"),O("code",null,"%ln"),w(": Node location with name ("),O("code",null,"<location-?><name>"),w(")"),O("br"),w("- "),O("code",null,"%nid"),w(": Node ID "),O("br"),w("- "),O("code",null,"%n"),w(": Node Name "),O("br"),w("- "),O("code",null,"%loc"),w(": Node Location "),O("br"),w("- "),O("code",null,"%p"),w(": valueId property (fallback to device type) "),O("br"),w("- "),O("code",null,"%pk"),w(": valueId property key (fallback to device type) "),O("br"),w("- "),O("code",null,"%pn"),w(": valueId property name (fallback to device type) "),O("br"),w("- "),O("code",null,"%o"),w(": HASS object_id "),O("br"),w("- "),O("code",null,"%l"),w(": valueId label (fallback to object_id) ")],-1)])),_:1,__:[188]})):x("",!0)]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),l(d,{onSave:u.saveValue,onClose:u.closeDialog,modelValue:t.dialogValue,"onUpdate:modelValue":e[137]||(e[137]=n=>t.dialogValue=n),gw_type:t.newGateway.type,title:u.dialogTitle,editedValue:t.editedValue,devices:o.devices},null,8,["onSave","onClose","modelValue","gw_type","title","editedValue","devices"])]),_:1},8,["onSubmit","modelValue"]),l(D,{justify:o.$vuetify.display.xs?"center":"end","space-be":"",class:"sticky-buttons py-3 px-4",style:We({backgroundColor:o.darkMode?"#272727":"#f5f5f5"})},{default:r(()=>[l(A,{class:"mr-2",size:"small",color:"error",onClick:e[139]||(e[139]=n=>u.resetConfig())},{default:r(()=>[e[190]||(e[190]=w(" Reset ")),l(K,{end:""},{default:r(()=>e[189]||(e[189]=[w("clear")])),_:1,__:[189]})]),_:1,__:[190]}),l(A,{class:"mr-2",size:"small",color:"purple",onClick:u.importSettings},{default:r(()=>[e[192]||(e[192]=w(" Import ")),l(K,{end:""},{default:r(()=>e[191]||(e[191]=[w("file_upload")])),_:1,__:[191]})]),_:1,__:[192]},8,["onClick"]),l(A,{class:"mr-2",size:"small",color:"success",onClick:u.exportSettings},{default:r(()=>[e[194]||(e[194]=w(" Export ")),l(K,{end:""},{default:r(()=>e[193]||(e[193]=[w("file_download")])),_:1,__:[193]})]),_:1,__:[194]},8,["onClick"]),l(A,{class:"mr-5",size:"small",color:"primary",type:"submit",loading:t.saving,disabled:t.saving||!u.settingsChanged,form:"form_settings"},{default:r(()=>[e[196]||(e[196]=w(" Save ")),l(K,{end:""},{default:r(()=>e[195]||(e[195]=[w("save")])),_:1,__:[195]})]),_:1,__:[196]},8,["loading","disabled"])]),_:1},8,["justify","style"])]),_:1})}const vt=Oe(st,[["render",ft],["__scopeId","data-v-6c3ca678"]]);export{vt as default};