iobroker.agent-dvr 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ var De=Object.defineProperty;var he=t=>{throw TypeError(t)};var Be=(t,n,e)=>n in t?De(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var te=(t,n,e)=>Be(t,typeof n!="symbol"?n+"":n,e),ne=(t,n,e)=>n.has(t)||he("Cannot "+e);var a=(t,n,e)=>(ne(t,n,"read from private field"),e?e.call(t):n.get(t)),x=(t,n,e)=>n.has(t)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,e),y=(t,n,e,i)=>(ne(t,n,"write to private field"),i?i.call(t,e):n.set(t,e),e),p=(t,n,e)=>(ne(t,n,"access private method"),e);var me="iob-dialog-close";var ge="iob-change";function K(t){return!!t.form}var be=["header","staticText","divider"];function v(t,n){return t==null?"":typeof t=="object"?t[n]||t.en||Object.values(t).find(e=>!!e)||"":String(t)}function X(t){let n={};for(let[e,i]of Object.entries(t.items||{}))i&&!be.includes(i.type)&&(n[e]=i.type);return n}function xe(t){return typeof t=="string"?t:typeof t=="number"||typeof t=="boolean"?t.toString():JSON.stringify(t)}function Pe(t,n){if(n!=null)switch(t){case"number":case"slider":{if(typeof n=="number")return Number.isFinite(n)?n:void 0;let e=xe(n).trim().replace(",",".");if(!e)return;let i=Number(e);return Number.isFinite(i)?i:void 0}case"checkbox":return n===!0||n==="true"||n===1||n==="1";default:return xe(n)}}function J(t,n){let e={};for(let[i,r]of Object.entries(t)){let o=Pe(r,n[i]);o!==void 0&&(e[i]=o)}return e}var we='"Roboto", "Helvetica", "Arial", sans-serif',Ve=Object.freeze({type:"light",primary:"#3399CC",primaryContrast:"#FFFFFF",secondary:"#164477",secondaryContrast:"#FFFFFF",background:"#FFFFFF",paper:"#FFFFFF",text:"rgba(0, 0, 0, 0.87)",textSecondary:"rgba(0, 0, 0, 0.6)",divider:"rgba(0, 0, 0, 0.12)",error:"#D32F2F",warning:"#ED6C02",info:"#0288D1",success:"#2E7D32",fontFamily:we,fontSize:14,borderRadius:4}),He=Object.freeze({type:"dark",primary:"#4DABF5",primaryContrast:"rgba(0, 0, 0, 0.87)",secondary:"#436A93",secondaryContrast:"#FFFFFF",background:"#121212",paper:"#121212",text:"#FFFFFF",textSecondary:"rgba(255, 255, 255, 0.7)",divider:"rgba(255, 255, 255, 0.12)",error:"#F44336",warning:"#FFA726",info:"#29B6F6",success:"#66BB6A",fontFamily:we,fontSize:14,borderRadius:4}),ie=["primary","primaryContrast","secondary","secondaryContrast","background","paper","text","textSecondary","divider","error","warning","info","success","fontFamily"],re=["fontSize","borderRadius"];function ye(t){return{...t==="dark"?He:Ve}}function D(t){if(!t||typeof t!="object")return ye(typeof t=="string"?t:"light");let n=t,e=ye(typeof n.type=="string"?n.type:"light");for(let i of ie){let r=n[i];typeof r=="string"&&r.trim()&&(e[i]=r.trim())}for(let i of re){let r=n[i],o=typeof r=="string"?parseFloat(r):r;typeof o=="number"&&Number.isFinite(o)&&o>=0&&(e[i]=o)}return e}function Se(t,n){return t.type===n.type&&ie.every(e=>t[e]===n[e])&&re.every(e=>t[e]===n[e])}function ve(t){return`--iob-${t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}`}function Y(t){let n={};for(let e of ie)n[ve(e)]=t[e];for(let e of re)n[ve(e)]=`${t[e]}px`;return n["color-scheme"]=t.type,n}var Ee={ok:{en:"OK","zh-cn":"\u786E\u5B9A"},cancel:{en:"Cancel",de:"Abbrechen",ru:"\u041E\u0442\u043C\u0435\u043D\u0430",pt:"Cancelar",nl:"Annuleren",fr:"Annuler",it:"Annulla",es:"Cancelar",pl:"Anuluj",uk:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","zh-cn":"\u53D6\u6D88"},close:{en:"Close",de:"Schlie\xDFen",ru:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",pt:"Fechar",nl:"Sluiten",fr:"Fermer",it:"Chiudi",es:"Cerrar",pl:"Zamknij",uk:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438","zh-cn":"\u5173\u95ED"}},We=`
2
+ dialog {
3
+ box-sizing: border-box;
4
+ width: 480px;
5
+ max-width: calc(100vw - 32px);
6
+ max-height: calc(100vh - 32px);
7
+ padding: 0;
8
+ border: 0;
9
+ border-radius: calc(var(--iob-border-radius) * 2);
10
+ background: var(--iob-paper);
11
+ color: var(--iob-text);
12
+ font-family: var(--iob-font-family);
13
+ font-size: var(--iob-font-size);
14
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
15
+ }
16
+ /* as the dialogs of MUI: a dark paper gets lighter the higher it lies */
17
+ dialog.dark { background-image: linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)); }
18
+ dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
19
+ dialog:focus { outline: none; }
20
+ form { display: flex; flex-direction: column; height: 100%; max-height: inherit; margin: 0; }
21
+ header { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 16px; font-size: 1.15em; font-weight: 500; }
22
+ header span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
23
+ .body { flex: 1; min-height: 0; padding: 0 16px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
24
+ footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }
25
+ button { font: inherit; padding: 6px 16px; border-radius: var(--iob-border-radius); border: 1px solid var(--iob-primary); background: transparent; color: var(--iob-primary); cursor: pointer; }
26
+ button.primary { background: var(--iob-primary); color: var(--iob-primary-contrast); }
27
+ button.close { border: 0; padding: 2px 8px; font-size: 1.4em; line-height: 1; color: var(--iob-text-secondary); }
28
+ label { display: flex; flex-direction: column; gap: 4px; }
29
+ label.check { flex-direction: row; align-items: center; gap: 8px; }
30
+ input, select, textarea { font: inherit; accent-color: var(--iob-primary); }
31
+ .help { color: var(--iob-text-secondary); font-size: 0.85em; }
32
+ h3 { margin: 4px 0 0; font-size: 1em; }
33
+ p { margin: 0; }
34
+ hr { width: 100%; border: 0; border-top: 1px solid var(--iob-divider); margin: 0; }
35
+ [hidden] { display: none !important; }
36
+ `;function ke(t){if(!t)return null;try{let n=new Function("data",`return (${t});`);return e=>{try{return!!n(e)}catch{return!1}}}catch{return null}}function oe(t){return typeof t=="string"?t:typeof t=="number"||typeof t=="boolean"?String(t):""}function Ge(t){let{input:n,setting:e}=t;if(n)return n instanceof HTMLInputElement&&n.type==="checkbox"?n.checked:n instanceof HTMLSelectElement?e.options?.[n.selectedIndex]?.value:n.value}function Ue(t,n,e,i,r){let o={name:n,setting:e,box:t.createElement("div"),hidden:ke(e.hidden),disabled:ke(e.disabled)},m=v(e.label,r);switch(e.type){case"header":return o.box=t.createElement("h3"),o.box.textContent=v(e.text,r)||m,o;case"staticText":return o.box=t.createElement("p"),o.box.textContent=v(e.text,r)||m,o;case"divider":return o.box=t.createElement("hr"),o;default:break}let u=t.createElement("label");o.box=u;let l=t.createElement("span");if(l.textContent=m||n,e.type==="checkbox"){let s=t.createElement("input");s.type="checkbox",s.checked=i===!0||i==="true",u.className="check",u.append(s,l),o.input=s}else if(e.type==="select"){let s=t.createElement("select");for(let d of e.options||[]){let h=t.createElement("option");h.textContent=v(d.label,r),s.append(h)}let f=(e.options||[]).findIndex(d=>String(d.value)===oe(i));s.selectedIndex=f===-1?0:f,u.append(l,s),o.input=s}else if(e.type==="text"&&(e.minRows||1)>1){let s=t.createElement("textarea");s.rows=e.minRows||2,s.value=oe(i),u.append(l,s),o.input=s}else{let s=t.createElement("input"),f=oe(i);switch(e.type){case"number":case"slider":s.type=e.type==="slider"?"range":"number",e.min!==void 0&&(s.min=String(e.min)),e.max!==void 0&&(s.max=String(e.max)),s.step=e.step!==void 0?String(e.step):"any";break;case"password":s.type="password";break;case"color":s.type=!f||/^#[0-9a-f]{6}$/i.test(f)?"color":"text";break;default:s.type="text";break}if(s.value=f,s.type==="range"){let d=t.createElement("output");d.textContent=s.value,s.addEventListener("input",()=>d.textContent=s.value),l.append(": ",d)}u.append(l,s),o.input=s}if(e.help){let s=t.createElement("span");s.className="help",s.textContent=v(e.help,r),u.append(s)}return o}function Ce(t,n={}){let e=n.lang||"en",i=document,r=$=>Ee[$][e]||Ee[$].en||$,o=i.createElement("div");o.setAttribute("data-iob-dialog","");let m=o.attachShadow({mode:"open"}),u=i.createElement("style");u.textContent=We;let l=i.createElement("dialog"),s=D(n.theme);l.className=s.type==="dark"?"dark":"";for(let[$,H]of Object.entries(Y(s)))l.style.setProperty($,H);t.width&&(l.style.width=`${t.width}px`),t.height&&(l.style.height=`${t.height}px`);let f=i.createElement("form"),d=i.createElement("header"),h=i.createElement("span");h.textContent=v(t.title,e);let C=i.createElement("button");C.type="button",C.className="close",C.title=r("close"),C.setAttribute("aria-label",r("close")),C.textContent="\xD7",d.append(h,C);let V=i.createElement("div");return V.className="body",f.append(d,V),l.append(f),m.append(u,l),new Promise($=>{let H=!1,M=T=>{H||(H=!0,l.open&&l.close(),o.remove(),$(T))};if(C.addEventListener("click",()=>M(null)),l.addEventListener("close",()=>M(null)),f.addEventListener("submit",T=>T.preventDefault()),K(t)){let T={},W=[];for(let[b,w]of Object.entries(t.form.items||{})){let Me=t.data?.[b]??w.default,fe=Ue(i,b,w,Me,e);W.push(fe),V.append(fe.box)}let de=()=>{for(let b of W)b.input&&(T[b.name]=Ge(b));return T},ee=()=>{let b=de();for(let w of W)w.box.hidden=w.hidden?w.hidden(b):!1,w.input&&(w.input.disabled=w.disabled?w.disabled(b):!1)};f.addEventListener("input",ee),f.addEventListener("change",ee),ee();let pe=W.find(b=>b.input&&!b.box.hidden&&!b.input.disabled);pe?.input&&(pe.input.autofocus=!0);let ue=i.createElement("footer"),G=i.createElement("button");G.type="button",G.textContent=v(t.cancel,e)||r("cancel"),G.addEventListener("click",()=>M(null));let U=i.createElement("button");U.type="submit",U.className="primary",U.textContent=v(t.ok,e)||r("ok"),ue.append(G,U),f.append(ue),f.addEventListener("submit",()=>M(J(X(t.form),de())))}else V.append(t.element),l.addEventListener(me,T=>M(T.detail??null));i.body.append(o),l.showModal(),(!m.activeElement||m.activeElement===C)&&(l.tabIndex=-1,l.focus())})}function Te(t){return[...new Set(t.filter(n=>typeof n=="string"&&!!n))]}var Ke=["socket","dialogs","theme","editMode","settings","value"],S,A,j,E,L,N,g,R,I,P,c,se,z,B,Fe,je,ae,ce,F,Z=class extends HTMLElement{constructor(){super(...arguments);x(this,c);te(this,"states",{});te(this,"objects",{});x(this,S,null);x(this,A,{});x(this,j,D("light"));x(this,E,!1);x(this,L,null);x(this,N);x(this,g,null);x(this,R,!1);x(this,I,(e,i)=>{a(this,g)?.states.includes(e)&&(this.states[e]=i||null,p(this,c,F).call(this))});x(this,P,(e,i)=>{a(this,g)?.objects.includes(e)&&(this.objects[e]=i||null,p(this,c,z).call(this))})}get socket(){return a(this,S)}set socket(e){y(this,S,e||null),p(this,c,z).call(this)}get settings(){return a(this,A)}set settings(e){y(this,A,e||{}),p(this,c,z).call(this)}get theme(){return a(this,j)}set theme(e){let i=D(e);Se(i,a(this,j))||(y(this,j,i),p(this,c,se).call(this),p(this,c,F).call(this))}get editMode(){return a(this,E)}set editMode(e){let i=!!e;i!==a(this,E)&&(y(this,E,i),p(this,c,F).call(this))}get dialogs(){return a(this,L)}set dialogs(e){y(this,L,e||null)}get value(){return a(this,N)}set value(e){e!==a(this,N)&&(y(this,N,e),p(this,c,F).call(this))}connectedCallback(){for(let e of Ke)if(Object.prototype.hasOwnProperty.call(this,e)){let i=this[e];delete this[e],this[e]=i}p(this,c,se).call(this),p(this,c,z).call(this)}disconnectedCallback(){p(this,c,ce).call(this)}getStateIds(e){return[]}getObjectIds(e){return[]}get systemLang(){return a(this,S)?.systemLang||"en"}text(e){return v(e,this.systemLang)}setState(e,i){return a(this,S)&&!a(this,E)?a(this,S).setState(e,i):Promise.resolve()}changeValue(e){return a(this,E)||this.emit(ge,e)?!1:(this.value=e,!0)}emit(e,i){return this.dispatchEvent(new CustomEvent(e,{detail:i,bubbles:!0,composed:!0,cancelable:!0}))}async openDialog(e){if(a(this,E))return null;let i=a(this,L)?await a(this,L).open(e):await Ce(e,{lang:this.systemLang,theme:a(this,j)});return K(e)?i&&typeof i=="object"?J(X(e.form),i):null:i??null}};S=new WeakMap,A=new WeakMap,j=new WeakMap,E=new WeakMap,L=new WeakMap,N=new WeakMap,g=new WeakMap,R=new WeakMap,I=new WeakMap,P=new WeakMap,c=new WeakSet,se=function(){for(let[e,i]of Object.entries(Y(a(this,j))))this.style.setProperty(e,i)},z=function(){if(!this.isConnected)return;let e=a(this,S),i=e?Te(this.getStateIds(a(this,A))):[],r=e?Te(this.getObjectIds(a(this,A))):[];a(this,g)&&a(this,g).socket!==e&&p(this,c,ce).call(this);let o=a(this,g)?.states||[],m=a(this,g)?.objects||[],u=o.filter(d=>!i.includes(d)),l=m.filter(d=>!r.includes(d)),s=i.filter(d=>!o.includes(d)),f=r.filter(d=>!m.includes(d));e&&u.length&&e.unsubscribeState(u,a(this,I)),e&&l.length&&p(this,c,ae).call(this,e,l);for(let d of u)delete this.states[d];for(let d of[...u,...l])!i.includes(d)&&!r.includes(d)&&delete this.objects[d];y(this,g,e&&(i.length||r.length)?{socket:e,states:i,objects:r}:null),e&&s.length&&p(this,c,Fe).call(this,e,s),e&&f.length&&p(this,c,je).call(this,e,f),p(this,c,F).call(this)},B=function(e,i,r){return a(this,g)?.socket===e&&a(this,g)[i].includes(r)},Fe=function(e,i){e.subscribeState(i,a(this,I)).catch(r=>console.warn(`<${this.localName}>: cannot subscribe ${i.join(", ")}: ${r}`));for(let r of i)e.getState(r).then(o=>{p(this,c,B).call(this,e,"states",r)&&this.states[r]===void 0&&(this.states[r]=o||null,p(this,c,F).call(this))}).catch(()=>{}),e.getObject(r).then(o=>{p(this,c,B).call(this,e,"states",r)&&!p(this,c,B).call(this,e,"objects",r)&&(this.objects[r]=o||null,p(this,c,F).call(this))}).catch(()=>{})},je=function(e,i){e.subscribeObject(i,a(this,P)).catch(r=>console.warn(`<${this.localName}>: cannot subscribe the objects ${i.join(", ")}: ${r}`));for(let r of i)e.getObject(r).then(o=>{p(this,c,B).call(this,e,"objects",r)&&(this.objects[r]=o||null,p(this,c,z).call(this))}).catch(()=>{})},ae=function(e,i){e.unsubscribeObject(i,a(this,P)).catch(()=>{})},ce=function(){if(a(this,g)){let{socket:e,states:i,objects:r}=a(this,g);i.length&&e.unsubscribeState(i,a(this,I)),r.length&&p(this,c,ae).call(this,e,r),y(this,g,null)}this.states={},this.objects={}},F=function(){a(this,R)||(y(this,R,!0),queueMicrotask(()=>{y(this,R,!1),this.isConnected&&this.render()}))};function _e(t,n){let e=typeof t=="string"?t:t.tag;customElements.get(e)||customElements.define(e,n)}var O={widgetMode:"nojs",count:50,thumbSize:"medium",minCol:150,maxModalWidth:900,showTags:!0,tagPosition:"bottom-left",sortNewest:!0,showSearch:!0,defaultTag:"",compact:!1,playerUrl:"",liveAspect:"",liveRefreshSec:0,colorCardBg:"rgba(127,127,127,0.15)",colorTagBg:"rgba(0,0,0,0.55)",colorTagText:"#ffffff",colorAccent:"#8ab4f8",colorModalBg:"#1c1c1e",borderRadius:8},Xe={small:120,medium:180,large:240},_={pickWidget:{en:"Please choose a widget in the settings.",de:"Bitte in den Einstellungen ein Widget ausw\xE4hlen."},pickCamera:{en:"Please choose a camera in the settings.",de:"Bitte in den Einstellungen eine Kamera ausw\xE4hlen."},pickInstance:{en:"Please choose an agent-dvr instance in the settings.",de:"Bitte in den Einstellungen eine agent-dvr-Instanz ausw\xE4hlen."},waiting:{en:"Waiting for data of the adapter \u2026",de:"Warte auf Daten des Adapters \u2026"},noCamera:{en:"Camera not found",de:"Kamera nicht gefunden"},noCameras:{en:"No cameras",de:"Keine Kameras"}},$e={en:{noRecordings:"No recordings",search:"Search \u2026",all:"All",download:"Download",live:"LIVE"},de:{noRecordings:"Keine Aufnahmen",search:"Suche \u2026",all:"Alle",download:"Herunterladen",live:"LIVE"}};function k(t){return String(t??"").replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n])}function Ae(t){let n=String(t||"").replace(/^system\.adapter\./,"").split(".");return{instance:n.length>=2?`${n[0]}.${n[1]}`:"",camera:n.length>=3&&/^cam_/.test(n[2])?n[2]:""}}function Le(t){let n=t&&t.val;if(typeof n!="string"||!n)return null;try{return JSON.parse(n)}catch{return null}}function Oe(t,n){if(t.mode==="custom"){let e={...O};for(let[i,r]of Object.entries(t))r!=null&&(e[i]=r);return e.minCol=Xe[e.thumbSize]||Number(e.minCol)||150,e}return!n||!n.settings?null:{...O,...n.settings}}function ze(t,n){return{...$e[n]||$e.en,...t&&t.labels||{}}}function Ne(t,n,e){let i=t.compact?6:12,r=`${Math.max(0,Number(t.borderRadius)||0)}px`,o=n?{card:"color-mix(in srgb, var(--iob-text, currentColor) 10%, transparent)",tagBg:"var(--iob-primary)",tagText:"var(--iob-primary-contrast)",accent:"var(--iob-primary)",modal:"var(--iob-paper)",info:"var(--iob-text)"}:{card:t.colorCardBg||O.colorCardBg,tagBg:t.colorTagBg||O.colorTagBg,tagText:t.colorTagText||O.colorTagText,accent:t.colorAccent||O.colorAccent,modal:t.colorModalBg||O.colorModalBg,info:"#fff"};return`:host{display:block;width:100%;height:100%;overflow:hidden;color:inherit;font:inherit}.root{--adv-card-bg:${o.card};--adv-tag-bg:${o.tagBg};--adv-tag-color:${o.tagText};--adv-accent:${o.accent};--adv-radius:${r};width:100%;height:100%;box-sizing:border-box;overflow:auto;${e?"pointer-events:none;":""}}.bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}.search{flex:1 1 160px;min-width:120px;padding:6px 10px;border-radius:8px;border:1px solid rgba(127,127,127,.4);background:rgba(127,127,127,.08);color:inherit;font:inherit}.tags{display:flex;flex-wrap:wrap;gap:6px}.tagbtn{padding:4px 10px;border-radius:999px;border:1px solid rgba(127,127,127,.4);background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:.8rem}.tagbtn.on{background:var(--adv-accent);color:${n?"var(--iob-primary-contrast)":"#fff"};border-color:var(--adv-accent)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(${Number(t.minCol)||150}px,1fr));gap:${i}px}.cell{display:flex;flex-direction:column;cursor:pointer;min-width:0}.img{position:relative;display:block;border-radius:var(--adv-radius);overflow:hidden;background:var(--adv-card-bg)}.img img{width:100%;height:auto;display:block}.img.fix img{height:100%;object-fit:cover}.tag{position:absolute;background:var(--adv-tag-bg);color:var(--adv-tag-color);font-size:.6rem;padding:2px 4px;border-radius:3px;line-height:1;max-width:85%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s;background:rgba(0,0,0,.2)}.play::before{content:"";border-style:solid;border-width:11px 0 11px 18px;border-color:transparent transparent transparent #fff;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6))}.cell:hover .play{opacity:1}.cap{font-size:${t.compact?".65rem":".72rem"};margin-top:${t.compact?2:4}px;line-height:1.25;opacity:.85;overflow:hidden;text-overflow:ellipsis}.empty,.msg{padding:24px;text-align:center;opacity:.7}.single{height:100%;display:flex;flex-direction:column}.single .cell{flex:1 1 auto;min-height:0}.single .img{flex:1 1 auto;min-height:0}.single .img img{width:100%;height:100%;object-fit:contain}dialog{border:0;padding:12px;border-radius:14px;background:${o.modal};max-width:min(92vw,${Number(t.maxModalWidth)||900}px);width:min(92vw,${Number(t.maxModalWidth)||900}px);box-sizing:border-box;box-shadow:0 16px 48px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.08);overflow:visible}dialog::backdrop{background:rgba(0,0,0,.35)}.box{position:relative;display:flex;flex-direction:column;gap:8px}video{width:100%;max-height:80vh;border-radius:8px;background:#000;display:block;object-fit:contain}.close{position:absolute;top:6px;right:6px;width:32px;height:32px;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px;z-index:2;border:2px solid rgba(255,255,255,.35)}.info{color:${o.info};font-size:.8rem;text-align:center}.info a{color:var(--adv-accent)}`}function Re(t){let n=document.createElement("dialog");n.innerHTML='<div class="box"><span class="close" role="button" aria-label="close">&#10005;</span><video controls preload="none" playsinline></video><div class="info"></div></div>';let e=n.querySelector("video"),i=n.querySelector(".info"),r=()=>n.open&&n.close();return n.querySelector(".close").addEventListener("click",r),n.addEventListener("click",o=>o.target===n&&r()),n.addEventListener("close",()=>{try{e.pause()}catch{}e.removeAttribute("src"),e.removeAttribute("style");try{e.load()}catch{}}),t.appendChild(n),{el:n,open(o,m,u){u&&(e.style.aspectRatio=u.replace("/"," / "),e.style.objectFit="fill"),e.setAttribute("src",o),i.innerHTML=m,n.open||n.showModal(),e.play&&e.play().catch(()=>{})}}}function Ie(t,n,e){let i=t.aspect||n.liveAspect||"",r=i?String(i).replace("/"," / "):"";return`<div class="cell" data-cam="${k(t.id)}"><span class="img${r?" fix":""}"${r?` style="aspect-ratio:${k(r)}"`:""}><img class="snap" alt="" src="${k(`${t.snapshot}&ts=${Date.now()}`)}" data-base="${k(t.snapshot)}"><span class="tag" style="top:5px;left:5px">&#9679; ${k(e.live)}</span><span class="play"></span></span><span class="cap">${k(t.name)}</span></div>`}var Q=class{constructor(n){this.root=n,this.timer=null,this.sec=0}set(n){n=Math.max(0,Number(n)||0),!(n===this.sec&&(this.timer||!n))&&(this.stop(),this.sec=n,n>0&&(this.timer=setInterval(()=>{for(let e of this.root.querySelectorAll("img.snap")){let i=e.getAttribute("data-base");i&&(e.src=`${i}&ts=${Date.now()}`)}},n*1e3)))}stop(){clearInterval(this.timer),this.timer=null,this.sec=0}};var q=class extends Z{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML='<style></style><div class="root"></div>',this._player=Re(this.shadowRoot),this._timer=new Q(this.shadowRoot),this._key="",this._cams=[],this._cfg=null}_target(n){return{instance:"",camera:"",missing:_.pickInstance}}_single(){return!1}getStateIds(n){let e=this._target(n);return e.instance?[`${e.instance}.widget_config`]:[]}render(){let n=this.settings||{},e=this._target(n),i=this.shadowRoot.querySelector(".root"),r=e.instance?Le(this.states[`${e.instance}.widget_config`]):null,o=Oe(n,r),m=this.shadowRoot.querySelector("style"),u=Ne(o||{},!!n.follow,this.editMode);if(m.textContent!==u&&(m.textContent=u),e.missing)return this._msg(i,this.text(e.missing));if(!o||!r||!Array.isArray(r.cameras))return this._msg(i,this.text(_.waiting));let l=e.camera?r.cameras.filter(h=>h.id===e.camera):r.cameras,s=JSON.stringify([o,l,r.labels,this.systemLang]);if(this._timer.set(o.liveRefreshSec),s===this._key)return;if(this._key=s,this._cfg=o,this._cams=l,!l.length)return this._msg(i,this.text(e.camera?_.noCamera:_.noCameras));let f=ze(r,this.systemLang),d=l.map(h=>Ie(h,o,f)).join("");if(i.innerHTML=this._single()?`<div class="single">${d}</div>`:`<div class="grid">${d}</div>`,this._single()){let h=i.querySelector(".img");h&&h.removeAttribute("style"),h&&h.classList.remove("fix")}for(let h of i.querySelectorAll(".cell"))h.addEventListener("click",()=>this._open(h.getAttribute("data-cam")))}_msg(n,e){this._key="",this._timer.stop(),n.innerHTML=`<div class="msg">${k(e)}</div>`}_open(n){let e=this._cams.find(i=>i.id===n);!e||this.editMode||this._player.open(e.live,`${k(e.name)} &middot; Live`,e.aspect||this._cfg.liveAspect||"")}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._key=""}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this._timer.stop(),this._player.el.open&&this._player.el.close()}};var le=class extends q{_target(n){let e=Ae(n.mode==="custom"?n.camera:n.widget),i=e.instance&&e.camera?null:n.mode==="custom"?_.pickCamera:_.pickWidget;return{...e,missing:i}}_single(){return!0}};_e("iob-agent-dvr-live",le);
@@ -0,0 +1,209 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/ioBroker/web-components/main/schemas/manifest.json",
3
+ "manifestVersion": 1,
4
+ "tag": "iob-agent-dvr-live",
5
+ "name": {
6
+ "en": "Agent DVR live camera",
7
+ "de": "Agent DVR Live-Kamera"
8
+ },
9
+ "description": {
10
+ "en": "Live tile of a camera, opens the live stream: from the adapter settings or set up here",
11
+ "de": "Live-Kachel einer Kamera, öffnet den Livestream: aus den Adapter-Einstellungen oder hier eingestellt"
12
+ },
13
+ "icon": "../agent-dvr.png",
14
+ "module": "agent-dvr-live.js",
15
+ "size": {
16
+ "width": 400,
17
+ "height": 260
18
+ },
19
+ "settings": {
20
+ "type": "panel",
21
+ "items": {
22
+ "mode": {
23
+ "type": "select",
24
+ "label": {
25
+ "en": "Source",
26
+ "de": "Quelle"
27
+ },
28
+ "default": "adapter",
29
+ "options": [
30
+ {
31
+ "value": "adapter",
32
+ "label": {
33
+ "en": "Widget from the adapter settings",
34
+ "de": "Widget aus den Adapter-Einstellungen"
35
+ }
36
+ },
37
+ {
38
+ "value": "custom",
39
+ "label": {
40
+ "en": "Own settings here",
41
+ "de": "Eigene Einstellungen hier"
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ "widget": {
47
+ "type": "objectId",
48
+ "types": "state",
49
+ "root": "agent-dvr",
50
+ "label": {
51
+ "en": "Widget",
52
+ "de": "Widget"
53
+ },
54
+ "help": {
55
+ "en": "The live widget of a camera, e.g. agent-dvr.0.cam_8_Garden.widget_live",
56
+ "de": "Live-Widget einer Kamera, z. B. agent-dvr.0.cam_8_Garten.widget_live"
57
+ },
58
+ "hidden": "data.mode === 'custom'"
59
+ },
60
+ "camera": {
61
+ "type": "objectId",
62
+ "types": "device",
63
+ "root": "agent-dvr",
64
+ "label": {
65
+ "en": "Camera",
66
+ "de": "Kamera"
67
+ },
68
+ "help": {
69
+ "en": "Choose the camera, e.g. agent-dvr.0.cam_8_Garden",
70
+ "de": "Kamera wählen, z. B. agent-dvr.0.cam_8_Garten"
71
+ },
72
+ "hidden": "data.mode !== 'custom'"
73
+ },
74
+ "follow": {
75
+ "type": "checkbox",
76
+ "label": {
77
+ "en": "Use the colors of the visualization",
78
+ "de": "Farben der Visualisierung übernehmen"
79
+ },
80
+ "default": false,
81
+ "help": {
82
+ "en": "Tiles, badges, player and accent in the colors of the theme instead of the widget colors",
83
+ "de": "Kacheln, Badges, Player und Akzent in den Farben des Themes statt der Widget-Farben"
84
+ }
85
+ },
86
+ "hLive": {
87
+ "type": "header",
88
+ "text": {
89
+ "en": "Live Widget",
90
+ "de": "Live-Widget"
91
+ },
92
+ "size": 5,
93
+ "hidden": "data.mode !== 'custom'"
94
+ },
95
+ "liveAspect": {
96
+ "type": "text",
97
+ "label": {
98
+ "en": "Live tile aspect ratio (e.g. 16/9)",
99
+ "de": "Seitenverhältnis Live-Kachel (z. B. 16/9)"
100
+ },
101
+ "default": "",
102
+ "hidden": "data.mode !== 'custom'",
103
+ "help": {
104
+ "en": "Used when the adapter could not detect the resolution of the camera. Empty = automatic",
105
+ "de": "Gilt, wenn der Adapter die Auflösung der Kamera nicht erkennen konnte. Leer = automatisch"
106
+ }
107
+ },
108
+ "liveRefreshSec": {
109
+ "type": "number",
110
+ "label": {
111
+ "en": "Snapshot refresh interval (s, 0 = never)",
112
+ "de": "Aktualisierung Vorschaubild (s, 0 = nie)"
113
+ },
114
+ "min": 0,
115
+ "max": 3600,
116
+ "default": 0,
117
+ "hidden": "data.mode !== 'custom'",
118
+ "help": {
119
+ "en": "Only the image is refreshed in the browser – an open player never closes",
120
+ "de": "Nur das Bild wird im Browser erneuert – ein offener Player schließt sich nie"
121
+ }
122
+ },
123
+ "compact": {
124
+ "type": "checkbox",
125
+ "label": {
126
+ "en": "Compact layout",
127
+ "de": "Kompaktes Layout"
128
+ },
129
+ "default": false,
130
+ "hidden": "data.mode !== 'custom'",
131
+ "help": {
132
+ "en": "Smaller spacing and font – more entries at a glance",
133
+ "de": "Kleinere Abstände und Schrift – mehr Einträge auf einen Blick"
134
+ }
135
+ },
136
+ "maxModalWidth": {
137
+ "type": "number",
138
+ "label": {
139
+ "en": "Max. player width (px)",
140
+ "de": "Max. Player-Breite (px)"
141
+ },
142
+ "min": 300,
143
+ "max": 2000,
144
+ "default": 900,
145
+ "hidden": "data.mode !== 'custom'"
146
+ },
147
+ "hColors": {
148
+ "type": "header",
149
+ "text": {
150
+ "en": "Colors & Design",
151
+ "de": "Farben & Design"
152
+ },
153
+ "size": 5,
154
+ "hidden": "data.mode !== 'custom'"
155
+ },
156
+ "colorCardBg": {
157
+ "type": "color",
158
+ "label": {
159
+ "en": "Tile background",
160
+ "de": "Kachel-Hintergrund"
161
+ },
162
+ "default": "rgba(127,127,127,0.15)",
163
+ "hidden": "data.mode !== 'custom' || data.follow"
164
+ },
165
+ "colorTagBg": {
166
+ "type": "color",
167
+ "label": {
168
+ "en": "Tag badge background",
169
+ "de": "Tag-Badge-Hintergrund"
170
+ },
171
+ "default": "rgba(0,0,0,0.55)",
172
+ "hidden": "data.mode !== 'custom' || data.follow"
173
+ },
174
+ "colorTagText": {
175
+ "type": "color",
176
+ "label": {
177
+ "en": "Tag badge text color",
178
+ "de": "Tag-Badge-Textfarbe"
179
+ },
180
+ "default": "#ffffff",
181
+ "hidden": "data.mode !== 'custom' || data.follow"
182
+ },
183
+ "colorModalBg": {
184
+ "type": "color",
185
+ "label": {
186
+ "en": "Modal background",
187
+ "de": "Modal-Hintergrund"
188
+ },
189
+ "default": "#1c1c1e",
190
+ "hidden": "data.mode !== 'custom' || data.follow"
191
+ },
192
+ "borderRadius": {
193
+ "type": "number",
194
+ "label": {
195
+ "en": "Border radius (px)",
196
+ "de": "Eckenradius (px)"
197
+ },
198
+ "min": 0,
199
+ "max": 32,
200
+ "default": 8,
201
+ "hidden": "data.mode !== 'custom'",
202
+ "help": {
203
+ "en": "Corner radius of the tiles (0 = square)",
204
+ "de": "Abrundungsradius der Kacheln (0 = eckig)"
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
@@ -0,0 +1,36 @@
1
+ var De=Object.defineProperty;var he=t=>{throw TypeError(t)};var Be=(t,n,e)=>n in t?De(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var te=(t,n,e)=>Be(t,typeof n!="symbol"?n+"":n,e),ne=(t,n,e)=>n.has(t)||he("Cannot "+e);var a=(t,n,e)=>(ne(t,n,"read from private field"),e?e.call(t):n.get(t)),x=(t,n,e)=>n.has(t)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,e),y=(t,n,e,i)=>(ne(t,n,"write to private field"),i?i.call(t,e):n.set(t,e),e),p=(t,n,e)=>(ne(t,n,"access private method"),e);var me="iob-dialog-close";var ge="iob-change";function K(t){return!!t.form}var be=["header","staticText","divider"];function v(t,n){return t==null?"":typeof t=="object"?t[n]||t.en||Object.values(t).find(e=>!!e)||"":String(t)}function X(t){let n={};for(let[e,i]of Object.entries(t.items||{}))i&&!be.includes(i.type)&&(n[e]=i.type);return n}function xe(t){return typeof t=="string"?t:typeof t=="number"||typeof t=="boolean"?t.toString():JSON.stringify(t)}function Pe(t,n){if(n!=null)switch(t){case"number":case"slider":{if(typeof n=="number")return Number.isFinite(n)?n:void 0;let e=xe(n).trim().replace(",",".");if(!e)return;let i=Number(e);return Number.isFinite(i)?i:void 0}case"checkbox":return n===!0||n==="true"||n===1||n==="1";default:return xe(n)}}function J(t,n){let e={};for(let[i,r]of Object.entries(t)){let o=Pe(r,n[i]);o!==void 0&&(e[i]=o)}return e}var we='"Roboto", "Helvetica", "Arial", sans-serif',Ve=Object.freeze({type:"light",primary:"#3399CC",primaryContrast:"#FFFFFF",secondary:"#164477",secondaryContrast:"#FFFFFF",background:"#FFFFFF",paper:"#FFFFFF",text:"rgba(0, 0, 0, 0.87)",textSecondary:"rgba(0, 0, 0, 0.6)",divider:"rgba(0, 0, 0, 0.12)",error:"#D32F2F",warning:"#ED6C02",info:"#0288D1",success:"#2E7D32",fontFamily:we,fontSize:14,borderRadius:4}),He=Object.freeze({type:"dark",primary:"#4DABF5",primaryContrast:"rgba(0, 0, 0, 0.87)",secondary:"#436A93",secondaryContrast:"#FFFFFF",background:"#121212",paper:"#121212",text:"#FFFFFF",textSecondary:"rgba(255, 255, 255, 0.7)",divider:"rgba(255, 255, 255, 0.12)",error:"#F44336",warning:"#FFA726",info:"#29B6F6",success:"#66BB6A",fontFamily:we,fontSize:14,borderRadius:4}),ie=["primary","primaryContrast","secondary","secondaryContrast","background","paper","text","textSecondary","divider","error","warning","info","success","fontFamily"],re=["fontSize","borderRadius"];function ye(t){return{...t==="dark"?He:Ve}}function D(t){if(!t||typeof t!="object")return ye(typeof t=="string"?t:"light");let n=t,e=ye(typeof n.type=="string"?n.type:"light");for(let i of ie){let r=n[i];typeof r=="string"&&r.trim()&&(e[i]=r.trim())}for(let i of re){let r=n[i],o=typeof r=="string"?parseFloat(r):r;typeof o=="number"&&Number.isFinite(o)&&o>=0&&(e[i]=o)}return e}function Se(t,n){return t.type===n.type&&ie.every(e=>t[e]===n[e])&&re.every(e=>t[e]===n[e])}function ve(t){return`--iob-${t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}`}function Y(t){let n={};for(let e of ie)n[ve(e)]=t[e];for(let e of re)n[ve(e)]=`${t[e]}px`;return n["color-scheme"]=t.type,n}var Ee={ok:{en:"OK","zh-cn":"\u786E\u5B9A"},cancel:{en:"Cancel",de:"Abbrechen",ru:"\u041E\u0442\u043C\u0435\u043D\u0430",pt:"Cancelar",nl:"Annuleren",fr:"Annuler",it:"Annulla",es:"Cancelar",pl:"Anuluj",uk:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","zh-cn":"\u53D6\u6D88"},close:{en:"Close",de:"Schlie\xDFen",ru:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",pt:"Fechar",nl:"Sluiten",fr:"Fermer",it:"Chiudi",es:"Cerrar",pl:"Zamknij",uk:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438","zh-cn":"\u5173\u95ED"}},We=`
2
+ dialog {
3
+ box-sizing: border-box;
4
+ width: 480px;
5
+ max-width: calc(100vw - 32px);
6
+ max-height: calc(100vh - 32px);
7
+ padding: 0;
8
+ border: 0;
9
+ border-radius: calc(var(--iob-border-radius) * 2);
10
+ background: var(--iob-paper);
11
+ color: var(--iob-text);
12
+ font-family: var(--iob-font-family);
13
+ font-size: var(--iob-font-size);
14
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
15
+ }
16
+ /* as the dialogs of MUI: a dark paper gets lighter the higher it lies */
17
+ dialog.dark { background-image: linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)); }
18
+ dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
19
+ dialog:focus { outline: none; }
20
+ form { display: flex; flex-direction: column; height: 100%; max-height: inherit; margin: 0; }
21
+ header { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 16px; font-size: 1.15em; font-weight: 500; }
22
+ header span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
23
+ .body { flex: 1; min-height: 0; padding: 0 16px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
24
+ footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }
25
+ button { font: inherit; padding: 6px 16px; border-radius: var(--iob-border-radius); border: 1px solid var(--iob-primary); background: transparent; color: var(--iob-primary); cursor: pointer; }
26
+ button.primary { background: var(--iob-primary); color: var(--iob-primary-contrast); }
27
+ button.close { border: 0; padding: 2px 8px; font-size: 1.4em; line-height: 1; color: var(--iob-text-secondary); }
28
+ label { display: flex; flex-direction: column; gap: 4px; }
29
+ label.check { flex-direction: row; align-items: center; gap: 8px; }
30
+ input, select, textarea { font: inherit; accent-color: var(--iob-primary); }
31
+ .help { color: var(--iob-text-secondary); font-size: 0.85em; }
32
+ h3 { margin: 4px 0 0; font-size: 1em; }
33
+ p { margin: 0; }
34
+ hr { width: 100%; border: 0; border-top: 1px solid var(--iob-divider); margin: 0; }
35
+ [hidden] { display: none !important; }
36
+ `;function ke(t){if(!t)return null;try{let n=new Function("data",`return (${t});`);return e=>{try{return!!n(e)}catch{return!1}}}catch{return null}}function oe(t){return typeof t=="string"?t:typeof t=="number"||typeof t=="boolean"?String(t):""}function Ge(t){let{input:n,setting:e}=t;if(n)return n instanceof HTMLInputElement&&n.type==="checkbox"?n.checked:n instanceof HTMLSelectElement?e.options?.[n.selectedIndex]?.value:n.value}function Ue(t,n,e,i,r){let o={name:n,setting:e,box:t.createElement("div"),hidden:ke(e.hidden),disabled:ke(e.disabled)},m=v(e.label,r);switch(e.type){case"header":return o.box=t.createElement("h3"),o.box.textContent=v(e.text,r)||m,o;case"staticText":return o.box=t.createElement("p"),o.box.textContent=v(e.text,r)||m,o;case"divider":return o.box=t.createElement("hr"),o;default:break}let f=t.createElement("label");o.box=f;let l=t.createElement("span");if(l.textContent=m||n,e.type==="checkbox"){let s=t.createElement("input");s.type="checkbox",s.checked=i===!0||i==="true",f.className="check",f.append(s,l),o.input=s}else if(e.type==="select"){let s=t.createElement("select");for(let d of e.options||[]){let h=t.createElement("option");h.textContent=v(d.label,r),s.append(h)}let u=(e.options||[]).findIndex(d=>String(d.value)===oe(i));s.selectedIndex=u===-1?0:u,f.append(l,s),o.input=s}else if(e.type==="text"&&(e.minRows||1)>1){let s=t.createElement("textarea");s.rows=e.minRows||2,s.value=oe(i),f.append(l,s),o.input=s}else{let s=t.createElement("input"),u=oe(i);switch(e.type){case"number":case"slider":s.type=e.type==="slider"?"range":"number",e.min!==void 0&&(s.min=String(e.min)),e.max!==void 0&&(s.max=String(e.max)),s.step=e.step!==void 0?String(e.step):"any";break;case"password":s.type="password";break;case"color":s.type=!u||/^#[0-9a-f]{6}$/i.test(u)?"color":"text";break;default:s.type="text";break}if(s.value=u,s.type==="range"){let d=t.createElement("output");d.textContent=s.value,s.addEventListener("input",()=>d.textContent=s.value),l.append(": ",d)}f.append(l,s),o.input=s}if(e.help){let s=t.createElement("span");s.className="help",s.textContent=v(e.help,r),f.append(s)}return o}function Ce(t,n={}){let e=n.lang||"en",i=document,r=_=>Ee[_][e]||Ee[_].en||_,o=i.createElement("div");o.setAttribute("data-iob-dialog","");let m=o.attachShadow({mode:"open"}),f=i.createElement("style");f.textContent=We;let l=i.createElement("dialog"),s=D(n.theme);l.className=s.type==="dark"?"dark":"";for(let[_,H]of Object.entries(Y(s)))l.style.setProperty(_,H);t.width&&(l.style.width=`${t.width}px`),t.height&&(l.style.height=`${t.height}px`);let u=i.createElement("form"),d=i.createElement("header"),h=i.createElement("span");h.textContent=v(t.title,e);let C=i.createElement("button");C.type="button",C.className="close",C.title=r("close"),C.setAttribute("aria-label",r("close")),C.textContent="\xD7",d.append(h,C);let V=i.createElement("div");return V.className="body",u.append(d,V),l.append(u),m.append(f,l),new Promise(_=>{let H=!1,M=T=>{H||(H=!0,l.open&&l.close(),o.remove(),_(T))};if(C.addEventListener("click",()=>M(null)),l.addEventListener("close",()=>M(null)),u.addEventListener("submit",T=>T.preventDefault()),K(t)){let T={},W=[];for(let[b,w]of Object.entries(t.form.items||{})){let Me=t.data?.[b]??w.default,ue=Ue(i,b,w,Me,e);W.push(ue),V.append(ue.box)}let de=()=>{for(let b of W)b.input&&(T[b.name]=Ge(b));return T},ee=()=>{let b=de();for(let w of W)w.box.hidden=w.hidden?w.hidden(b):!1,w.input&&(w.input.disabled=w.disabled?w.disabled(b):!1)};u.addEventListener("input",ee),u.addEventListener("change",ee),ee();let pe=W.find(b=>b.input&&!b.box.hidden&&!b.input.disabled);pe?.input&&(pe.input.autofocus=!0);let fe=i.createElement("footer"),G=i.createElement("button");G.type="button",G.textContent=v(t.cancel,e)||r("cancel"),G.addEventListener("click",()=>M(null));let U=i.createElement("button");U.type="submit",U.className="primary",U.textContent=v(t.ok,e)||r("ok"),fe.append(G,U),u.append(fe),u.addEventListener("submit",()=>M(J(X(t.form),de())))}else V.append(t.element),l.addEventListener(me,T=>M(T.detail??null));i.body.append(o),l.showModal(),(!m.activeElement||m.activeElement===C)&&(l.tabIndex=-1,l.focus())})}function Te(t){return[...new Set(t.filter(n=>typeof n=="string"&&!!n))]}var Ke=["socket","dialogs","theme","editMode","settings","value"],S,$,j,E,L,N,g,R,I,P,c,se,z,B,Fe,je,ae,ce,F,Z=class extends HTMLElement{constructor(){super(...arguments);x(this,c);te(this,"states",{});te(this,"objects",{});x(this,S,null);x(this,$,{});x(this,j,D("light"));x(this,E,!1);x(this,L,null);x(this,N);x(this,g,null);x(this,R,!1);x(this,I,(e,i)=>{a(this,g)?.states.includes(e)&&(this.states[e]=i||null,p(this,c,F).call(this))});x(this,P,(e,i)=>{a(this,g)?.objects.includes(e)&&(this.objects[e]=i||null,p(this,c,z).call(this))})}get socket(){return a(this,S)}set socket(e){y(this,S,e||null),p(this,c,z).call(this)}get settings(){return a(this,$)}set settings(e){y(this,$,e||{}),p(this,c,z).call(this)}get theme(){return a(this,j)}set theme(e){let i=D(e);Se(i,a(this,j))||(y(this,j,i),p(this,c,se).call(this),p(this,c,F).call(this))}get editMode(){return a(this,E)}set editMode(e){let i=!!e;i!==a(this,E)&&(y(this,E,i),p(this,c,F).call(this))}get dialogs(){return a(this,L)}set dialogs(e){y(this,L,e||null)}get value(){return a(this,N)}set value(e){e!==a(this,N)&&(y(this,N,e),p(this,c,F).call(this))}connectedCallback(){for(let e of Ke)if(Object.prototype.hasOwnProperty.call(this,e)){let i=this[e];delete this[e],this[e]=i}p(this,c,se).call(this),p(this,c,z).call(this)}disconnectedCallback(){p(this,c,ce).call(this)}getStateIds(e){return[]}getObjectIds(e){return[]}get systemLang(){return a(this,S)?.systemLang||"en"}text(e){return v(e,this.systemLang)}setState(e,i){return a(this,S)&&!a(this,E)?a(this,S).setState(e,i):Promise.resolve()}changeValue(e){return a(this,E)||this.emit(ge,e)?!1:(this.value=e,!0)}emit(e,i){return this.dispatchEvent(new CustomEvent(e,{detail:i,bubbles:!0,composed:!0,cancelable:!0}))}async openDialog(e){if(a(this,E))return null;let i=a(this,L)?await a(this,L).open(e):await Ce(e,{lang:this.systemLang,theme:a(this,j)});return K(e)?i&&typeof i=="object"?J(X(e.form),i):null:i??null}};S=new WeakMap,$=new WeakMap,j=new WeakMap,E=new WeakMap,L=new WeakMap,N=new WeakMap,g=new WeakMap,R=new WeakMap,I=new WeakMap,P=new WeakMap,c=new WeakSet,se=function(){for(let[e,i]of Object.entries(Y(a(this,j))))this.style.setProperty(e,i)},z=function(){if(!this.isConnected)return;let e=a(this,S),i=e?Te(this.getStateIds(a(this,$))):[],r=e?Te(this.getObjectIds(a(this,$))):[];a(this,g)&&a(this,g).socket!==e&&p(this,c,ce).call(this);let o=a(this,g)?.states||[],m=a(this,g)?.objects||[],f=o.filter(d=>!i.includes(d)),l=m.filter(d=>!r.includes(d)),s=i.filter(d=>!o.includes(d)),u=r.filter(d=>!m.includes(d));e&&f.length&&e.unsubscribeState(f,a(this,I)),e&&l.length&&p(this,c,ae).call(this,e,l);for(let d of f)delete this.states[d];for(let d of[...f,...l])!i.includes(d)&&!r.includes(d)&&delete this.objects[d];y(this,g,e&&(i.length||r.length)?{socket:e,states:i,objects:r}:null),e&&s.length&&p(this,c,Fe).call(this,e,s),e&&u.length&&p(this,c,je).call(this,e,u),p(this,c,F).call(this)},B=function(e,i,r){return a(this,g)?.socket===e&&a(this,g)[i].includes(r)},Fe=function(e,i){e.subscribeState(i,a(this,I)).catch(r=>console.warn(`<${this.localName}>: cannot subscribe ${i.join(", ")}: ${r}`));for(let r of i)e.getState(r).then(o=>{p(this,c,B).call(this,e,"states",r)&&this.states[r]===void 0&&(this.states[r]=o||null,p(this,c,F).call(this))}).catch(()=>{}),e.getObject(r).then(o=>{p(this,c,B).call(this,e,"states",r)&&!p(this,c,B).call(this,e,"objects",r)&&(this.objects[r]=o||null,p(this,c,F).call(this))}).catch(()=>{})},je=function(e,i){e.subscribeObject(i,a(this,P)).catch(r=>console.warn(`<${this.localName}>: cannot subscribe the objects ${i.join(", ")}: ${r}`));for(let r of i)e.getObject(r).then(o=>{p(this,c,B).call(this,e,"objects",r)&&(this.objects[r]=o||null,p(this,c,z).call(this))}).catch(()=>{})},ae=function(e,i){e.unsubscribeObject(i,a(this,P)).catch(()=>{})},ce=function(){if(a(this,g)){let{socket:e,states:i,objects:r}=a(this,g);i.length&&e.unsubscribeState(i,a(this,I)),r.length&&p(this,c,ae).call(this,e,r),y(this,g,null)}this.states={},this.objects={}},F=function(){a(this,R)||(y(this,R,!0),queueMicrotask(()=>{y(this,R,!1),this.isConnected&&this.render()}))};function _e(t,n){let e=typeof t=="string"?t:t.tag;customElements.get(e)||customElements.define(e,n)}var A={widgetMode:"nojs",count:50,thumbSize:"medium",minCol:150,maxModalWidth:900,showTags:!0,tagPosition:"bottom-left",sortNewest:!0,showSearch:!0,defaultTag:"",compact:!1,playerUrl:"",liveAspect:"",liveRefreshSec:0,colorCardBg:"rgba(127,127,127,0.15)",colorTagBg:"rgba(0,0,0,0.55)",colorTagText:"#ffffff",colorAccent:"#8ab4f8",colorModalBg:"#1c1c1e",borderRadius:8},Xe={small:120,medium:180,large:240},O={pickWidget:{en:"Please choose a widget in the settings.",de:"Bitte in den Einstellungen ein Widget ausw\xE4hlen."},pickCamera:{en:"Please choose a camera in the settings.",de:"Bitte in den Einstellungen eine Kamera ausw\xE4hlen."},pickInstance:{en:"Please choose an agent-dvr instance in the settings.",de:"Bitte in den Einstellungen eine agent-dvr-Instanz ausw\xE4hlen."},waiting:{en:"Waiting for data of the adapter \u2026",de:"Warte auf Daten des Adapters \u2026"},noCamera:{en:"Camera not found",de:"Kamera nicht gefunden"},noCameras:{en:"No cameras",de:"Keine Kameras"}},$e={en:{noRecordings:"No recordings",search:"Search \u2026",all:"All",download:"Download",live:"LIVE"},de:{noRecordings:"Keine Aufnahmen",search:"Suche \u2026",all:"Alle",download:"Herunterladen",live:"LIVE"}};function k(t){return String(t??"").replace(/[&<>"]/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[n])}function Le(t){let n=String(t||"").replace(/^system\.adapter\./,"");return/^\d+$/.test(n)?`agent-dvr.${n}`:/^[^.]+\.\d+$/.test(n)?n:""}function Ae(t){let n=t&&t.val;if(typeof n!="string"||!n)return null;try{return JSON.parse(n)}catch{return null}}function Oe(t,n){if(t.mode==="custom"){let e={...A};for(let[i,r]of Object.entries(t))r!=null&&(e[i]=r);return e.minCol=Xe[e.thumbSize]||Number(e.minCol)||150,e}return!n||!n.settings?null:{...A,...n.settings}}function ze(t,n){return{...$e[n]||$e.en,...t&&t.labels||{}}}function Ne(t,n,e){let i=t.compact?6:12,r=`${Math.max(0,Number(t.borderRadius)||0)}px`,o=n?{card:"color-mix(in srgb, var(--iob-text, currentColor) 10%, transparent)",tagBg:"var(--iob-primary)",tagText:"var(--iob-primary-contrast)",accent:"var(--iob-primary)",modal:"var(--iob-paper)",info:"var(--iob-text)"}:{card:t.colorCardBg||A.colorCardBg,tagBg:t.colorTagBg||A.colorTagBg,tagText:t.colorTagText||A.colorTagText,accent:t.colorAccent||A.colorAccent,modal:t.colorModalBg||A.colorModalBg,info:"#fff"};return`:host{display:block;width:100%;height:100%;overflow:hidden;color:inherit;font:inherit}.root{--adv-card-bg:${o.card};--adv-tag-bg:${o.tagBg};--adv-tag-color:${o.tagText};--adv-accent:${o.accent};--adv-radius:${r};width:100%;height:100%;box-sizing:border-box;overflow:auto;${e?"pointer-events:none;":""}}.bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}.search{flex:1 1 160px;min-width:120px;padding:6px 10px;border-radius:8px;border:1px solid rgba(127,127,127,.4);background:rgba(127,127,127,.08);color:inherit;font:inherit}.tags{display:flex;flex-wrap:wrap;gap:6px}.tagbtn{padding:4px 10px;border-radius:999px;border:1px solid rgba(127,127,127,.4);background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:.8rem}.tagbtn.on{background:var(--adv-accent);color:${n?"var(--iob-primary-contrast)":"#fff"};border-color:var(--adv-accent)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(${Number(t.minCol)||150}px,1fr));gap:${i}px}.cell{display:flex;flex-direction:column;cursor:pointer;min-width:0}.img{position:relative;display:block;border-radius:var(--adv-radius);overflow:hidden;background:var(--adv-card-bg)}.img img{width:100%;height:auto;display:block}.img.fix img{height:100%;object-fit:cover}.tag{position:absolute;background:var(--adv-tag-bg);color:var(--adv-tag-color);font-size:.6rem;padding:2px 4px;border-radius:3px;line-height:1;max-width:85%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s;background:rgba(0,0,0,.2)}.play::before{content:"";border-style:solid;border-width:11px 0 11px 18px;border-color:transparent transparent transparent #fff;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6))}.cell:hover .play{opacity:1}.cap{font-size:${t.compact?".65rem":".72rem"};margin-top:${t.compact?2:4}px;line-height:1.25;opacity:.85;overflow:hidden;text-overflow:ellipsis}.empty,.msg{padding:24px;text-align:center;opacity:.7}.single{height:100%;display:flex;flex-direction:column}.single .cell{flex:1 1 auto;min-height:0}.single .img{flex:1 1 auto;min-height:0}.single .img img{width:100%;height:100%;object-fit:contain}dialog{border:0;padding:12px;border-radius:14px;background:${o.modal};max-width:min(92vw,${Number(t.maxModalWidth)||900}px);width:min(92vw,${Number(t.maxModalWidth)||900}px);box-sizing:border-box;box-shadow:0 16px 48px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.08);overflow:visible}dialog::backdrop{background:rgba(0,0,0,.35)}.box{position:relative;display:flex;flex-direction:column;gap:8px}video{width:100%;max-height:80vh;border-radius:8px;background:#000;display:block;object-fit:contain}.close{position:absolute;top:6px;right:6px;width:32px;height:32px;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px;z-index:2;border:2px solid rgba(255,255,255,.35)}.info{color:${o.info};font-size:.8rem;text-align:center}.info a{color:var(--adv-accent)}`}function Re(t){let n=document.createElement("dialog");n.innerHTML='<div class="box"><span class="close" role="button" aria-label="close">&#10005;</span><video controls preload="none" playsinline></video><div class="info"></div></div>';let e=n.querySelector("video"),i=n.querySelector(".info"),r=()=>n.open&&n.close();return n.querySelector(".close").addEventListener("click",r),n.addEventListener("click",o=>o.target===n&&r()),n.addEventListener("close",()=>{try{e.pause()}catch{}e.removeAttribute("src"),e.removeAttribute("style");try{e.load()}catch{}}),t.appendChild(n),{el:n,open(o,m,f){f&&(e.style.aspectRatio=f.replace("/"," / "),e.style.objectFit="fill"),e.setAttribute("src",o),i.innerHTML=m,n.open||n.showModal(),e.play&&e.play().catch(()=>{})}}}function Ie(t,n,e){let i=t.aspect||n.liveAspect||"",r=i?String(i).replace("/"," / "):"";return`<div class="cell" data-cam="${k(t.id)}"><span class="img${r?" fix":""}"${r?` style="aspect-ratio:${k(r)}"`:""}><img class="snap" alt="" src="${k(`${t.snapshot}&ts=${Date.now()}`)}" data-base="${k(t.snapshot)}"><span class="tag" style="top:5px;left:5px">&#9679; ${k(e.live)}</span><span class="play"></span></span><span class="cap">${k(t.name)}</span></div>`}var Q=class{constructor(n){this.root=n,this.timer=null,this.sec=0}set(n){n=Math.max(0,Number(n)||0),!(n===this.sec&&(this.timer||!n))&&(this.stop(),this.sec=n,n>0&&(this.timer=setInterval(()=>{for(let e of this.root.querySelectorAll("img.snap")){let i=e.getAttribute("data-base");i&&(e.src=`${i}&ts=${Date.now()}`)}},n*1e3)))}stop(){clearInterval(this.timer),this.timer=null,this.sec=0}};var q=class extends Z{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML='<style></style><div class="root"></div>',this._player=Re(this.shadowRoot),this._timer=new Q(this.shadowRoot),this._key="",this._cams=[],this._cfg=null}_target(n){return{instance:"",camera:"",missing:O.pickInstance}}_single(){return!1}getStateIds(n){let e=this._target(n);return e.instance?[`${e.instance}.widget_config`]:[]}render(){let n=this.settings||{},e=this._target(n),i=this.shadowRoot.querySelector(".root"),r=e.instance?Ae(this.states[`${e.instance}.widget_config`]):null,o=Oe(n,r),m=this.shadowRoot.querySelector("style"),f=Ne(o||{},!!n.follow,this.editMode);if(m.textContent!==f&&(m.textContent=f),e.missing)return this._msg(i,this.text(e.missing));if(!o||!r||!Array.isArray(r.cameras))return this._msg(i,this.text(O.waiting));let l=e.camera?r.cameras.filter(h=>h.id===e.camera):r.cameras,s=JSON.stringify([o,l,r.labels,this.systemLang]);if(this._timer.set(o.liveRefreshSec),s===this._key)return;if(this._key=s,this._cfg=o,this._cams=l,!l.length)return this._msg(i,this.text(e.camera?O.noCamera:O.noCameras));let u=ze(r,this.systemLang),d=l.map(h=>Ie(h,o,u)).join("");if(i.innerHTML=this._single()?`<div class="single">${d}</div>`:`<div class="grid">${d}</div>`,this._single()){let h=i.querySelector(".img");h&&h.removeAttribute("style"),h&&h.classList.remove("fix")}for(let h of i.querySelectorAll(".cell"))h.addEventListener("click",()=>this._open(h.getAttribute("data-cam")))}_msg(n,e){this._key="",this._timer.stop(),n.innerHTML=`<div class="msg">${k(e)}</div>`}_open(n){let e=this._cams.find(i=>i.id===n);!e||this.editMode||this._player.open(e.live,`${k(e.name)} &middot; Live`,e.aspect||this._cfg.liveAspect||"")}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._key=""}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this._timer.stop(),this._player.el.open&&this._player.el.close()}};var le=class extends q{_target(n){let e=Le(n.instance);return{instance:e,camera:"",missing:e?null:O.pickInstance}}};_e("iob-agent-dvr-overview",le);
@@ -0,0 +1,244 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/ioBroker/web-components/main/schemas/manifest.json",
3
+ "manifestVersion": 1,
4
+ "tag": "iob-agent-dvr-overview",
5
+ "name": {
6
+ "en": "Agent DVR live overview",
7
+ "de": "Agent DVR Live-Übersicht"
8
+ },
9
+ "description": {
10
+ "en": "Live tiles of all cameras of an instance: with the adapter settings or set up here",
11
+ "de": "Live-Kacheln aller Kameras einer Instanz: mit den Adapter-Einstellungen oder hier eingestellt"
12
+ },
13
+ "icon": "../agent-dvr.png",
14
+ "module": "agent-dvr-overview.js",
15
+ "size": {
16
+ "width": 640,
17
+ "height": 420
18
+ },
19
+ "settings": {
20
+ "type": "panel",
21
+ "items": {
22
+ "mode": {
23
+ "type": "select",
24
+ "label": {
25
+ "en": "Source",
26
+ "de": "Quelle"
27
+ },
28
+ "default": "adapter",
29
+ "options": [
30
+ {
31
+ "value": "adapter",
32
+ "label": {
33
+ "en": "Widget from the adapter settings",
34
+ "de": "Widget aus den Adapter-Einstellungen"
35
+ }
36
+ },
37
+ {
38
+ "value": "custom",
39
+ "label": {
40
+ "en": "Own settings here",
41
+ "de": "Eigene Einstellungen hier"
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ "instance": {
47
+ "type": "instance",
48
+ "adapter": "agent-dvr",
49
+ "label": {
50
+ "en": "Instance",
51
+ "de": "Instanz"
52
+ },
53
+ "default": "agent-dvr.0"
54
+ },
55
+ "follow": {
56
+ "type": "checkbox",
57
+ "label": {
58
+ "en": "Use the colors of the visualization",
59
+ "de": "Farben der Visualisierung übernehmen"
60
+ },
61
+ "default": false,
62
+ "help": {
63
+ "en": "Tiles, badges, player and accent in the colors of the theme instead of the widget colors",
64
+ "de": "Kacheln, Badges, Player und Akzent in den Farben des Themes statt der Widget-Farben"
65
+ }
66
+ },
67
+ "hLive": {
68
+ "type": "header",
69
+ "text": {
70
+ "en": "Live Widget",
71
+ "de": "Live-Widget"
72
+ },
73
+ "size": 5,
74
+ "hidden": "data.mode !== 'custom'"
75
+ },
76
+ "liveAspect": {
77
+ "type": "text",
78
+ "label": {
79
+ "en": "Live tile aspect ratio (e.g. 16/9)",
80
+ "de": "Seitenverhältnis Live-Kachel (z. B. 16/9)"
81
+ },
82
+ "default": "",
83
+ "hidden": "data.mode !== 'custom'",
84
+ "help": {
85
+ "en": "Used when the adapter could not detect the resolution of the camera. Empty = automatic",
86
+ "de": "Gilt, wenn der Adapter die Auflösung der Kamera nicht erkennen konnte. Leer = automatisch"
87
+ }
88
+ },
89
+ "liveRefreshSec": {
90
+ "type": "number",
91
+ "label": {
92
+ "en": "Snapshot refresh interval (s, 0 = never)",
93
+ "de": "Aktualisierung Vorschaubild (s, 0 = nie)"
94
+ },
95
+ "min": 0,
96
+ "max": 3600,
97
+ "default": 0,
98
+ "hidden": "data.mode !== 'custom'",
99
+ "help": {
100
+ "en": "Only the image is refreshed in the browser – an open player never closes",
101
+ "de": "Nur das Bild wird im Browser erneuert – ein offener Player schließt sich nie"
102
+ }
103
+ },
104
+ "thumbSize": {
105
+ "type": "select",
106
+ "label": {
107
+ "en": "Thumbnail size",
108
+ "de": "Thumbnail-Größe"
109
+ },
110
+ "default": "medium",
111
+ "hidden": "data.mode !== 'custom'",
112
+ "help": {
113
+ "en": "Width of preview images (overrides min. column width)",
114
+ "de": "Breite der Vorschaubilder (überschreibt Min. Spaltenbreite)"
115
+ },
116
+ "options": [
117
+ {
118
+ "value": "small",
119
+ "label": {
120
+ "en": "Small (120 px)",
121
+ "de": "Klein (120 px)"
122
+ }
123
+ },
124
+ {
125
+ "value": "medium",
126
+ "label": {
127
+ "en": "Medium (180 px)",
128
+ "de": "Mittel (180 px)"
129
+ }
130
+ },
131
+ {
132
+ "value": "large",
133
+ "label": {
134
+ "en": "Large (240 px)",
135
+ "de": "Groß (240 px)"
136
+ }
137
+ },
138
+ {
139
+ "value": "custom",
140
+ "label": {
141
+ "en": "Min. column width below",
142
+ "de": "Min. Spaltenbreite unten"
143
+ }
144
+ }
145
+ ]
146
+ },
147
+ "minCol": {
148
+ "type": "number",
149
+ "label": {
150
+ "en": "Min. column width (px)",
151
+ "de": "Min. Spaltenbreite (px)"
152
+ },
153
+ "min": 80,
154
+ "max": 600,
155
+ "default": 150,
156
+ "hidden": "data.mode !== 'custom' || data.thumbSize !== 'custom'"
157
+ },
158
+ "compact": {
159
+ "type": "checkbox",
160
+ "label": {
161
+ "en": "Compact layout",
162
+ "de": "Kompaktes Layout"
163
+ },
164
+ "default": false,
165
+ "hidden": "data.mode !== 'custom'",
166
+ "help": {
167
+ "en": "Smaller spacing and font – more entries at a glance",
168
+ "de": "Kleinere Abstände und Schrift – mehr Einträge auf einen Blick"
169
+ }
170
+ },
171
+ "maxModalWidth": {
172
+ "type": "number",
173
+ "label": {
174
+ "en": "Max. player width (px)",
175
+ "de": "Max. Player-Breite (px)"
176
+ },
177
+ "min": 300,
178
+ "max": 2000,
179
+ "default": 900,
180
+ "hidden": "data.mode !== 'custom'"
181
+ },
182
+ "hColors": {
183
+ "type": "header",
184
+ "text": {
185
+ "en": "Colors & Design",
186
+ "de": "Farben & Design"
187
+ },
188
+ "size": 5,
189
+ "hidden": "data.mode !== 'custom'"
190
+ },
191
+ "colorCardBg": {
192
+ "type": "color",
193
+ "label": {
194
+ "en": "Tile background",
195
+ "de": "Kachel-Hintergrund"
196
+ },
197
+ "default": "rgba(127,127,127,0.15)",
198
+ "hidden": "data.mode !== 'custom' || data.follow"
199
+ },
200
+ "colorTagBg": {
201
+ "type": "color",
202
+ "label": {
203
+ "en": "Tag badge background",
204
+ "de": "Tag-Badge-Hintergrund"
205
+ },
206
+ "default": "rgba(0,0,0,0.55)",
207
+ "hidden": "data.mode !== 'custom' || data.follow"
208
+ },
209
+ "colorTagText": {
210
+ "type": "color",
211
+ "label": {
212
+ "en": "Tag badge text color",
213
+ "de": "Tag-Badge-Textfarbe"
214
+ },
215
+ "default": "#ffffff",
216
+ "hidden": "data.mode !== 'custom' || data.follow"
217
+ },
218
+ "colorModalBg": {
219
+ "type": "color",
220
+ "label": {
221
+ "en": "Modal background",
222
+ "de": "Modal-Hintergrund"
223
+ },
224
+ "default": "#1c1c1e",
225
+ "hidden": "data.mode !== 'custom' || data.follow"
226
+ },
227
+ "borderRadius": {
228
+ "type": "number",
229
+ "label": {
230
+ "en": "Border radius (px)",
231
+ "de": "Eckenradius (px)"
232
+ },
233
+ "min": 0,
234
+ "max": 32,
235
+ "default": 8,
236
+ "hidden": "data.mode !== 'custom'",
237
+ "help": {
238
+ "en": "Corner radius of the tiles (0 = square)",
239
+ "de": "Abrundungsradius der Kacheln (0 = eckig)"
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }