From b5edca1719d11bd05b57b49a3c51ed61f2eea5b0 Mon Sep 17 00:00:00 2001 From: jemu75 Date: Thu, 13 May 2021 13:00:34 +0200 Subject: [PATCH] v.3.20.2 --- package.json | 2 +- public/cfg/templ_dimmer2.json | 2 -- src/components/TemplDefault.vue | 6 ++-- src/components/TemplPanel.vue | 32 +++++++++++++++++-- www/fhemapp/cfg/templ_dimmer2.json | 2 -- www/fhemapp/index.html | 2 +- .../js/{app.a5ce73d0.js => app.ce23e979.js} | 2 +- www/fhemapp/js/chunk-00f750ae.31479edc.js | 1 + www/fhemapp/js/chunk-00f750ae.7fc9b0ad.js | 1 - www/fhemapp/js/chunk-1444c05b.136b534d.js | 1 - www/fhemapp/js/chunk-1444c05b.85f227c2.js | 1 + 11 files changed, 37 insertions(+), 15 deletions(-) rename www/fhemapp/js/{app.a5ce73d0.js => app.ce23e979.js} (99%) create mode 100644 www/fhemapp/js/chunk-00f750ae.31479edc.js delete mode 100644 www/fhemapp/js/chunk-00f750ae.7fc9b0ad.js delete mode 100644 www/fhemapp/js/chunk-1444c05b.136b534d.js create mode 100644 www/fhemapp/js/chunk-1444c05b.85f227c2.js diff --git a/package.json b/package.json index e29c1f1f..43668431 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fhemapp", - "version": "3.20.1", + "version": "3.20.2", "private": true, "author": "jemu75", "scripts": { diff --git a/public/cfg/templ_dimmer2.json b/public/cfg/templ_dimmer2.json index c60ce5bb..5cc3d2fb 100644 --- a/public/cfg/templ_dimmer2.json +++ b/public/cfg/templ_dimmer2.json @@ -28,8 +28,6 @@ "leftBtn": "mdi-dots-vertical", "leftMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"], "text": ["pct::%n%"], - "midBtn": "mdi-dots-vertical", - "midMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"], "rightBtn": "mdi-dots-vertical", "rightMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"] } diff --git a/src/components/TemplDefault.vue b/src/components/TemplDefault.vue index 153bef9b..87930666 100644 --- a/src/components/TemplDefault.vue +++ b/src/components/TemplDefault.vue @@ -466,8 +466,8 @@ let result = ''; if(param.match('set')) { - let parts = param.split(' '); - if(parts[1].match('Connected')) { + let parts = param.trim().split(' '); + if(parts[1] && parts[1].match('Connected')) { let device = parts[1].replace('Connected.',''); parts[1] = this.$fhem.getEl(this.item, 'Connected', device, 'Internals', 'NAME'); @@ -582,7 +582,7 @@ let value = /\./.test(parts[0]) ? parts[0].split('.') : [ 'Readings', parts[0], 'Value' ]; let state = this.$fhem.getEl(this.item, ...value); - if(state.match(parts[1])) result = true; + if(state && state.match(parts[1])) result = true; } return result; diff --git a/src/components/TemplPanel.vue b/src/components/TemplPanel.vue index 2f51c188..3cd297ee 100644 --- a/src/components/TemplPanel.vue +++ b/src/components/TemplPanel.vue @@ -116,7 +116,10 @@ dense color="secondary lighten-2" > - + + + mdi-check + @@ -239,6 +245,23 @@ this.$fhem.request(cmd); }, + checkMenu(device, cmd) { + let result = false; + + if(cmd) { + let parts = cmd.split(' '); + + if(parts[0].match('set')) parts.splice(0, 2); + if(parts.length === 1) parts.splice(0, 0, 'state'); + + let value = /\./.test(parts[0]) ? parts[0].split('.') : [ 'Readings', parts[0], 'Value' ]; + let state = this.$fhem.getEl(device, ...value); + if(state && state.match(parts[1])) result = true; + } + + return result; + }, + loadItem(obj) { let device = this.$fhem.getEl(obj, 'Name') || ''; let alias = this.$fhem.getEl(obj, 'Attributes', 'alias') || obj.Name; @@ -257,7 +280,9 @@ if(menu.length > 0) { for(const el of menu) { let parts = el.split(':'); - if(parts.length == 2) menuItems.push({ name: parts[0], cmd: parts[1] }) + let active = this.checkMenu(obj, parts[1]); + + if(parts.length == 2) menuItems.push({ name: parts[0], cmd: parts[1], active }) } } @@ -295,7 +320,8 @@ icon: data.icon, route: data.route, click: data.click, - menu: data.menu + menu: data.menu, + menuIdx: data.menu.map((e) => e.active).indexOf(true) }; if(data.color != 'success') { diff --git a/www/fhemapp/cfg/templ_dimmer2.json b/www/fhemapp/cfg/templ_dimmer2.json index c60ce5bb..5cc3d2fb 100644 --- a/www/fhemapp/cfg/templ_dimmer2.json +++ b/www/fhemapp/cfg/templ_dimmer2.json @@ -28,8 +28,6 @@ "leftBtn": "mdi-dots-vertical", "leftMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"], "text": ["pct::%n%"], - "midBtn": "mdi-dots-vertical", - "midMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"], "rightBtn": "mdi-dots-vertical", "rightMenu": ["aus:off","25 %:pct 25","50 %:pct 50","75 %:pct 75","an:on"] } diff --git a/www/fhemapp/index.html b/www/fhemapp/index.html index c4b7d177..e2ed9f53 100644 --- a/www/fhemapp/index.html +++ b/www/fhemapp/index.html @@ -1 +1 @@ -fhemapp
\ No newline at end of file +fhemapp
\ No newline at end of file diff --git a/www/fhemapp/js/app.a5ce73d0.js b/www/fhemapp/js/app.ce23e979.js similarity index 99% rename from www/fhemapp/js/app.a5ce73d0.js rename to www/fhemapp/js/app.ce23e979.js index efc12dbd..5f09f038 100644 --- a/www/fhemapp/js/app.a5ce73d0.js +++ b/www/fhemapp/js/app.ce23e979.js @@ -1 +1 @@ -(function(e){function t(t){for(var a,s,o=t[0],c=t[1],p=t[2],l=0,u=[];l0?(this.type=this.types[this.msgList[0].lvl],this.message=this.msgList[0].msg,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted:function(){var e=this;this.$fhem.on("message",(function(t){var n={lvl:5,msg:"no valid message received",meta:""};Object.assign(n,t),e.msgList.unshift(n)}))},methods:{clearMessage:function(){this.msgList.length>0&&this.msgList.splice(0,1)}}}),p=c,l=n("2877"),u=n("6544"),h=n.n(u),d=n("0798"),m=n("8336"),f=n("62ad"),v=n("132d"),g=n("0fd9"),b=Object(l["a"])(p,i,o,!1,null,null,null),k=b.exports;h()(b,{VAlert:d["a"],VBtn:m["a"],VCol:f["a"],VIcon:v["a"],VRow:g["a"]});var y={components:{Broadcaster:k},data:function(){return{appBar:{color:"",drawer:null,clock:null,header:null},app:{options:{loading:!1,reloadBtn:!1},session:{connect:!1},data:{roomList:[],groupList:[]}},version:"v"+n("9224").version,status:{color:"secondary",icon:"mdi-circle",text:"unbekannt",time:""}}},computed:{showRooms:function(){return this.app.data.roomList.length>0},showGroups:function(){return this.app.data.groupList.length>0}},watch:{"app.session.connect":function(e){this.status.color=e?"success":"error",this.status.text=e?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted:function(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.appBar=this.$fhem.app.appBar},methods:{reload:function(){location.reload(!0)},goTo:function(e){var t=e||"/";this.$router.currentRoute.path!=t&&this.$router.push(t)}}},O=y,x=(n("100d"),n("7496")),w=n("40dc"),j=n("5bc1"),C=n("cc20"),R=n("a523"),_=n("ce7e"),L=n("adda"),S=n("8860"),T=n("56b0"),E=n("da13"),I=n("5d23"),P=n("34c3"),V=n("f6c4"),B=n("f774"),D=n("a797"),A=n("490a"),N=n("2fa4"),F=n("3a2f"),M=Object(l["a"])(O,s,r,!1,null,"765e5cc9",null),H=M.exports;h()(M,{VApp:x["a"],VAppBar:w["a"],VAppBarNavIcon:j["a"],VBtn:m["a"],VChip:C["a"],VContainer:R["a"],VDivider:_["a"],VIcon:v["a"],VImg:L["a"],VList:S["a"],VListGroup:T["a"],VListItem:E["a"],VListItemContent:I["a"],VListItemIcon:P["a"],VListItemSubtitle:I["b"],VListItemTitle:I["c"],VMain:V["a"],VNavigationDrawer:B["a"],VOverlay:D["a"],VProgressCircular:A["a"],VSpacer:N["a"],VTooltip:F["a"]});n("d3b7"),n("3ca3"),n("ddb0");var $=n("8c4f");a["a"].use($["a"]);var U=[{path:"/",name:"Home",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/system",name:"System",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/dashboard",name:"Dashboard",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/devices/:filter",name:"Devices",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/edit-devices",name:"EditDevice",component:function(){return Promise.all([n.e("chunk-28c4def2"),n.e("chunk-12e7f05c"),n.e("chunk-97aef864"),n.e("chunk-2d22d812")]).then(n.bind(null,"f87a"))}},{path:"/syslog",name:"Syslog",component:function(){return Promise.all([n.e("chunk-28c4def2"),n.e("chunk-12e7f05c"),n.e("chunk-97aef864"),n.e("chunk-40496c8f")]).then(n.bind(null,"beee"))}}],J=new $["a"]({mode:"hash",base:"",routes:U}),q=J,z=n("f309"),G=n("0fe0"),X=n.n(G),K=n("fcf4");a["a"].use(z["a"]);var W={lang:{locales:{de:X.a},current:"de"},theme:{dark:!0,themes:{dark:{primary:K["a"].grey.darken4,secondary:K["a"].grey.darken3,success:K["a"].green.accent2,accent:K["a"].green.accent2},light:{primary:K["a"].grey,secondary:K["a"].grey.lighten3,success:K["a"].green.accent3,accent:K["a"].green.accent3}}}},Z=new z["a"](W),Q=n("1321"),Y=n.n(Q),ee=(n("159b"),n("ac1f"),n("466d"),n("a925"));function te(){var e=n("49f8"),t={};return e.keys().forEach((function(n){var a=n.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){var s=a[1];t[s]=e(n)}})),t}a["a"].use(ee["a"]);var ne=new ee["a"]({locale:"de",fallbackLocale:"en",messages:te()}),ae=n("b85c"),se=n("2909"),re=n("1da1"),ie=n("53ca"),oe=n("d4ec"),ce=n("bee2"),pe=n("262e"),le=n("2caf"),ue=(n("96cf"),n("fb6a"),n("1276"),n("5319"),n("13d5"),n("b64b"),n("b0c0"),n("d81d"),n("a15b"),n("b680"),n("25f0"),n("99af"),n("4d63"),n("07ac"),n("faa1")),he=n.n(ue),de=function(e){Object(pe["a"])(n,e);var t=Object(le["a"])(n);function n(){var e;return Object(oe["a"])(this,n),e=t.call(this),e.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem",type:"websocket"},conn:null,connOffset:0,session:{connect:!1,ready:!1,csrf:null,restart:!1,restartCnt:0,logList:[]},options:{lang:"de",debugMode:!1,debugLevel:5,loading:!1,loadCount:0,clockInterval:5e3,clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},theme:{dark:!0,themes:{}},appBar:{color:"primary",drawer:!1,clock:null,header:null},templates:[],componentMap:[{name:"panel",component:"templ_panel"},{name:"chart",component:"templ_chart"},{name:"weather",component:"templ_weather"},{name:"sysmon",component:"templ_sysmon"},{name:"hmlan",component:"templ_hmlan"},{name:"sonos",component:"templ_sonos"},{name:"scenes",component:"templ_scenes"},{name:"cam",component:"templ_cam"}],data:{roomList:[],groupList:[],deviceList:[],routeList:[],header:""},hasConnected:[]},e}return Object(ce["a"])(n,[{key:"loading",set:function(e){e&&this.app.options.loadCount++,!e&&this.app.options.loadCount>0&&this.app.options.loadCount--,this.app.options.loadCount>0&&!this.app.options.loading&&(this.app.options.loading=!0),0===this.app.options.loadCount&&(this.app.options.loading=!1)}},{key:"log",value:function(e){var t=["","mdi-alert-outline","mdi-connection","mdi-send-circle-outline","mdi-sync","mdi-hexagon-multiple-outline"],n=["","error","info","success","success","warning"],a=(new Date).toLocaleTimeString(this.app.options.lang),s=(new Date).getMilliseconds(),r={time:a+":"+("000"+s).slice(-3),msg:e.msg||"",lvl:e.lvl||5,meta:e.meta||null,icon:t[e.lvl||5],color:n[e.lvl||5]};this.app.options.logRecord&&r.lvl<=this.app.options.debugLevel&&(this.app.session.logList.unshift(r),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer)),1==r.lvl&&(this.app.options.loadCount=0,this.app.options.loading=!1,this.emit("message",r))}},{key:"getDate",value:function(e){var t=e?parseInt(e):0;return function(e){return new Date(e.setDate(e.getDate()-t)).toISOString()}(new Date).split("T")[0]}},{key:"getDateTime",value:function(e){var t=e||(new Date).toISOString();return new Date(t.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}},{key:"createURL",value:function(e){var t=this.app.connection,n=t.location?t.location:"",a=t.port?":"+t.port.replace(":",""):"",s=t.path?"/"+t.path.replace("/",""):"",r="";return"object"==Object(ie["a"])(e)&&e.length>0&&e.forEach((function(e){e.param&&e.value&&(r+=r?"&":"?",r+=e.param+"="+encodeURIComponent(e.value))})),n+a+s+r}},{key:"getEl",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0?s.push.apply(s,Object(se["a"])(t)):s.push(t)),"string"===typeof t&&s.push({param:"cmd",value:t}),r=this.createURL(s),this.log({lvl:3,msg:"Request: "+r}),e.next=9,fetch(r).then((function(e){var t=null;return"csrf"===n&&(t=e.headers.get("x-fhem-csrftoken")),"json"===n&&(t=e.json()),t||(t=e.text()),"object"===Object(ie["a"])(a)?Object.assign(a,{data:t}):t})).catch((function(e){return i.log({lvl:1,msg:"Request failed "+r,meta:e.message})}));case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)})));function t(t,n,a){return e.apply(this,arguments)}return t}()},{key:"getJsonFile",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=new Headers,n.append("pragma","no-cache"),n.append("cache-control","no-cache"),a={method:"GET",headers:n},e.next=6,fetch(t,a).then((function(e){return e.json()})).catch((function(e){return r.log({lvl:1,msg:"Read Json-Data from "+t+" failed.",meta:e})}));case 6:return s=e.sent,s&&this.log({lvl:5,msg:"Json-Data parsed from "+t,meta:s}),e.next=10,s;case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"readConfig",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getJsonFile(t);case 2:if(n=e.sent,n){for(a=0,s=Object.keys(n);a0)){e.next=41;break}n=[],a=[],this.app.data.routeList.splice(0),s=Object(ae["a"])(t.Results),e.prev=8,s.s();case 10:if((r=s.n()).done){e.next=27;break}return i=r.value,e.next=14,this.createOptions(i);case 14:if(o=e.sent,!o.template){e.next=25;break}return e.next=18,this.getTemplate(o);case 18:c=e.sent,c&&this.app.templates.push(c),o.room&&this.createNaviItems(o,n,"room"),o.group&&this.createNaviItems(o,a,"group"),o.home&&this.createRoutes(o,"/"),o.dashboard&&this.createRoutes(o,"/dashboard"),o.system&&this.createRoutes(o,"/system");case 25:e.next=10;break;case 27:e.next=32;break;case 29:e.prev=29,e.t0=e["catch"](8),s.e(e.t0);case 32:return e.prev=32,s.f(),e.finish(32);case 35:n.sort((function(e,t){return e.title>t.title?1:t.title>e.title?-1:0})),a.sort((function(e,t){return e.title>t.title?1:t.title>e.title?-1:0})),this.app.data.roomList=Object.assign([],n),this.app.data.groupList=Object.assign([],a),this.app.session.ready=!0,this.loading=!1;case 41:case"end":return e.stop()}}),e,this,[[8,29,32,35]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"createConnected",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r,i,o,c,p;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n={},a=this.app.hasConnected.indexOf(t.Name),-1!=a){e.next=30;break}if(this.app.hasConnected.push(t.Name),!("connected"in t.Options)){e.next=28;break}s=Object.keys(t.Options.connected),r=0,i=s;case 7:if(!(rt.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0})),this.app.data.deviceList=Object.assign([],r),this.loading=!1),i++;case 39:e.next=15;break;case 41:e.next=46;break;case 43:e.prev=43,e.t0=e["catch"](13),o.e(e.t0);case 46:return e.prev=46,o.f(),e.finish(46);case 49:case"end":return e.stop()}}),e,this,[[13,43,46,49]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"checkUpdate",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(){var t,n,a,s,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]);case 2:if(t=e.sent,n=0,t){a=t.split("\n").splice(2),s=Object(ae["a"])(a);try{for(s.s();!(r=s.n()).done;)i=r.value,i.match("UPD")&&!i.match("excluded")&&n++}catch(o){s.e(o)}finally{s.f()}}return e.abrupt("return",n>0);case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"handleLogData",value:function(e){var t=e.split("\n");t.length>3&&t.splice(-3,3);var n,a=[],s=t.length>this.app.options.maxChartPoints?parseInt(t.length/this.app.options.maxChartPoints):1,r=s,i=0,o=1,c=Object(ae["a"])(t);try{for(c.s();!(n=c.n()).done;){var p=n.value,l=p.split(" "),u=Date.parse(l[0].replace("_","T")),h=parseFloat(l[1]);i+=h,(o>=r||o===t.length)&&(o===t.length&&(s-=r-o),a.push({timestamp:u,value:i/s}),r+=s,i=0),o++}}catch(d){c.e(d)}finally{c.f()}return this.log({lvl:5,msg:"handle Chartdata (Lines: "+t.length+")"}),a}},{key:"readLogData",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r,i,o,c,p,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=[],this.loading=!0,!(t.defs&&t.defs.length>0)){e.next=40;break}a=0,s=Object(ae["a"])(t.defs),e.prev=5,s.s();case 7:if((r=s.n()).done){e.next=32;break}return i=r.value,o=/\(.*\)/.exec(i),c=o?i.replace(o[0],"_").split(":"):i.split(":"),p="get ",p+=c[0]?c[0]:t.deviceName,p+=t.from?" - - "+t.from:"",p+=t.to?" "+t.to:"",p+=o?" "+o[0].replace(/\(|\)/g,""):" 4:"+c[1],e.next=18,this.request([{param:"cmd",value:p},{param:"XHR",value:"1"}],"text",{id:a});case 18:if(l=e.sent,!l){e.next=29;break}return e.t0=n,e.t1=l.id,e.t2=this,e.next=25,l.data;case 25:e.t3=e.sent,e.t4=e.t2.handleLogData.call(e.t2,e.t3),e.t5={id:e.t1,data:e.t4},e.t0.push.call(e.t0,e.t5);case 29:a++;case 30:e.next=7;break;case 32:e.next=37;break;case 34:e.prev=34,e.t6=e["catch"](5),s.e(e.t6);case 37:return e.prev=37,s.f(),e.finish(37);case 40:return this.loading=!1,e.abrupt("return",Object.assign(t,{data:n}));case 42:case"end":return e.stop()}}),e,this,[[5,34,37,40]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"replaceVals",value:function(e,t){for(var n=/-?[0-9]/.exec(t),a=[],s=2;s0){var a,s=Object(ae["a"])(t);try{for(s.s();!(a=s.n()).done;){var r=a.value,i=r.split(":");if(i.length>2){var o=/\./.test(i[0])?i[0].split("."):["Readings",i[0],"Value"],c=this.getEl.apply(this,[e].concat(Object(se["a"])(o)))||this.getEl(e,"Readings",i[0],"Value");if(c){var p=!1,l=parseFloat(i[1]);if(isNaN(l))RegExp(i[1]?i[1]:".").test(c)&&(p=!0);else{var u=/-?[0-9]/.exec(c);-1!=u.index&&parseFloat(c.slice(u.index))>=l&&(p=!0)}if(p){n=this.replaceVals(i,c);break}}}}}catch(h){s.e(h)}finally{s.f()}}return n}},{key:"handleTemplate",value:function(e){var t=this.getEl(e,"Options","setup","show"),n=this.getEl(e,"Options","setup","status","bar"),a=this.getEl(e,"Options","setup","status","error"),s=this.getEl(e,"Options","setup","info");if(t){var r=this.handleVals(e,t);e.Options.show="false"!==r[0],r[1]&&(e.Options.setup.size=r[1]),r[2]&&(e.Options.sortby=r[2])}if(n){var i=this.getEl(e,"Options","setup","status","min")||0,o=this.getEl(e,"Options","setup","status","max")||100,c=this.handleVals(e,n),p=100/(o-i),l=(c[0]||"0"-i)*p;e.Options.status.level=c[2]?100-l:l,e.Options.status.color=c[1]||"success"}if(a){var u=this.handleVals(e,a);u.length>0?(e.Options.status.level=u[0]||"100",e.Options.status.color=u[1]||"error",e.Options.status.error=u[2]||"Fehler",e.Options.status.isActive=!1):e.Options.status.isActive=!0}if(s){var h=this.handleVals(e,s.left1),d=this.handleVals(e,s.left2),m=this.handleVals(e,s.mid1),f=this.handleVals(e,s.mid2),v=this.handleVals(e,s.right1),g=this.handleVals(e,s.right2);e.Options.info.left1IconColor=h[2]||"",e.Options.info.left1Icon=h[1]||"",e.Options.info.left1Text=h[0]||"",e.Options.info.left2IconColor=d[2]||"",e.Options.info.left2Icon=d[1]||"",e.Options.info.left2Text=d[0]||"",e.Options.info.mid1IconColor=m[2]||"",e.Options.info.mid1Icon=m[1]||"",e.Options.info.mid1Text=m[0]||"",e.Options.info.mid2IconColor=f[2]||"",e.Options.info.mid2Icon=f[1]||"",e.Options.info.mid2Text=f[0]||"",e.Options.info.right1IconColor=v[2]||"",e.Options.info.right1Icon=v[1]||"",e.Options.info.right1Text=v[0]||"",e.Options.info.right2IconColor=v[2]||"",e.Options.info.right2Icon=g[1]||"",e.Options.info.right2Text=g[0]||""}}},{key:"handleData",value:function(e){var t=JSON.parse(e),n=null;if(!t[2].match("0){var i=this.handleData(r);if(i){var o,c=0,p=Object(ae["a"])(this.app.data.deviceList);try{for(p.s();!(o=p.n()).done;){var l=o.value,u=this.app.data.deviceList[c],h=Object.assign({},u);if(l.Name===i.Name&&("Readings"===i.devicePart&&this.getEl(h,"Readings",i.param,i.paramPart)&&(h.Readings[i.param][i.paramPart]=i.value),"Attributes"===i.devicePart&&this.getEl(h,"Attributes",i.param)&&(h.Attributes[i.param]=i.value),this.handleTemplate(h),this.app.data.deviceList.splice(c,1,h),this.app.data.deviceList.sort((function(e,t){return e.Options.sortby>t.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0}))),"Connected"in l)for(var d=0,m=0,f=Object.values(l.Connected);mt.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0}))}d++}c++}}catch(b){p.e(b)}finally{p.f()}}}}}catch(b){s.e(b)}finally{s.f()}}},{key:"connOpen",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.app.session.connect=!0,this.app.session.restartCnt=0,this.log({lvl:2,msg:"Connection with FHEM is opened.",meta:this.app.connection}),e.next=5,this.request({},"csrf");case 5:this.app.session.csrf=e.sent,this.log({lvl:2,msg:"Crsf-Token received.",meta:{token:this.app.session.csrf}}),this.loadStructure();case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"connClose",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.ready=!1,this.app.conn=null,this.app.session.restart||(n=0==this.app.session.restartCnt?1:3e3,this.app.session.restart=!0,setTimeout((function(){s.app.session.restart=!1,s.app.session.restartCnt++,s.connStart()}),n),a={info:"Connection ("+this.app.connection.type+") "+(t?"failed.":"was closed."),errCode:t||""},this.log({lvl:2,msg:"Connection with FHEM was closed. Try to Reconnect in "+n/1e3+" seconds...",meta:a}),this.loading=!1);case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"connStart",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(){var t,n,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],n=this.createURL(t),"websocket"===this.app.connection.type?(this.app.conn=new WebSocket(n.replace(/^http/i,"ws")),this.app.conn.onopen=function(){return a.connOpen()},this.app.conn.onmessage=function(e){return a.doUpdate(e)},this.app.conn.onclose=function(){return a.connClose()},this.app.conn.onerror=function(e){return a.connClose(e)}):(this.app.conn=new XMLHttpRequest,this.app.conn.open("GET",n,!0),this.app.conn.onreadystatechange=function(){200===a.app.conn.status&&2===a.app.conn.readyState&&a.connOpen(),200===a.app.conn.status&&3===a.app.conn.readyState&&a.doUpdate()},this.app.conn.onerror=function(e){return a.connClose(e)},this.app.conn.send());case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setClock",value:function(){var e=new Date;this.app.appBar.clock=e.toLocaleString(this.app.options.lang,{hour:"2-digit",minute:"2-digit"}),this.app.options.mobileHeader||(this.app.appBar.header=e.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))}},{key:"init",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t,n){var a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.log({lvl:2,msg:"Starting FHEMApp..."}),this.loading=!0,e.next=4,this.readConfig("./cfg/config.json");case 4:this.connStart(),t&&this.app.theme&&(-1!=this.app.theme.dark&&Object.assign(t.framework.theme,{dark:this.app.theme.dark}),this.app.theme.themes.light&&Object.assign(t.framework.theme.themes.light,this.app.theme.themes.light),this.app.theme.themes.dark&&Object.assign(t.framework.theme.themes.dark,this.app.theme.themes.dark)),n&&this.app.options.lang&&(n.locale=this.app.options.lang),this.setClock(),setInterval((function(){return a.setClock()}),this.app.options.clockInterval);case 9:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(he.a),me={install:function(e,t,n){e.prototype.$fhem=new de,e.prototype.$fhem.init(t,n)}};a["a"].use(me,Z,ne),a["a"].use(Y.a),a["a"].component("apexchart",Y.a),a["a"].config.productionTip=!1,new a["a"]({vuetify:Z,router:q,i18n:ne,render:function(e){return e(H)}}).$mount("#app")},"6ce2":function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"},"dates":{"from":"von","to":"bis"}},"templates":{"sysmon":{"updateBtn":["prüfe Updates...","system aktuell","update","update läuft.."],"restartBtn":"neustart","updateDialog":{"header":"FHEM Update","text":"Update wurde erfolgreich beendet. FHEM sollte neu gestartet werden.","restartBtn":"jetzt neustarten"}}}}')},9224:function(e){e.exports=JSON.parse('{"name":"fhemapp","version":"3.20.1","private":true,"author":"jemu75","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build","lint":"vue-cli-service lint","i18n:report":"vue-cli-service i18n:report --src \\"./src/**/*.?(js|vue)\\" --locales \\"./src/locales/**/*.json\\""},"dependencies":{"apexcharts":"^3.26.1","core-js":"^3.12.0","typeface-roboto":"^1.1.13","vue":"^2.6.11","vue-apexcharts":"^1.6.1","vue-i18n":"^8.24.4","vue-json-pretty":"^1.8.0","vue-router":"^3.5.1","vuetify":"^2.4.11"},"devDependencies":{"@mdi/font":"^5.9.55","@vue/cli-plugin-babel":"^4.5.13","@vue/cli-plugin-eslint":"^4.5.13","@vue/cli-plugin-router":"^4.5.13","@vue/cli-service":"^4.5.13","babel-eslint":"^10.1.0","eslint":"^6.7.2","eslint-plugin-vue":"^6.2.2","sass":"^1.32.12","sass-loader":"^8.0.0","vue-cli-plugin-i18n":"~2.1.0","vue-cli-plugin-vuetify":"~2.0.9","vue-template-compiler":"^2.6.11","vuetify-loader":"^1.7.2"},"bugs":{"url":"https://github.com/jemu75/fhemApp/issues"},"homepage":"https://github.com/jemu75/fhemApp#readme","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jemu75/fhemApp.git"}}')},c274:function(e,t,n){e.exports=n.p+"img/FHEM_Logo.2d0f7a38.png"},edd4:function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"},"dates":{"from":"From","to":"To"}},"templates":{"sysmon":{"updateBtn":["check updates...","up to date","update","update running..."],"restartBtn":"restart","updateDialog":{"header":"FHEM Update","text":"Update was successful finished. FHEM should be restarted now.","restartBtn":"restart now"}}}}')}}); \ No newline at end of file +(function(e){function t(t){for(var a,s,o=t[0],c=t[1],p=t[2],l=0,u=[];l0?(this.type=this.types[this.msgList[0].lvl],this.message=this.msgList[0].msg,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted:function(){var e=this;this.$fhem.on("message",(function(t){var n={lvl:5,msg:"no valid message received",meta:""};Object.assign(n,t),e.msgList.unshift(n)}))},methods:{clearMessage:function(){this.msgList.length>0&&this.msgList.splice(0,1)}}}),p=c,l=n("2877"),u=n("6544"),h=n.n(u),d=n("0798"),m=n("8336"),f=n("62ad"),v=n("132d"),g=n("0fd9"),b=Object(l["a"])(p,i,o,!1,null,null,null),k=b.exports;h()(b,{VAlert:d["a"],VBtn:m["a"],VCol:f["a"],VIcon:v["a"],VRow:g["a"]});var y={components:{Broadcaster:k},data:function(){return{appBar:{color:"",drawer:null,clock:null,header:null},app:{options:{loading:!1,reloadBtn:!1},session:{connect:!1},data:{roomList:[],groupList:[]}},version:"v"+n("9224").version,status:{color:"secondary",icon:"mdi-circle",text:"unbekannt",time:""}}},computed:{showRooms:function(){return this.app.data.roomList.length>0},showGroups:function(){return this.app.data.groupList.length>0}},watch:{"app.session.connect":function(e){this.status.color=e?"success":"error",this.status.text=e?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted:function(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.appBar=this.$fhem.app.appBar},methods:{reload:function(){location.reload(!0)},goTo:function(e){var t=e||"/";this.$router.currentRoute.path!=t&&this.$router.push(t)}}},O=y,x=(n("100d"),n("7496")),w=n("40dc"),j=n("5bc1"),C=n("cc20"),R=n("a523"),_=n("ce7e"),L=n("adda"),S=n("8860"),T=n("56b0"),E=n("da13"),I=n("5d23"),P=n("34c3"),V=n("f6c4"),B=n("f774"),D=n("a797"),A=n("490a"),N=n("2fa4"),F=n("3a2f"),M=Object(l["a"])(O,s,r,!1,null,"765e5cc9",null),H=M.exports;h()(M,{VApp:x["a"],VAppBar:w["a"],VAppBarNavIcon:j["a"],VBtn:m["a"],VChip:C["a"],VContainer:R["a"],VDivider:_["a"],VIcon:v["a"],VImg:L["a"],VList:S["a"],VListGroup:T["a"],VListItem:E["a"],VListItemContent:I["a"],VListItemIcon:P["a"],VListItemSubtitle:I["b"],VListItemTitle:I["c"],VMain:V["a"],VNavigationDrawer:B["a"],VOverlay:D["a"],VProgressCircular:A["a"],VSpacer:N["a"],VTooltip:F["a"]});n("d3b7"),n("3ca3"),n("ddb0");var $=n("8c4f");a["a"].use($["a"]);var U=[{path:"/",name:"Home",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/system",name:"System",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/dashboard",name:"Dashboard",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/devices/:filter",name:"Devices",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/edit-devices",name:"EditDevice",component:function(){return Promise.all([n.e("chunk-28c4def2"),n.e("chunk-12e7f05c"),n.e("chunk-97aef864"),n.e("chunk-2d22d812")]).then(n.bind(null,"f87a"))}},{path:"/syslog",name:"Syslog",component:function(){return Promise.all([n.e("chunk-28c4def2"),n.e("chunk-12e7f05c"),n.e("chunk-97aef864"),n.e("chunk-40496c8f")]).then(n.bind(null,"beee"))}}],J=new $["a"]({mode:"hash",base:"",routes:U}),q=J,z=n("f309"),G=n("0fe0"),X=n.n(G),K=n("fcf4");a["a"].use(z["a"]);var W={lang:{locales:{de:X.a},current:"de"},theme:{dark:!0,themes:{dark:{primary:K["a"].grey.darken4,secondary:K["a"].grey.darken3,success:K["a"].green.accent2,accent:K["a"].green.accent2},light:{primary:K["a"].grey,secondary:K["a"].grey.lighten3,success:K["a"].green.accent3,accent:K["a"].green.accent3}}}},Z=new z["a"](W),Q=n("1321"),Y=n.n(Q),ee=(n("159b"),n("ac1f"),n("466d"),n("a925"));function te(){var e=n("49f8"),t={};return e.keys().forEach((function(n){var a=n.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){var s=a[1];t[s]=e(n)}})),t}a["a"].use(ee["a"]);var ne=new ee["a"]({locale:"de",fallbackLocale:"en",messages:te()}),ae=n("b85c"),se=n("2909"),re=n("1da1"),ie=n("53ca"),oe=n("d4ec"),ce=n("bee2"),pe=n("262e"),le=n("2caf"),ue=(n("96cf"),n("fb6a"),n("1276"),n("5319"),n("13d5"),n("b64b"),n("b0c0"),n("d81d"),n("a15b"),n("b680"),n("25f0"),n("99af"),n("4d63"),n("07ac"),n("faa1")),he=n.n(ue),de=function(e){Object(pe["a"])(n,e);var t=Object(le["a"])(n);function n(){var e;return Object(oe["a"])(this,n),e=t.call(this),e.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem",type:"websocket"},conn:null,connOffset:0,session:{connect:!1,ready:!1,csrf:null,restart:!1,restartCnt:0,logList:[]},options:{lang:"de",debugMode:!1,debugLevel:5,loading:!1,loadCount:0,clockInterval:5e3,clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},theme:{dark:!0,themes:{}},appBar:{color:"primary",drawer:!1,clock:null,header:null},templates:[],componentMap:[{name:"panel",component:"templ_panel"},{name:"chart",component:"templ_chart"},{name:"weather",component:"templ_weather"},{name:"sysmon",component:"templ_sysmon"},{name:"hmlan",component:"templ_hmlan"},{name:"sonos",component:"templ_sonos"},{name:"scenes",component:"templ_scenes"},{name:"cam",component:"templ_cam"}],data:{roomList:[],groupList:[],deviceList:[],routeList:[],header:""},hasConnected:[]},e}return Object(ce["a"])(n,[{key:"loading",set:function(e){e&&this.app.options.loadCount++,!e&&this.app.options.loadCount>0&&this.app.options.loadCount--,this.app.options.loadCount>0&&!this.app.options.loading&&(this.app.options.loading=!0),0===this.app.options.loadCount&&(this.app.options.loading=!1)}},{key:"log",value:function(e){var t=["","mdi-alert-outline","mdi-connection","mdi-send-circle-outline","mdi-sync","mdi-hexagon-multiple-outline"],n=["","error","info","success","success","warning"],a=(new Date).toLocaleTimeString(this.app.options.lang),s=(new Date).getMilliseconds(),r={time:a+":"+("000"+s).slice(-3),msg:e.msg||"",lvl:e.lvl||5,meta:e.meta||null,icon:t[e.lvl||5],color:n[e.lvl||5]};this.app.options.logRecord&&r.lvl<=this.app.options.debugLevel&&(this.app.session.logList.unshift(r),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer)),1==r.lvl&&(this.app.options.loadCount=0,this.app.options.loading=!1,this.emit("message",r))}},{key:"getDate",value:function(e){var t=e?parseInt(e):0;return function(e){return new Date(e.setDate(e.getDate()-t)).toISOString()}(new Date).split("T")[0]}},{key:"getDateTime",value:function(e){var t=e||(new Date).toISOString();return new Date(t.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}},{key:"createURL",value:function(e){var t=this.app.connection,n=t.location?t.location:"",a=t.port?":"+t.port.replace(":",""):"",s=t.path?"/"+t.path.replace("/",""):"",r="";return"object"==Object(ie["a"])(e)&&e.length>0&&e.forEach((function(e){e.param&&e.value&&(r+=r?"&":"?",r+=e.param+"="+encodeURIComponent(e.value))})),n+a+s+r}},{key:"getEl",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0?s.push.apply(s,Object(se["a"])(t)):s.push(t)),"string"===typeof t&&s.push({param:"cmd",value:t}),r=this.createURL(s),this.log({lvl:3,msg:"Request: "+r}),e.next=9,fetch(r).then((function(e){var t=null;return"csrf"===n&&(t=e.headers.get("x-fhem-csrftoken")),"json"===n&&(t=e.json()),t||(t=e.text()),"object"===Object(ie["a"])(a)?Object.assign(a,{data:t}):t})).catch((function(e){return i.log({lvl:1,msg:"Request failed "+r,meta:e.message})}));case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)})));function t(t,n,a){return e.apply(this,arguments)}return t}()},{key:"getJsonFile",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=new Headers,n.append("pragma","no-cache"),n.append("cache-control","no-cache"),a={method:"GET",headers:n},e.next=6,fetch(t,a).then((function(e){return e.json()})).catch((function(e){return r.log({lvl:1,msg:"Read Json-Data from "+t+" failed.",meta:e})}));case 6:return s=e.sent,s&&this.log({lvl:5,msg:"Json-Data parsed from "+t,meta:s}),e.next=10,s;case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"readConfig",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getJsonFile(t);case 2:if(n=e.sent,n){for(a=0,s=Object.keys(n);a0)){e.next=41;break}n=[],a=[],this.app.data.routeList.splice(0),s=Object(ae["a"])(t.Results),e.prev=8,s.s();case 10:if((r=s.n()).done){e.next=27;break}return i=r.value,e.next=14,this.createOptions(i);case 14:if(o=e.sent,!o.template){e.next=25;break}return e.next=18,this.getTemplate(o);case 18:c=e.sent,c&&this.app.templates.push(c),o.room&&this.createNaviItems(o,n,"room"),o.group&&this.createNaviItems(o,a,"group"),o.home&&this.createRoutes(o,"/"),o.dashboard&&this.createRoutes(o,"/dashboard"),o.system&&this.createRoutes(o,"/system");case 25:e.next=10;break;case 27:e.next=32;break;case 29:e.prev=29,e.t0=e["catch"](8),s.e(e.t0);case 32:return e.prev=32,s.f(),e.finish(32);case 35:n.sort((function(e,t){return e.title>t.title?1:t.title>e.title?-1:0})),a.sort((function(e,t){return e.title>t.title?1:t.title>e.title?-1:0})),this.app.data.roomList=Object.assign([],n),this.app.data.groupList=Object.assign([],a),this.app.session.ready=!0,this.loading=!1;case 41:case"end":return e.stop()}}),e,this,[[8,29,32,35]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"createConnected",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r,i,o,c,p;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n={},a=this.app.hasConnected.indexOf(t.Name),-1!=a){e.next=30;break}if(this.app.hasConnected.push(t.Name),!("connected"in t.Options)){e.next=28;break}s=Object.keys(t.Options.connected),r=0,i=s;case 7:if(!(rt.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0})),this.app.data.deviceList=Object.assign([],r),this.loading=!1),i++;case 39:e.next=15;break;case 41:e.next=46;break;case 43:e.prev=43,e.t0=e["catch"](13),o.e(e.t0);case 46:return e.prev=46,o.f(),e.finish(46);case 49:case"end":return e.stop()}}),e,this,[[13,43,46,49]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"checkUpdate",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(){var t,n,a,s,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]);case 2:if(t=e.sent,n=0,t){a=t.split("\n").splice(2),s=Object(ae["a"])(a);try{for(s.s();!(r=s.n()).done;)i=r.value,i.match("UPD")&&!i.match("excluded")&&n++}catch(o){s.e(o)}finally{s.f()}}return e.abrupt("return",n>0);case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"handleLogData",value:function(e){var t=e.split("\n");t.length>3&&t.splice(-3,3);var n,a=[],s=t.length>this.app.options.maxChartPoints?parseInt(t.length/this.app.options.maxChartPoints):1,r=s,i=0,o=1,c=Object(ae["a"])(t);try{for(c.s();!(n=c.n()).done;){var p=n.value,l=p.split(" "),u=Date.parse(l[0].replace("_","T")),h=parseFloat(l[1]);i+=h,(o>=r||o===t.length)&&(o===t.length&&(s-=r-o),a.push({timestamp:u,value:i/s}),r+=s,i=0),o++}}catch(d){c.e(d)}finally{c.f()}return this.log({lvl:5,msg:"handle Chartdata (Lines: "+t.length+")"}),a}},{key:"readLogData",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r,i,o,c,p,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=[],this.loading=!0,!(t.defs&&t.defs.length>0)){e.next=40;break}a=0,s=Object(ae["a"])(t.defs),e.prev=5,s.s();case 7:if((r=s.n()).done){e.next=32;break}return i=r.value,o=/\(.*\)/.exec(i),c=o?i.replace(o[0],"_").split(":"):i.split(":"),p="get ",p+=c[0]?c[0]:t.deviceName,p+=t.from?" - - "+t.from:"",p+=t.to?" "+t.to:"",p+=o?" "+o[0].replace(/\(|\)/g,""):" 4:"+c[1],e.next=18,this.request([{param:"cmd",value:p},{param:"XHR",value:"1"}],"text",{id:a});case 18:if(l=e.sent,!l){e.next=29;break}return e.t0=n,e.t1=l.id,e.t2=this,e.next=25,l.data;case 25:e.t3=e.sent,e.t4=e.t2.handleLogData.call(e.t2,e.t3),e.t5={id:e.t1,data:e.t4},e.t0.push.call(e.t0,e.t5);case 29:a++;case 30:e.next=7;break;case 32:e.next=37;break;case 34:e.prev=34,e.t6=e["catch"](5),s.e(e.t6);case 37:return e.prev=37,s.f(),e.finish(37);case 40:return this.loading=!1,e.abrupt("return",Object.assign(t,{data:n}));case 42:case"end":return e.stop()}}),e,this,[[5,34,37,40]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"replaceVals",value:function(e,t){for(var n=/-?[0-9]/.exec(t),a=[],s=2;s0){var a,s=Object(ae["a"])(t);try{for(s.s();!(a=s.n()).done;){var r=a.value,i=r.split(":");if(i.length>2){var o=/\./.test(i[0])?i[0].split("."):["Readings",i[0],"Value"],c=this.getEl.apply(this,[e].concat(Object(se["a"])(o)))||this.getEl(e,"Readings",i[0],"Value");if(c){var p=!1,l=parseFloat(i[1]);if(isNaN(l))RegExp(i[1]?i[1]:".").test(c)&&(p=!0);else{var u=/-?[0-9]/.exec(c);-1!=u.index&&parseFloat(c.slice(u.index))>=l&&(p=!0)}if(p){n=this.replaceVals(i,c);break}}}}}catch(h){s.e(h)}finally{s.f()}}return n}},{key:"handleTemplate",value:function(e){var t=this.getEl(e,"Options","setup","show"),n=this.getEl(e,"Options","setup","status","bar"),a=this.getEl(e,"Options","setup","status","error"),s=this.getEl(e,"Options","setup","info");if(t){var r=this.handleVals(e,t);e.Options.show="false"!==r[0],r[1]&&(e.Options.setup.size=r[1]),r[2]&&(e.Options.sortby=r[2])}if(n){var i=this.getEl(e,"Options","setup","status","min")||0,o=this.getEl(e,"Options","setup","status","max")||100,c=this.handleVals(e,n),p=100/(o-i),l=(c[0]||"0"-i)*p;e.Options.status.level=c[2]?100-l:l,e.Options.status.color=c[1]||"success"}if(a){var u=this.handleVals(e,a);u.length>0?(e.Options.status.level=u[0]||"100",e.Options.status.color=u[1]||"error",e.Options.status.error=u[2]||"Fehler",e.Options.status.isActive=!1):e.Options.status.isActive=!0}if(s){var h=this.handleVals(e,s.left1),d=this.handleVals(e,s.left2),m=this.handleVals(e,s.mid1),f=this.handleVals(e,s.mid2),v=this.handleVals(e,s.right1),g=this.handleVals(e,s.right2);e.Options.info.left1IconColor=h[2]||"",e.Options.info.left1Icon=h[1]||"",e.Options.info.left1Text=h[0]||"",e.Options.info.left2IconColor=d[2]||"",e.Options.info.left2Icon=d[1]||"",e.Options.info.left2Text=d[0]||"",e.Options.info.mid1IconColor=m[2]||"",e.Options.info.mid1Icon=m[1]||"",e.Options.info.mid1Text=m[0]||"",e.Options.info.mid2IconColor=f[2]||"",e.Options.info.mid2Icon=f[1]||"",e.Options.info.mid2Text=f[0]||"",e.Options.info.right1IconColor=v[2]||"",e.Options.info.right1Icon=v[1]||"",e.Options.info.right1Text=v[0]||"",e.Options.info.right2IconColor=v[2]||"",e.Options.info.right2Icon=g[1]||"",e.Options.info.right2Text=g[0]||""}}},{key:"handleData",value:function(e){var t=JSON.parse(e),n=null;if(!t[2].match("0){var i=this.handleData(r);if(i){var o,c=0,p=Object(ae["a"])(this.app.data.deviceList);try{for(p.s();!(o=p.n()).done;){var l=o.value,u=this.app.data.deviceList[c],h=Object.assign({},u);if(l.Name===i.Name&&("Readings"===i.devicePart&&this.getEl(h,"Readings",i.param,i.paramPart)&&(h.Readings[i.param][i.paramPart]=i.value),"Attributes"===i.devicePart&&this.getEl(h,"Attributes",i.param)&&(h.Attributes[i.param]=i.value),this.handleTemplate(h),this.app.data.deviceList.splice(c,1,h),this.app.data.deviceList.sort((function(e,t){return e.Options.sortby>t.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0}))),"Connected"in l)for(var d=0,m=0,f=Object.values(l.Connected);mt.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0}))}d++}c++}}catch(b){p.e(b)}finally{p.f()}}}}}catch(b){s.e(b)}finally{s.f()}}},{key:"connOpen",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.app.session.connect=!0,this.app.session.restartCnt=0,this.log({lvl:2,msg:"Connection with FHEM is opened.",meta:this.app.connection}),e.next=5,this.request({},"csrf");case 5:this.app.session.csrf=e.sent,this.log({lvl:2,msg:"Crsf-Token received.",meta:{token:this.app.session.csrf}}),this.loadStructure();case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"connClose",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t){var n,a,s=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.ready=!1,this.app.conn=null,this.app.session.restart||(n=0==this.app.session.restartCnt?1:3e3,this.app.session.restart=!0,setTimeout((function(){s.app.session.restart=!1,s.app.session.restartCnt++,s.connStart()}),n),a={info:"Connection ("+this.app.connection.type+") "+(t?"failed.":"was closed."),errCode:t||""},this.log({lvl:2,msg:"Connection with FHEM was closed. Try to Reconnect in "+n/1e3+" seconds...",meta:a}),this.loading=!1);case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"connStart",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(){var t,n,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],n=this.createURL(t),"websocket"===this.app.connection.type?(this.app.conn=new WebSocket(n.replace(/^http/i,"ws")),this.app.conn.onopen=function(){return a.connOpen()},this.app.conn.onmessage=function(e){return a.doUpdate(e)},this.app.conn.onclose=function(){return a.connClose()},this.app.conn.onerror=function(e){return a.connClose(e)}):(this.app.conn=new XMLHttpRequest,this.app.conn.open("GET",n,!0),this.app.conn.onreadystatechange=function(){200===a.app.conn.status&&2===a.app.conn.readyState&&a.connOpen(),200===a.app.conn.status&&3===a.app.conn.readyState&&a.doUpdate()},this.app.conn.onerror=function(e){return a.connClose(e)},this.app.conn.send());case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setClock",value:function(){var e=new Date;this.app.appBar.clock=e.toLocaleString(this.app.options.lang,{hour:"2-digit",minute:"2-digit"}),this.app.options.mobileHeader||(this.app.appBar.header=e.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))}},{key:"init",value:function(){var e=Object(re["a"])(regeneratorRuntime.mark((function e(t,n){var a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.log({lvl:2,msg:"Starting FHEMApp..."}),this.loading=!0,e.next=4,this.readConfig("./cfg/config.json");case 4:this.connStart(),t&&this.app.theme&&(-1!=this.app.theme.dark&&Object.assign(t.framework.theme,{dark:this.app.theme.dark}),this.app.theme.themes.light&&Object.assign(t.framework.theme.themes.light,this.app.theme.themes.light),this.app.theme.themes.dark&&Object.assign(t.framework.theme.themes.dark,this.app.theme.themes.dark)),n&&this.app.options.lang&&(n.locale=this.app.options.lang),this.setClock(),setInterval((function(){return a.setClock()}),this.app.options.clockInterval);case 9:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(he.a),me={install:function(e,t,n){e.prototype.$fhem=new de,e.prototype.$fhem.init(t,n)}};a["a"].use(me,Z,ne),a["a"].use(Y.a),a["a"].component("apexchart",Y.a),a["a"].config.productionTip=!1,new a["a"]({vuetify:Z,router:q,i18n:ne,render:function(e){return e(H)}}).$mount("#app")},"6ce2":function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"},"dates":{"from":"von","to":"bis"}},"templates":{"sysmon":{"updateBtn":["prüfe Updates...","system aktuell","update","update läuft.."],"restartBtn":"neustart","updateDialog":{"header":"FHEM Update","text":"Update wurde erfolgreich beendet. FHEM sollte neu gestartet werden.","restartBtn":"jetzt neustarten"}}}}')},9224:function(e){e.exports=JSON.parse('{"name":"fhemapp","version":"3.20.2","private":true,"author":"jemu75","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build","lint":"vue-cli-service lint","i18n:report":"vue-cli-service i18n:report --src \\"./src/**/*.?(js|vue)\\" --locales \\"./src/locales/**/*.json\\""},"dependencies":{"apexcharts":"^3.26.1","core-js":"^3.12.0","typeface-roboto":"^1.1.13","vue":"^2.6.11","vue-apexcharts":"^1.6.1","vue-i18n":"^8.24.4","vue-json-pretty":"^1.8.0","vue-router":"^3.5.1","vuetify":"^2.4.11"},"devDependencies":{"@mdi/font":"^5.9.55","@vue/cli-plugin-babel":"^4.5.13","@vue/cli-plugin-eslint":"^4.5.13","@vue/cli-plugin-router":"^4.5.13","@vue/cli-service":"^4.5.13","babel-eslint":"^10.1.0","eslint":"^6.7.2","eslint-plugin-vue":"^6.2.2","sass":"^1.32.12","sass-loader":"^8.0.0","vue-cli-plugin-i18n":"~2.1.0","vue-cli-plugin-vuetify":"~2.0.9","vue-template-compiler":"^2.6.11","vuetify-loader":"^1.7.2"},"bugs":{"url":"https://github.com/jemu75/fhemApp/issues"},"homepage":"https://github.com/jemu75/fhemApp#readme","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jemu75/fhemApp.git"}}')},c274:function(e,t,n){e.exports=n.p+"img/FHEM_Logo.2d0f7a38.png"},edd4:function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"},"dates":{"from":"From","to":"To"}},"templates":{"sysmon":{"updateBtn":["check updates...","up to date","update","update running..."],"restartBtn":"restart","updateDialog":{"header":"FHEM Update","text":"Update was successful finished. FHEM should be restarted now.","restartBtn":"restart now"}}}}')}}); \ No newline at end of file diff --git a/www/fhemapp/js/chunk-00f750ae.31479edc.js b/www/fhemapp/js/chunk-00f750ae.31479edc.js new file mode 100644 index 00000000..46bb11be --- /dev/null +++ b/www/fhemapp/js/chunk-00f750ae.31479edc.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00f750ae"],{"5d11":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.item.Options.show?i("v-col",{class:t.item.Options.setup.size||t.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.item.Options.status.level||t.status.level,color:t.item.Options.status.color||t.status.color,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.name)+" "),i("v-spacer"),t.app.options.debugMode?i("jsonList",{attrs:{item:t.item}}):t._e()],1),i("v-divider"),t.item.Options.status.isActive?t._e():i("div",[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),i("v-divider")],1),t.item.Options.status.isActive?i("div",[i("v-card-text",{staticClass:"pa-0"},t._l(t.panelItems,(function(e){return i("div",{key:e.Name,attrs:{align:"center"}},[i("v-row",{staticClass:"ma-1",attrs:{dense:"",align:"center"}},[i("v-col",{staticClass:"col-2"},[i("v-progress-circular",{attrs:{value:e.level,color:e.color}})],1),i("v-col",{staticClass:"text-truncate",attrs:{align:"left"}},[i("div",{staticClass:"text-truncate headline"},[t._v(" "+t._s(e.title)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(e.text)+" ")])]),i("v-col",{staticClass:"col-2",attrs:{align:"center"}},[e.route&&!e.click&&e.icon?i("v-btn",{attrs:{icon:"",link:"",to:e.route}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.icon)+" ")])],1):t._e(),e.click&&!e.route&&e.icon?i("div",[i("v-btn",{attrs:{icon:""},on:{click:function(i){return t.set(e.device,e.click)}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.icon)+" ")])],1)],1):t._e(),e.menu&&!e.route&&!e.click&&e.icon?i("div",[i("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,o=s.attrs;return[i("v-btn",t._g(t._b({attrs:{icon:""}},"v-btn",o,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.icon)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.menuIdx,callback:function(i){t.$set(e,"menuIdx",i)},expression:"el.menuIdx"}},t._l(e.menu,(function(s,n){return i("v-list-item",{key:n,on:{click:function(i){return t.set(e.device,s.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(s.name)+" ")])],1),s.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e()],1)],1),i("v-divider")],1)})),0)],1):t._e(),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),i("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},n=[],o=i("b85c"),a=i("2909"),l=(i("ac1f"),i("466d"),i("1276"),i("a434"),i("99af"),i("d81d"),i("b0c0"),i("649b")),c={components:{jsonList:l["a"]},props:{item:{type:Object,default:function(){return{name:"panel"}}}},data:function(){return{name:"panel",size:"col-12 col-sm-6 col-md-6 col-lg-6",status:{color:"success",level:0},app:{options:{debugMode:!1}},panelItems:[]}},watch:{item:{immediate:!0,deep:!0,handler:function(){this.doList()}}},created:function(){this.app.options=this.$fhem.app.options},methods:{set:function(t,e){var i=e.match("set")?e:"set "+t+" "+e;this.$fhem.request(i)},checkMenu:function(t,e){var i=!1;if(e){var s,n=e.split(" ");n[0].match("set")&&n.splice(0,2),1===n.length&&n.splice(0,0,"state");var o=/\./.test(n[0])?n[0].split("."):["Readings",n[0],"Value"],l=(s=this.$fhem).getEl.apply(s,[t].concat(Object(a["a"])(o)));l&&l.match(n[1])&&(i=!0)}return i},loadItem:function(t){var e=this.$fhem.getEl(t,"Name")||"",i=this.$fhem.getEl(t,"Attributes","alias")||t.Name,s=this.$fhem.getEl(t,"Options","name")||i,n=this.$fhem.getEl(t,"Options","panel","link")||"",a=this.$fhem.handleVals(t,this.$fhem.getEl(t,"Options","panel","status"))||[],l=this.$fhem.handleVals(t,this.$fhem.getEl(t,"Options","panel","btn"))||[],c=this.$fhem.handleVals(t,this.$fhem.getEl(t,"Options","panel","click"))||[],r=this.$fhem.getEl(t,"Options","panel","menu")||[],h=this.$fhem.getEl(t,"Options","panel","min")||0,u=this.$fhem.getEl(t,"Options","panel","max")||100,d=100/(u-h),p=((a[1]||0)-h)*d,f=[];if(r.length>0){var m,v=Object(o["a"])(r);try{for(v.s();!(m=v.n()).done;){var g=m.value,y=g.split(":"),b=this.checkMenu(t,y[1]);2==y.length&&f.push({name:y[0],cmd:y[1],active:b})}}catch(k){v.e(k)}finally{v.f()}}var _={device:e,title:s,text:a[0]||"",level:a[3]?100-p:p,color:a[2]||"success",icon:l[0]||"",route:n,click:c[0]||"",menu:f};return _},doList:function(){if(this.item.Connected)for(var t in this.status.color="success",this.item.Options.connected){var e=this.panelItems.map((function(t){return t.name})).indexOf(t),i=this.loadItem(this.item.Connected[t]),s={name:t,device:i.device,level:i.level,color:i.color,title:i.title,text:i.text,icon:i.icon,route:i.route,click:i.click,menu:i.menu,menuIdx:i.menu.map((function(t){return t.active})).indexOf(!0)};"success"!=i.color&&(this.status.color=i.color,this.status.level=100),-1!=e?this.panelItems.splice(e,1,s):this.panelItems.push(s)}}}},r=c,h=i("2877"),u=i("6544"),d=i.n(u),p=i("8336"),f=i("b0af"),m=i("99d9"),v=i("62ad"),g=i("ce7e"),y=i("132d"),b=i("8860"),_=i("da13"),k=i("5d23"),C=i("1baa"),x=i("34c3"),O=i("e449"),T=i("490a"),w=i("8e36"),$=i("0fd9"),I=i("2fa4"),j=i("afd9"),S=Object(h["a"])(r,s,n,!1,null,null,null);e["default"]=S.exports;d()(S,{VBtn:p["a"],VCard:f["a"],VCardText:m["c"],VCardTitle:m["d"],VCol:v["a"],VDivider:g["a"],VIcon:y["a"],VList:b["a"],VListItem:_["a"],VListItemContent:k["a"],VListItemGroup:C["a"],VListItemIcon:x["a"],VListItemTitle:k["c"],VMenu:O["a"],VProgressCircular:T["a"],VProgressLinear:w["a"],VRow:$["a"],VSpacer:I["a"],VSystemBar:j["a"]})},"649b":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"text-center"},["zzz"!=t.item.Options.sortby?i("v-chip",{attrs:{small:"",color:"secondary"}},[i("v-icon",{attrs:{left:""}},[t._v(" mdi-sort-ascending ")]),t._v(" "+t._s(t.item.Options.sortby)+" ")],1):t._e(),i("v-btn",{attrs:{href:t.toFhem(),target:"_blank",small:"",icon:""}},[i("v-icon",{attrs:{small:""}},[t._v(" mdi-link ")])],1),i("v-dialog",{attrs:{"max-width":"90%",scrollable:""},scopedSlots:t._u([{key:"activator",fn:function(e){var s=e.on,n=e.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",n,!1),s),[i("v-icon",{attrs:{small:""}},[t._v(" mdi-code-json ")])],1)]}}]),model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[i("v-card",{staticClass:"secondary lighten-1"},[i("v-card-title",{staticClass:"secondary"},[i("v-btn",{attrs:{icon:""},on:{click:function(e){t.deep=t.deep>1?1:5}}},[i("v-icon",[t._v("mdi-file-tree-outline")])],1),i("v-spacer"),t._v(" "+t._s(t.item.Name)+" "),i("v-spacer"),i("v-btn",{attrs:{icon:""},on:{click:function(e){t.dialog=!1}}},[i("v-icon",[t._v("mdi-close")])],1)],1),i("v-card-text",[i("div",{ref:"jsonContent",staticClass:"select"},[i("vue-json-pretty",{attrs:{"show-line":!1,deep:t.deep,data:t.item}})],1)])],1)],1)],1)},n=[],o=i("838b"),a=i.n(o),l=(i("b83f"),{props:{item:{type:Object,default:function(){return{name:"json"}}}},data:function(){return{dialog:!1,deep:1}},components:{VueJsonPretty:a.a},methods:{toFhem:function(){var t=this.$fhem.createURL([{param:"detail",value:this.item.Name}]);return t}}}),c=l,r=(i("a906"),i("2877")),h=i("6544"),u=i.n(h),d=i("8336"),p=i("b0af"),f=i("99d9"),m=i("cc20"),v=i("169a"),g=i("132d"),y=i("2fa4"),b=Object(r["a"])(c,s,n,!1,null,"33cd40a8",null);e["a"]=b.exports;u()(b,{VBtn:d["a"],VCard:p["a"],VCardText:f["c"],VCardTitle:f["d"],VChip:m["a"],VDialog:v["a"],VIcon:g["a"],VSpacer:y["a"]})},8308:function(t,e,i){},"838b":function(t,e,i){!function(e,i){t.exports=i()}(0,(function(){return function(){"use strict";var t={16:function(t,e,i){function s(t,e,i,s,n,o,a,l){var c,r="function"==typeof t?t.options:t;if(e&&(r.render=e,r.staticRenderFns=i,r._compiled=!0),s&&(r.functional=!0),o&&(r._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},r._ssrRegister=c):n&&(c=l?function(){n.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:n),c)if(r.functional){r._injectStyles=c;var h=r.render;r.render=function(t,e){return c.call(e),h(t,e)}}else{var u=r.beforeCreate;r.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:r}}i.r(e),i.d(e,{default:function(){return h}});var n=s({props:{data:{required:!0,type:String},collapsedOnClickBrackets:Boolean},methods:{toggleBrackets(t){this.collapsedOnClickBrackets&&this.$emit("click",t)}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"vjs-tree__brackets",on:{click:function(e){return e.stopPropagation(),t.toggleBrackets(e)}}},[t._v("\n "+t._s(t.data)+"\n")])}),[],!1,null,null,null).exports,o=s({props:{checked:{type:Boolean,default:!1},isMultiple:Boolean},data:()=>({focus:!1}),computed:{uiType(){return this.isMultiple?"checkbox":"radio"},model:{get(){return this.checked},set(t){this.$emit("input",t)}}}},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{class:["vjs-check-controller",t.checked?"is-checked":""],on:{click:function(t){t.stopPropagation()}}},[i("span",{class:"vjs-check-controller__inner is-"+t.uiType}),t._v(" "),"checkbox"===t.uiType?i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],class:"vjs-check-controller__original is-"+t.uiType,attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.model)?t._i(t.model,null)>-1:t.model},on:{change:[function(e){var i=t.model,s=e.target,n=!!s.checked;if(Array.isArray(i)){var o=t._i(i,null);s.checked?o<0&&(t.model=i.concat([null])):o>-1&&(t.model=i.slice(0,o).concat(i.slice(o+1)))}else t.model=n},function(e){return t.$emit("change",t.model)}],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}):"radio"===t.uiType?i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],class:"vjs-check-controller__original is-"+t.uiType,attrs:{type:"radio"},domProps:{checked:t._q(t.model,null)},on:{change:[function(e){t.model=null},function(e){return t.$emit("change",t.model)}],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}):i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],class:"vjs-check-controller__original is-"+t.uiType,attrs:{type:t.uiType},domProps:{value:t.model},on:{change:function(e){return t.$emit("change",t.model)},focus:function(e){t.focus=!0},blur:function(e){t.focus=!1},input:function(e){e.target.composing||(t.model=e.target.value)}}})])}),[],!1,null,null,null);function a(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function l(t,e="root",i=0,{key:s,index:n,type:o="content",showComma:c=!1,length:r=1}={}){const h=a(t);if("array"===h){const n=t.map((t,s,n)=>l(t,`${e}[${s}]`,i+1,{index:s,showComma:s!==n.length-1,length:r,type:o})).flat();return[l("[",e,i,{key:s,length:t.length,type:"arrayStart"})[0]].concat(n,l("]",e,i,{showComma:c,length:t.length,type:"arrayEnd"})[0])}if("object"===h){const a=Object.keys(t),h=a.map((s,n,a)=>l(t[s],s.includes(".")?`${e}["${s}"]`:`${e}.${s}`,i+1,{key:s,showComma:n!==a.length-1,length:r,type:o})).flat();return[l("{",e,i,{key:s,index:n,length:a.length,type:"objectStart"})[0]].concat(h,l("}",e,i,{showComma:c,length:a.length,type:"objectEnd"})[0])}const u=Object.entries({content:t,level:i,key:s,index:n,path:e,showComma:c,length:r,type:o}).reduce((t,[e,i])=>void 0!==i?{...t,[e]:i}:t,{});return"object"===a(u)?[u]:u}var c=s({components:{Brackets:n,CheckController:o.exports},props:{node:{required:!0,type:Object},collapsed:Boolean,collapsedOnClickBrackets:Boolean,showDoubleQuotes:Boolean,showLength:Boolean,checked:Boolean,selectableType:{type:String,default:""},showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},selectOnClickNode:{type:Boolean,default:!0},pathSelectable:{type:Function,default:()=>!0},highlightSelectedNode:{type:Boolean,default:!0},customValueFormatter:{type:Function,default:null}},computed:{valueClass(){return"vjs-value vjs-value__"+this.dataType},dataType(){return a(this.node.content)},prettyKey(){return this.showDoubleQuotes?`"${this.node.key}"`:this.node.key},selectable(){return this.pathSelectable(this.node.path,this.node.content)&&(this.isMultiple||this.isSingle)},isMultiple(){return"multiple"===this.selectableType},isSingle(){return"single"===this.selectableType}},methods:{defaultFormatter(t){let e=t+"";return"string"===this.dataType&&(e=`"${e}"`),e},customFormatter(t){return this.customValueFormatter?this.customValueFormatter(t,this.node.key,this.node.path,this.defaultFormatter(t)):this.defaultFormatter(t)},onBracketsClick(){this.$emit("brackets-click",!this.collapsed,this.node.path)},onCheckedChange(){this.$emit("selected-change",this.node)},onTreeNodeClick(){this.$emit("tree-node-click",this.node),this.selectable&&this.selectOnClickNode&&this.$emit("selected-change",this.node)}}},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:{"vjs-tree__node":!0,"has-selector":t.showSelectController,"is-highlight":t.highlightSelectedNode&&t.checked},on:{click:t.onTreeNodeClick}},[t.showSelectController&&t.selectable&&"objectEnd"!==t.node.type&&"arrayEnd"!==t.node.type?[i("check-controller",{attrs:{"is-multiple":t.isMultiple,checked:t.checked},on:{change:t.onCheckedChange}})]:t._e(),t._v(" "),t._l(t.node.level,(function(e,s){return i("div",{key:s,class:{"vjs-tree__indent":!0,"has-line":t.showLine}})})),t._v(" "),t.node.key?i("span",{staticClass:"vjs-key"},[t._v(" "+t._s(t.prettyKey)+":  ")]):t._e(),t._v(" "),i("span",["content"!==t.node.type?i("brackets",{attrs:{data:t.node.content,"collapsed-on-click-brackets":t.collapsedOnClickBrackets},on:{click:t.onBracketsClick}}):[t.customValueFormatter?i("span",{class:t.valueClass,domProps:{innerHTML:t._s(t.customFormatter(t.node.content))}}):i("span",{class:t.valueClass},[t._v(t._s(t.defaultFormatter(t.node.content)))])],t._v(" "),t.node.showComma?i("span",[t._v(",")]):t._e(),t._v(" "),t.showLength&&t.collapsed?i("span",{staticClass:"vjs-comment"},[t._v(" // "+t._s(t.node.length)+" items ")]):t._e()],2)],2)}),[],!1,null,null,null),r=s({name:"VueJsonPretty",components:{TreeNode:c.exports},props:{data:{type:[String,Number,Boolean,Array,Object],default:null},deep:{type:Number,default:1/0},path:{type:String,default:"root"},virtual:{type:Boolean,default:!1},itemHeight:{type:Number,default:20},showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},selectableType:{type:String,default:""},showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},selectOnClickNode:{type:Boolean,default:!0},value:{type:[Array,String],default:()=>""},pathSelectable:{type:Function,default:()=>!0},highlightSelectedNode:{type:Boolean,default:!0},collapsedOnClickBrackets:{type:Boolean,default:!0},customValueFormatter:{type:Function,default:null}},data(){return{translateY:0,visibleData:null,hiddenPaths:l(this.data,this.path).reduce((t,e)=>"objectStart"!==e.type&&"arrayStart"!==e.type||e.level!==this.deep?t:{...t,[e.path]:1},{})}},computed:{flatData(){let t=null;return l(this.data,this.path).reduce((e,i,s)=>{const n={...i,id:s},o=this.hiddenPaths[n.path];if(t&&t.path===n.path){const i="objectStart"===t.type,s={...t,...n,content:i?"{...}":"[...]",type:i?"objectCollapsed":"arrayCollapsed"};return t=null,e.concat(s)}return o&&!t?(t=n,e):t?e:e.concat(n)},[])},selectedPaths:{get(){return this.value&&"single"===this.selectableType?[this.value]:this.value||[]},set(t){this.$emit("input",t)}},propsError(){return!this.selectableType||this.selectOnClickNode||this.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}},watch:{propsError:{handler(t){if(t)throw new Error("[VueJsonPretty] "+t)},immediate:!0},flatData:{handler(){this.onTreeScroll()},immediate:!0}},methods:{onTreeScroll(){if(this.virtual){const t=10,e=this.$refs.tree&&this.$refs.tree.scrollTop||0,i=Math.floor(e/this.itemHeight);let s=i<0?0:i+t>this.flatData.length?this.flatData.length-t:i;s<0&&(s=0);const n=s+t;this.translateY=s*this.itemHeight,this.visibleData=this.flatData.filter((t,e)=>e>=s&&ee===t),i=[...this.selectedPaths];-1!==e?this.selectedPaths.splice(e,1):this.selectedPaths.push(t),this.$emit("change",this.selectedPaths,i)}else if("single"===e&&this.selectedPaths!==t){const e=this.selectedPaths,i=t;this.selectedPaths=i,this.$emit("change",i,e)}},onTreeNodeClick({content:t,path:e}){this.$emit("click",e,t)},onBracketsClick(t,e){if(t)this.hiddenPaths={...this.hiddenPaths,[e]:1};else{const t={...this.hiddenPaths};delete t[e],this.hiddenPaths=t}}}},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"tree",class:{"vjs-tree":!0,"is-virtual":t.virtual},on:{scroll:t.onTreeScroll}},[i("div",{style:t.virtual&&{height:t.flatData.length*t.itemHeight+"px"}},[i("div",{style:t.virtual&&{transform:"translateY("+t.translateY+"px)"}},t._l(t.visibleData,(function(e){return i("tree-node",{key:e.id,attrs:{node:e,collapsed:!!t.hiddenPaths[e.path],"custom-value-formatter":t.customValueFormatter,"show-double-quotes":t.showDoubleQuotes,"show-length":t.showLength,"collapsed-on-click-brackets":t.collapsedOnClickBrackets,checked:t.selectedPaths.includes(e.path),"selectable-type":t.selectableType,"show-line":t.showLine,"show-select-controller":t.showSelectController,"select-on-click-node":t.selectOnClickNode,"path-selectable":t.pathSelectable,"highlight-selected-node":t.highlightSelectedNode},on:{"tree-node-click":t.onTreeNodeClick,"brackets-click":t.onBracketsClick,"selected-change":t.onSelectedChange}})})),1)])])}),[],!1,null,null,null).exports,h=Object.assign({},r,{version:"1.8.0"})}},e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}return i.d=function(t,e){for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(16)}()}))},a906:function(t,e,i){"use strict";i("b3d1")},afd9:function(t,e,i){"use strict";var s=i("5530"),n=(i("a9e3"),i("c7cd"),i("8308"),i("3a66")),o=i("a9ad"),a=i("7560"),l=i("58df"),c=i("80d2");e["a"]=Object(l["a"])(Object(n["a"])("bar",["height","window"]),o["a"],a["a"]).extend({name:"v-system-bar",props:{height:[Number,String],lightsOut:Boolean,window:Boolean},computed:{classes:function(){return Object(s["a"])({"v-system-bar--lights-out":this.lightsOut,"v-system-bar--absolute":this.absolute,"v-system-bar--fixed":!this.absolute&&(this.app||this.fixed),"v-system-bar--window":this.window},this.themeClasses)},computedHeight:function(){return this.height?isNaN(parseInt(this.height))?this.height:parseInt(this.height):this.window?32:24},styles:function(){return{height:Object(c["g"])(this.computedHeight)}}},methods:{updateApplication:function(){return this.$el?this.$el.clientHeight:this.computedHeight}},render:function(t){var e={staticClass:"v-system-bar",class:this.classes,style:this.styles,on:this.$listeners};return t("div",this.setBackgroundColor(this.color,e),Object(c["s"])(this))}})},b3d1:function(t,e,i){},b83f:function(t,e,i){},e449:function(t,e,i){"use strict";var s=i("ade3"),n=i("2909"),o=i("5530"),a=(i("a9e3"),i("7db0"),i("a630"),i("3ca3"),i("99af"),i("498a"),i("caad"),i("2532"),i("ee6f"),i("480e")),l=i("4ad4"),c=i("16b7"),r=i("b848"),h=i("75eb"),u=i("f573"),d=i("e4d3"),p=i("a236"),f=i("f2e7"),m=i("7560"),v=i("a293"),g=i("dc22"),y=i("58df"),b=i("d9bd"),_=i("80d2"),k=Object(y["a"])(r["a"],c["a"],h["a"],u["a"],d["a"],p["a"],f["a"],m["a"]);e["a"]=k.extend({name:"v-menu",directives:{ClickOutside:v["a"],Resize:g["a"]},provide:function(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnClick:{type:Boolean,default:!0},openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data:function(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile:function(){return this.tiles[this.listIndex]},calculatedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?Object(_["g"])(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight:function(){var t=this.auto?"200px":Object(_["g"])(this.maxHeight);return t||"0"},calculatedMaxWidth:function(){return Object(_["g"])(this.maxWidth)||"0"},calculatedMinWidth:function(){if(this.minWidth)return Object(_["g"])(this.minWidth)||"0";var t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),e=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return Object(_["g"])(Math.min(e,t))||"0"},calculatedTop:function(){var t=this.auto?Object(_["g"])(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles:function(){return Boolean(this.tiles.find((function(t){return t.tabIndex>-1})))},styles:function(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive:function(t){t||(this.listIndex=-1)},isContentActive:function(t){this.hasJustFocused=t},listIndex:function(t,e){if(t in this.tiles){var i=this.tiles[t];i.classList.add("v-list-item--highlighted"),this.$refs.content.scrollTop=i.offsetTop-i.clientHeight}e in this.tiles&&this.tiles[e].classList.remove("v-list-item--highlighted")}},created:function(){this.$attrs.hasOwnProperty("full-width")&&Object(b["e"])("full-width",this)},mounted:function(){this.isActive&&this.callActivate()},methods:{activate:function(){var t=this;this.updateDimensions(),requestAnimationFrame((function(){t.startTransition().then((function(){t.$refs.content&&(t.calculatedTopAuto=t.calcTopAuto(),t.auto&&(t.$refs.content.scrollTop=t.calcScrollPosition()))}))}))},calcScrollPosition:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active"),i=t.scrollHeight-t.offsetHeight;return e?Math.min(i,Math.max(0,e.offsetTop-t.offsetHeight/2+e.offsetHeight/2)):t.scrollTop},calcLeftAuto:function(){return parseInt(this.dimensions.activator.left-2*this.defaultOffset)},calcTopAuto:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active");if(e||(this.selectedIndex=null),this.offsetY||!e)return this.computedTop;this.selectedIndex=Array.from(this.tiles).indexOf(e);var i=e.offsetTop-this.calcScrollPosition(),s=t.querySelector(".v-list-item").offsetTop;return this.computedTop-i-s-1},changeListIndex:function(t){if(this.getTiles(),this.isActive&&this.hasClickableTiles)if(t.keyCode!==_["x"].tab){if(t.keyCode===_["x"].down)this.nextTile();else if(t.keyCode===_["x"].up)this.prevTile();else if(t.keyCode===_["x"].end)this.lastTile();else if(t.keyCode===_["x"].home)this.firstTile();else{if(t.keyCode!==_["x"].enter||-1===this.listIndex)return;this.tiles[this.listIndex].click()}t.preventDefault()}else this.isActive=!1},closeConditional:function(t){var e=t.target;return this.isActive&&!this._isDestroyed&&this.closeOnClick&&!this.$refs.content.contains(e)},genActivatorAttributes:function(){var t=l["a"].options.methods.genActivatorAttributes.call(this);return this.activeTile&&this.activeTile.id?Object(o["a"])(Object(o["a"])({},t),{},{"aria-activedescendant":this.activeTile.id}):t},genActivatorListeners:function(){var t=u["a"].options.methods.genActivatorListeners.call(this);return this.disableKeys||(t.keydown=this.onKeyDown),t},genTransition:function(){var t=this.genContent();return this.transition?this.$createElement("transition",{props:{name:this.transition}},[t]):t},genDirectives:function(){var t=this,e=[{name:"show",value:this.isContentActive}];return!this.openOnHover&&this.closeOnClick&&e.push({name:"click-outside",value:{handler:function(){t.isActive=!1},closeConditional:this.closeConditional,include:function(){return[t.$el].concat(Object(n["a"])(t.getOpenDependentElements()))}}}),e},genContent:function(){var t=this,e={attrs:Object(o["a"])(Object(o["a"])({},this.getScopeIdAttrs()),{},{role:"role"in this.$attrs?this.$attrs.role:"menu"}),staticClass:"v-menu__content",class:Object(o["a"])(Object(o["a"])(Object(o["a"])({},this.rootThemeClasses),this.roundedClasses),{},Object(s["a"])({"v-menu__content--auto":this.auto,"v-menu__content--fixed":this.activatorFixed,menuable__content__active:this.isActive},this.contentClass.trim(),!0)),style:this.styles,directives:this.genDirectives(),ref:"content",on:{click:function(e){var i=e.target;i.getAttribute("disabled")||t.closeOnContentClick&&(t.isActive=!1)},keydown:this.onKeyDown}};return this.$listeners.scroll&&(e.on=e.on||{},e.on.scroll=this.$listeners.scroll),!this.disabled&&this.openOnHover&&(e.on=e.on||{},e.on.mouseenter=this.mouseEnterHandler),this.openOnHover&&(e.on=e.on||{},e.on.mouseleave=this.mouseLeaveHandler),this.$createElement("div",e,this.getContentSlot())},getTiles:function(){this.$refs.content&&(this.tiles=Array.from(this.$refs.content.querySelectorAll(".v-list-item")))},mouseEnterHandler:function(){var t=this;this.runDelay("open",(function(){t.hasJustFocused||(t.hasJustFocused=!0)}))},mouseLeaveHandler:function(t){var e=this;this.runDelay("close",(function(){e.$refs.content.contains(t.relatedTarget)||requestAnimationFrame((function(){e.isActive=!1,e.callDeactivate()}))}))},nextTile:function(){var t=this.tiles[this.listIndex+1];if(!t){if(!this.tiles.length)return;return this.listIndex=-1,void this.nextTile()}this.listIndex++,-1===t.tabIndex&&this.nextTile()},prevTile:function(){var t=this.tiles[this.listIndex-1];if(!t){if(!this.tiles.length)return;return this.listIndex=this.tiles.length,void this.prevTile()}this.listIndex--,-1===t.tabIndex&&this.prevTile()},lastTile:function(){var t=this.tiles[this.tiles.length-1];t&&(this.listIndex=this.tiles.length-1,-1===t.tabIndex&&this.prevTile())},firstTile:function(){var t=this.tiles[0];t&&(this.listIndex=0,-1===t.tabIndex&&this.nextTile())},onKeyDown:function(t){var e=this;if(t.keyCode===_["x"].esc){setTimeout((function(){e.isActive=!1}));var i=this.getActivator();this.$nextTick((function(){return i&&i.focus()}))}else!this.isActive&&[_["x"].up,_["x"].down].includes(t.keyCode)&&(this.isActive=!0);this.$nextTick((function(){return e.changeListIndex(t)}))},onResize:function(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.updateDimensions,100))}},render:function(t){var e=this,i={staticClass:"v-menu",class:{"v-menu--attached":""===this.attach||!0===this.attach||"attach"===this.attach},directives:[{arg:"500",name:"resize",value:this.onResize}]};return t("div",i,[!this.activator&&this.genActivator(),this.showLazyContent((function(){return[e.$createElement(a["a"],{props:{root:!0,light:e.light,dark:e.dark}},[e.genTransition()])]}))])}})},ee6f:function(t,e,i){}}]); \ No newline at end of file diff --git a/www/fhemapp/js/chunk-00f750ae.7fc9b0ad.js b/www/fhemapp/js/chunk-00f750ae.7fc9b0ad.js deleted file mode 100644 index 7ef89a06..00000000 --- a/www/fhemapp/js/chunk-00f750ae.7fc9b0ad.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00f750ae"],{"5d11":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.item.Options.show?i("v-col",{class:t.item.Options.setup.size||t.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.item.Options.status.level||t.status.level,color:t.item.Options.status.color||t.status.color,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.name)+" "),i("v-spacer"),t.app.options.debugMode?i("jsonList",{attrs:{item:t.item}}):t._e()],1),i("v-divider"),t.item.Options.status.isActive?t._e():i("div",[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),i("v-divider")],1),t.item.Options.status.isActive?i("div",[i("v-card-text",{staticClass:"pa-0"},t._l(t.panelItems,(function(e){return i("div",{key:e.Name,attrs:{align:"center"}},[i("v-row",{staticClass:"ma-1",attrs:{dense:"",align:"center"}},[i("v-col",{staticClass:"col-2"},[i("v-progress-circular",{attrs:{value:e.level,color:e.color}})],1),i("v-col",{staticClass:"text-truncate",attrs:{align:"left"}},[i("div",{staticClass:"text-truncate headline"},[t._v(" "+t._s(e.title)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(e.text)+" ")])]),i("v-col",{staticClass:"col-2",attrs:{align:"center"}},[e.route&&!e.click&&e.icon?i("v-btn",{attrs:{icon:"",link:"",to:e.route}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.icon)+" ")])],1):t._e(),e.click&&!e.route&&e.icon?i("div",[i("v-btn",{attrs:{icon:""},on:{click:function(i){return t.set(e.device,e.click)}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.icon)+" ")])],1)],1):t._e(),e.menu&&!e.route&&!e.click&&e.icon?i("div",[i("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,o=s.attrs;return[i("v-btn",t._g(t._b({attrs:{icon:""}},"v-btn",o,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.icon)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",t._l(e.menu,(function(s,n){return i("v-list-item",{key:n,on:{click:function(i){return t.set(e.device,s.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(s.name)+" ")])],1)],1)})),1)],1)],1)],1):t._e()],1)],1),i("v-divider")],1)})),0)],1):t._e(),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),i("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},n=[],o=i("b85c"),a=(i("ac1f"),i("466d"),i("1276"),i("d81d"),i("b0c0"),i("a434"),i("649b")),l={components:{jsonList:a["a"]},props:{item:{type:Object,default:function(){return{name:"panel"}}}},data:function(){return{name:"panel",size:"col-12 col-sm-6 col-md-6 col-lg-6",status:{color:"success",level:0},app:{options:{debugMode:!1}},panelItems:[]}},watch:{item:{immediate:!0,deep:!0,handler:function(){this.doList()}}},created:function(){this.app.options=this.$fhem.app.options},methods:{set:function(t,e){var i=e.match("set")?e:"set "+t+" "+e;this.$fhem.request(i)},loadItem:function(t){var e=this.$fhem.getEl(t,"Name")||"",i=this.$fhem.getEl(t,"Attributes","alias")||t.Name,s=this.$fhem.getEl(t,"Options","name")||i,n=this.$fhem.getEl(t,"Options","panel","link")||"",a=this.$fhem.handleVals(t,this.$fhem.getEl(t,"Options","panel","status"))||[],l=this.$fhem.handleVals(t,this.$fhem.getEl(t,"Options","panel","btn"))||[],c=this.$fhem.handleVals(t,this.$fhem.getEl(t,"Options","panel","click"))||[],r=this.$fhem.getEl(t,"Options","panel","menu")||[],h=this.$fhem.getEl(t,"Options","panel","min")||0,d=this.$fhem.getEl(t,"Options","panel","max")||100,u=100/(d-h),p=((a[1]||0)-h)*u,f=[];if(r.length>0){var m,v=Object(o["a"])(r);try{for(v.s();!(m=v.n()).done;){var g=m.value,y=g.split(":");2==y.length&&f.push({name:y[0],cmd:y[1]})}}catch(_){v.e(_)}finally{v.f()}}var b={device:e,title:s,text:a[0]||"",level:a[3]?100-p:p,color:a[2]||"success",icon:l[0]||"",route:n,click:c[0]||"",menu:f};return b},doList:function(){if(this.item.Connected)for(var t in this.status.color="success",this.item.Options.connected){var e=this.panelItems.map((function(t){return t.name})).indexOf(t),i=this.loadItem(this.item.Connected[t]),s={name:t,device:i.device,level:i.level,color:i.color,title:i.title,text:i.text,icon:i.icon,route:i.route,click:i.click,menu:i.menu};"success"!=i.color&&(this.status.color=i.color,this.status.level=100),-1!=e?this.panelItems.splice(e,1,s):this.panelItems.push(s)}}}},c=l,r=i("2877"),h=i("6544"),d=i.n(h),u=i("8336"),p=i("b0af"),f=i("99d9"),m=i("62ad"),v=i("ce7e"),g=i("132d"),y=i("8860"),b=i("da13"),_=i("5d23"),k=i("1baa"),C=i("e449"),x=i("490a"),O=i("8e36"),T=i("0fd9"),w=i("2fa4"),$=i("afd9"),j=Object(r["a"])(c,s,n,!1,null,null,null);e["default"]=j.exports;d()(j,{VBtn:u["a"],VCard:p["a"],VCardText:f["c"],VCardTitle:f["d"],VCol:m["a"],VDivider:v["a"],VIcon:g["a"],VList:y["a"],VListItem:b["a"],VListItemContent:_["a"],VListItemGroup:k["a"],VListItemTitle:_["c"],VMenu:C["a"],VProgressCircular:x["a"],VProgressLinear:O["a"],VRow:T["a"],VSpacer:w["a"],VSystemBar:$["a"]})},"649b":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"text-center"},["zzz"!=t.item.Options.sortby?i("v-chip",{attrs:{small:"",color:"secondary"}},[i("v-icon",{attrs:{left:""}},[t._v(" mdi-sort-ascending ")]),t._v(" "+t._s(t.item.Options.sortby)+" ")],1):t._e(),i("v-btn",{attrs:{href:t.toFhem(),target:"_blank",small:"",icon:""}},[i("v-icon",{attrs:{small:""}},[t._v(" mdi-link ")])],1),i("v-dialog",{attrs:{"max-width":"90%",scrollable:""},scopedSlots:t._u([{key:"activator",fn:function(e){var s=e.on,n=e.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",n,!1),s),[i("v-icon",{attrs:{small:""}},[t._v(" mdi-code-json ")])],1)]}}]),model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[i("v-card",{staticClass:"secondary lighten-1"},[i("v-card-title",{staticClass:"secondary"},[i("v-btn",{attrs:{icon:""},on:{click:function(e){t.deep=t.deep>1?1:5}}},[i("v-icon",[t._v("mdi-file-tree-outline")])],1),i("v-spacer"),t._v(" "+t._s(t.item.Name)+" "),i("v-spacer"),i("v-btn",{attrs:{icon:""},on:{click:function(e){t.dialog=!1}}},[i("v-icon",[t._v("mdi-close")])],1)],1),i("v-card-text",[i("div",{ref:"jsonContent",staticClass:"select"},[i("vue-json-pretty",{attrs:{"show-line":!1,deep:t.deep,data:t.item}})],1)])],1)],1)],1)},n=[],o=i("838b"),a=i.n(o),l=(i("b83f"),{props:{item:{type:Object,default:function(){return{name:"json"}}}},data:function(){return{dialog:!1,deep:1}},components:{VueJsonPretty:a.a},methods:{toFhem:function(){var t=this.$fhem.createURL([{param:"detail",value:this.item.Name}]);return t}}}),c=l,r=(i("a906"),i("2877")),h=i("6544"),d=i.n(h),u=i("8336"),p=i("b0af"),f=i("99d9"),m=i("cc20"),v=i("169a"),g=i("132d"),y=i("2fa4"),b=Object(r["a"])(c,s,n,!1,null,"33cd40a8",null);e["a"]=b.exports;d()(b,{VBtn:u["a"],VCard:p["a"],VCardText:f["c"],VCardTitle:f["d"],VChip:m["a"],VDialog:v["a"],VIcon:g["a"],VSpacer:y["a"]})},8308:function(t,e,i){},"838b":function(t,e,i){!function(e,i){t.exports=i()}(0,(function(){return function(){"use strict";var t={16:function(t,e,i){function s(t,e,i,s,n,o,a,l){var c,r="function"==typeof t?t.options:t;if(e&&(r.render=e,r.staticRenderFns=i,r._compiled=!0),s&&(r.functional=!0),o&&(r._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},r._ssrRegister=c):n&&(c=l?function(){n.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:n),c)if(r.functional){r._injectStyles=c;var h=r.render;r.render=function(t,e){return c.call(e),h(t,e)}}else{var d=r.beforeCreate;r.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:r}}i.r(e),i.d(e,{default:function(){return h}});var n=s({props:{data:{required:!0,type:String},collapsedOnClickBrackets:Boolean},methods:{toggleBrackets(t){this.collapsedOnClickBrackets&&this.$emit("click",t)}}},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"vjs-tree__brackets",on:{click:function(e){return e.stopPropagation(),t.toggleBrackets(e)}}},[t._v("\n "+t._s(t.data)+"\n")])}),[],!1,null,null,null).exports,o=s({props:{checked:{type:Boolean,default:!1},isMultiple:Boolean},data:()=>({focus:!1}),computed:{uiType(){return this.isMultiple?"checkbox":"radio"},model:{get(){return this.checked},set(t){this.$emit("input",t)}}}},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("label",{class:["vjs-check-controller",t.checked?"is-checked":""],on:{click:function(t){t.stopPropagation()}}},[i("span",{class:"vjs-check-controller__inner is-"+t.uiType}),t._v(" "),"checkbox"===t.uiType?i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],class:"vjs-check-controller__original is-"+t.uiType,attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.model)?t._i(t.model,null)>-1:t.model},on:{change:[function(e){var i=t.model,s=e.target,n=!!s.checked;if(Array.isArray(i)){var o=t._i(i,null);s.checked?o<0&&(t.model=i.concat([null])):o>-1&&(t.model=i.slice(0,o).concat(i.slice(o+1)))}else t.model=n},function(e){return t.$emit("change",t.model)}],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}):"radio"===t.uiType?i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],class:"vjs-check-controller__original is-"+t.uiType,attrs:{type:"radio"},domProps:{checked:t._q(t.model,null)},on:{change:[function(e){t.model=null},function(e){return t.$emit("change",t.model)}],focus:function(e){t.focus=!0},blur:function(e){t.focus=!1}}}):i("input",{directives:[{name:"model",rawName:"v-model",value:t.model,expression:"model"}],class:"vjs-check-controller__original is-"+t.uiType,attrs:{type:t.uiType},domProps:{value:t.model},on:{change:function(e){return t.$emit("change",t.model)},focus:function(e){t.focus=!0},blur:function(e){t.focus=!1},input:function(e){e.target.composing||(t.model=e.target.value)}}})])}),[],!1,null,null,null);function a(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function l(t,e="root",i=0,{key:s,index:n,type:o="content",showComma:c=!1,length:r=1}={}){const h=a(t);if("array"===h){const n=t.map((t,s,n)=>l(t,`${e}[${s}]`,i+1,{index:s,showComma:s!==n.length-1,length:r,type:o})).flat();return[l("[",e,i,{key:s,length:t.length,type:"arrayStart"})[0]].concat(n,l("]",e,i,{showComma:c,length:t.length,type:"arrayEnd"})[0])}if("object"===h){const a=Object.keys(t),h=a.map((s,n,a)=>l(t[s],s.includes(".")?`${e}["${s}"]`:`${e}.${s}`,i+1,{key:s,showComma:n!==a.length-1,length:r,type:o})).flat();return[l("{",e,i,{key:s,index:n,length:a.length,type:"objectStart"})[0]].concat(h,l("}",e,i,{showComma:c,length:a.length,type:"objectEnd"})[0])}const d=Object.entries({content:t,level:i,key:s,index:n,path:e,showComma:c,length:r,type:o}).reduce((t,[e,i])=>void 0!==i?{...t,[e]:i}:t,{});return"object"===a(d)?[d]:d}var c=s({components:{Brackets:n,CheckController:o.exports},props:{node:{required:!0,type:Object},collapsed:Boolean,collapsedOnClickBrackets:Boolean,showDoubleQuotes:Boolean,showLength:Boolean,checked:Boolean,selectableType:{type:String,default:""},showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},selectOnClickNode:{type:Boolean,default:!0},pathSelectable:{type:Function,default:()=>!0},highlightSelectedNode:{type:Boolean,default:!0},customValueFormatter:{type:Function,default:null}},computed:{valueClass(){return"vjs-value vjs-value__"+this.dataType},dataType(){return a(this.node.content)},prettyKey(){return this.showDoubleQuotes?`"${this.node.key}"`:this.node.key},selectable(){return this.pathSelectable(this.node.path,this.node.content)&&(this.isMultiple||this.isSingle)},isMultiple(){return"multiple"===this.selectableType},isSingle(){return"single"===this.selectableType}},methods:{defaultFormatter(t){let e=t+"";return"string"===this.dataType&&(e=`"${e}"`),e},customFormatter(t){return this.customValueFormatter?this.customValueFormatter(t,this.node.key,this.node.path,this.defaultFormatter(t)):this.defaultFormatter(t)},onBracketsClick(){this.$emit("brackets-click",!this.collapsed,this.node.path)},onCheckedChange(){this.$emit("selected-change",this.node)},onTreeNodeClick(){this.$emit("tree-node-click",this.node),this.selectable&&this.selectOnClickNode&&this.$emit("selected-change",this.node)}}},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:{"vjs-tree__node":!0,"has-selector":t.showSelectController,"is-highlight":t.highlightSelectedNode&&t.checked},on:{click:t.onTreeNodeClick}},[t.showSelectController&&t.selectable&&"objectEnd"!==t.node.type&&"arrayEnd"!==t.node.type?[i("check-controller",{attrs:{"is-multiple":t.isMultiple,checked:t.checked},on:{change:t.onCheckedChange}})]:t._e(),t._v(" "),t._l(t.node.level,(function(e,s){return i("div",{key:s,class:{"vjs-tree__indent":!0,"has-line":t.showLine}})})),t._v(" "),t.node.key?i("span",{staticClass:"vjs-key"},[t._v(" "+t._s(t.prettyKey)+":  ")]):t._e(),t._v(" "),i("span",["content"!==t.node.type?i("brackets",{attrs:{data:t.node.content,"collapsed-on-click-brackets":t.collapsedOnClickBrackets},on:{click:t.onBracketsClick}}):[t.customValueFormatter?i("span",{class:t.valueClass,domProps:{innerHTML:t._s(t.customFormatter(t.node.content))}}):i("span",{class:t.valueClass},[t._v(t._s(t.defaultFormatter(t.node.content)))])],t._v(" "),t.node.showComma?i("span",[t._v(",")]):t._e(),t._v(" "),t.showLength&&t.collapsed?i("span",{staticClass:"vjs-comment"},[t._v(" // "+t._s(t.node.length)+" items ")]):t._e()],2)],2)}),[],!1,null,null,null),r=s({name:"VueJsonPretty",components:{TreeNode:c.exports},props:{data:{type:[String,Number,Boolean,Array,Object],default:null},deep:{type:Number,default:1/0},path:{type:String,default:"root"},virtual:{type:Boolean,default:!1},itemHeight:{type:Number,default:20},showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},selectableType:{type:String,default:""},showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},selectOnClickNode:{type:Boolean,default:!0},value:{type:[Array,String],default:()=>""},pathSelectable:{type:Function,default:()=>!0},highlightSelectedNode:{type:Boolean,default:!0},collapsedOnClickBrackets:{type:Boolean,default:!0},customValueFormatter:{type:Function,default:null}},data(){return{translateY:0,visibleData:null,hiddenPaths:l(this.data,this.path).reduce((t,e)=>"objectStart"!==e.type&&"arrayStart"!==e.type||e.level!==this.deep?t:{...t,[e.path]:1},{})}},computed:{flatData(){let t=null;return l(this.data,this.path).reduce((e,i,s)=>{const n={...i,id:s},o=this.hiddenPaths[n.path];if(t&&t.path===n.path){const i="objectStart"===t.type,s={...t,...n,content:i?"{...}":"[...]",type:i?"objectCollapsed":"arrayCollapsed"};return t=null,e.concat(s)}return o&&!t?(t=n,e):t?e:e.concat(n)},[])},selectedPaths:{get(){return this.value&&"single"===this.selectableType?[this.value]:this.value||[]},set(t){this.$emit("input",t)}},propsError(){return!this.selectableType||this.selectOnClickNode||this.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}},watch:{propsError:{handler(t){if(t)throw new Error("[VueJsonPretty] "+t)},immediate:!0},flatData:{handler(){this.onTreeScroll()},immediate:!0}},methods:{onTreeScroll(){if(this.virtual){const t=10,e=this.$refs.tree&&this.$refs.tree.scrollTop||0,i=Math.floor(e/this.itemHeight);let s=i<0?0:i+t>this.flatData.length?this.flatData.length-t:i;s<0&&(s=0);const n=s+t;this.translateY=s*this.itemHeight,this.visibleData=this.flatData.filter((t,e)=>e>=s&&ee===t),i=[...this.selectedPaths];-1!==e?this.selectedPaths.splice(e,1):this.selectedPaths.push(t),this.$emit("change",this.selectedPaths,i)}else if("single"===e&&this.selectedPaths!==t){const e=this.selectedPaths,i=t;this.selectedPaths=i,this.$emit("change",i,e)}},onTreeNodeClick({content:t,path:e}){this.$emit("click",e,t)},onBracketsClick(t,e){if(t)this.hiddenPaths={...this.hiddenPaths,[e]:1};else{const t={...this.hiddenPaths};delete t[e],this.hiddenPaths=t}}}},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"tree",class:{"vjs-tree":!0,"is-virtual":t.virtual},on:{scroll:t.onTreeScroll}},[i("div",{style:t.virtual&&{height:t.flatData.length*t.itemHeight+"px"}},[i("div",{style:t.virtual&&{transform:"translateY("+t.translateY+"px)"}},t._l(t.visibleData,(function(e){return i("tree-node",{key:e.id,attrs:{node:e,collapsed:!!t.hiddenPaths[e.path],"custom-value-formatter":t.customValueFormatter,"show-double-quotes":t.showDoubleQuotes,"show-length":t.showLength,"collapsed-on-click-brackets":t.collapsedOnClickBrackets,checked:t.selectedPaths.includes(e.path),"selectable-type":t.selectableType,"show-line":t.showLine,"show-select-controller":t.showSelectController,"select-on-click-node":t.selectOnClickNode,"path-selectable":t.pathSelectable,"highlight-selected-node":t.highlightSelectedNode},on:{"tree-node-click":t.onTreeNodeClick,"brackets-click":t.onBracketsClick,"selected-change":t.onSelectedChange}})})),1)])])}),[],!1,null,null,null).exports,h=Object.assign({},r,{version:"1.8.0"})}},e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}return i.d=function(t,e){for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(16)}()}))},a906:function(t,e,i){"use strict";i("b3d1")},afd9:function(t,e,i){"use strict";var s=i("5530"),n=(i("a9e3"),i("c7cd"),i("8308"),i("3a66")),o=i("a9ad"),a=i("7560"),l=i("58df"),c=i("80d2");e["a"]=Object(l["a"])(Object(n["a"])("bar",["height","window"]),o["a"],a["a"]).extend({name:"v-system-bar",props:{height:[Number,String],lightsOut:Boolean,window:Boolean},computed:{classes:function(){return Object(s["a"])({"v-system-bar--lights-out":this.lightsOut,"v-system-bar--absolute":this.absolute,"v-system-bar--fixed":!this.absolute&&(this.app||this.fixed),"v-system-bar--window":this.window},this.themeClasses)},computedHeight:function(){return this.height?isNaN(parseInt(this.height))?this.height:parseInt(this.height):this.window?32:24},styles:function(){return{height:Object(c["g"])(this.computedHeight)}}},methods:{updateApplication:function(){return this.$el?this.$el.clientHeight:this.computedHeight}},render:function(t){var e={staticClass:"v-system-bar",class:this.classes,style:this.styles,on:this.$listeners};return t("div",this.setBackgroundColor(this.color,e),Object(c["s"])(this))}})},b3d1:function(t,e,i){},b83f:function(t,e,i){},e449:function(t,e,i){"use strict";var s=i("ade3"),n=i("2909"),o=i("5530"),a=(i("a9e3"),i("7db0"),i("a630"),i("3ca3"),i("99af"),i("498a"),i("caad"),i("2532"),i("ee6f"),i("480e")),l=i("4ad4"),c=i("16b7"),r=i("b848"),h=i("75eb"),d=i("f573"),u=i("e4d3"),p=i("a236"),f=i("f2e7"),m=i("7560"),v=i("a293"),g=i("dc22"),y=i("58df"),b=i("d9bd"),_=i("80d2"),k=Object(y["a"])(r["a"],c["a"],h["a"],d["a"],u["a"],p["a"],f["a"],m["a"]);e["a"]=k.extend({name:"v-menu",directives:{ClickOutside:v["a"],Resize:g["a"]},provide:function(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnClick:{type:Boolean,default:!0},openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data:function(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile:function(){return this.tiles[this.listIndex]},calculatedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?Object(_["g"])(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight:function(){var t=this.auto?"200px":Object(_["g"])(this.maxHeight);return t||"0"},calculatedMaxWidth:function(){return Object(_["g"])(this.maxWidth)||"0"},calculatedMinWidth:function(){if(this.minWidth)return Object(_["g"])(this.minWidth)||"0";var t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),e=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return Object(_["g"])(Math.min(e,t))||"0"},calculatedTop:function(){var t=this.auto?Object(_["g"])(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles:function(){return Boolean(this.tiles.find((function(t){return t.tabIndex>-1})))},styles:function(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive:function(t){t||(this.listIndex=-1)},isContentActive:function(t){this.hasJustFocused=t},listIndex:function(t,e){if(t in this.tiles){var i=this.tiles[t];i.classList.add("v-list-item--highlighted"),this.$refs.content.scrollTop=i.offsetTop-i.clientHeight}e in this.tiles&&this.tiles[e].classList.remove("v-list-item--highlighted")}},created:function(){this.$attrs.hasOwnProperty("full-width")&&Object(b["e"])("full-width",this)},mounted:function(){this.isActive&&this.callActivate()},methods:{activate:function(){var t=this;this.updateDimensions(),requestAnimationFrame((function(){t.startTransition().then((function(){t.$refs.content&&(t.calculatedTopAuto=t.calcTopAuto(),t.auto&&(t.$refs.content.scrollTop=t.calcScrollPosition()))}))}))},calcScrollPosition:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active"),i=t.scrollHeight-t.offsetHeight;return e?Math.min(i,Math.max(0,e.offsetTop-t.offsetHeight/2+e.offsetHeight/2)):t.scrollTop},calcLeftAuto:function(){return parseInt(this.dimensions.activator.left-2*this.defaultOffset)},calcTopAuto:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active");if(e||(this.selectedIndex=null),this.offsetY||!e)return this.computedTop;this.selectedIndex=Array.from(this.tiles).indexOf(e);var i=e.offsetTop-this.calcScrollPosition(),s=t.querySelector(".v-list-item").offsetTop;return this.computedTop-i-s-1},changeListIndex:function(t){if(this.getTiles(),this.isActive&&this.hasClickableTiles)if(t.keyCode!==_["x"].tab){if(t.keyCode===_["x"].down)this.nextTile();else if(t.keyCode===_["x"].up)this.prevTile();else if(t.keyCode===_["x"].end)this.lastTile();else if(t.keyCode===_["x"].home)this.firstTile();else{if(t.keyCode!==_["x"].enter||-1===this.listIndex)return;this.tiles[this.listIndex].click()}t.preventDefault()}else this.isActive=!1},closeConditional:function(t){var e=t.target;return this.isActive&&!this._isDestroyed&&this.closeOnClick&&!this.$refs.content.contains(e)},genActivatorAttributes:function(){var t=l["a"].options.methods.genActivatorAttributes.call(this);return this.activeTile&&this.activeTile.id?Object(o["a"])(Object(o["a"])({},t),{},{"aria-activedescendant":this.activeTile.id}):t},genActivatorListeners:function(){var t=d["a"].options.methods.genActivatorListeners.call(this);return this.disableKeys||(t.keydown=this.onKeyDown),t},genTransition:function(){var t=this.genContent();return this.transition?this.$createElement("transition",{props:{name:this.transition}},[t]):t},genDirectives:function(){var t=this,e=[{name:"show",value:this.isContentActive}];return!this.openOnHover&&this.closeOnClick&&e.push({name:"click-outside",value:{handler:function(){t.isActive=!1},closeConditional:this.closeConditional,include:function(){return[t.$el].concat(Object(n["a"])(t.getOpenDependentElements()))}}}),e},genContent:function(){var t=this,e={attrs:Object(o["a"])(Object(o["a"])({},this.getScopeIdAttrs()),{},{role:"role"in this.$attrs?this.$attrs.role:"menu"}),staticClass:"v-menu__content",class:Object(o["a"])(Object(o["a"])(Object(o["a"])({},this.rootThemeClasses),this.roundedClasses),{},Object(s["a"])({"v-menu__content--auto":this.auto,"v-menu__content--fixed":this.activatorFixed,menuable__content__active:this.isActive},this.contentClass.trim(),!0)),style:this.styles,directives:this.genDirectives(),ref:"content",on:{click:function(e){var i=e.target;i.getAttribute("disabled")||t.closeOnContentClick&&(t.isActive=!1)},keydown:this.onKeyDown}};return this.$listeners.scroll&&(e.on=e.on||{},e.on.scroll=this.$listeners.scroll),!this.disabled&&this.openOnHover&&(e.on=e.on||{},e.on.mouseenter=this.mouseEnterHandler),this.openOnHover&&(e.on=e.on||{},e.on.mouseleave=this.mouseLeaveHandler),this.$createElement("div",e,this.getContentSlot())},getTiles:function(){this.$refs.content&&(this.tiles=Array.from(this.$refs.content.querySelectorAll(".v-list-item")))},mouseEnterHandler:function(){var t=this;this.runDelay("open",(function(){t.hasJustFocused||(t.hasJustFocused=!0)}))},mouseLeaveHandler:function(t){var e=this;this.runDelay("close",(function(){e.$refs.content.contains(t.relatedTarget)||requestAnimationFrame((function(){e.isActive=!1,e.callDeactivate()}))}))},nextTile:function(){var t=this.tiles[this.listIndex+1];if(!t){if(!this.tiles.length)return;return this.listIndex=-1,void this.nextTile()}this.listIndex++,-1===t.tabIndex&&this.nextTile()},prevTile:function(){var t=this.tiles[this.listIndex-1];if(!t){if(!this.tiles.length)return;return this.listIndex=this.tiles.length,void this.prevTile()}this.listIndex--,-1===t.tabIndex&&this.prevTile()},lastTile:function(){var t=this.tiles[this.tiles.length-1];t&&(this.listIndex=this.tiles.length-1,-1===t.tabIndex&&this.prevTile())},firstTile:function(){var t=this.tiles[0];t&&(this.listIndex=0,-1===t.tabIndex&&this.nextTile())},onKeyDown:function(t){var e=this;if(t.keyCode===_["x"].esc){setTimeout((function(){e.isActive=!1}));var i=this.getActivator();this.$nextTick((function(){return i&&i.focus()}))}else!this.isActive&&[_["x"].up,_["x"].down].includes(t.keyCode)&&(this.isActive=!0);this.$nextTick((function(){return e.changeListIndex(t)}))},onResize:function(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.updateDimensions,100))}},render:function(t){var e=this,i={staticClass:"v-menu",class:{"v-menu--attached":""===this.attach||!0===this.attach||"attach"===this.attach},directives:[{arg:"500",name:"resize",value:this.onResize}]};return t("div",i,[!this.activator&&this.genActivator(),this.showLazyContent((function(){return[e.$createElement(a["a"],{props:{root:!0,light:e.light,dark:e.dark}},[e.genTransition()])]}))])}})},ee6f:function(t,e,i){}}]); \ No newline at end of file diff --git a/www/fhemapp/js/chunk-1444c05b.136b534d.js b/www/fhemapp/js/chunk-1444c05b.136b534d.js deleted file mode 100644 index ea9ae4d6..00000000 --- a/www/fhemapp/js/chunk-1444c05b.136b534d.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1444c05b"],{"121f":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.item.Options.show?i("v-col",{class:t.item.Options.setup.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.item.Options.status.level,color:t.item.Options.status.color,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.name)+" "),i("v-spacer"),t.lvlIcon&&t.item.Options.status.isActive?i("v-btn",{attrs:{small:"",icon:""},on:{click:function(e){return t.lvlBtn()}}},[i("v-icon",{attrs:{small:""}},[t._v(" "+t._s(t.lvlIcon)+" ")])],1):t._e(),t.app.options.debugMode?i("jsonList",{attrs:{item:t.item}}):t._e()],1),i("v-divider"),t.item.Options.status.isActive?t._e():i("div",[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),i("v-divider")],1),t.item.Options.status.isActive?i("div",t._l(t.main,(function(e){return i("div",{key:e.idx},[i("v-card-text",[e.slider?t._e():i("div",[i("v-row",{attrs:{align:"center"}},[0==e.leftMenu.length&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.leftBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"left","touch")},touchend:function(i){return t.clickEnd(e.idx,"left","touch")},mousedown:function(i){return t.clickStart(e.idx,"left","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"left","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)],1):t._e(),e.leftMenu.length>0&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",right:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,a=n.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),s),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.leftMenuIdx,callback:function(i){t.$set(e,"leftMenuIdx",i)},expression:"level.leftMenuIdx"}},t._l(e.leftMenu,(function(e,n){return i("v-list-item",{key:n,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.leftBtn?i("v-divider",{attrs:{vertical:""}}):t._e(),e.midBtn?t._e():i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text)+" ")])]),e.text2&&!e.midBtn?i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text2)+" ")])]):t._e(),0===e.midMenu.length&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.midBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"mid","touch")},touchend:function(i){return t.clickEnd(e.idx,"mid","touch")},mousedown:function(i){return t.clickStart(e.idx,"mid","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"mid","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)],1):t._e(),e.midMenu.length>0&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,a=n.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),s),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.midMenuIdx,callback:function(i){t.$set(e,"midMenuIdx",i)},expression:"level.midMenuIdx"}},t._l(e.midMenu,(function(e,n){return i("v-list-item",{key:n,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.rightBtn?i("v-divider",{attrs:{vertical:""}}):t._e(),0===e.rightMenu.length&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.rightBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"right","touch")},touchend:function(i){return t.clickEnd(e.idx,"right","touch")},mousedown:function(i){return t.clickStart(e.idx,"right","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"right","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)],1):t._e(),e.rightMenu.length>0&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,a=n.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),s),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.rightMenuIdx,callback:function(i){t.$set(e,"rightMenuIdx",i)},expression:"level.rightMenuIdx"}},t._l(e.rightMenu,(function(e,n){return i("v-list-item",{key:n,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e()],1)],1),e.slider?i("div",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("v-slider",{staticClass:"ml-5 mr-5",attrs:{min:e.sliderMin,max:e.sliderMax,"hide-details":"","thumb-label":"","thumb-size":"48",color:"success",step:e.sliderStep},on:{change:function(i){return t.setSlider(e.idx,e.sliderCurrent)}},scopedSlots:t._u([{key:"thumb-label",fn:function(n){var s=n.value;return[i("div",{staticClass:"text-h6"},[t._v(" "+t._s(t.sliderVal(e.idx,s))+" ")])]}},e.leftBtn?{key:"prepend",fn:function(){return[i("v-icon",{on:{click:function(i){return t.clickEnd(e.idx,"left")}}},[t._v(" "+t._s(e.leftBtn)+" ")])]},proxy:!0}:null,e.rightBtn?{key:"append",fn:function(){return[i("v-icon",{on:{click:function(i){return t.clickEnd(e.idx,"right")}}},[t._v(" "+t._s(e.rightBtn)+" ")])]},proxy:!0}:null],null,!0),model:{value:e.sliderCurrent,callback:function(i){t.$set(e,"sliderCurrent",i)},expression:"level.sliderCurrent"}})],1)],1)],1):t._e()]),i("v-divider")],1)})),0):t._e(),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),i("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},s=[],a=i("b85c"),l=i("2909"),o=(i("ac1f"),i("1276"),i("466d"),i("5319"),i("a15b"),i("c740"),i("b680"),i("a434"),i("99af"),i("d81d"),i("649b")),r={components:{jsonList:o["a"]},props:{item:{type:Object,default:function(){return{name:"default"}}}},data:function(){return{name:"default",app:{options:{debugMode:!1}},main:[],lvlMax:1,lvlIcon:null,timer:!1,long:!1,pendingClick:0,touchFirst:!1}},watch:{item:{immediate:!1,deep:!0,handler:function(){this.setVals()}}},created:function(){this.app.options=this.$fhem.app.options,this.lvlMax=this.item.Options.setup.main.length,this.lvlIcon=this.lvlMax>1?this.item.Options.setup.expand?"mdi-arrow-expand":"mdi-swap-vertical":null,this.setLvl(0),this.setVals()},methods:{sendCmd:function(t,e){var i=this;e?(this.pendingClick&&(clearTimeout(this.pendingClick),this.pendingClick=0),this.pendingClick=setTimeout((function(){i.$fhem.request(t)}),1e3)):this.$fhem.request(t)},updateReading:function(t){var e=t.split(" ");4===e.length&&this.$fhem.getEl(this.item,"Readings",e[2],"Value")&&(this.item.Readings[e[2]].Value=e[3])},createCmd:function(t){var e="";if(t.match("set")){var i=t.split(" ");if(i[1].match("Connected")){var n=i[1].replace("Connected.","");i[1]=this.$fhem.getEl(this.item,"Connected",n,"Internals","NAME"),i[1]?e=i.join(" "):this.$fhem.log({lvl:1,msg:"Connected Device not found. "+this.item.Options})}else e=t}else e="set "+this.item.Name+" "+t;return e},clickStart:function(t,e,i){var n=this;this.long=!1,this.$fhem.log({lvl:5,msg:"ClickStart: type "+e+":"+i}),this.touchFirst&&"mouse"===i||("touch"===i&&(this.touchFirst=!0),this.timer=setInterval((function(){n.long=!0;var i=n.item.Options.setup.main[t][e+"Long"];if(n.$fhem.log({lvl:5,msg:"ClickEvent: Long ["+i+"]"}),i){var s=n.$fhem.handleVals(n.item,i);if(s[0]){var a=n.createCmd(s[0]);n.sendCmd(a),n.timer=clearInterval(n.timer)}}}),1e3))},clickEnd:function(t,e,i){if(this.$fhem.log({lvl:5,msg:"ClickEnd: type "+e+":"+i}),!this.touchFirst||"mouse"!==i){"touch"===i&&(this.touchFirst=!0),this.timer=clearInterval(this.timer);var n=this.item.Options.setup.main[t][e+(this.long?"LongRelease":"Click")];if(this.$fhem.log({lvl:5,msg:"ClickEvent: "+(this.long?"LongRelease":"Click")+" ["+n+"]"}),n){var s=this.$fhem.handleVals(this.item,n);if(s[0]){var a=this.item.Options.setup.expand?t:0;this.main[a].sliderPrevent=!1;var l=this.createCmd(s[0]),o=-1!=n.findIndex((function(t){return t.match("%i")}));!this.long&&o&&this.updateReading(l),this.sendCmd(l,o)}}}},sliderVal:function(t,e){var i=this.item.Options.setup.main[t].slider,n=e;if(i){var s=this.$fhem.handleVals(this.item,i),a=s[4]&&s[4].match(".")?1:0;n=e.toFixed(a)}return n},setSlider:function(t,e){var i=this.item.Options.setup.main[t].slider;if(i){var n=this.$fhem.handleVals(this.item,i);if(n[0]){var s=this.item.Options.setup.expand?t:0;this.main[s].sliderPrevent=!0;var a=this.createCmd(n[0]),l=n[4]&&n[4].match(".")?1:0;a=a.replace("%v",e.toFixed(l)),this.sendCmd(a)}}},checkMenu:function(t){var e=!1;if(t){var i,n=t.split(" ");n[0].match("set")&&n.splice(0,2),1===n.length&&n.splice(0,0,"state");var s=/\./.test(n[0])?n[0].split("."):["Readings",n[0],"Value"],a=(i=this.$fhem).getEl.apply(i,[this.item].concat(Object(l["a"])(s)));a.match(n[1])&&(e=!0)}return e},createMenu:function(t){var e=[];if(t&&t.length>0){var i,n=Object(a["a"])(t);try{for(n.s();!(i=n.n()).done;){var s=i.value,l=s.split(":");if(l.length>1){var o=this.createCmd(l[1]),r=this.checkMenu(o);e.push({name:l[0],cmd:o,active:r})}}}catch(c){n.e(c)}finally{n.f()}}return e},lvlBtn:function(){var t=0;this.item.Options.setup.expand?(t=this.main.length>1?0:-1,this.lvlIcon=-1===t?"mdi-arrow-collapse":"mdi-arrow-expand"):(t=this.main[0].idx+1,t>this.lvlMax-1&&(t=0)),this.setLvl(t),this.setVals()},setLvl:function(t){var e=-1!=t?t:0,i=-1!=t?t:this.lvlMax-1;this.main.splice(0);for(var n=e;n<=i;n++){var s={idx:n,leftBtn:"",leftBtnDisabled:!1,leftMenu:[],leftMenuIdx:-1,text:"",text2:"",midBtn:"",midBtnDisabled:!1,midMenu:[],midMenuIdx:-1,slider:!1,sliderCurrent:0,sliderPrevent:!1,sliderMin:0,sliderMax:100,sliderStep:1,rightBtn:"",rightBtnDisabled:!1,rightMenu:[],rightMenuIdx:-1};this.main.push(s)}},setVals:function(){for(var t in this.main){var e=this.main[t].idx,i=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text),n=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text2),s=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].slider),a=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].leftBtn),l=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].midBtn),o=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].rightBtn),r=this.createMenu(this.item.Options.setup.main[e].leftMenu),c=this.createMenu(this.item.Options.setup.main[e].midMenu),h=this.createMenu(this.item.Options.setup.main[e].rightMenu);this.main[t].text=i[0]||"",this.main[t].text2=n[0]||"",this.main[t].leftBtn=a[0]||"",this.main[t].midBtn=l[0]||"",this.main[t].rightBtn=o[0]||"",this.main[t].leftBtnDisabled=!!a[1],this.main[t].midBtnDisabled=!!l[1],this.main[t].rightBtnDisabled=!!o[1],this.main[t].leftMenu=r,this.main[t].leftMenuIdx=r.map((function(t){return t.active})).indexOf(!0),this.main[t].midMenu=c,this.main[t].midMenuIdx=c.map((function(t){return t.active})).indexOf(!0),this.main[t].rightMenu=h,this.main[t].rightMenuIdx=h.map((function(t){return t.active})).indexOf(!0),this.main[t].slider=!!s[0],this.main[t].sliderMin=s[2]||0,this.main[t].sliderMax=s[3]||100,this.main[t].sliderStep=s[4]||1,this.main[t].sliderPrevent?this.main[t].sliderCurrent===s[1]&&(this.main[t].sliderPrevent=!1,this.main[t].sliderCurrent=s[1]||0):this.main[t].sliderCurrent=s[1]||0}}}},c=r,h=i("2877"),d=i("6544"),u=i.n(d),m=i("8336"),v=i("b0af"),f=i("99d9"),p=i("62ad"),g=i("ce7e"),x=i("132d"),_=i("8860"),C=i("da13"),b=i("5d23"),O=i("1baa"),k=i("34c3"),I=i("e449"),M=i("8e36"),y=i("0fd9"),T=i("ba0d"),B=i("2fa4"),$=i("afd9"),A=Object(h["a"])(c,n,s,!1,null,null,null);e["default"]=A.exports;u()(A,{VBtn:m["a"],VCard:v["a"],VCardText:f["c"],VCardTitle:f["d"],VCol:p["a"],VDivider:g["a"],VIcon:x["a"],VList:_["a"],VListItem:C["a"],VListItemContent:b["a"],VListItemGroup:O["a"],VListItemIcon:k["a"],VListItemTitle:b["c"],VMenu:I["a"],VProgressLinear:M["a"],VRow:y["a"],VSlider:T["a"],VSpacer:B["a"],VSystemBar:$["a"]})},e449:function(t,e,i){"use strict";var n=i("ade3"),s=i("2909"),a=i("5530"),l=(i("a9e3"),i("7db0"),i("a630"),i("3ca3"),i("99af"),i("498a"),i("caad"),i("2532"),i("ee6f"),i("480e")),o=i("4ad4"),r=i("16b7"),c=i("b848"),h=i("75eb"),d=i("f573"),u=i("e4d3"),m=i("a236"),v=i("f2e7"),f=i("7560"),p=i("a293"),g=i("dc22"),x=i("58df"),_=i("d9bd"),C=i("80d2"),b=Object(x["a"])(c["a"],r["a"],h["a"],d["a"],u["a"],m["a"],v["a"],f["a"]);e["a"]=b.extend({name:"v-menu",directives:{ClickOutside:p["a"],Resize:g["a"]},provide:function(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnClick:{type:Boolean,default:!0},openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data:function(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile:function(){return this.tiles[this.listIndex]},calculatedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?Object(C["g"])(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight:function(){var t=this.auto?"200px":Object(C["g"])(this.maxHeight);return t||"0"},calculatedMaxWidth:function(){return Object(C["g"])(this.maxWidth)||"0"},calculatedMinWidth:function(){if(this.minWidth)return Object(C["g"])(this.minWidth)||"0";var t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),e=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return Object(C["g"])(Math.min(e,t))||"0"},calculatedTop:function(){var t=this.auto?Object(C["g"])(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles:function(){return Boolean(this.tiles.find((function(t){return t.tabIndex>-1})))},styles:function(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive:function(t){t||(this.listIndex=-1)},isContentActive:function(t){this.hasJustFocused=t},listIndex:function(t,e){if(t in this.tiles){var i=this.tiles[t];i.classList.add("v-list-item--highlighted"),this.$refs.content.scrollTop=i.offsetTop-i.clientHeight}e in this.tiles&&this.tiles[e].classList.remove("v-list-item--highlighted")}},created:function(){this.$attrs.hasOwnProperty("full-width")&&Object(_["e"])("full-width",this)},mounted:function(){this.isActive&&this.callActivate()},methods:{activate:function(){var t=this;this.updateDimensions(),requestAnimationFrame((function(){t.startTransition().then((function(){t.$refs.content&&(t.calculatedTopAuto=t.calcTopAuto(),t.auto&&(t.$refs.content.scrollTop=t.calcScrollPosition()))}))}))},calcScrollPosition:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active"),i=t.scrollHeight-t.offsetHeight;return e?Math.min(i,Math.max(0,e.offsetTop-t.offsetHeight/2+e.offsetHeight/2)):t.scrollTop},calcLeftAuto:function(){return parseInt(this.dimensions.activator.left-2*this.defaultOffset)},calcTopAuto:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active");if(e||(this.selectedIndex=null),this.offsetY||!e)return this.computedTop;this.selectedIndex=Array.from(this.tiles).indexOf(e);var i=e.offsetTop-this.calcScrollPosition(),n=t.querySelector(".v-list-item").offsetTop;return this.computedTop-i-n-1},changeListIndex:function(t){if(this.getTiles(),this.isActive&&this.hasClickableTiles)if(t.keyCode!==C["x"].tab){if(t.keyCode===C["x"].down)this.nextTile();else if(t.keyCode===C["x"].up)this.prevTile();else if(t.keyCode===C["x"].end)this.lastTile();else if(t.keyCode===C["x"].home)this.firstTile();else{if(t.keyCode!==C["x"].enter||-1===this.listIndex)return;this.tiles[this.listIndex].click()}t.preventDefault()}else this.isActive=!1},closeConditional:function(t){var e=t.target;return this.isActive&&!this._isDestroyed&&this.closeOnClick&&!this.$refs.content.contains(e)},genActivatorAttributes:function(){var t=o["a"].options.methods.genActivatorAttributes.call(this);return this.activeTile&&this.activeTile.id?Object(a["a"])(Object(a["a"])({},t),{},{"aria-activedescendant":this.activeTile.id}):t},genActivatorListeners:function(){var t=d["a"].options.methods.genActivatorListeners.call(this);return this.disableKeys||(t.keydown=this.onKeyDown),t},genTransition:function(){var t=this.genContent();return this.transition?this.$createElement("transition",{props:{name:this.transition}},[t]):t},genDirectives:function(){var t=this,e=[{name:"show",value:this.isContentActive}];return!this.openOnHover&&this.closeOnClick&&e.push({name:"click-outside",value:{handler:function(){t.isActive=!1},closeConditional:this.closeConditional,include:function(){return[t.$el].concat(Object(s["a"])(t.getOpenDependentElements()))}}}),e},genContent:function(){var t=this,e={attrs:Object(a["a"])(Object(a["a"])({},this.getScopeIdAttrs()),{},{role:"role"in this.$attrs?this.$attrs.role:"menu"}),staticClass:"v-menu__content",class:Object(a["a"])(Object(a["a"])(Object(a["a"])({},this.rootThemeClasses),this.roundedClasses),{},Object(n["a"])({"v-menu__content--auto":this.auto,"v-menu__content--fixed":this.activatorFixed,menuable__content__active:this.isActive},this.contentClass.trim(),!0)),style:this.styles,directives:this.genDirectives(),ref:"content",on:{click:function(e){var i=e.target;i.getAttribute("disabled")||t.closeOnContentClick&&(t.isActive=!1)},keydown:this.onKeyDown}};return this.$listeners.scroll&&(e.on=e.on||{},e.on.scroll=this.$listeners.scroll),!this.disabled&&this.openOnHover&&(e.on=e.on||{},e.on.mouseenter=this.mouseEnterHandler),this.openOnHover&&(e.on=e.on||{},e.on.mouseleave=this.mouseLeaveHandler),this.$createElement("div",e,this.getContentSlot())},getTiles:function(){this.$refs.content&&(this.tiles=Array.from(this.$refs.content.querySelectorAll(".v-list-item")))},mouseEnterHandler:function(){var t=this;this.runDelay("open",(function(){t.hasJustFocused||(t.hasJustFocused=!0)}))},mouseLeaveHandler:function(t){var e=this;this.runDelay("close",(function(){e.$refs.content.contains(t.relatedTarget)||requestAnimationFrame((function(){e.isActive=!1,e.callDeactivate()}))}))},nextTile:function(){var t=this.tiles[this.listIndex+1];if(!t){if(!this.tiles.length)return;return this.listIndex=-1,void this.nextTile()}this.listIndex++,-1===t.tabIndex&&this.nextTile()},prevTile:function(){var t=this.tiles[this.listIndex-1];if(!t){if(!this.tiles.length)return;return this.listIndex=this.tiles.length,void this.prevTile()}this.listIndex--,-1===t.tabIndex&&this.prevTile()},lastTile:function(){var t=this.tiles[this.tiles.length-1];t&&(this.listIndex=this.tiles.length-1,-1===t.tabIndex&&this.prevTile())},firstTile:function(){var t=this.tiles[0];t&&(this.listIndex=0,-1===t.tabIndex&&this.nextTile())},onKeyDown:function(t){var e=this;if(t.keyCode===C["x"].esc){setTimeout((function(){e.isActive=!1}));var i=this.getActivator();this.$nextTick((function(){return i&&i.focus()}))}else!this.isActive&&[C["x"].up,C["x"].down].includes(t.keyCode)&&(this.isActive=!0);this.$nextTick((function(){return e.changeListIndex(t)}))},onResize:function(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.updateDimensions,100))}},render:function(t){var e=this,i={staticClass:"v-menu",class:{"v-menu--attached":""===this.attach||!0===this.attach||"attach"===this.attach},directives:[{arg:"500",name:"resize",value:this.onResize}]};return t("div",i,[!this.activator&&this.genActivator(),this.showLazyContent((function(){return[e.$createElement(l["a"],{props:{root:!0,light:e.light,dark:e.dark}},[e.genTransition()])]}))])}})},ee6f:function(t,e,i){}}]); \ No newline at end of file diff --git a/www/fhemapp/js/chunk-1444c05b.85f227c2.js b/www/fhemapp/js/chunk-1444c05b.85f227c2.js new file mode 100644 index 00000000..21ca8339 --- /dev/null +++ b/www/fhemapp/js/chunk-1444c05b.85f227c2.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1444c05b"],{"121f":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.item.Options.show?i("v-col",{class:t.item.Options.setup.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.item.Options.status.level,color:t.item.Options.status.color,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.name)+" "),i("v-spacer"),t.lvlIcon&&t.item.Options.status.isActive?i("v-btn",{attrs:{small:"",icon:""},on:{click:function(e){return t.lvlBtn()}}},[i("v-icon",{attrs:{small:""}},[t._v(" "+t._s(t.lvlIcon)+" ")])],1):t._e(),t.app.options.debugMode?i("jsonList",{attrs:{item:t.item}}):t._e()],1),i("v-divider"),t.item.Options.status.isActive?t._e():i("div",[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),i("v-divider")],1),t.item.Options.status.isActive?i("div",t._l(t.main,(function(e){return i("div",{key:e.idx},[i("v-card-text",[e.slider?t._e():i("div",[i("v-row",{attrs:{align:"center"}},[0==e.leftMenu.length&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.leftBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"left","touch")},touchend:function(i){return t.clickEnd(e.idx,"left","touch")},mousedown:function(i){return t.clickStart(e.idx,"left","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"left","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)],1):t._e(),e.leftMenu.length>0&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",right:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,a=n.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),s),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.leftMenuIdx,callback:function(i){t.$set(e,"leftMenuIdx",i)},expression:"level.leftMenuIdx"}},t._l(e.leftMenu,(function(e,n){return i("v-list-item",{key:n,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.leftBtn?i("v-divider",{attrs:{vertical:""}}):t._e(),e.midBtn?t._e():i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text)+" ")])]),e.text2&&!e.midBtn?i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text2)+" ")])]):t._e(),0===e.midMenu.length&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.midBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"mid","touch")},touchend:function(i){return t.clickEnd(e.idx,"mid","touch")},mousedown:function(i){return t.clickStart(e.idx,"mid","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"mid","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)],1):t._e(),e.midMenu.length>0&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,a=n.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),s),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.midMenuIdx,callback:function(i){t.$set(e,"midMenuIdx",i)},expression:"level.midMenuIdx"}},t._l(e.midMenu,(function(e,n){return i("v-list-item",{key:n,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.rightBtn?i("v-divider",{attrs:{vertical:""}}):t._e(),0===e.rightMenu.length&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.rightBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"right","touch")},touchend:function(i){return t.clickEnd(e.idx,"right","touch")},mousedown:function(i){return t.clickStart(e.idx,"right","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"right","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)],1):t._e(),e.rightMenu.length>0&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,a=n.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),s),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.rightMenuIdx,callback:function(i){t.$set(e,"rightMenuIdx",i)},expression:"level.rightMenuIdx"}},t._l(e.rightMenu,(function(e,n){return i("v-list-item",{key:n,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e()],1)],1),e.slider?i("div",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("v-slider",{staticClass:"ml-5 mr-5",attrs:{min:e.sliderMin,max:e.sliderMax,"hide-details":"","thumb-label":"","thumb-size":"48",color:"success",step:e.sliderStep},on:{change:function(i){return t.setSlider(e.idx,e.sliderCurrent)}},scopedSlots:t._u([{key:"thumb-label",fn:function(n){var s=n.value;return[i("div",{staticClass:"text-h6"},[t._v(" "+t._s(t.sliderVal(e.idx,s))+" ")])]}},e.leftBtn?{key:"prepend",fn:function(){return[i("v-icon",{on:{click:function(i){return t.clickEnd(e.idx,"left")}}},[t._v(" "+t._s(e.leftBtn)+" ")])]},proxy:!0}:null,e.rightBtn?{key:"append",fn:function(){return[i("v-icon",{on:{click:function(i){return t.clickEnd(e.idx,"right")}}},[t._v(" "+t._s(e.rightBtn)+" ")])]},proxy:!0}:null],null,!0),model:{value:e.sliderCurrent,callback:function(i){t.$set(e,"sliderCurrent",i)},expression:"level.sliderCurrent"}})],1)],1)],1):t._e()]),i("v-divider")],1)})),0):t._e(),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),i("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},s=[],a=i("b85c"),l=i("2909"),o=(i("ac1f"),i("1276"),i("466d"),i("498a"),i("5319"),i("a15b"),i("c740"),i("b680"),i("a434"),i("99af"),i("d81d"),i("649b")),r={components:{jsonList:o["a"]},props:{item:{type:Object,default:function(){return{name:"default"}}}},data:function(){return{name:"default",app:{options:{debugMode:!1}},main:[],lvlMax:1,lvlIcon:null,timer:!1,long:!1,pendingClick:0,touchFirst:!1}},watch:{item:{immediate:!1,deep:!0,handler:function(){this.setVals()}}},created:function(){this.app.options=this.$fhem.app.options,this.lvlMax=this.item.Options.setup.main.length,this.lvlIcon=this.lvlMax>1?this.item.Options.setup.expand?"mdi-arrow-expand":"mdi-swap-vertical":null,this.setLvl(0),this.setVals()},methods:{sendCmd:function(t,e){var i=this;e?(this.pendingClick&&(clearTimeout(this.pendingClick),this.pendingClick=0),this.pendingClick=setTimeout((function(){i.$fhem.request(t)}),1e3)):this.$fhem.request(t)},updateReading:function(t){var e=t.split(" ");4===e.length&&this.$fhem.getEl(this.item,"Readings",e[2],"Value")&&(this.item.Readings[e[2]].Value=e[3])},createCmd:function(t){var e="";if(t.match("set")){var i=t.trim().split(" ");if(i[1]&&i[1].match("Connected")){var n=i[1].replace("Connected.","");i[1]=this.$fhem.getEl(this.item,"Connected",n,"Internals","NAME"),i[1]?e=i.join(" "):this.$fhem.log({lvl:1,msg:"Connected Device not found. "+this.item.Options})}else e=t}else e="set "+this.item.Name+" "+t;return e},clickStart:function(t,e,i){var n=this;this.long=!1,this.$fhem.log({lvl:5,msg:"ClickStart: type "+e+":"+i}),this.touchFirst&&"mouse"===i||("touch"===i&&(this.touchFirst=!0),this.timer=setInterval((function(){n.long=!0;var i=n.item.Options.setup.main[t][e+"Long"];if(n.$fhem.log({lvl:5,msg:"ClickEvent: Long ["+i+"]"}),i){var s=n.$fhem.handleVals(n.item,i);if(s[0]){var a=n.createCmd(s[0]);n.sendCmd(a),n.timer=clearInterval(n.timer)}}}),1e3))},clickEnd:function(t,e,i){if(this.$fhem.log({lvl:5,msg:"ClickEnd: type "+e+":"+i}),!this.touchFirst||"mouse"!==i){"touch"===i&&(this.touchFirst=!0),this.timer=clearInterval(this.timer);var n=this.item.Options.setup.main[t][e+(this.long?"LongRelease":"Click")];if(this.$fhem.log({lvl:5,msg:"ClickEvent: "+(this.long?"LongRelease":"Click")+" ["+n+"]"}),n){var s=this.$fhem.handleVals(this.item,n);if(s[0]){var a=this.item.Options.setup.expand?t:0;this.main[a].sliderPrevent=!1;var l=this.createCmd(s[0]),o=-1!=n.findIndex((function(t){return t.match("%i")}));!this.long&&o&&this.updateReading(l),this.sendCmd(l,o)}}}},sliderVal:function(t,e){var i=this.item.Options.setup.main[t].slider,n=e;if(i){var s=this.$fhem.handleVals(this.item,i),a=s[4]&&s[4].match(".")?1:0;n=e.toFixed(a)}return n},setSlider:function(t,e){var i=this.item.Options.setup.main[t].slider;if(i){var n=this.$fhem.handleVals(this.item,i);if(n[0]){var s=this.item.Options.setup.expand?t:0;this.main[s].sliderPrevent=!0;var a=this.createCmd(n[0]),l=n[4]&&n[4].match(".")?1:0;a=a.replace("%v",e.toFixed(l)),this.sendCmd(a)}}},checkMenu:function(t){var e=!1;if(t){var i,n=t.split(" ");n[0].match("set")&&n.splice(0,2),1===n.length&&n.splice(0,0,"state");var s=/\./.test(n[0])?n[0].split("."):["Readings",n[0],"Value"],a=(i=this.$fhem).getEl.apply(i,[this.item].concat(Object(l["a"])(s)));a&&a.match(n[1])&&(e=!0)}return e},createMenu:function(t){var e=[];if(t&&t.length>0){var i,n=Object(a["a"])(t);try{for(n.s();!(i=n.n()).done;){var s=i.value,l=s.split(":");if(l.length>1){var o=this.createCmd(l[1]),r=this.checkMenu(o);e.push({name:l[0],cmd:o,active:r})}}}catch(c){n.e(c)}finally{n.f()}}return e},lvlBtn:function(){var t=0;this.item.Options.setup.expand?(t=this.main.length>1?0:-1,this.lvlIcon=-1===t?"mdi-arrow-collapse":"mdi-arrow-expand"):(t=this.main[0].idx+1,t>this.lvlMax-1&&(t=0)),this.setLvl(t),this.setVals()},setLvl:function(t){var e=-1!=t?t:0,i=-1!=t?t:this.lvlMax-1;this.main.splice(0);for(var n=e;n<=i;n++){var s={idx:n,leftBtn:"",leftBtnDisabled:!1,leftMenu:[],leftMenuIdx:-1,text:"",text2:"",midBtn:"",midBtnDisabled:!1,midMenu:[],midMenuIdx:-1,slider:!1,sliderCurrent:0,sliderPrevent:!1,sliderMin:0,sliderMax:100,sliderStep:1,rightBtn:"",rightBtnDisabled:!1,rightMenu:[],rightMenuIdx:-1};this.main.push(s)}},setVals:function(){for(var t in this.main){var e=this.main[t].idx,i=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text),n=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text2),s=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].slider),a=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].leftBtn),l=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].midBtn),o=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].rightBtn),r=this.createMenu(this.item.Options.setup.main[e].leftMenu),c=this.createMenu(this.item.Options.setup.main[e].midMenu),h=this.createMenu(this.item.Options.setup.main[e].rightMenu);this.main[t].text=i[0]||"",this.main[t].text2=n[0]||"",this.main[t].leftBtn=a[0]||"",this.main[t].midBtn=l[0]||"",this.main[t].rightBtn=o[0]||"",this.main[t].leftBtnDisabled=!!a[1],this.main[t].midBtnDisabled=!!l[1],this.main[t].rightBtnDisabled=!!o[1],this.main[t].leftMenu=r,this.main[t].leftMenuIdx=r.map((function(t){return t.active})).indexOf(!0),this.main[t].midMenu=c,this.main[t].midMenuIdx=c.map((function(t){return t.active})).indexOf(!0),this.main[t].rightMenu=h,this.main[t].rightMenuIdx=h.map((function(t){return t.active})).indexOf(!0),this.main[t].slider=!!s[0],this.main[t].sliderMin=s[2]||0,this.main[t].sliderMax=s[3]||100,this.main[t].sliderStep=s[4]||1,this.main[t].sliderPrevent?this.main[t].sliderCurrent===s[1]&&(this.main[t].sliderPrevent=!1,this.main[t].sliderCurrent=s[1]||0):this.main[t].sliderCurrent=s[1]||0}}}},c=r,h=i("2877"),d=i("6544"),u=i.n(d),m=i("8336"),v=i("b0af"),f=i("99d9"),p=i("62ad"),g=i("ce7e"),x=i("132d"),_=i("8860"),C=i("da13"),b=i("5d23"),O=i("1baa"),k=i("34c3"),I=i("e449"),M=i("8e36"),y=i("0fd9"),T=i("ba0d"),B=i("2fa4"),$=i("afd9"),A=Object(h["a"])(c,n,s,!1,null,null,null);e["default"]=A.exports;u()(A,{VBtn:m["a"],VCard:v["a"],VCardText:f["c"],VCardTitle:f["d"],VCol:p["a"],VDivider:g["a"],VIcon:x["a"],VList:_["a"],VListItem:C["a"],VListItemContent:b["a"],VListItemGroup:O["a"],VListItemIcon:k["a"],VListItemTitle:b["c"],VMenu:I["a"],VProgressLinear:M["a"],VRow:y["a"],VSlider:T["a"],VSpacer:B["a"],VSystemBar:$["a"]})},e449:function(t,e,i){"use strict";var n=i("ade3"),s=i("2909"),a=i("5530"),l=(i("a9e3"),i("7db0"),i("a630"),i("3ca3"),i("99af"),i("498a"),i("caad"),i("2532"),i("ee6f"),i("480e")),o=i("4ad4"),r=i("16b7"),c=i("b848"),h=i("75eb"),d=i("f573"),u=i("e4d3"),m=i("a236"),v=i("f2e7"),f=i("7560"),p=i("a293"),g=i("dc22"),x=i("58df"),_=i("d9bd"),C=i("80d2"),b=Object(x["a"])(c["a"],r["a"],h["a"],d["a"],u["a"],m["a"],v["a"],f["a"]);e["a"]=b.extend({name:"v-menu",directives:{ClickOutside:p["a"],Resize:g["a"]},provide:function(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnClick:{type:Boolean,default:!0},openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data:function(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile:function(){return this.tiles[this.listIndex]},calculatedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?Object(C["g"])(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight:function(){var t=this.auto?"200px":Object(C["g"])(this.maxHeight);return t||"0"},calculatedMaxWidth:function(){return Object(C["g"])(this.maxWidth)||"0"},calculatedMinWidth:function(){if(this.minWidth)return Object(C["g"])(this.minWidth)||"0";var t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),e=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return Object(C["g"])(Math.min(e,t))||"0"},calculatedTop:function(){var t=this.auto?Object(C["g"])(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles:function(){return Boolean(this.tiles.find((function(t){return t.tabIndex>-1})))},styles:function(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive:function(t){t||(this.listIndex=-1)},isContentActive:function(t){this.hasJustFocused=t},listIndex:function(t,e){if(t in this.tiles){var i=this.tiles[t];i.classList.add("v-list-item--highlighted"),this.$refs.content.scrollTop=i.offsetTop-i.clientHeight}e in this.tiles&&this.tiles[e].classList.remove("v-list-item--highlighted")}},created:function(){this.$attrs.hasOwnProperty("full-width")&&Object(_["e"])("full-width",this)},mounted:function(){this.isActive&&this.callActivate()},methods:{activate:function(){var t=this;this.updateDimensions(),requestAnimationFrame((function(){t.startTransition().then((function(){t.$refs.content&&(t.calculatedTopAuto=t.calcTopAuto(),t.auto&&(t.$refs.content.scrollTop=t.calcScrollPosition()))}))}))},calcScrollPosition:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active"),i=t.scrollHeight-t.offsetHeight;return e?Math.min(i,Math.max(0,e.offsetTop-t.offsetHeight/2+e.offsetHeight/2)):t.scrollTop},calcLeftAuto:function(){return parseInt(this.dimensions.activator.left-2*this.defaultOffset)},calcTopAuto:function(){var t=this.$refs.content,e=t.querySelector(".v-list-item--active");if(e||(this.selectedIndex=null),this.offsetY||!e)return this.computedTop;this.selectedIndex=Array.from(this.tiles).indexOf(e);var i=e.offsetTop-this.calcScrollPosition(),n=t.querySelector(".v-list-item").offsetTop;return this.computedTop-i-n-1},changeListIndex:function(t){if(this.getTiles(),this.isActive&&this.hasClickableTiles)if(t.keyCode!==C["x"].tab){if(t.keyCode===C["x"].down)this.nextTile();else if(t.keyCode===C["x"].up)this.prevTile();else if(t.keyCode===C["x"].end)this.lastTile();else if(t.keyCode===C["x"].home)this.firstTile();else{if(t.keyCode!==C["x"].enter||-1===this.listIndex)return;this.tiles[this.listIndex].click()}t.preventDefault()}else this.isActive=!1},closeConditional:function(t){var e=t.target;return this.isActive&&!this._isDestroyed&&this.closeOnClick&&!this.$refs.content.contains(e)},genActivatorAttributes:function(){var t=o["a"].options.methods.genActivatorAttributes.call(this);return this.activeTile&&this.activeTile.id?Object(a["a"])(Object(a["a"])({},t),{},{"aria-activedescendant":this.activeTile.id}):t},genActivatorListeners:function(){var t=d["a"].options.methods.genActivatorListeners.call(this);return this.disableKeys||(t.keydown=this.onKeyDown),t},genTransition:function(){var t=this.genContent();return this.transition?this.$createElement("transition",{props:{name:this.transition}},[t]):t},genDirectives:function(){var t=this,e=[{name:"show",value:this.isContentActive}];return!this.openOnHover&&this.closeOnClick&&e.push({name:"click-outside",value:{handler:function(){t.isActive=!1},closeConditional:this.closeConditional,include:function(){return[t.$el].concat(Object(s["a"])(t.getOpenDependentElements()))}}}),e},genContent:function(){var t=this,e={attrs:Object(a["a"])(Object(a["a"])({},this.getScopeIdAttrs()),{},{role:"role"in this.$attrs?this.$attrs.role:"menu"}),staticClass:"v-menu__content",class:Object(a["a"])(Object(a["a"])(Object(a["a"])({},this.rootThemeClasses),this.roundedClasses),{},Object(n["a"])({"v-menu__content--auto":this.auto,"v-menu__content--fixed":this.activatorFixed,menuable__content__active:this.isActive},this.contentClass.trim(),!0)),style:this.styles,directives:this.genDirectives(),ref:"content",on:{click:function(e){var i=e.target;i.getAttribute("disabled")||t.closeOnContentClick&&(t.isActive=!1)},keydown:this.onKeyDown}};return this.$listeners.scroll&&(e.on=e.on||{},e.on.scroll=this.$listeners.scroll),!this.disabled&&this.openOnHover&&(e.on=e.on||{},e.on.mouseenter=this.mouseEnterHandler),this.openOnHover&&(e.on=e.on||{},e.on.mouseleave=this.mouseLeaveHandler),this.$createElement("div",e,this.getContentSlot())},getTiles:function(){this.$refs.content&&(this.tiles=Array.from(this.$refs.content.querySelectorAll(".v-list-item")))},mouseEnterHandler:function(){var t=this;this.runDelay("open",(function(){t.hasJustFocused||(t.hasJustFocused=!0)}))},mouseLeaveHandler:function(t){var e=this;this.runDelay("close",(function(){e.$refs.content.contains(t.relatedTarget)||requestAnimationFrame((function(){e.isActive=!1,e.callDeactivate()}))}))},nextTile:function(){var t=this.tiles[this.listIndex+1];if(!t){if(!this.tiles.length)return;return this.listIndex=-1,void this.nextTile()}this.listIndex++,-1===t.tabIndex&&this.nextTile()},prevTile:function(){var t=this.tiles[this.listIndex-1];if(!t){if(!this.tiles.length)return;return this.listIndex=this.tiles.length,void this.prevTile()}this.listIndex--,-1===t.tabIndex&&this.prevTile()},lastTile:function(){var t=this.tiles[this.tiles.length-1];t&&(this.listIndex=this.tiles.length-1,-1===t.tabIndex&&this.prevTile())},firstTile:function(){var t=this.tiles[0];t&&(this.listIndex=0,-1===t.tabIndex&&this.nextTile())},onKeyDown:function(t){var e=this;if(t.keyCode===C["x"].esc){setTimeout((function(){e.isActive=!1}));var i=this.getActivator();this.$nextTick((function(){return i&&i.focus()}))}else!this.isActive&&[C["x"].up,C["x"].down].includes(t.keyCode)&&(this.isActive=!0);this.$nextTick((function(){return e.changeListIndex(t)}))},onResize:function(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.updateDimensions,100))}},render:function(t){var e=this,i={staticClass:"v-menu",class:{"v-menu--attached":""===this.attach||!0===this.attach||"attach"===this.attach},directives:[{arg:"500",name:"resize",value:this.onResize}]};return t("div",i,[!this.activator&&this.genActivator(),this.showLazyContent((function(){return[e.$createElement(l["a"],{props:{root:!0,light:e.light,dark:e.dark}},[e.genTransition()])]}))])}})},ee6f:function(t,e,i){}}]); \ No newline at end of file