diff --git a/app/build/asterics-grid.bundle.js b/app/build/asterics-grid.bundle.js index 68abf2e8b..136f82b6c 100644 --- a/app/build/asterics-grid.bundle.js +++ b/app/build/asterics-grid.bundle.js @@ -4,7 +4,7 @@ * (c) 2014-2020 Evan You * Released under the MIT License. */ -var i=Object.freeze({});function a(e){return null==e}function r(e){return null!=e}function s(e){return!0===e}function o(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function l(e){return null!==e&&"object"==typeof e}var c=Object.prototype.toString;function d(e){return"[object Object]"===c.call(e)}function u(e){return"[object RegExp]"===c.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return r(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||d(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),i=e.split(","),a=0;a-1)return e.splice(n,1)}}var E=Object.prototype.hasOwnProperty;function y(e,t){return E.call(e,t)}function C(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var w=/-(\w)/g,T=C((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),A=C((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),N=/\B([A-Z])/g,S=C((function(e){return e.replace(N,"-$1").toLowerCase()}));var I=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var i=arguments.length;return i?i>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,i=new Array(n);n--;)i[n]=e[n+t];return i}function O(e,t){for(var n in t)e[n]=t[n];return e}function L(e){for(var t={},n=0;n0,Q=X&&X.indexOf("edge/")>0,ee=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===J),te=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/)),ne={}.watch,ie=!1;if(z)try{var ae={};Object.defineProperty(ae,"passive",{get:function(){ie=!0}}),window.addEventListener("test-passive",null,ae)}catch(e){}var re=function(){return void 0===H&&(H=!z&&!K&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),H},se=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function oe(e){return"function"==typeof e&&/native code/.test(e.toString())}var le,ce="undefined"!=typeof Symbol&&oe(Symbol)&&"undefined"!=typeof Reflect&&oe(Reflect.ownKeys);le="undefined"!=typeof Set&&oe(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var de=x,ue=0,fe=function(){this.id=ue++,this.subs=[]};fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){b(this.subs,e)},fe.prototype.depend=function(){fe.target&&fe.target.addDep(this)},fe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(r&&!y(a,"default"))s=!1;else if(""===s||s===S(e)){var l=je(String,a.type);(l<0||o0&&(ft((l=e(l,(n||"")+"_"+i))[0])&&ft(d)&&(u[c]=be(d.text+l[0].text),l.shift()),u.push.apply(u,l)):o(l)?ft(d)?u[c]=be(d.text+l):""!==l&&u.push(be(l)):ft(l)&&ft(d)?u[c]=be(d.text+l.text):(s(t._isVList)&&r(l.tag)&&a(l.key)&&r(n)&&(l.key="__vlist"+n+"_"+i+"__"),u.push(l)));return u}(e):void 0}function ft(e){return r(e)&&r(e.text)&&!1===e.isComment}function pt(e,t){if(e){for(var n=Object.create(null),i=ce?Reflect.ownKeys(e):Object.keys(e),a=0;a0,s=e?!!e.$stable:!r,o=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&n&&n!==i&&o===n.$key&&!r&&!n.$hasNormal)return n;for(var l in a={},e)e[l]&&"$"!==l[0]&&(a[l]=gt(t,l,e[l]))}else a={};for(var c in t)c in a||(a[c]=_t(t,c));return e&&Object.isExtensible(e)&&(e._normalized=a),j(a,"$stable",s),j(a,"$key",o),j(a,"$hasNormal",r),a}function gt(e,t,n){var i=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ut(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:i,enumerable:!0,configurable:!0}),i}function _t(e,t){return function(){return e[t]}}function bt(e,t){var n,i,a,s,o;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),i=0,a=e.length;idocument.createEvent("Event").timeStamp&&(dn=function(){return un.now()})}function fn(){var e,t;for(cn=dn(),on=!0,nn.sort((function(e,t){return e.id-t.id})),ln=0;lnln&&nn[n].id>e.id;)n--;nn.splice(n+1,0,e)}else nn.push(e);sn||(sn=!0,it(fn))}}(this)},hn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Ye(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},hn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},hn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},hn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:x,set:x};function vn(e,t,n){mn.get=function(){return this[t][n]},mn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,mn)}function gn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},i=e._props={},a=e.$options._propKeys=[];e.$parent&&Ae(!1);var r=function(r){a.push(r);var s=Fe(r,t,n,e);Ie(i,r,s),r in e||vn(e,"_props",r)};for(var s in t)r(s);Ae(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?x:I(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;d(t=e._data="function"==typeof t?function(e,t){he();try{return e.call(t,t)}catch(e){return Ye(e,t,"data()"),{}}finally{me()}}(t,e):t||{})||(t={});var n=Object.keys(t),i=e.$options.props,a=(e.$options.methods,n.length);for(;a--;){var r=n[a];0,i&&y(i,r)||B(r)||vn(e,"_data",r)}Se(t,!0)}(e):Se(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),i=re();for(var a in t){var r=t[a],s="function"==typeof r?r:r.get;0,i||(n[a]=new hn(e,s||x,x,_n)),a in e||bn(e,a,r)}}(e,t.computed),t.watch&&t.watch!==ne&&function(e,t){for(var n in t){var i=t[n];if(Array.isArray(i))for(var a=0;a-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!u(e)&&e.test(t)}function kn(e,t){var n=e.cache,i=e.keys,a=e._vnode;for(var r in n){var s=n[r];if(s){var o=Sn(s.componentOptions);o&&!t(o)&&On(n,r,i,a)}}}function On(e,t,n,i){var a=e[t];!a||i&&a.tag===i.tag||a.componentInstance.$destroy(),e[t]=null,b(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=wn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),i=t._parentVnode;n.parent=t.parent,n._parentVnode=i;var a=i.componentOptions;n.propsData=a.propsData,n._parentListeners=a.listeners,n._renderChildren=a.children,n._componentTag=a.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Ue(Tn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Xt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,a=n&&n.context;e.$slots=ht(t._renderChildren,a),e.$scopedSlots=i,e._c=function(t,n,i,a){return Vt(e,t,n,i,a,!1)},e.$createElement=function(t,n,i,a){return Vt(e,t,n,i,a,!0)};var r=n&&n.data;Ie(e,"$attrs",r&&r.attrs||i,null,!0),Ie(e,"$listeners",t._parentListeners||i,null,!0)}(t),tn(t,"beforeCreate"),function(e){var t=pt(e.$options.inject,e);t&&(Ae(!1),Object.keys(t).forEach((function(n){Ie(e,n,t[n])})),Ae(!0))}(t),gn(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),tn(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(An),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Oe,e.prototype.$watch=function(e,t,n){if(d(t))return Cn(this,e,t,n);(n=n||{}).user=!0;var i=new hn(this,e,t,n);if(n.immediate)try{t.call(this,i.value)}catch(e){Ye(e,this,'callback for immediate watcher "'+i.expression+'"')}return function(){i.teardown()}}}(An),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var i=this;if(Array.isArray(e))for(var a=0,r=e.length;a1?k(n):n;for(var i=k(arguments,1),a='event handler for "'+e+'"',r=0,s=n.length;rparseInt(this.max)&&On(s,o[0],o,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:de,extend:O,mergeOptions:Ue,defineReactive:Ie},e.set=ke,e.delete=Oe,e.nextTick=it,e.observable=function(e){return Se(e),e},e.options=Object.create(null),U.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,O(e.options.components,xn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Ue(this.options,e),this}}(e),Nn(e),function(e){U.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&d(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(An),Object.defineProperty(An.prototype,"$isServer",{get:re}),Object.defineProperty(An.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(An,"FunctionalRenderContext",{value:Rt}),An.version="2.6.12";var Dn=v("style,class"),Rn=v("input,textarea,option,select,progress"),Mn=function(e,t,n){return"value"===n&&Rn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Pn=v("contenteditable,draggable,spellcheck"),Gn=v("events,caret,typing,plaintext-only"),Un=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),$n="http://www.w3.org/1999/xlink",Fn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Vn=function(e){return Fn(e)?e.slice(6,e.length):""},Bn=function(e){return null==e||!1===e};function jn(e){for(var t=e.data,n=e,i=e;r(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Yn(i.data,t));for(;r(n=n.parent);)n&&n.data&&(t=Yn(t,n.data));return function(e,t){if(r(e)||r(t))return Hn(e,Wn(t));return""}(t.staticClass,t.class)}function Yn(e,t){return{staticClass:Hn(e.staticClass,t.staticClass),class:r(e.class)?[e.class,t.class]:t.class}}function Hn(e,t){return e?t?e+" "+t:e:t||""}function Wn(e){return Array.isArray(e)?function(e){for(var t,n="",i=0,a=e.length;i-1?gi(e,t,n):Un(t)?Bn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Pn(t)?e.setAttribute(t,function(e,t){return Bn(t)||"false"===t?"false":"contenteditable"===e&&Gn(t)?t:"true"}(t,n)):Fn(t)?Bn(n)?e.removeAttributeNS($n,Vn(t)):e.setAttributeNS($n,t,n):gi(e,t,n)}function gi(e,t,n){if(Bn(n))e.removeAttribute(t);else{if(q&&!Z&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var i=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",i)};e.addEventListener("input",i),e.__ieph=!0}e.setAttribute(t,n)}}var _i={create:mi,update:mi};function bi(e,t){var n=t.elm,i=t.data,s=e.data;if(!(a(i.staticClass)&&a(i.class)&&(a(s)||a(s.staticClass)&&a(s.class)))){var o=jn(t),l=n._transitionClasses;r(l)&&(o=Hn(o,Wn(l))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var Ei,yi,Ci,wi,Ti,Ai,Ni={create:bi,update:bi},Si=/[\w).+\-_$\]]/;function Ii(e){var t,n,i,a,r,s=!1,o=!1,l=!1,c=!1,d=0,u=0,f=0,p=0;for(i=0;i=0&&" "===(m=e.charAt(h));h--);m&&Si.test(m)||(c=!0)}}else void 0===a?(p=i+1,a=e.slice(0,i).trim()):v();function v(){(r||(r=[])).push(e.slice(p,i).trim()),p=i+1}if(void 0===a?a=e.slice(0,i).trim():0!==p&&v(),r)for(i=0;i-1?{exp:e.slice(0,wi),key:'"'+e.slice(wi+1)+'"'}:{exp:e,key:null};yi=e,wi=Ti=Ai=0;for(;!Hi();)Wi(Ci=Yi())?Ki(Ci):91===Ci&&zi(Ci);return{exp:e.slice(0,Ti),key:e.slice(Ti+1,Ai)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Yi(){return yi.charCodeAt(++wi)}function Hi(){return wi>=Ei}function Wi(e){return 34===e||39===e}function zi(e){var t=1;for(Ti=wi;!Hi();)if(Wi(e=Yi()))Ki(e);else if(91===e&&t++,93===e&&t--,0===t){Ai=wi;break}}function Ki(e){for(var t=e;!Hi()&&(e=Yi())!==t;);}var Ji;function Xi(e,t,n){var i=Ji;return function a(){var r=t.apply(null,arguments);null!==r&&Qi(e,a,n,i)}}var qi=Je&&!(te&&Number(te[1])<=53);function Zi(e,t,n,i){if(qi){var a=cn,r=t;t=r._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=a||e.timeStamp<=0||e.target.ownerDocument!==document)return r.apply(this,arguments)}}Ji.addEventListener(e,t,ie?{capture:n,passive:i}:n)}function Qi(e,t,n,i){(i||Ji).removeEventListener(e,t._wrapper||t,n)}function ea(e,t){if(!a(e.data.on)||!a(t.data.on)){var n=t.data.on||{},i=e.data.on||{};Ji=t.elm,function(e){if(r(e.__r)){var t=q?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}r(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),lt(n,i,Zi,Qi,Xi,t.context),Ji=void 0}}var ta,na={create:ea,update:ea};function ia(e,t){if(!a(e.data.domProps)||!a(t.data.domProps)){var n,i,s=t.elm,o=e.data.domProps||{},l=t.data.domProps||{};for(n in r(l.__ob__)&&(l=t.data.domProps=O({},l)),o)n in l||(s[n]="");for(n in l){if(i=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),i===o[n])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===n&&"PROGRESS"!==s.tagName){s._value=i;var c=a(i)?"":String(i);aa(s,c)&&(s.value=c)}else if("innerHTML"===n&&Jn(s.tagName)&&a(s.innerHTML)){(ta=ta||document.createElement("div")).innerHTML=""+i+"";for(var d=ta.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;d.firstChild;)s.appendChild(d.firstChild)}else if(i!==o[n])try{s[n]=i}catch(e){}}}}function aa(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,i=e._vModifiers;if(r(i)){if(i.number)return m(n)!==m(t);if(i.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ra={create:ia,update:ia},sa=C((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var i=e.split(n);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}));function oa(e){var t=la(e.style);return e.staticStyle?O(e.staticStyle,t):t}function la(e){return Array.isArray(e)?L(e):"string"==typeof e?sa(e):e}var ca,da=/^--/,ua=/\s*!important$/,fa=function(e,t,n){if(da.test(t))e.style.setProperty(t,n);else if(ua.test(n))e.style.setProperty(S(t),n.replace(ua,""),"important");else{var i=ha(t);if(Array.isArray(n))for(var a=0,r=n.length;a-1?t.split(ga).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function ba(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(ga).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",i=" "+t+" ";n.indexOf(i)>=0;)n=n.replace(i," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Ea(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&O(t,ya(e.name||"v")),O(t,e),t}return"string"==typeof e?ya(e):void 0}}var ya=C((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),Ca=z&&!Z,wa="transition",Ta="transitionend",Aa="animation",Na="animationend";Ca&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(wa="WebkitTransition",Ta="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Aa="WebkitAnimation",Na="webkitAnimationEnd"));var Sa=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ia(e){Sa((function(){Sa(e)}))}function ka(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),_a(e,t))}function Oa(e,t){e._transitionClasses&&b(e._transitionClasses,t),ba(e,t)}function La(e,t,n){var i=Da(e,t),a=i.type,r=i.timeout,s=i.propCount;if(!a)return n();var o="transition"===a?Ta:Na,l=0,c=function(){e.removeEventListener(o,d),n()},d=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l0&&(n="transition",d=s,u=r.length):"animation"===t?c>0&&(n="animation",d=c,u=l.length):u=(n=(d=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?r.length:l.length:0,{type:n,timeout:d,propCount:u,hasTransform:"transition"===n&&xa.test(i[wa+"Property"])}}function Ra(e,t){for(;e.length1}function Fa(e,t){!0!==t.data.show&&Pa(t)}var Va=function(e){var t,n,i={},l=e.modules,c=e.nodeOps;for(t=0;th?b(e,a(n[g+1])?null:n[g+1].elm,n,p,g,i):p>g&&y(t,f,h)}(f,v,g,n,d):r(g)?(r(e.text)&&c.setTextContent(f,""),b(f,null,g,0,g.length-1,n)):r(v)?y(v,0,v.length-1):r(e.text)&&c.setTextContent(f,""):e.text!==t.text&&c.setTextContent(f,t.text),r(h)&&r(p=h.hook)&&r(p=p.postpatch)&&p(e,t)}}}function A(e,t,n){if(s(n)&&r(e.parent))e.parent.data.pendingInsert=t;else for(var i=0;i-1,s.selected!==r&&(s.selected=r);else if(M(Wa(s),i))return void(e.selectedIndex!==o&&(e.selectedIndex=o));a||(e.selectedIndex=-1)}}function Ha(e,t){return t.every((function(t){return!M(t,e)}))}function Wa(e){return"_value"in e?e._value:e.value}function za(e){e.target.composing=!0}function Ka(e){e.target.composing&&(e.target.composing=!1,Ja(e.target,"input"))}function Ja(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Xa(e){return!e.componentInstance||e.data&&e.data.transition?e:Xa(e.componentInstance._vnode)}var qa={model:Ba,show:{bind:function(e,t,n){var i=t.value,a=(n=Xa(n)).data&&n.data.transition,r=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;i&&a?(n.data.show=!0,Pa(n,(function(){e.style.display=r}))):e.style.display=i?r:"none"},update:function(e,t,n){var i=t.value;!i!=!t.oldValue&&((n=Xa(n)).data&&n.data.transition?(n.data.show=!0,i?Pa(n,(function(){e.style.display=e.__vOriginalDisplay})):Ga(n,(function(){e.style.display="none"}))):e.style.display=i?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,i,a){a||(e.style.display=e.__vOriginalDisplay)}}},Za={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Qa(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Qa(Wt(t.children)):e}function er(e){var t={},n=e.$options;for(var i in n.propsData)t[i]=e[i];var a=n._parentListeners;for(var r in a)t[T(r)]=a[r];return t}function tr(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var nr=function(e){return e.tag||Ht(e)},ir=function(e){return"show"===e.name},ar={name:"transition",props:Za,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(nr)).length){0;var i=this.mode;0;var a=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return a;var r=Qa(a);if(!r)return a;if(this._leaving)return tr(e,a);var s="__transition-"+this._uid+"-";r.key=null==r.key?r.isComment?s+"comment":s+r.tag:o(r.key)?0===String(r.key).indexOf(s)?r.key:s+r.key:r.key;var l=(r.data||(r.data={})).transition=er(this),c=this._vnode,d=Qa(c);if(r.data.directives&&r.data.directives.some(ir)&&(r.data.show=!0),d&&d.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(r,d)&&!Ht(d)&&(!d.componentInstance||!d.componentInstance._vnode.isComment)){var u=d.data.transition=O({},l);if("out-in"===i)return this._leaving=!0,ct(u,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),tr(e,a);if("in-out"===i){if(Ht(r))return c;var f,p=function(){f()};ct(l,"afterEnter",p),ct(l,"enterCancelled",p),ct(u,"delayLeave",(function(e){f=e}))}}return a}}},rr=O({tag:String,moveClass:String},Za);function sr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function or(e){e.data.newPos=e.elm.getBoundingClientRect()}function lr(e){var t=e.data.pos,n=e.data.newPos,i=t.left-n.left,a=t.top-n.top;if(i||a){e.data.moved=!0;var r=e.elm.style;r.transform=r.WebkitTransform="translate("+i+"px,"+a+"px)",r.transitionDuration="0s"}}delete rr.mode;var cr={Transition:ar,TransitionGroup:{props:rr,beforeMount:function(){var e=this,t=this._update;this._update=function(n,i){var a=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,a(),t.call(e,n,i)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,a=this.$slots.default||[],r=this.children=[],s=er(this),o=0;o-1?Zn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Zn[e]=/HTMLUnknownElement/.test(t.toString())},O(An.options.directives,qa),O(An.options.components,cr),An.prototype.__patch__=z?Va:x,An.prototype.$mount=function(e,t){return function(e,t,n){var i;return e.$el=t,e.$options.render||(e.$options.render=_e),tn(e,"beforeMount"),i=function(){e._update(e._render(),n)},new hn(e,i,x,{before:function(){e._isMounted&&!e._isDestroyed&&tn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,tn(e,"mounted")),e}(this,e=e&&z?ei(e):void 0,t)},z&&setTimeout((function(){F.devtools&&se&&se.emit("init",An)}),0);var dr=/\{\{((?:.|\r?\n)+?)\}\}/g,ur=/[-.*+?^${}()|[\]\/\\]/g,fr=C((function(e){var t=e[0].replace(ur,"\\$&"),n=e[1].replace(ur,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var pr={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=$i(e,"class");n&&(e.staticClass=JSON.stringify(n));var i=Ui(e,"class",!1);i&&(e.classBinding=i)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var hr,mr={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=$i(e,"style");n&&(e.staticStyle=JSON.stringify(sa(n)));var i=Ui(e,"style",!1);i&&(e.styleBinding=i)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},vr=function(e){return(hr=hr||document.createElement("div")).innerHTML=e,hr.textContent},gr=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),_r=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),br=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Er=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,yr=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Cr="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+V.source+"]*",wr="((?:"+Cr+"\\:)?"+Cr+")",Tr=new RegExp("^<"+wr),Ar=/^\s*(\/?)>/,Nr=new RegExp("^<\\/"+wr+"[^>]*>"),Sr=/^]+>/i,Ir=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Dr=/&(?:lt|gt|quot|amp|#39);/g,Rr=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Mr=v("pre,textarea",!0),Pr=function(e,t){return e&&Mr(e)&&"\n"===t[0]};function Gr(e,t){var n=t?Rr:Dr;return e.replace(n,(function(e){return xr[e]}))}var Ur,$r,Fr,Vr,Br,jr,Yr,Hr,Wr=/^@|^v-on:/,zr=/^v-|^@|^:|^#/,Kr=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Jr=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Xr=/^\(|\)$/g,qr=/^\[.*\]$/,Zr=/:(.*)$/,Qr=/^:|^\.|^v-bind:/,es=/\.[^.\]]+(?=[^\]]*$)/g,ts=/^v-slot(:|$)|^#/,ns=/[\r\n]/,is=/\s+/g,as=C(vr);function rs(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:fs(t),rawAttrsMap:{},parent:n,children:[]}}function ss(e,t){Ur=t.warn||Oi,jr=t.isPreTag||D,Yr=t.mustUseProp||D,Hr=t.getTagNamespace||D;var n=t.isReservedTag||D;(function(e){return!!e.component||!n(e.tag)}),Fr=Li(t.modules,"transformNode"),Vr=Li(t.modules,"preTransformNode"),Br=Li(t.modules,"postTransformNode"),$r=t.delimiters;var i,a,r=[],s=!1!==t.preserveWhitespace,o=t.whitespace,l=!1,c=!1;function d(e){if(u(e),l||e.processed||(e=os(e,t)),r.length||e===i||i.if&&(e.elseif||e.else)&&cs(i,{exp:e.elseif,block:e}),a&&!e.forbidden)if(e.elseif||e.else)s=e,(o=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(a.children))&&o.if&&cs(o,{exp:s.elseif,block:s});else{if(e.slotScope){var n=e.slotTarget||'"default"';(a.scopedSlots||(a.scopedSlots={}))[n]=e}a.children.push(e),e.parent=a}var s,o;e.children=e.children.filter((function(e){return!e.slotScope})),u(e),e.pre&&(l=!1),jr(e.tag)&&(c=!1);for(var d=0;d]*>)","i")),f=e.replace(u,(function(e,n,i){return c=i.length,Or(d)||"noscript"===d||(n=n.replace(//g,"$1").replace(//g,"$1")),Pr(d,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));l+=e.length-f.length,e=f,N(d,l-c,l)}else{var p=e.indexOf("<");if(0===p){if(Ir.test(e)){var h=e.indexOf("--\x3e");if(h>=0){t.shouldKeepComment&&t.comment(e.substring(4,h),l,l+h+3),w(h+3);continue}}if(kr.test(e)){var m=e.indexOf("]>");if(m>=0){w(m+2);continue}}var v=e.match(Sr);if(v){w(v[0].length);continue}var g=e.match(Nr);if(g){var _=l;w(g[0].length),N(g[1],_,l);continue}var b=T();if(b){A(b),Pr(b.tagName,e)&&w(1);continue}}var E=void 0,y=void 0,C=void 0;if(p>=0){for(y=e.slice(p);!(Nr.test(y)||Tr.test(y)||Ir.test(y)||kr.test(y)||(C=y.indexOf("<",1))<0);)p+=C,y=e.slice(p);E=e.substring(0,p)}p<0&&(E=e),E&&w(E.length),t.chars&&E&&t.chars(E,l-E.length,l)}if(e===n){t.chars&&t.chars(e);break}}function w(t){l+=t,e=e.substring(t)}function T(){var t=e.match(Tr);if(t){var n,i,a={tagName:t[1],attrs:[],start:l};for(w(t[0].length);!(n=e.match(Ar))&&(i=e.match(yr)||e.match(Er));)i.start=l,w(i[0].length),i.end=l,a.attrs.push(i);if(n)return a.unarySlash=n[1],w(n[0].length),a.end=l,a}}function A(e){var n=e.tagName,l=e.unarySlash;r&&("p"===i&&br(n)&&N(i),o(n)&&i===n&&N(n));for(var c=s(n)||!!l,d=e.attrs.length,u=new Array(d),f=0;f=0&&a[s].lowerCasedTag!==o;s--);else s=0;if(s>=0){for(var c=a.length-1;c>=s;c--)t.end&&t.end(a[c].tag,n,r);a.length=s,i=s&&a[s-1].tag}else"br"===o?t.start&&t.start(e,[],!0,n,r):"p"===o&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}N()}(e,{warn:Ur,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,n,s,o,u){var f=a&&a.ns||Hr(e);q&&"svg"===f&&(n=function(e){for(var t=[],n=0;nl&&(o.push(r=e.slice(l,a)),s.push(JSON.stringify(r)));var c=Ii(i[1].trim());s.push("_s("+c+")"),o.push({"@binding":c}),l=a+i[0].length}return l-1"+("true"===r?":("+t+")":":_q("+t+","+r+")")),Gi(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+r+"):("+s+");if(Array.isArray($$a)){var $$v="+(i?"_n("+a+")":a)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+ji(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+ji(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+ji(t,"$$c")+"}",null,!0)}(e,i,a);else if("input"===r&&"radio"===s)!function(e,t,n){var i=n&&n.number,a=Ui(e,"value")||"null";xi(e,"checked","_q("+t+","+(a=i?"_n("+a+")":a)+")"),Gi(e,"change",ji(t,a),null,!0)}(e,i,a);else if("input"===r||"textarea"===r)!function(e,t,n){var i=e.attrsMap.type;0;var a=n||{},r=a.lazy,s=a.number,o=a.trim,l=!r&&"range"!==i,c=r?"change":"range"===i?"__r":"input",d="$event.target.value";o&&(d="$event.target.value.trim()");s&&(d="_n("+d+")");var u=ji(t,d);l&&(u="if($event.target.composing)return;"+u);xi(e,"value","("+t+")"),Gi(e,c,u,null,!0),(o||s)&&Gi(e,"blur","$forceUpdate()")}(e,i,a);else{if(!F.isReservedTag(r))return Bi(e,i,a),!1}return!0},text:function(e,t){t.value&&xi(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&xi(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:gr,mustUseProp:Mn,canBeLeftOpenTag:_r,isReservedTag:Xn,getTagNamespace:qn,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(vs)},Es=C((function(e){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function ys(e,t){e&&(gs=Es(t.staticKeys||""),_s=t.isReservedTag||D,function e(t){if(t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||g(e.tag)||!_s(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(gs)))}(t),1===t.type){if(!_s(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,i=t.children.length;n|^function(?:\s+[\w$]+)?\s*\(/,ws=/\([^)]*?\);*$/,Ts=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,As={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ns={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ss=function(e){return"if("+e+")return null;"},Is={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ss("$event.target !== $event.currentTarget"),ctrl:Ss("!$event.ctrlKey"),shift:Ss("!$event.shiftKey"),alt:Ss("!$event.altKey"),meta:Ss("!$event.metaKey"),left:Ss("'button' in $event && $event.button !== 0"),middle:Ss("'button' in $event && $event.button !== 1"),right:Ss("'button' in $event && $event.button !== 2")};function ks(e,t){var n=t?"nativeOn:":"on:",i="",a="";for(var r in e){var s=Os(e[r]);e[r]&&e[r].dynamic?a+=r+","+s+",":i+='"'+r+'":'+s+","}return i="{"+i.slice(0,-1)+"}",a?n+"_d("+i+",["+a.slice(0,-1)+"])":n+i}function Os(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return Os(e)})).join(",")+"]";var t=Ts.test(e.value),n=Cs.test(e.value),i=Ts.test(e.value.replace(ws,""));if(e.modifiers){var a="",r="",s=[];for(var o in e.modifiers)if(Is[o])r+=Is[o],As[o]&&s.push(o);else if("exact"===o){var l=e.modifiers;r+=Ss(["ctrl","shift","alt","meta"].filter((function(e){return!l[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else s.push(o);return s.length&&(a+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ls).join("&&")+")return null;"}(s)),r&&(a+=r),"function($event){"+a+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":i?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(i?"return "+e.value:e.value)+"}"}function Ls(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=As[e],i=Ns[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(i)+")"}var xs={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:x},Ds=function(e){this.options=e,this.warn=e.warn||Oi,this.transforms=Li(e.modules,"transformCode"),this.dataGenFns=Li(e.modules,"genData"),this.directives=O(O({},xs),e.directives);var t=e.isReservedTag||D;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Rs(e,t){var n=new Ds(t);return{render:"with(this){return "+(e?Ms(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ms(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ps(e,t);if(e.once&&!e.onceProcessed)return Gs(e,t);if(e.for&&!e.forProcessed)return $s(e,t);if(e.if&&!e.ifProcessed)return Us(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',i=js(e,t),a="_t("+n+(i?","+i:""),r=e.attrs||e.dynamicAttrs?Ws((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:T(e.name),value:e.value,dynamic:e.dynamic}}))):null,s=e.attrsMap["v-bind"];!r&&!s||i||(a+=",null");r&&(a+=","+r);s&&(a+=(r?"":",null")+","+s);return a+")"}(e,t);var n;if(e.component)n=function(e,t,n){var i=t.inlineTemplate?null:js(t,n,!0);return"_c("+e+","+Fs(t,n)+(i?","+i:"")+")"}(e.component,e,t);else{var i;(!e.plain||e.pre&&t.maybeComponent(e))&&(i=Fs(e,t));var a=e.inlineTemplate?null:js(e,t,!0);n="_c('"+e.tag+"'"+(i?","+i:"")+(a?","+a:"")+")"}for(var r=0;r>>0}(s):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var r=function(e,t){var n=e.children[0];0;if(n&&1===n.type){var i=Rs(n,t.options);return"inlineTemplate:{render:function(){"+i.render+"},staticRenderFns:["+i.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);r&&(n+=r+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ws(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Vs(e){return 1===e.type&&("slot"===e.tag||e.children.some(Vs))}function Bs(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Us(e,t,Bs,"null");if(e.for&&!e.forProcessed)return $s(e,t,Bs);var i="_empty_"===e.slotScope?"":String(e.slotScope),a="function("+i+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(js(e,t)||"undefined")+":undefined":js(e,t)||"undefined":Ms(e,t))+"}",r=i?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+a+r+"}"}function js(e,t,n,i,a){var r=e.children;if(r.length){var s=r[0];if(1===r.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var o=n?t.maybeComponent(s)?",1":",0":"";return""+(i||Ms)(s,t)+o}var l=n?function(e,t){for(var n=0,i=0;i':'
',qs.innerHTML.indexOf(" ")>0}var to=!!z&&eo(!1),no=!!z&&eo(!0),io=C((function(e){var t=ei(e);return t&&t.innerHTML})),ao=An.prototype.$mount;An.prototype.$mount=function(e,t){if((e=e&&ei(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var i=n.template;if(i)if("string"==typeof i)"#"===i.charAt(0)&&(i=io(i));else{if(!i.nodeType)return this;i=i.innerHTML}else e&&(i=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(i){0;var a=Qs(i,{outputSourceRange:!1,shouldDecodeNewlines:to,shouldDecodeNewlinesForHref:no,delimiters:n.delimiters,comments:n.comments},this),r=a.render,s=a.staticRenderFns;n.render=r,n.staticRenderFns=s}}return ao.call(this,e,t)},An.compile=Qs,t.a=An}).call(this,n(9),n(49).setImmediate)},function(e,t,n){"use strict";var i=n(42),a=n(99),r=Object.prototype.toString;function s(e){return"[object Array]"===r.call(e)}function o(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===r.call(e)}function c(e,t){if(null!=e)if("object"==typeof e||s(e)||(e=[e]),s(e))for(var n=0,i=e.length;n0&&void 0!==arguments[0]?arguments[0]:{};if(t.serverUrl&&(this._http=a.default.create({baseURL:t.serverUrl,timeout:t.timeout})),t.baseUrl=t.baseUrl||"/auth",t.baseUrl=t.baseUrl.replace(/\/$/,""),t.socialUrl=t.socialUrl||t.baseUrl,t.socialUrl=t.socialUrl.replace(/\/$/,""),t.local=t.local||{},t.local.usernameField=t.local.usernameField||"username",t.local.passwordField=t.local.passwordField||"password",t.endpoints&&t.endpoints instanceof Array||(t.endpoints=[]),!t.noDefaultEndpoint){var n=window.location.host;t.serverUrl&&(n=u(t.serverUrl)),t.endpoints.push(n)}t.providers=t.providers||[],t.timeout=t.timeout||0,p()?"session"===t.storage?this.storage=window.sessionStorage:this.storage=window.localStorage:this.storage=m,this._config=t,this._session=JSON.parse(this.storage.getItem("superlogin.session")),this._httpInterceptor(),t.checkExpired&&(this.checkExpired(),this.validateSession().then((function(){e._onLogin(e._session)})).catch((function(){})))}},{key:"_httpInterceptor",value:function(){var e=this;this._http.interceptors.request.eject(this._httpRequestInterceptor),this._http.interceptors.response.eject(this._httpResponseInterceptor),this._httpRequestInterceptor=this._http.interceptors.request.use(function(t){var n=e.getConfig(),i=e.getSession();return i&&i.token?t.skipRefresh?Promise.resolve(t):e.checkRefresh().then((function(){return f(t.url,n.endpoints)&&(t.headers.Authorization="Bearer "+i.token+":"+i.password),t})):Promise.resolve(t)}.bind(this)),this._httpResponseInterceptor=this._http.interceptors.response.use(null,function(t){var n=e.getConfig();return t&&t.config?(f(t.config.url,n.endpoints)&&t.response&&401===t.response.status&&e.authenticated()&&(c.warn("Not authorized"),e._onLogout("Session expired")),Promise.reject(t)):Promise.reject(t)}.bind(this))}},{key:"authenticated",value:function(){return!(!this._session||!this._session.user_id)}},{key:"getConfig",value:function(){return this._config}},{key:"validateSession",value:function(){var e=this;return this.authenticated()?this._http.get(this._config.baseUrl+"/session").catch((function(t){throw e._onLogout("Session expired"),h(t)})):Promise.reject()}},{key:"getSession",value:function(){return this._session||(this._session=JSON.parse(this.storage.getItem("superlogin.session"))),this._session?Object.assign(this._session):null}},{key:"setSession",value:function(e){this._session=e,this.storage.setItem("superlogin.session",JSON.stringify(this._session)),c.info("New session set")}},{key:"deleteSession",value:function(){this.storage.removeItem("superlogin.session"),this._session=null}},{key:"getDbUrl",value:function(e){return this._session.userDBs&&this._session.userDBs[e]?this._session.userDBs[e]:null}},{key:"getHttp",value:function(){return this._http}},{key:"confirmRole",value:function(e){return!!(this._session&&this._session.roles&&this._session.roles.length)&&-1!==this._session.roles.indexOf(e)}},{key:"confirmAnyRole",value:function(e){if(!this._session||!this._session.roles||!this._session.roles.length)return!1;for(var t=0;tn?(c.info("Refreshing session"),this.refresh().then((function(e){return c.log("Refreshing session sucess",e),e})).catch((function(e){throw c.error("Refreshing session failed",e),e}))):Promise.resolve()}},{key:"checkExpired",value:function(){if(this.authenticated()){var e=this._session.expires,t=this._session.serverTimeDiff||0;Math.abs(t)<5e3&&(t=0),Date.now()+t>e&&this._onLogout("Session expired")}}},{key:"refresh",value:function(){var e=this,t=this.getSession();return this._refreshInProgress=!0,this._http.post(this._config.baseUrl+"/refresh",{}).then((function(n){return e._refreshInProgress=!1,n.data.token&&n.data.expires&&(Object.assign(t,n.data),e.setSession(t),e._onRefresh(t)),t})).catch((function(t){throw e._refreshInProgress=!1,h(t)}))}},{key:"authenticate",value:function(){var e=this;return new Promise((function(t){var n=e.getSession();n?t(n):e.on("login",(function(e){t(e)}))}))}},{key:"login",value:function(e){var t=this,n=this._config.local,i=n.usernameField,a=n.passwordField;return e[i]&&e[a]?this._http.post(this._config.baseUrl+"/login",e,{skipRefresh:!0}).then((function(e){return e.data.serverTimeDiff=e.data.issued-Date.now(),t.setSession(e.data),t._onLogin(e.data),e.data})).catch((function(e){throw t.deleteSession(),h(e)})):Promise.reject({error:"Username or Password missing..."})}},{key:"register",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/register",e,{skipRefresh:!0}).then((function(n){return n.data.user_id&&n.data.token&&(n.data.serverTimeDiff=n.data.issued-Date.now(),t.setSession(n.data),t._onLogin(n.data)),t._onRegister(e),n.data})).catch((function(e){throw h(e)}))}},{key:"logout",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/logout",{}).then((function(n){return t._onLogout(e||"Logged out"),n.data})).catch((function(n){if(t._onLogout(e||"Logged out"),!n.response||401!==n.response.data.status)throw h(n)}))}},{key:"logoutAll",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/logout-all",{}).then((function(n){return t._onLogout(e||"Logged out"),n.data})).catch((function(n){if(t._onLogout(e||"Logged out"),!n.response||401!==n.response.data.status)throw h(n)}))}},{key:"logoutOthers",value:function(){return this._http.post(this._config.baseUrl+"/logout-others",{}).then((function(e){return e.data})).catch((function(e){throw h(e)}))}},{key:"socialAuth",value:function(e){if(-1===this._config.providers.indexOf(e))return Promise.reject({error:"Provider "+e+" not supported."});var t=this._config.socialUrl+"/"+e;return this._oAuthPopup(t,{windowTitle:"Login with "+d(e)})}},{key:"tokenSocialAuth",value:function(e,t){var n=this;return-1===this._config.providers.indexOf(e)?Promise.reject({error:"Provider "+e+" not supported."}):this._http.post(this._config.baseUrl+"/"+e+"/token",{access_token:t}).then((function(e){return e.data.user_id&&e.data.token&&(e.data.serverTimeDiff=e.data.issued-Date.now(),n.setSession(e.data),n._onLogin(e.data)),e.data})).catch((function(e){throw h(e)}))}},{key:"tokenLink",value:function(e,t){if(-1===this._config.providers.indexOf(e))return Promise.reject({error:"Provider "+e+" not supported."});var n=this._config.baseUrl+"/link/"+e+"/token";return this._http.post(n,{access_token:t}).then((function(e){return e.data})).catch((function(e){throw h(e)}))}},{key:"link",value:function(e){if(-1===this._config.providers.indexOf(e))return Promise.reject({error:"Provider "+e+" not supported."});if(this.authenticated()){var t=this.getSession(),n="bearer_token="+t.token+":"+t.password,i=this._config.socialUrl+"/link/"+e+"?"+n,a="Link your account to "+d(e);return this._oAuthPopup(i,{windowTitle:a})}return Promise.reject({error:"Authentication required"})}},{key:"unlink",value:function(e){return-1===this._config.providers.indexOf(e)?Promise.reject({error:"Provider "+e+" not supported."}):this.authenticated()?this._http.post(this._config.baseUrl+"/unlink/"+e).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Authentication required"})}},{key:"confirmEmail",value:function(e){return e&&"string"==typeof e?this._http.get(this._config.baseUrl+"/confirm-email/"+e).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Invalid token"})}},{key:"forgotPassword",value:function(e){return this._http.post(this._config.baseUrl+"/forgot-password",{email:e},{skipRefresh:!0}).then((function(e){return e.data})).catch((function(e){throw h(e)}))}},{key:"resetPassword",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/password-reset",e,{skipRefresh:!0}).then((function(e){return e.data.user_id&&e.data.token&&(t.setSession(e.data),t._onLogin(e.data)),e.data})).catch((function(e){throw h(e)}))}},{key:"changePassword",value:function(e){return this.authenticated()?this._http.post(this._config.baseUrl+"/password-change",e).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Authentication required"})}},{key:"changeEmail",value:function(e){return this.authenticated()?this._http.post(this._config.baseUrl+"/change-email",{newEmail:e}).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Authentication required"})}},{key:"validateUsername",value:function(e){return this._http.get(this._config.baseUrl+"/validate-username/"+encodeURIComponent(e)).then((function(){return!0})).catch((function(e){throw h(e)}))}},{key:"validateEmail",value:function(e){return this._http.get(this._config.baseUrl+"/validate-email/"+encodeURIComponent(e)).then((function(){return!0})).catch((function(e){throw h(e)}))}},{key:"_oAuthPopup",value:function(e,t){var n=this;return new Promise((function(i,a){n._oauthComplete=!1,t.windowName=t.windowTitle||"Social Login",t.windowOptions=t.windowOptions||"location=0,status=0,width=800,height=600";var r=window.open(e,t.windowName,t.windowOptions);r||a({error:"Authorization popup blocked"});var s=setInterval((function(){r.closed&&(clearInterval(s),n._oauthComplete||(n.authComplete=!0,a({error:"Authorization cancelled"})))}),500);window.superlogin={},window.superlogin.oauthSession=function(e,t,r){return!e&&t?(t.serverTimeDiff=t.issued-Date.now(),n.setSession(t),n._onLogin(t),i(t)):!e&&r?(n._onLink(r),i(d(r)+" successfully linked.")):(n._oauthComplete=!0,a(e))}}))}},{key:"_onLogin",value:function(e){c.info("Login",e),this.emit("login",e)}},{key:"_onLogout",value:function(e){this.deleteSession(),c.info("Logout",e),this.emit("logout",e)}},{key:"_onLink",value:function(e){c.info("Link",e),this.emit("link",e)}},{key:"_onRegister",value:function(e){c.info("Register",e),this.emit("register",e)}},{key:"_onRefresh",value:function(e){c.info("Refresh",e),this.emit("refresh",e)}}]),t}(s.EventEmitter2);t.default=new v},function(e,t,n){var i,a=a||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},i=t.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in i,r=/constructor/i.test(e.HTMLElement)||e.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent),o=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},l=function(e){setTimeout((function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()}),4e4)},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},d=function(t,d,u){u||(t=c(t));var f,p=this,h="application/octet-stream"===t.type,m=function(){!function(e,t,n){for(var i=(t=[].concat(t)).length;i--;){var a=e["on"+t[i]];if("function"==typeof a)try{a.call(e,n||e)}catch(e){o(e)}}}(p,"writestart progress write writeend".split(" "))};if(p.readyState=p.INIT,a)return f=n().createObjectURL(t),void setTimeout((function(){var e,t;i.href=f,i.download=d,e=i,t=new MouseEvent("click"),e.dispatchEvent(t),m(),l(f),p.readyState=p.DONE}));!function(){if((s||h&&r)&&e.FileReader){var i=new FileReader;return i.onloadend=function(){var t=s?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,p.readyState=p.DONE,m()},i.readAsDataURL(t),void(p.readyState=p.INIT)}(f||(f=n().createObjectURL(t)),h)?e.location.href=f:e.open(f,"_blank")||(e.location.href=f);p.readyState=p.DONE,m(),l(f)}()},u=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=c(e)),navigator.msSaveOrOpenBlob(e,t)}:(u.abort=function(){},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t,n){return new d(e,t||e.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content); +var i=Object.freeze({});function a(e){return null==e}function r(e){return null!=e}function s(e){return!0===e}function o(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function l(e){return null!==e&&"object"==typeof e}var c=Object.prototype.toString;function d(e){return"[object Object]"===c.call(e)}function u(e){return"[object RegExp]"===c.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return r(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||d(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),i=e.split(","),a=0;a-1)return e.splice(n,1)}}var E=Object.prototype.hasOwnProperty;function y(e,t){return E.call(e,t)}function C(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var w=/-(\w)/g,T=C((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),A=C((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),N=/\B([A-Z])/g,S=C((function(e){return e.replace(N,"-$1").toLowerCase()}));var I=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var i=arguments.length;return i?i>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,i=new Array(n);n--;)i[n]=e[n+t];return i}function O(e,t){for(var n in t)e[n]=t[n];return e}function L(e){for(var t={},n=0;n0,Q=X&&X.indexOf("edge/")>0,ee=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===J),te=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/)),ne={}.watch,ie=!1;if(z)try{var ae={};Object.defineProperty(ae,"passive",{get:function(){ie=!0}}),window.addEventListener("test-passive",null,ae)}catch(e){}var re=function(){return void 0===H&&(H=!z&&!K&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),H},se=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function oe(e){return"function"==typeof e&&/native code/.test(e.toString())}var le,ce="undefined"!=typeof Symbol&&oe(Symbol)&&"undefined"!=typeof Reflect&&oe(Reflect.ownKeys);le="undefined"!=typeof Set&&oe(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var de=x,ue=0,fe=function(){this.id=ue++,this.subs=[]};fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){b(this.subs,e)},fe.prototype.depend=function(){fe.target&&fe.target.addDep(this)},fe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(r&&!y(a,"default"))s=!1;else if(""===s||s===S(e)){var l=Ye(String,a.type);(l<0||o0&&(ft((l=e(l,(n||"")+"_"+i))[0])&&ft(d)&&(u[c]=be(d.text+l[0].text),l.shift()),u.push.apply(u,l)):o(l)?ft(d)?u[c]=be(d.text+l):""!==l&&u.push(be(l)):ft(l)&&ft(d)?u[c]=be(d.text+l.text):(s(t._isVList)&&r(l.tag)&&a(l.key)&&r(n)&&(l.key="__vlist"+n+"_"+i+"__"),u.push(l)));return u}(e):void 0}function ft(e){return r(e)&&r(e.text)&&!1===e.isComment}function pt(e,t){if(e){for(var n=Object.create(null),i=ce?Reflect.ownKeys(e):Object.keys(e),a=0;a0,s=e?!!e.$stable:!r,o=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&n&&n!==i&&o===n.$key&&!r&&!n.$hasNormal)return n;for(var l in a={},e)e[l]&&"$"!==l[0]&&(a[l]=gt(t,l,e[l]))}else a={};for(var c in t)c in a||(a[c]=_t(t,c));return e&&Object.isExtensible(e)&&(e._normalized=a),Y(a,"$stable",s),Y(a,"$key",o),Y(a,"$hasNormal",r),a}function gt(e,t,n){var i=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ut(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:i,enumerable:!0,configurable:!0}),i}function _t(e,t){return function(){return e[t]}}function bt(e,t){var n,i,a,s,o;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),i=0,a=e.length;idocument.createEvent("Event").timeStamp&&(dn=function(){return un.now()})}function fn(){var e,t;for(cn=dn(),on=!0,nn.sort((function(e,t){return e.id-t.id})),ln=0;lnln&&nn[n].id>e.id;)n--;nn.splice(n+1,0,e)}else nn.push(e);sn||(sn=!0,it(fn))}}(this)},hn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){je(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},hn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},hn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},hn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||b(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:x,set:x};function vn(e,t,n){mn.get=function(){return this[t][n]},mn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,mn)}function gn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},i=e._props={},a=e.$options._propKeys=[];e.$parent&&Ae(!1);var r=function(r){a.push(r);var s=Fe(r,t,n,e);Ie(i,r,s),r in e||vn(e,"_props",r)};for(var s in t)r(s);Ae(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?x:I(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;d(t=e._data="function"==typeof t?function(e,t){he();try{return e.call(t,t)}catch(e){return je(e,t,"data()"),{}}finally{me()}}(t,e):t||{})||(t={});var n=Object.keys(t),i=e.$options.props,a=(e.$options.methods,n.length);for(;a--;){var r=n[a];0,i&&y(i,r)||B(r)||vn(e,"_data",r)}Se(t,!0)}(e):Se(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),i=re();for(var a in t){var r=t[a],s="function"==typeof r?r:r.get;0,i||(n[a]=new hn(e,s||x,x,_n)),a in e||bn(e,a,r)}}(e,t.computed),t.watch&&t.watch!==ne&&function(e,t){for(var n in t){var i=t[n];if(Array.isArray(i))for(var a=0;a-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!u(e)&&e.test(t)}function kn(e,t){var n=e.cache,i=e.keys,a=e._vnode;for(var r in n){var s=n[r];if(s){var o=Sn(s.componentOptions);o&&!t(o)&&On(n,r,i,a)}}}function On(e,t,n,i){var a=e[t];!a||i&&a.tag===i.tag||a.componentInstance.$destroy(),e[t]=null,b(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=wn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),i=t._parentVnode;n.parent=t.parent,n._parentVnode=i;var a=i.componentOptions;n.propsData=a.propsData,n._parentListeners=a.listeners,n._renderChildren=a.children,n._componentTag=a.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Ue(Tn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Xt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,a=n&&n.context;e.$slots=ht(t._renderChildren,a),e.$scopedSlots=i,e._c=function(t,n,i,a){return Vt(e,t,n,i,a,!1)},e.$createElement=function(t,n,i,a){return Vt(e,t,n,i,a,!0)};var r=n&&n.data;Ie(e,"$attrs",r&&r.attrs||i,null,!0),Ie(e,"$listeners",t._parentListeners||i,null,!0)}(t),tn(t,"beforeCreate"),function(e){var t=pt(e.$options.inject,e);t&&(Ae(!1),Object.keys(t).forEach((function(n){Ie(e,n,t[n])})),Ae(!0))}(t),gn(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),tn(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(An),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Oe,e.prototype.$watch=function(e,t,n){if(d(t))return Cn(this,e,t,n);(n=n||{}).user=!0;var i=new hn(this,e,t,n);if(n.immediate)try{t.call(this,i.value)}catch(e){je(e,this,'callback for immediate watcher "'+i.expression+'"')}return function(){i.teardown()}}}(An),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var i=this;if(Array.isArray(e))for(var a=0,r=e.length;a1?k(n):n;for(var i=k(arguments,1),a='event handler for "'+e+'"',r=0,s=n.length;rparseInt(this.max)&&On(s,o[0],o,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:de,extend:O,mergeOptions:Ue,defineReactive:Ie},e.set=ke,e.delete=Oe,e.nextTick=it,e.observable=function(e){return Se(e),e},e.options=Object.create(null),U.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,O(e.options.components,xn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=k(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Ue(this.options,e),this}}(e),Nn(e),function(e){U.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&d(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(An),Object.defineProperty(An.prototype,"$isServer",{get:re}),Object.defineProperty(An.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(An,"FunctionalRenderContext",{value:Rt}),An.version="2.6.12";var Dn=v("style,class"),Rn=v("input,textarea,option,select,progress"),Mn=function(e,t,n){return"value"===n&&Rn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Pn=v("contenteditable,draggable,spellcheck"),Gn=v("events,caret,typing,plaintext-only"),Un=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),$n="http://www.w3.org/1999/xlink",Fn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Vn=function(e){return Fn(e)?e.slice(6,e.length):""},Bn=function(e){return null==e||!1===e};function Yn(e){for(var t=e.data,n=e,i=e;r(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=jn(i.data,t));for(;r(n=n.parent);)n&&n.data&&(t=jn(t,n.data));return function(e,t){if(r(e)||r(t))return Hn(e,Wn(t));return""}(t.staticClass,t.class)}function jn(e,t){return{staticClass:Hn(e.staticClass,t.staticClass),class:r(e.class)?[e.class,t.class]:t.class}}function Hn(e,t){return e?t?e+" "+t:e:t||""}function Wn(e){return Array.isArray(e)?function(e){for(var t,n="",i=0,a=e.length;i-1?gi(e,t,n):Un(t)?Bn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Pn(t)?e.setAttribute(t,function(e,t){return Bn(t)||"false"===t?"false":"contenteditable"===e&&Gn(t)?t:"true"}(t,n)):Fn(t)?Bn(n)?e.removeAttributeNS($n,Vn(t)):e.setAttributeNS($n,t,n):gi(e,t,n)}function gi(e,t,n){if(Bn(n))e.removeAttribute(t);else{if(q&&!Z&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var i=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",i)};e.addEventListener("input",i),e.__ieph=!0}e.setAttribute(t,n)}}var _i={create:mi,update:mi};function bi(e,t){var n=t.elm,i=t.data,s=e.data;if(!(a(i.staticClass)&&a(i.class)&&(a(s)||a(s.staticClass)&&a(s.class)))){var o=Yn(t),l=n._transitionClasses;r(l)&&(o=Hn(o,Wn(l))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var Ei,yi,Ci,wi,Ti,Ai,Ni={create:bi,update:bi},Si=/[\w).+\-_$\]]/;function Ii(e){var t,n,i,a,r,s=!1,o=!1,l=!1,c=!1,d=0,u=0,f=0,p=0;for(i=0;i=0&&" "===(m=e.charAt(h));h--);m&&Si.test(m)||(c=!0)}}else void 0===a?(p=i+1,a=e.slice(0,i).trim()):v();function v(){(r||(r=[])).push(e.slice(p,i).trim()),p=i+1}if(void 0===a?a=e.slice(0,i).trim():0!==p&&v(),r)for(i=0;i-1?{exp:e.slice(0,wi),key:'"'+e.slice(wi+1)+'"'}:{exp:e,key:null};yi=e,wi=Ti=Ai=0;for(;!Hi();)Wi(Ci=ji())?Ki(Ci):91===Ci&&zi(Ci);return{exp:e.slice(0,Ti),key:e.slice(Ti+1,Ai)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function ji(){return yi.charCodeAt(++wi)}function Hi(){return wi>=Ei}function Wi(e){return 34===e||39===e}function zi(e){var t=1;for(Ti=wi;!Hi();)if(Wi(e=ji()))Ki(e);else if(91===e&&t++,93===e&&t--,0===t){Ai=wi;break}}function Ki(e){for(var t=e;!Hi()&&(e=ji())!==t;);}var Ji;function Xi(e,t,n){var i=Ji;return function a(){var r=t.apply(null,arguments);null!==r&&Qi(e,a,n,i)}}var qi=Je&&!(te&&Number(te[1])<=53);function Zi(e,t,n,i){if(qi){var a=cn,r=t;t=r._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=a||e.timeStamp<=0||e.target.ownerDocument!==document)return r.apply(this,arguments)}}Ji.addEventListener(e,t,ie?{capture:n,passive:i}:n)}function Qi(e,t,n,i){(i||Ji).removeEventListener(e,t._wrapper||t,n)}function ea(e,t){if(!a(e.data.on)||!a(t.data.on)){var n=t.data.on||{},i=e.data.on||{};Ji=t.elm,function(e){if(r(e.__r)){var t=q?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}r(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),lt(n,i,Zi,Qi,Xi,t.context),Ji=void 0}}var ta,na={create:ea,update:ea};function ia(e,t){if(!a(e.data.domProps)||!a(t.data.domProps)){var n,i,s=t.elm,o=e.data.domProps||{},l=t.data.domProps||{};for(n in r(l.__ob__)&&(l=t.data.domProps=O({},l)),o)n in l||(s[n]="");for(n in l){if(i=l[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),i===o[n])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===n&&"PROGRESS"!==s.tagName){s._value=i;var c=a(i)?"":String(i);aa(s,c)&&(s.value=c)}else if("innerHTML"===n&&Jn(s.tagName)&&a(s.innerHTML)){(ta=ta||document.createElement("div")).innerHTML=""+i+"";for(var d=ta.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;d.firstChild;)s.appendChild(d.firstChild)}else if(i!==o[n])try{s[n]=i}catch(e){}}}}function aa(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,i=e._vModifiers;if(r(i)){if(i.number)return m(n)!==m(t);if(i.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ra={create:ia,update:ia},sa=C((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var i=e.split(n);i.length>1&&(t[i[0].trim()]=i[1].trim())}})),t}));function oa(e){var t=la(e.style);return e.staticStyle?O(e.staticStyle,t):t}function la(e){return Array.isArray(e)?L(e):"string"==typeof e?sa(e):e}var ca,da=/^--/,ua=/\s*!important$/,fa=function(e,t,n){if(da.test(t))e.style.setProperty(t,n);else if(ua.test(n))e.style.setProperty(S(t),n.replace(ua,""),"important");else{var i=ha(t);if(Array.isArray(n))for(var a=0,r=n.length;a-1?t.split(ga).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function ba(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(ga).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",i=" "+t+" ";n.indexOf(i)>=0;)n=n.replace(i," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Ea(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&O(t,ya(e.name||"v")),O(t,e),t}return"string"==typeof e?ya(e):void 0}}var ya=C((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),Ca=z&&!Z,wa="transition",Ta="transitionend",Aa="animation",Na="animationend";Ca&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(wa="WebkitTransition",Ta="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Aa="WebkitAnimation",Na="webkitAnimationEnd"));var Sa=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ia(e){Sa((function(){Sa(e)}))}function ka(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),_a(e,t))}function Oa(e,t){e._transitionClasses&&b(e._transitionClasses,t),ba(e,t)}function La(e,t,n){var i=Da(e,t),a=i.type,r=i.timeout,s=i.propCount;if(!a)return n();var o="transition"===a?Ta:Na,l=0,c=function(){e.removeEventListener(o,d),n()},d=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l0&&(n="transition",d=s,u=r.length):"animation"===t?c>0&&(n="animation",d=c,u=l.length):u=(n=(d=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?r.length:l.length:0,{type:n,timeout:d,propCount:u,hasTransform:"transition"===n&&xa.test(i[wa+"Property"])}}function Ra(e,t){for(;e.length1}function Fa(e,t){!0!==t.data.show&&Pa(t)}var Va=function(e){var t,n,i={},l=e.modules,c=e.nodeOps;for(t=0;th?b(e,a(n[g+1])?null:n[g+1].elm,n,p,g,i):p>g&&y(t,f,h)}(f,v,g,n,d):r(g)?(r(e.text)&&c.setTextContent(f,""),b(f,null,g,0,g.length-1,n)):r(v)?y(v,0,v.length-1):r(e.text)&&c.setTextContent(f,""):e.text!==t.text&&c.setTextContent(f,t.text),r(h)&&r(p=h.hook)&&r(p=p.postpatch)&&p(e,t)}}}function A(e,t,n){if(s(n)&&r(e.parent))e.parent.data.pendingInsert=t;else for(var i=0;i-1,s.selected!==r&&(s.selected=r);else if(M(Wa(s),i))return void(e.selectedIndex!==o&&(e.selectedIndex=o));a||(e.selectedIndex=-1)}}function Ha(e,t){return t.every((function(t){return!M(t,e)}))}function Wa(e){return"_value"in e?e._value:e.value}function za(e){e.target.composing=!0}function Ka(e){e.target.composing&&(e.target.composing=!1,Ja(e.target,"input"))}function Ja(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Xa(e){return!e.componentInstance||e.data&&e.data.transition?e:Xa(e.componentInstance._vnode)}var qa={model:Ba,show:{bind:function(e,t,n){var i=t.value,a=(n=Xa(n)).data&&n.data.transition,r=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;i&&a?(n.data.show=!0,Pa(n,(function(){e.style.display=r}))):e.style.display=i?r:"none"},update:function(e,t,n){var i=t.value;!i!=!t.oldValue&&((n=Xa(n)).data&&n.data.transition?(n.data.show=!0,i?Pa(n,(function(){e.style.display=e.__vOriginalDisplay})):Ga(n,(function(){e.style.display="none"}))):e.style.display=i?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,i,a){a||(e.style.display=e.__vOriginalDisplay)}}},Za={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Qa(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Qa(Wt(t.children)):e}function er(e){var t={},n=e.$options;for(var i in n.propsData)t[i]=e[i];var a=n._parentListeners;for(var r in a)t[T(r)]=a[r];return t}function tr(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var nr=function(e){return e.tag||Ht(e)},ir=function(e){return"show"===e.name},ar={name:"transition",props:Za,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(nr)).length){0;var i=this.mode;0;var a=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return a;var r=Qa(a);if(!r)return a;if(this._leaving)return tr(e,a);var s="__transition-"+this._uid+"-";r.key=null==r.key?r.isComment?s+"comment":s+r.tag:o(r.key)?0===String(r.key).indexOf(s)?r.key:s+r.key:r.key;var l=(r.data||(r.data={})).transition=er(this),c=this._vnode,d=Qa(c);if(r.data.directives&&r.data.directives.some(ir)&&(r.data.show=!0),d&&d.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(r,d)&&!Ht(d)&&(!d.componentInstance||!d.componentInstance._vnode.isComment)){var u=d.data.transition=O({},l);if("out-in"===i)return this._leaving=!0,ct(u,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),tr(e,a);if("in-out"===i){if(Ht(r))return c;var f,p=function(){f()};ct(l,"afterEnter",p),ct(l,"enterCancelled",p),ct(u,"delayLeave",(function(e){f=e}))}}return a}}},rr=O({tag:String,moveClass:String},Za);function sr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function or(e){e.data.newPos=e.elm.getBoundingClientRect()}function lr(e){var t=e.data.pos,n=e.data.newPos,i=t.left-n.left,a=t.top-n.top;if(i||a){e.data.moved=!0;var r=e.elm.style;r.transform=r.WebkitTransform="translate("+i+"px,"+a+"px)",r.transitionDuration="0s"}}delete rr.mode;var cr={Transition:ar,TransitionGroup:{props:rr,beforeMount:function(){var e=this,t=this._update;this._update=function(n,i){var a=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,a(),t.call(e,n,i)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),i=this.prevChildren=this.children,a=this.$slots.default||[],r=this.children=[],s=er(this),o=0;o-1?Zn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Zn[e]=/HTMLUnknownElement/.test(t.toString())},O(An.options.directives,qa),O(An.options.components,cr),An.prototype.__patch__=z?Va:x,An.prototype.$mount=function(e,t){return function(e,t,n){var i;return e.$el=t,e.$options.render||(e.$options.render=_e),tn(e,"beforeMount"),i=function(){e._update(e._render(),n)},new hn(e,i,x,{before:function(){e._isMounted&&!e._isDestroyed&&tn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,tn(e,"mounted")),e}(this,e=e&&z?ei(e):void 0,t)},z&&setTimeout((function(){F.devtools&&se&&se.emit("init",An)}),0);var dr=/\{\{((?:.|\r?\n)+?)\}\}/g,ur=/[-.*+?^${}()|[\]\/\\]/g,fr=C((function(e){var t=e[0].replace(ur,"\\$&"),n=e[1].replace(ur,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var pr={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=$i(e,"class");n&&(e.staticClass=JSON.stringify(n));var i=Ui(e,"class",!1);i&&(e.classBinding=i)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var hr,mr={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=$i(e,"style");n&&(e.staticStyle=JSON.stringify(sa(n)));var i=Ui(e,"style",!1);i&&(e.styleBinding=i)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},vr=function(e){return(hr=hr||document.createElement("div")).innerHTML=e,hr.textContent},gr=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),_r=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),br=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Er=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,yr=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Cr="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+V.source+"]*",wr="((?:"+Cr+"\\:)?"+Cr+")",Tr=new RegExp("^<"+wr),Ar=/^\s*(\/?)>/,Nr=new RegExp("^<\\/"+wr+"[^>]*>"),Sr=/^]+>/i,Ir=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Dr=/&(?:lt|gt|quot|amp|#39);/g,Rr=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Mr=v("pre,textarea",!0),Pr=function(e,t){return e&&Mr(e)&&"\n"===t[0]};function Gr(e,t){var n=t?Rr:Dr;return e.replace(n,(function(e){return xr[e]}))}var Ur,$r,Fr,Vr,Br,Yr,jr,Hr,Wr=/^@|^v-on:/,zr=/^v-|^@|^:|^#/,Kr=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Jr=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Xr=/^\(|\)$/g,qr=/^\[.*\]$/,Zr=/:(.*)$/,Qr=/^:|^\.|^v-bind:/,es=/\.[^.\]]+(?=[^\]]*$)/g,ts=/^v-slot(:|$)|^#/,ns=/[\r\n]/,is=/\s+/g,as=C(vr);function rs(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:fs(t),rawAttrsMap:{},parent:n,children:[]}}function ss(e,t){Ur=t.warn||Oi,Yr=t.isPreTag||D,jr=t.mustUseProp||D,Hr=t.getTagNamespace||D;var n=t.isReservedTag||D;(function(e){return!!e.component||!n(e.tag)}),Fr=Li(t.modules,"transformNode"),Vr=Li(t.modules,"preTransformNode"),Br=Li(t.modules,"postTransformNode"),$r=t.delimiters;var i,a,r=[],s=!1!==t.preserveWhitespace,o=t.whitespace,l=!1,c=!1;function d(e){if(u(e),l||e.processed||(e=os(e,t)),r.length||e===i||i.if&&(e.elseif||e.else)&&cs(i,{exp:e.elseif,block:e}),a&&!e.forbidden)if(e.elseif||e.else)s=e,(o=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(a.children))&&o.if&&cs(o,{exp:s.elseif,block:s});else{if(e.slotScope){var n=e.slotTarget||'"default"';(a.scopedSlots||(a.scopedSlots={}))[n]=e}a.children.push(e),e.parent=a}var s,o;e.children=e.children.filter((function(e){return!e.slotScope})),u(e),e.pre&&(l=!1),Yr(e.tag)&&(c=!1);for(var d=0;d]*>)","i")),f=e.replace(u,(function(e,n,i){return c=i.length,Or(d)||"noscript"===d||(n=n.replace(//g,"$1").replace(//g,"$1")),Pr(d,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));l+=e.length-f.length,e=f,N(d,l-c,l)}else{var p=e.indexOf("<");if(0===p){if(Ir.test(e)){var h=e.indexOf("--\x3e");if(h>=0){t.shouldKeepComment&&t.comment(e.substring(4,h),l,l+h+3),w(h+3);continue}}if(kr.test(e)){var m=e.indexOf("]>");if(m>=0){w(m+2);continue}}var v=e.match(Sr);if(v){w(v[0].length);continue}var g=e.match(Nr);if(g){var _=l;w(g[0].length),N(g[1],_,l);continue}var b=T();if(b){A(b),Pr(b.tagName,e)&&w(1);continue}}var E=void 0,y=void 0,C=void 0;if(p>=0){for(y=e.slice(p);!(Nr.test(y)||Tr.test(y)||Ir.test(y)||kr.test(y)||(C=y.indexOf("<",1))<0);)p+=C,y=e.slice(p);E=e.substring(0,p)}p<0&&(E=e),E&&w(E.length),t.chars&&E&&t.chars(E,l-E.length,l)}if(e===n){t.chars&&t.chars(e);break}}function w(t){l+=t,e=e.substring(t)}function T(){var t=e.match(Tr);if(t){var n,i,a={tagName:t[1],attrs:[],start:l};for(w(t[0].length);!(n=e.match(Ar))&&(i=e.match(yr)||e.match(Er));)i.start=l,w(i[0].length),i.end=l,a.attrs.push(i);if(n)return a.unarySlash=n[1],w(n[0].length),a.end=l,a}}function A(e){var n=e.tagName,l=e.unarySlash;r&&("p"===i&&br(n)&&N(i),o(n)&&i===n&&N(n));for(var c=s(n)||!!l,d=e.attrs.length,u=new Array(d),f=0;f=0&&a[s].lowerCasedTag!==o;s--);else s=0;if(s>=0){for(var c=a.length-1;c>=s;c--)t.end&&t.end(a[c].tag,n,r);a.length=s,i=s&&a[s-1].tag}else"br"===o?t.start&&t.start(e,[],!0,n,r):"p"===o&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}N()}(e,{warn:Ur,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,n,s,o,u){var f=a&&a.ns||Hr(e);q&&"svg"===f&&(n=function(e){for(var t=[],n=0;nl&&(o.push(r=e.slice(l,a)),s.push(JSON.stringify(r)));var c=Ii(i[1].trim());s.push("_s("+c+")"),o.push({"@binding":c}),l=a+i[0].length}return l-1"+("true"===r?":("+t+")":":_q("+t+","+r+")")),Gi(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+r+"):("+s+");if(Array.isArray($$a)){var $$v="+(i?"_n("+a+")":a)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Yi(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Yi(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Yi(t,"$$c")+"}",null,!0)}(e,i,a);else if("input"===r&&"radio"===s)!function(e,t,n){var i=n&&n.number,a=Ui(e,"value")||"null";xi(e,"checked","_q("+t+","+(a=i?"_n("+a+")":a)+")"),Gi(e,"change",Yi(t,a),null,!0)}(e,i,a);else if("input"===r||"textarea"===r)!function(e,t,n){var i=e.attrsMap.type;0;var a=n||{},r=a.lazy,s=a.number,o=a.trim,l=!r&&"range"!==i,c=r?"change":"range"===i?"__r":"input",d="$event.target.value";o&&(d="$event.target.value.trim()");s&&(d="_n("+d+")");var u=Yi(t,d);l&&(u="if($event.target.composing)return;"+u);xi(e,"value","("+t+")"),Gi(e,c,u,null,!0),(o||s)&&Gi(e,"blur","$forceUpdate()")}(e,i,a);else{if(!F.isReservedTag(r))return Bi(e,i,a),!1}return!0},text:function(e,t){t.value&&xi(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&xi(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:gr,mustUseProp:Mn,canBeLeftOpenTag:_r,isReservedTag:Xn,getTagNamespace:qn,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(vs)},Es=C((function(e){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function ys(e,t){e&&(gs=Es(t.staticKeys||""),_s=t.isReservedTag||D,function e(t){if(t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||g(e.tag)||!_s(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(gs)))}(t),1===t.type){if(!_s(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,i=t.children.length;n|^function(?:\s+[\w$]+)?\s*\(/,ws=/\([^)]*?\);*$/,Ts=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,As={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ns={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ss=function(e){return"if("+e+")return null;"},Is={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ss("$event.target !== $event.currentTarget"),ctrl:Ss("!$event.ctrlKey"),shift:Ss("!$event.shiftKey"),alt:Ss("!$event.altKey"),meta:Ss("!$event.metaKey"),left:Ss("'button' in $event && $event.button !== 0"),middle:Ss("'button' in $event && $event.button !== 1"),right:Ss("'button' in $event && $event.button !== 2")};function ks(e,t){var n=t?"nativeOn:":"on:",i="",a="";for(var r in e){var s=Os(e[r]);e[r]&&e[r].dynamic?a+=r+","+s+",":i+='"'+r+'":'+s+","}return i="{"+i.slice(0,-1)+"}",a?n+"_d("+i+",["+a.slice(0,-1)+"])":n+i}function Os(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return Os(e)})).join(",")+"]";var t=Ts.test(e.value),n=Cs.test(e.value),i=Ts.test(e.value.replace(ws,""));if(e.modifiers){var a="",r="",s=[];for(var o in e.modifiers)if(Is[o])r+=Is[o],As[o]&&s.push(o);else if("exact"===o){var l=e.modifiers;r+=Ss(["ctrl","shift","alt","meta"].filter((function(e){return!l[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else s.push(o);return s.length&&(a+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ls).join("&&")+")return null;"}(s)),r&&(a+=r),"function($event){"+a+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":i?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(i?"return "+e.value:e.value)+"}"}function Ls(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=As[e],i=Ns[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(i)+")"}var xs={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:x},Ds=function(e){this.options=e,this.warn=e.warn||Oi,this.transforms=Li(e.modules,"transformCode"),this.dataGenFns=Li(e.modules,"genData"),this.directives=O(O({},xs),e.directives);var t=e.isReservedTag||D;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Rs(e,t){var n=new Ds(t);return{render:"with(this){return "+(e?Ms(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ms(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ps(e,t);if(e.once&&!e.onceProcessed)return Gs(e,t);if(e.for&&!e.forProcessed)return $s(e,t);if(e.if&&!e.ifProcessed)return Us(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',i=Ys(e,t),a="_t("+n+(i?","+i:""),r=e.attrs||e.dynamicAttrs?Ws((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:T(e.name),value:e.value,dynamic:e.dynamic}}))):null,s=e.attrsMap["v-bind"];!r&&!s||i||(a+=",null");r&&(a+=","+r);s&&(a+=(r?"":",null")+","+s);return a+")"}(e,t);var n;if(e.component)n=function(e,t,n){var i=t.inlineTemplate?null:Ys(t,n,!0);return"_c("+e+","+Fs(t,n)+(i?","+i:"")+")"}(e.component,e,t);else{var i;(!e.plain||e.pre&&t.maybeComponent(e))&&(i=Fs(e,t));var a=e.inlineTemplate?null:Ys(e,t,!0);n="_c('"+e.tag+"'"+(i?","+i:"")+(a?","+a:"")+")"}for(var r=0;r>>0}(s):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var r=function(e,t){var n=e.children[0];0;if(n&&1===n.type){var i=Rs(n,t.options);return"inlineTemplate:{render:function(){"+i.render+"},staticRenderFns:["+i.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);r&&(n+=r+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ws(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Vs(e){return 1===e.type&&("slot"===e.tag||e.children.some(Vs))}function Bs(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Us(e,t,Bs,"null");if(e.for&&!e.forProcessed)return $s(e,t,Bs);var i="_empty_"===e.slotScope?"":String(e.slotScope),a="function("+i+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(Ys(e,t)||"undefined")+":undefined":Ys(e,t)||"undefined":Ms(e,t))+"}",r=i?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+a+r+"}"}function Ys(e,t,n,i,a){var r=e.children;if(r.length){var s=r[0];if(1===r.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var o=n?t.maybeComponent(s)?",1":",0":"";return""+(i||Ms)(s,t)+o}var l=n?function(e,t){for(var n=0,i=0;i':'
',qs.innerHTML.indexOf(" ")>0}var to=!!z&&eo(!1),no=!!z&&eo(!0),io=C((function(e){var t=ei(e);return t&&t.innerHTML})),ao=An.prototype.$mount;An.prototype.$mount=function(e,t){if((e=e&&ei(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var i=n.template;if(i)if("string"==typeof i)"#"===i.charAt(0)&&(i=io(i));else{if(!i.nodeType)return this;i=i.innerHTML}else e&&(i=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(i){0;var a=Qs(i,{outputSourceRange:!1,shouldDecodeNewlines:to,shouldDecodeNewlinesForHref:no,delimiters:n.delimiters,comments:n.comments},this),r=a.render,s=a.staticRenderFns;n.render=r,n.staticRenderFns=s}}return ao.call(this,e,t)},An.compile=Qs,t.a=An}).call(this,n(9),n(49).setImmediate)},function(e,t,n){"use strict";var i=n(42),a=n(99),r=Object.prototype.toString;function s(e){return"[object Array]"===r.call(e)}function o(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===r.call(e)}function c(e,t){if(null!=e)if("object"==typeof e||s(e)||(e=[e]),s(e))for(var n=0,i=e.length;n0&&void 0!==arguments[0]?arguments[0]:{};if(t.serverUrl&&(this._http=a.default.create({baseURL:t.serverUrl,timeout:t.timeout})),t.baseUrl=t.baseUrl||"/auth",t.baseUrl=t.baseUrl.replace(/\/$/,""),t.socialUrl=t.socialUrl||t.baseUrl,t.socialUrl=t.socialUrl.replace(/\/$/,""),t.local=t.local||{},t.local.usernameField=t.local.usernameField||"username",t.local.passwordField=t.local.passwordField||"password",t.endpoints&&t.endpoints instanceof Array||(t.endpoints=[]),!t.noDefaultEndpoint){var n=window.location.host;t.serverUrl&&(n=u(t.serverUrl)),t.endpoints.push(n)}t.providers=t.providers||[],t.timeout=t.timeout||0,p()?"session"===t.storage?this.storage=window.sessionStorage:this.storage=window.localStorage:this.storage=m,this._config=t,this._session=JSON.parse(this.storage.getItem("superlogin.session")),this._httpInterceptor(),t.checkExpired&&(this.checkExpired(),this.validateSession().then((function(){e._onLogin(e._session)})).catch((function(){})))}},{key:"_httpInterceptor",value:function(){var e=this;this._http.interceptors.request.eject(this._httpRequestInterceptor),this._http.interceptors.response.eject(this._httpResponseInterceptor),this._httpRequestInterceptor=this._http.interceptors.request.use(function(t){var n=e.getConfig(),i=e.getSession();return i&&i.token?t.skipRefresh?Promise.resolve(t):e.checkRefresh().then((function(){return f(t.url,n.endpoints)&&(t.headers.Authorization="Bearer "+i.token+":"+i.password),t})):Promise.resolve(t)}.bind(this)),this._httpResponseInterceptor=this._http.interceptors.response.use(null,function(t){var n=e.getConfig();return t&&t.config?(f(t.config.url,n.endpoints)&&t.response&&401===t.response.status&&e.authenticated()&&(c.warn("Not authorized"),e._onLogout("Session expired")),Promise.reject(t)):Promise.reject(t)}.bind(this))}},{key:"authenticated",value:function(){return!(!this._session||!this._session.user_id)}},{key:"getConfig",value:function(){return this._config}},{key:"validateSession",value:function(){var e=this;return this.authenticated()?this._http.get(this._config.baseUrl+"/session").catch((function(t){throw e._onLogout("Session expired"),h(t)})):Promise.reject()}},{key:"getSession",value:function(){return this._session||(this._session=JSON.parse(this.storage.getItem("superlogin.session"))),this._session?Object.assign(this._session):null}},{key:"setSession",value:function(e){this._session=e,this.storage.setItem("superlogin.session",JSON.stringify(this._session)),c.info("New session set")}},{key:"deleteSession",value:function(){this.storage.removeItem("superlogin.session"),this._session=null}},{key:"getDbUrl",value:function(e){return this._session.userDBs&&this._session.userDBs[e]?this._session.userDBs[e]:null}},{key:"getHttp",value:function(){return this._http}},{key:"confirmRole",value:function(e){return!!(this._session&&this._session.roles&&this._session.roles.length)&&-1!==this._session.roles.indexOf(e)}},{key:"confirmAnyRole",value:function(e){if(!this._session||!this._session.roles||!this._session.roles.length)return!1;for(var t=0;tn?(c.info("Refreshing session"),this.refresh().then((function(e){return c.log("Refreshing session sucess",e),e})).catch((function(e){throw c.error("Refreshing session failed",e),e}))):Promise.resolve()}},{key:"checkExpired",value:function(){if(this.authenticated()){var e=this._session.expires,t=this._session.serverTimeDiff||0;Math.abs(t)<5e3&&(t=0),Date.now()+t>e&&this._onLogout("Session expired")}}},{key:"refresh",value:function(){var e=this,t=this.getSession();return this._refreshInProgress=!0,this._http.post(this._config.baseUrl+"/refresh",{}).then((function(n){return e._refreshInProgress=!1,n.data.token&&n.data.expires&&(Object.assign(t,n.data),e.setSession(t),e._onRefresh(t)),t})).catch((function(t){throw e._refreshInProgress=!1,h(t)}))}},{key:"authenticate",value:function(){var e=this;return new Promise((function(t){var n=e.getSession();n?t(n):e.on("login",(function(e){t(e)}))}))}},{key:"login",value:function(e){var t=this,n=this._config.local,i=n.usernameField,a=n.passwordField;return e[i]&&e[a]?this._http.post(this._config.baseUrl+"/login",e,{skipRefresh:!0}).then((function(e){return e.data.serverTimeDiff=e.data.issued-Date.now(),t.setSession(e.data),t._onLogin(e.data),e.data})).catch((function(e){throw t.deleteSession(),h(e)})):Promise.reject({error:"Username or Password missing..."})}},{key:"register",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/register",e,{skipRefresh:!0}).then((function(n){return n.data.user_id&&n.data.token&&(n.data.serverTimeDiff=n.data.issued-Date.now(),t.setSession(n.data),t._onLogin(n.data)),t._onRegister(e),n.data})).catch((function(e){throw h(e)}))}},{key:"logout",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/logout",{}).then((function(n){return t._onLogout(e||"Logged out"),n.data})).catch((function(n){if(t._onLogout(e||"Logged out"),!n.response||401!==n.response.data.status)throw h(n)}))}},{key:"logoutAll",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/logout-all",{}).then((function(n){return t._onLogout(e||"Logged out"),n.data})).catch((function(n){if(t._onLogout(e||"Logged out"),!n.response||401!==n.response.data.status)throw h(n)}))}},{key:"logoutOthers",value:function(){return this._http.post(this._config.baseUrl+"/logout-others",{}).then((function(e){return e.data})).catch((function(e){throw h(e)}))}},{key:"socialAuth",value:function(e){if(-1===this._config.providers.indexOf(e))return Promise.reject({error:"Provider "+e+" not supported."});var t=this._config.socialUrl+"/"+e;return this._oAuthPopup(t,{windowTitle:"Login with "+d(e)})}},{key:"tokenSocialAuth",value:function(e,t){var n=this;return-1===this._config.providers.indexOf(e)?Promise.reject({error:"Provider "+e+" not supported."}):this._http.post(this._config.baseUrl+"/"+e+"/token",{access_token:t}).then((function(e){return e.data.user_id&&e.data.token&&(e.data.serverTimeDiff=e.data.issued-Date.now(),n.setSession(e.data),n._onLogin(e.data)),e.data})).catch((function(e){throw h(e)}))}},{key:"tokenLink",value:function(e,t){if(-1===this._config.providers.indexOf(e))return Promise.reject({error:"Provider "+e+" not supported."});var n=this._config.baseUrl+"/link/"+e+"/token";return this._http.post(n,{access_token:t}).then((function(e){return e.data})).catch((function(e){throw h(e)}))}},{key:"link",value:function(e){if(-1===this._config.providers.indexOf(e))return Promise.reject({error:"Provider "+e+" not supported."});if(this.authenticated()){var t=this.getSession(),n="bearer_token="+t.token+":"+t.password,i=this._config.socialUrl+"/link/"+e+"?"+n,a="Link your account to "+d(e);return this._oAuthPopup(i,{windowTitle:a})}return Promise.reject({error:"Authentication required"})}},{key:"unlink",value:function(e){return-1===this._config.providers.indexOf(e)?Promise.reject({error:"Provider "+e+" not supported."}):this.authenticated()?this._http.post(this._config.baseUrl+"/unlink/"+e).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Authentication required"})}},{key:"confirmEmail",value:function(e){return e&&"string"==typeof e?this._http.get(this._config.baseUrl+"/confirm-email/"+e).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Invalid token"})}},{key:"forgotPassword",value:function(e){return this._http.post(this._config.baseUrl+"/forgot-password",{email:e},{skipRefresh:!0}).then((function(e){return e.data})).catch((function(e){throw h(e)}))}},{key:"resetPassword",value:function(e){var t=this;return this._http.post(this._config.baseUrl+"/password-reset",e,{skipRefresh:!0}).then((function(e){return e.data.user_id&&e.data.token&&(t.setSession(e.data),t._onLogin(e.data)),e.data})).catch((function(e){throw h(e)}))}},{key:"changePassword",value:function(e){return this.authenticated()?this._http.post(this._config.baseUrl+"/password-change",e).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Authentication required"})}},{key:"changeEmail",value:function(e){return this.authenticated()?this._http.post(this._config.baseUrl+"/change-email",{newEmail:e}).then((function(e){return e.data})).catch((function(e){throw h(e)})):Promise.reject({error:"Authentication required"})}},{key:"validateUsername",value:function(e){return this._http.get(this._config.baseUrl+"/validate-username/"+encodeURIComponent(e)).then((function(){return!0})).catch((function(e){throw h(e)}))}},{key:"validateEmail",value:function(e){return this._http.get(this._config.baseUrl+"/validate-email/"+encodeURIComponent(e)).then((function(){return!0})).catch((function(e){throw h(e)}))}},{key:"_oAuthPopup",value:function(e,t){var n=this;return new Promise((function(i,a){n._oauthComplete=!1,t.windowName=t.windowTitle||"Social Login",t.windowOptions=t.windowOptions||"location=0,status=0,width=800,height=600";var r=window.open(e,t.windowName,t.windowOptions);r||a({error:"Authorization popup blocked"});var s=setInterval((function(){r.closed&&(clearInterval(s),n._oauthComplete||(n.authComplete=!0,a({error:"Authorization cancelled"})))}),500);window.superlogin={},window.superlogin.oauthSession=function(e,t,r){return!e&&t?(t.serverTimeDiff=t.issued-Date.now(),n.setSession(t),n._onLogin(t),i(t)):!e&&r?(n._onLink(r),i(d(r)+" successfully linked.")):(n._oauthComplete=!0,a(e))}}))}},{key:"_onLogin",value:function(e){c.info("Login",e),this.emit("login",e)}},{key:"_onLogout",value:function(e){this.deleteSession(),c.info("Logout",e),this.emit("logout",e)}},{key:"_onLink",value:function(e){c.info("Link",e),this.emit("link",e)}},{key:"_onRegister",value:function(e){c.info("Register",e),this.emit("register",e)}},{key:"_onRefresh",value:function(e){c.info("Refresh",e),this.emit("refresh",e)}}]),t}(s.EventEmitter2);t.default=new v},function(e,t,n){var i,a=a||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},i=t.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in i,r=/constructor/i.test(e.HTMLElement)||e.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent),o=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},l=function(e){setTimeout((function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()}),4e4)},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},d=function(t,d,u){u||(t=c(t));var f,p=this,h="application/octet-stream"===t.type,m=function(){!function(e,t,n){for(var i=(t=[].concat(t)).length;i--;){var a=e["on"+t[i]];if("function"==typeof a)try{a.call(e,n||e)}catch(e){o(e)}}}(p,"writestart progress write writeend".split(" "))};if(p.readyState=p.INIT,a)return f=n().createObjectURL(t),void setTimeout((function(){var e,t;i.href=f,i.download=d,e=i,t=new MouseEvent("click"),e.dispatchEvent(t),m(),l(f),p.readyState=p.DONE}));!function(){if((s||h&&r)&&e.FileReader){var i=new FileReader;return i.onloadend=function(){var t=s?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,p.readyState=p.DONE,m()},i.readAsDataURL(t),void(p.readyState=p.INIT)}(f||(f=n().createObjectURL(t)),h)?e.location.href=f:e.open(f,"_blank")||(e.location.href=f);p.readyState=p.DONE,m(),l(f)}()},u=d.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=c(e)),navigator.msSaveOrOpenBlob(e,t)}:(u.abort=function(){},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t,n){return new d(e,t||e.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content); /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=a:null!==n(50)&&null!==n(51)&&(void 0===(i=function(){return a}.call(t,n,t,e))||(e.exports=i))},function(e,t){e.exports=PouchDB},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,i,a=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(e){n=r}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],d=!1,u=-1;function f(){d&&l&&(d=!1,l.length?c=l.concat(c):u=-1,c.length&&p())}function p(){if(!d){var e=o(f);d=!0;for(var t=c.length;t;){for(l=c,c=[];++u1)for(var n=1;n=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(r)})),e.exports=l}).call(this,n(10))},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i1&&void 0!==arguments[1]?arguments[1]:[]).map((function(t){var a=function(e){var t=[];return{regexp:e instanceof RegExp?e:new RegExp(e.replace(n.PARAMETER_REGEXP,(function(e,i,a){return t.push(a),n.REPLACE_VARIABLE_REGEXP})).replace(n.WILDCARD_REGEXP,n.REPLACE_WILDCARD)+n.FOLLOWED_BY_SLASH_REGEXP,n.MATCH_REGEXP_FLAGS),paramNames:t}}(i(t.route)),r=a.regexp,s=a.paramNames,o=e.replace(/^\/+/,"/").match(r),l=function(e,t){return 0===t.length?null:e?e.slice(1,e.length).reduce((function(e,n,i){return null===e&&(e={}),e[t[i]]=decodeURIComponent(n),e}),null):null}(o,s);return!!o&&{match:o,route:t,params:l}})).filter((function(e){return e}))}(e,t)[0]||!1}function o(e,t){var n=t.map((function(t){return""===t.route||"*"===t.route?e:e.split(new RegExp(t.route+"($|/)"))[0]})),a=i(e);return n.length>1?n.reduce((function(e,t){return e.length>t.length&&(e=t),e}),n[0]):1===n.length?n[0]:a}function l(e,n,i){var a,r=function(e){return e.split(/\?(.*)?$/)[0]};return void 0===i&&(i="#"),t()&&!n?r(e).split(i)[0]:(a=e.split(i)).length>1?r(a[1]):r(a[0])}function c(t,n,i){if(n&&"object"===(void 0===n?"undefined":e(n))){if(n.before)return void n.before((function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(t(),n.after&&n.after(i))}),i);if(n.after)return t(),void(n.after&&n.after(i))}t()}return n.prototype={helpers:{match:s,root:o,clean:i,getOnlyURL:l},navigate:function(e,t){var n;return e=e||"",this._usePushState?(n=(n=(t?"":this._getRoot()+"/")+e.replace(/^\/+/,"/")).replace(/([^:])(\/{2,})/g,"$1/"),history[this._historyAPIUpdateMethod]({},"",n),this.resolve()):"undefined"!=typeof window&&(e=e.replace(new RegExp("^"+this._hash),""),window.location.href=window.location.href.replace(/#$/,"").replace(new RegExp(this._hash+".*$"),"")+this._hash+e),this},on:function(){for(var t=this,n=arguments.length,i=Array(n),a=0;a=2)if("/"===i[0]){var s=i[1];"object"===e(i[1])&&(s=i[1].uses),this._defaultHandler={handler:s,hooks:i[2]}}else this._add(i[0],i[1],i[2]);else"object"===e(i[0])&&Object.keys(i[0]).sort(r).forEach((function(e){t.on(e,i[0][e])}));return this},off:function(e){return null!==this._defaultHandler&&e===this._defaultHandler.handler?this._defaultHandler=null:null!==this._notFoundHandler&&e===this._notFoundHandler.handler&&(this._notFoundHandler=null),this._routes=this._routes.reduce((function(t,n){return n.handler!==e&&t.push(n),t}),[]),this},notFound:function(e,t){return this._notFoundHandler={handler:e,hooks:t},this},resolve:function(e){var n,i,a=this,r=(e||this._cLoc()).replace(this._getRoot(),"");this._useHash&&(r=r.replace(new RegExp("^/"+this._hash),"/"));var o=function(e){return e.split(/\?(.*)?$/).slice(1).join("")}(e||this._cLoc()),d=l(r,this._useHash,this._hash);return!this._paused&&(this._lastRouteResolved&&d===this._lastRouteResolved.url&&o===this._lastRouteResolved.query?(this._lastRouteResolved.hooks&&this._lastRouteResolved.hooks.already&&this._lastRouteResolved.hooks.already(this._lastRouteResolved.params),!1):(i=s(d,this._routes))?(this._callLeave(),this._lastRouteResolved={url:d,query:o,hooks:i.route.hooks,params:i.params,name:i.route.name},n=i.route.handler,c((function(){c((function(){i.route.route instanceof RegExp?n.apply(void 0,i.match.slice(1,i.match.length)):n(i.params,o)}),i.route.hooks,i.params,a._genericHooks)}),this._genericHooks,i.params),i):this._defaultHandler&&(""===d||"/"===d||d===this._hash||function(e,n,i){if(t()&&!n)return!1;if(!e.match(i))return!1;var a=e.split(i);return a.length<2||""===a[1]}(d,this._useHash,this._hash))?(c((function(){c((function(){a._callLeave(),a._lastRouteResolved={url:d,query:o,hooks:a._defaultHandler.hooks},a._defaultHandler.handler(o)}),a._defaultHandler.hooks)}),this._genericHooks),!0):(this._notFoundHandler&&c((function(){c((function(){a._callLeave(),a._lastRouteResolved={url:d,query:o,hooks:a._notFoundHandler.hooks},a._notFoundHandler.handler(o)}),a._notFoundHandler.hooks)}),this._genericHooks),!1))},destroy:function(){this._routes=[],this._destroyed=!0,this._lastRouteResolved=null,this._genericHooks=null,clearTimeout(this._listeningInterval),"undefined"!=typeof window&&(window.removeEventListener("popstate",this._onLocationChange),window.removeEventListener("hashchange",this._onLocationChange))},updatePageLinks:function(){var e=this;"undefined"!=typeof document&&this._findLinks().forEach((function(t){t.hasListenerAttached||(t.addEventListener("click",(function(n){if((n.ctrlKey||n.metaKey)&&"a"==n.target.tagName.toLowerCase())return!1;var i=e.getLinkPath(t);e._destroyed||(n.preventDefault(),e.navigate(i.replace(/\/+$/,"").replace(/^\/+/,"/")))})),t.hasListenerAttached=!0)}))},generate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._routes.reduce((function(n,i){var a;if(i.name===e)for(a in n=i.route,t)n=n.toString().replace(":"+a,t[a]);return n}),"");return this._useHash?this._hash+n:n},link:function(e){return this._getRoot()+e},pause:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._paused=e,this._historyAPIUpdateMethod=e?"replaceState":"pushState"},resume:function(){this.pause(!1)},historyAPIUpdateMethod:function(e){return void 0===e?this._historyAPIUpdateMethod:(this._historyAPIUpdateMethod=e,e)},disableIfAPINotAvailable:function(){t()||this.destroy()},lastRouteResolved:function(){return this._lastRouteResolved},getLinkPath:function(e){return e.getAttribute("href")},hooks:function(e){this._genericHooks=e},_add:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"string"==typeof t&&(t=encodeURI(t)),this._routes.push("object"===(void 0===n?"undefined":e(n))?{route:t,handler:n.uses,name:n.as,hooks:i||n.hooks}:{route:t,handler:n,hooks:i}),this._add},_getRoot:function(){return null!==this.root||(this.root=o(this._cLoc().split("?")[0],this._routes)),this.root},_listen:function(){var e=this;if(this._usePushState)window.addEventListener("popstate",this._onLocationChange);else if("undefined"!=typeof window&&"onhashchange"in window)window.addEventListener("hashchange",this._onLocationChange);else{var t=this._cLoc(),n=void 0,i=void 0;(i=function(){n=e._cLoc(),t!==n&&(t=n,e.resolve()),e._listeningInterval=setTimeout(i,200)})()}},_cLoc:function(){return"undefined"!=typeof window?void 0!==window.__NAVIGO_WINDOW_LOCATION_MOCK__?window.__NAVIGO_WINDOW_LOCATION_MOCK__:i(window.location.href):""},_findLinks:function(){return[].slice.call(document.querySelectorAll("[data-navigo]"))},_onLocationChange:function(){this.resolve()},_callLeave:function(){var e=this._lastRouteResolved;e&&e.hooks&&e.hooks.leave&&e.hooks.leave(e.params)}},n.PARAMETER_REGEXP=/([:*])(\w+)/g,n.WILDCARD_REGEXP=/\*/g,n.REPLACE_VARIABLE_REGEXP="([^/]+)",n.REPLACE_WILDCARD="(?:.*)",n.FOLLOWED_BY_SLASH_REGEXP="(?:/$|$)",n.MATCH_REGEXP_FLAGS="",n}()},function(e,t){var n,i;i=function(e,t,i){var a,r,s,o,l,c,d,u,f,p,h,m,v,g,_;if(null==i&&(i={}),!(t>=2))throw new RangeError("`n` must be at least 2");if(0===(v=e.length))return new n([],0);if(1===v)return l=e[0],new n([l],l.weight);if(i.sorted||(e=e.slice(0).sort((function(e,t){return t.weight-e.weight}))),g=1+(t-1)*(h=Math.ceil((v-1)/(t-1)))-v,r=Array(h),d=0,a=0,c=v-1,g>0){for(m=t-g,_=0,o=Array(m),s=0;s=0?e[c]:null;d=0?e[c]:null),o[s]=u,_+=u.weight,s++;r[d]=new n(o,_),d++}return r[h-1]},n=function(){function e(e,t){this.children=e,this.weight=t}return e.prototype.assignCodeWords=function(t,n,i){var a,r,s,o,l;for(null==i&&(i=""),s=0,r=(l=this.children).length-1;r>=0;r+=-1)o=l[r],a=i+t[s++],o instanceof e?o.assignCodeWords(t,n,a):n(o,a)},e}(),e.exports={createTree:i,BranchPoint:n}},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new r(a.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new r(a.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(58),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";var i=n(11);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"#notificationBar[data-v-7bec61b8]{position:absolute;bottom:1vh;right:1vw;z-index:100;background:black;opacity:0.85;border-radius:10px;color:whitesmoke;width:40vw;padding:10px 50px 10px 10px;cursor:grab}@media (max-width: 850px){#notificationBar[data-v-7bec61b8]{width:50vw;padding:10px 35px 10px 10px}}#notificationBarImg[data-v-7bec61b8]{vertical-align:middle;max-height:100%;max-width:80%;height:4vh;width:auto}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,r=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?e:(a=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:i+r.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'.modal h1{font-size:1.5em}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:table;transition:opacity .3s ease}.modal-wrapper{display:table-cell;vertical-align:middle}.modal-container{max-width:920px;max-height:75vh;margin:0px auto;padding:2em 4em;background-color:#fff;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,0.33);transition:all .3s ease;font-family:Helvetica, Arial, sans-serif;overflow-y:auto;overflow-x:hidden}@media (max-width: 850px){.modal-container{padding:2em}}.modal-footer{margin-top:3em}.modal-header h3{margin-top:0;color:#42b983}.modal-body{margin-top:2.5em}.modal-body img{border:1px solid lightgray}.modal-body label{font-weight:bold}.modal-enter{opacity:0}.modal-leave-active{opacity:0}.modal-enter .modal-container,.modal-leave-active .modal-container{-webkit-transform:scale(1.1);transform:scale(1.1)}.file-input input[type="file"]{position:absolute;top:-1000px}.close-button,.close-button:focus{float:right;padding:0.5em 1em;color:black}.black,.black:focus{color:black}.blue{color:#2d7bb4}.modal h2{font-size:1.3em;margin:0;padding:0}.modal .row{margin-top:1em}.modal .warn{font-weight:bold;color:#c96a00}\n',""])},function(e,t,n){"use strict";var i=n(12);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".biggerFont[data-v-2fce46f7]{font-size:1.3em}\n",""])},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,a,r,s,o,l=1,c={},d=!1,u=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){h(e.data)},i=function(e){r.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,i=function(e){var t=u.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):i=function(e){setTimeout(h,0,e)}:(s="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&h(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),i=function(t){e.postMessage(s+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nspan[data-v-2dc40afd]{border:1px solid lightgray;padding:0.3em;width:150px}#imgPreview[data-v-2dc40afd]{width:150px}.row[data-v-2dc40afd]{margin-top:1em}@media (max-width: 850px){#inputSearch[data-v-2dc40afd]{width:80%}}\n",""])},function(e,t,n){"use strict";var i=n(18);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".row[data-v-761467a8]{margin-top:1em}\n",""])},function(e,t,n){"use strict";var i=n(19);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".row[data-v-74c379ae]{margin-top:1em}.nomargin[data-v-74c379ae]{margin-top:0}.full-width[data-v-74c379ae]{width:100%}.normal-text[data-v-74c379ae]{font-weight:normal}\n",""])},function(e,t,n){"use strict";var i=n(20);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".row[data-v-a1b68270]{margin-top:1em}ul li[data-v-a1b68270]{list-style:none;outline:1px solid lightgray;padding:0.5em}.webradioList button[data-v-a1b68270]{line-height:unset;margin-bottom:0;padding:0 10px}.webradioList[data-v-a1b68270],.webradioList li[data-v-a1b68270],.webradioList li div[data-v-a1b68270]{padding:0;margin:0}.webradioList li[data-v-a1b68270]:hover{background-color:#c4f0fe}.webRadioListItem[data-v-a1b68270]{display:flex}.webRadioListItem img[data-v-a1b68270]{flex-grow:0;flex-shrink:0;vertical-align:middle;height:28px;width:28px}.webRadioLabel[data-v-a1b68270]{flex-grow:1;flex-shrink:1;margin:0 5px !important}.webRadioButtons[data-v-a1b68270]{flex-grow:0;flex-shrink:0}@media (min-width: 850px){#poweredby[data-v-a1b68270]{margin-top:1em}}\n",""])},function(e,t,n){"use strict";var i=n(21);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".row[data-v-07fb84aa]{margin-top:1em}ul li[data-v-07fb84aa]{list-style:none;outline:1px solid lightgray;padding:0.5em}[v-cloak][data-v-07fb84aa]{display:none !important}.normal-text[data-v-07fb84aa]{font-weight:normal}.actionbtns button[data-v-07fb84aa]{width:30%;padding:0}\n",""])},function(e,t,n){"use strict";var i=n(22);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".row[data-v-5f4007c6]{margin-top:1em}\n",""])},function(e,t,n){"use strict";var i=n(23);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".modal-body[data-v-0fc126e0]{margin-top:0}.row[data-v-0fc126e0]{margin-top:1em}\n",""])},function(e,t,n){"use strict";var i=n(24);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".row[data-v-7d6c5d35]{margin-top:1em}ul[data-v-7d6c5d35]{list-style-type:none}\n",""])},function(e,t,n){"use strict";var i=n(25);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"ul[data-v-b6cf8364]{list-style:none}ul li[data-v-b6cf8364]:first-child{margin-top:1em !important}li[data-v-b6cf8364]{margin-bottom:2em;margin-top:2em}.row.nomargin[data-v-b6cf8364]{margin:0}.input-label[data-v-b6cf8364]{font-weight:bold;margin-bottom:0.7em}@media (max-width: 850px){li[data-v-b6cf8364]{outline:1px solid lightgray;padding:0.5em}}\n",""])},function(e,t,n){"use strict";var i=n(26);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".area[data-v-2f9b4098]{width:60%;padding-top:60%;position:relative}.area-row[data-v-2f9b4098],.area-column[data-v-2f9b4098]{width:100%;height:100%;position:absolute;top:0;left:0}.area-element[data-v-2f9b4098]{position:absolute}.area-element-inner[data-v-2f9b4098]{border:1px solid gray;border-radius:5px;position:relative;width:90%;height:90%;margin:5%;background-color:lightblue;z-index:100}.active[data-v-2f9b4098]{outline:3px solid red}.inactive[data-v-2f9b4098]{background-color:whitesmoke !important;animation:none !important}.selected[data-v-2f9b4098]{-webkit-animation:background-data-v-2f9b4098 5s cubic-bezier(1, 0, 0, 1) !important;animation:background-data-v-2f9b4098 5s cubic-bezier(1, 0, 0, 1) !important}.mouseentered[data-v-2f9b4098]{outline:3px solid green !important;background-color:lightgreen}@-webkit-keyframes background-data-v-2f9b4098{0%{background-color:dodgerblue}100%{background-color:lightblue}}@keyframes background-data-v-2f9b4098{0%{background-color:dodgerblue}100%{background-color:lightblue}}\n",""])},function(e,t,n){"use strict";var i=n(27);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".warn[data-v-3cc44ad7]{margin-top:2em}.slidergroup input[data-v-3cc44ad7]{width:50%}\n",""])},function(e,t,n){"use strict";var i=n(28);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".warn[data-v-4c9162fd]{margin-top:2em}\n",""])},function(e,t,n){"use strict";var i=n(29);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".warn[data-v-fff4292a]{margin-top:2em}\n",""])},function(e,t,n){"use strict";var i=n(30);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".warn[data-v-071e6452]{margin-top:2em}\n",""])},function(e,t,n){"use strict";var i=n(31);n.n(i).a},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".number-row[data-v-1e4b04a9]{width:60%;margin:0 auto}.modal-body button[data-v-1e4b04a9]{width:30%;padding:3% 0;margin-right:3%;font-size:2.5em}\n",""])},function(e,t,n){e.exports=n(98)},function(e,t,n){"use strict";var i=n(5),a=n(42),r=n(100),s=n(41);function o(e){var t=new r(e),n=a(r.prototype.request,t);return i.extend(n,r.prototype,t),i.extend(n,t),n}var l=o(s);l.Axios=r,l.create=function(e){return o(i.merge(s,e))},l.Cancel=n(46),l.CancelToken=n(114),l.isCancel=n(45),l.all=function(e){return Promise.all(e)},l.spread=n(115),e.exports=l,e.exports.default=l},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer @@ -19,4 +19,4 @@ e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeo * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. - */!function(r){var s=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(){this._events={},this._conf&&l.call(this,this._conf)}function l(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=void 0!==e.maxListeners?e.maxListeners:10,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=10}function c(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==i&&i.emitWarning){var a=new Error(n);a.name="MaxListenersExceededWarning",a.emitter=this,a.count=e,i.emitWarning(a)}else console.error(n),console.trace&&console.trace()}function d(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,l.call(this,e)}function u(e,t,n,i){if(!n)return[];var a,r,s,o,l,c,d,f=[],p=t.length,h=t[i],m=t[i+1];if(i===p&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(a=0,r=n._listeners.length;a0&&a._listeners.length>this._maxListeners&&(a._listeners.warned=!0,c.call(this,a._listeners.length,r))):a._listeners=t,!0;r=e.shift()}return!0}d.EventEmitter2=d,d.prototype.delimiter=".",d.prototype.setMaxListeners=function(e){void 0!==e&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},d.prototype.event="",d.prototype.once=function(e,t){return this._once(e,t,!1)},d.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},d.prototype._once=function(e,t,n){return this._many(e,1,t,n),this},d.prototype.many=function(e,t,n){return this._many(e,t,n,!1)},d.prototype.prependMany=function(e,t,n){return this._many(e,t,n,!0)},d.prototype._many=function(e,t,n,i){var a=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function r(){return 0==--t&&a.off(e,r),n.apply(this,arguments)}return r._origin=n,this._on(e,r,i),a},d.prototype.emit=function(){this._events||o.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,n,i,a,r,s=arguments.length;if(this._all&&this._all.length){if(r=this._all.slice(),s>3)for(t=new Array(s),a=0;a3)for(t=new Array(s-1),a=1;a3)for(t=new Array(l),a=1;a3)for(t=new Array(l-1),a=1;a0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,c.call(this,this._events[e].length,e))):this._events[e]=t,this)},d.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var a="string"==typeof e?e.split(this.delimiter):e.slice();i=u.call(this,null,a,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var r=0;r0&&e(t[a]),0===Object.keys(r).length&&delete t[a])}}}(this.listenerTree),this},d.prototype.offAny=function(e){var t,n=0,i=0;if(e&&this._all&&this._all.length>0){for(n=0,i=(t=this._all).length;ni,.context-menu-icon.context-menu-icon--fa5.context-menu-hover svg{color:#fff}.context-menu-icon.context-menu-icon--fa5.context-menu-disabled i,.context-menu-icon.context-menu-icon--fa5.context-menu-disabled svg{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.5);box-shadow:0 2px 5px rgba(0,0,0,0.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:\'\';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type="checkbox"],.context-menu-input>label>input[type="radio"]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type="text"],.context-menu-input>label>textarea,.context-menu-input>label>select{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}\n',""])},function(e,t,n){var i=n(146);"string"==typeof i&&(i=[[e.i,i,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,a);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".holy-grail{min-height:100vh}.holy-grail,.holy-grail-body{display:flex;flex:1 1 auto;flex-direction:row}.holy-grail-content{flex:1 1 auto}.holy-grail-sidebar-1{order:-1;border-right:2px solid lightgray;max-height:98vh;overflow-x:hidden;padding-top:2vh;display:flex;flex-flow:column}.hg-sidebar{flex:0 0 250px;z-index:3}nav li:focus{outline:none}@media (max-width: 850px){.hg-sidebar{flex:0 0 50px}#astericsIcon{margin-bottom:1em}nav li button{padding-left:0.5em}.hg-sidebar button{padding-left:0;padding-right:0;text-align:center}}@media (max-width: 850px) and (max-height: 500px){.hg-sidebar{flex:0 0 12vh}.hg-sidebar button,#syncVisualization{font-size:3vh;line-height:0}#astericsIcon{height:10vh}header button,header a,header input{height:10vh !important;max-height:40px;font-size:4vh;line-height:0}}\n",""])},function(e,t,n){"use strict";n.r(t);var i=n(0),a=n.n(i),r={ELEMENT_EVENT_ID:"ELEMENT_EVENT_ID",MODEL_VERSION:'{"major": 3, "minor": 0, "patch": 0}',LOCAL_NOLOGIN_USERNAME:"default-user",LOCAL_DEMO_USERNAME:"local-demo-user",USERNAME_REGEX:/^[a-z][a-z0-9_-]{2,50}$/,VALIDATION_ERROR_REGEX:"VALIDATION_ERROR_REGEX",VALIDATION_ERROR_EXISTING:"VALIDATION_ERROR_EXISTING",VALIDATION_VALID:"VALIDATION_VALID",EVENT_DB_CONNECTION_LOST:"EVENT_DB_CONNECTION_LOST",EVENT_DB_PULL_UPDATED:"EVENT_DB_PULL_UPDATED",EVENT_DB_SYNC_STATE_CHANGE:"EVENT_DB_SYNC_STATE_CHANGE",EVENT_DB_INITIALIZED:"EVENT_DB_INITIALIZED",EVENT_DB_CLOSED:"EVENT_DB_CLOSED",EVENT_DB_DATAMODEL_UPDATE:"EVENT_DB_DATAMODEL_UPDATE",EVENT_SIDEBAR_OPEN:"event-sidebar-open",EVENT_SIDEBAR_OPENED:"event-sidebar-opened",EVENT_SIDEBAR_CLOSE:"event-sidebar-close",EVENT_GRID_RESIZE:"EVENT_GRID_RESIZE",EVENT_GRID_LOADED:"EVENT_GRID_LOADED",EVENT_USER_CHANGED:"EVENT_USER_CHANGED",EVENT_LANGUAGE_CHANGE:"EVENT_LANGUAGE_CHANGE",DB_SYNC_STATE_SYNCINC:"DB_SYNC_STATE_SYNCINC",DB_SYNC_STATE_SYNCED:"DB_SYNC_STATE_SYNCED",DB_SYNC_STATE_STOPPED:"DB_SYNC_STATE_STOPPED",DB_SYNC_STATE_FAIL:"DB_SYNC_STATE_FAIL",DB_SYNC_STATE_ONLINEONLY:"DB_SYNC_STATE_ONLINEONLY",ENVIRONMENT:"PROD"};r.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===r.ENVIRONMENT,r.IS_ENVIRONMENT_PROD=!r.IS_ENVIRONMENT_DEV,r.CURRENT_VERSION="release-2021-02-04-10.37/+0100",r.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),r.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var s={},o=100;let l=JSON.parse(r.MODEL_VERSION),c={major:null,minor:null,patch:null};s.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+o++},s.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},s.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},s.setDefaults=function(e,t,n){if(t&&e&&n&&n.definition){var i=Object.keys(n.definition);Object.keys(t).forEach((function(n){i.includes(n)&&null==e[n]&&(e[n]=t[n])}))}return e},s.hashCode=function(e){e=e||{};var t=JSON.parse(JSON.stringify(e));return delete t._rev,delete t._id,delete t.id,JSON.stringify(t).split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0)},s.getModelVersionString=function(){return r.MODEL_VERSION},s.getModelVersionObject=function(e){if(!e)return c;let t=JSON.parse(e);return t.major&&(t.major=parseInt(t.major),t.minor=parseInt(t.minor),t.patch=parseInt(t.patch)),t.major?t:c},s.getLatestModelVersion=function(){return l};let d=window.Model;class u extends(d({id:String,modelName:String,modelVersion:String,label:[String],keyCode:[Number],keyName:[String],repeat:[Number],timeout:[Number],holdDuration:[Number]})){constructor(e,t){super(e=s.setDefaults(e,t,u)),this.id=this.id||s.generateId("input-event-key")}isValid(){return this.modelName&&this.label&&this.keyCode}static getModelName(){return"InputEventKey"}}u.defaults({id:"",modelName:u.getModelName(),modelVersion:r.MODEL_VERSION,repeat:1,timeout:0,holdDuration:0});class f extends(d({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[d.Array(String)],areURL:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,f)),this.id=this.id||s.generateId("input-event-are")}isValid(){return this.modelName&&this.label&&this.eventNames.length>0}static getModelName(){return"InputEventARE"}}f.defaults({id:"",modelName:f.getModelName(),modelVersion:r.MODEL_VERSION,eventNames:[]});class p extends(d({id:String,modelName:String,modelVersion:String,globalReadActive:[Boolean],scanEnabled:[Boolean],scanAuto:[Boolean],scanTimeoutMs:[Number],scanTimeoutFirstElementFactor:[Number],scanVertical:[Boolean],scanBinary:[Boolean],scanInputs:[d.Array(Object)],hoverEnabled:[Boolean],hoverTimeoutMs:Number,hoverHideCursor:[Boolean],hoverDisableHoverpane:[Boolean],mouseclickEnabled:[Boolean],dirEnabled:[Boolean],dirInputs:[d.Array(Object)],dirWrapAround:[Boolean],dirResetToStart:[Boolean],seqEnabled:[Boolean],seqInputs:[d.Array(Object)],huffEnabled:[Boolean],huffElementCount:[Number],huffInputs:[d.Array(Object)],huffColors:[d.Array(String)],huffShowColors:[Boolean],huffShowNumbers:[Boolean],huffColorWholeElement:[Boolean],huffTimeout:[Number],huffMarkInactive:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,p)),this.id=this.id||s.generateId("input-config")}static getModelName(){return"InputConfig"}static getInputEventTypes(){return[u,f]}static getInputEventInstance(e,t){let n=this.getInputEventTypes().filter(t=>t.getModelName()===e)[0];if(n)return new n(t);log.warn("input event type not found: "+e)}}p.UP="UP",p.DOWN="DOWN",p.LEFT="LEFT",p.RIGHT="RIGHT",p.SELECT="SELECT",p.NEXT="NEXT",p.NEXT_ELEMENT="NEXT_ELEMENT",p.PREVIOUS_ELEMENT="PREVIOUS_ELEMENT",p.GENERAL_INPUT="GENERAL_INPUT",p.getNumConst=e=>"NUM"+e,p.DEFAULT_SCAN_INPUTS=[new u({label:p.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new u({label:p.NEXT,keyCode:32,keyName:"Space"})],p.DEFAULT_SEQ_INPUTS=[new u({label:p.SELECT,keyCode:32,keyName:"Space"}),new u({label:p.NEXT_ELEMENT,keyCode:39,keyName:"ArrowRight"}),new u({label:p.PREVIOUS_ELEMENT,keyCode:37,keyName:"ArrowLeft"})],p.DEFAULT_DIR_INPUTS=[new u({label:p.SELECT,keyCode:32,keyName:"Space"}),new u({label:p.LEFT,keyCode:37,keyName:"ArrowLeft"}),new u({label:p.RIGHT,keyCode:39,keyName:"ArrowRight"}),new u({label:p.UP,keyCode:38,keyName:"ArrowUp"}),new u({label:p.DOWN,keyCode:40,keyName:"ArrowDown"})],p.DEFAULT_HUFF_INPUTS=[new u({label:p.GENERAL_INPUT,keyCode:49,keyName:"Digit1"}),new u({label:p.GENERAL_INPUT,keyCode:50,keyName:"Digit2"}),new u({label:p.GENERAL_INPUT,keyCode:51,keyName:"Digit3"}),new u({label:p.GENERAL_INPUT,keyCode:52,keyName:"Digit4"})],p.DEFAULT_HUFF_COLORS=["#D55E00","#F0E442","#009E73","#0072B2","#CC79A7","#E69F00","#56B4E9","#000000","#016619"],p.defaults({id:"",modelName:p.getModelName(),modelVersion:r.MODEL_VERSION,scanAuto:!1,scanTimeoutMs:1e3,scanTimeoutFirstElementFactor:1,scanBinary:!0,hoverTimeoutMs:1e3,mouseclickEnabled:!0,scanInputs:p.DEFAULT_SCAN_INPUTS,dirInputs:p.DEFAULT_DIR_INPUTS,seqInputs:p.DEFAULT_SEQ_INPUTS,dirWrapAround:!0,huffInputs:p.DEFAULT_HUFF_INPUTS,huffColors:p.DEFAULT_HUFF_COLORS,huffShowColors:!0,huffShowNumbers:!0,huffElementCount:0,huffTimeout:4e3,huffMarkInactive:!0});class h extends(d({id:String,modelName:String,modelVersion:String,lastOpenedGridId:[String],globalGridId:[String],globalGridActive:[Boolean],globalGridHeightPercentage:[Number],locked:[Boolean],fullscreen:[Boolean],hashCodes:[Object],inputConfig:p})){constructor(e,t){super(e=s.setDefaults(e,t,h)||{}),this.id=this.id||s.generateId(h.getIdPrefix())}isEqual(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}static getModelName(){return"MetaData"}static getIdPrefix(){return"meta-data"}}h.defaults({id:"",modelName:h.getModelName(),modelVersion:r.MODEL_VERSION,locked:void 0,fullscreen:void 0,hashCodes:{},inputConfig:new p,globalGridActive:!1,globalGridHeightPercentage:15});var m="could not access local storage, maybe disabled by user? Error: ",v=null;if("undefined"!=typeof Storage)try{v=window.localStorage}catch(e){log.error(m+e)}var g={save:function(e,t){if(v)try{return v.setItem(e,t)}catch(e){log.error(m+e)}},get:function(e){if(v)try{return v.getItem(e)}catch(e){log.error(m+e)}},remove:function(e){if(v)try{return v.removeItem(e)}catch(e){log.error(m+e)}},getUserPassword:e=>e?_("USER_PASSWORDS_KEY")[e]:null,saveLocalUser(e){let t=_("USER_PASSWORDS_KEY");t[e]="",g.save("USER_PASSWORDS_KEY",JSON.stringify(t))},isSavedLocalUser:e=>""===_("USER_PASSWORDS_KEY")[e],isLastActiveUserLocal:()=>""===_("USER_PASSWORDS_KEY")[g.getLastActiveUser()],saveUserPassword(e,t){let n=_("USER_PASSWORDS_KEY");n[e]=t,g.save("USER_PASSWORDS_KEY",JSON.stringify(n))},removeUserPassword(e){let t=_("USER_PASSWORDS_KEY");delete t[e],g.save("USER_PASSWORDS_KEY",JSON.stringify(t)),g.getAutologinUser()===e&&g.setAutologinUser("")},getSavedUsers(e){let t=g.getSavedLocalUsers(),n=g.getSavedOnlineUsers().concat(t);return e&&n.includes(e)&&(n=n.filter(t=>t!==e),n.unshift(e)),n},getSavedLocalUsers(){let e=_("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""===e[t]).sort((e,t)=>e===r.LOCAL_DEMO_USERNAME?1:t===r.LOCAL_DEMO_USERNAME?-1:e.localeCompare(t))},getSavedOnlineUsers(){let e=_("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""!==e[t]).sort()},setLastActiveUser(e){g.save("LAST_ACTIVEUSER_KEY",e)},getLastActiveUser:()=>g.get("LAST_ACTIVEUSER_KEY"),setAutologinUser(e){e!==r.LOCAL_DEMO_USERNAME&&g.save("AUTOLOGIN_USER_KEY",e)},getAutologinUser:()=>g.get("AUTOLOGIN_USER_KEY"),markSyncedDatabase(e){let t=b();t.includes(e)||t.push(e),g.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},isDatabaseSynced:e=>b().includes(e),unmarkSyncedDatabase(e){let t=b();t=t.filter(t=>t!==e),g.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},getUserMajorModelVersion(e){let t=_("USER_MODELVERSION_KEY");return t[e]?parseInt(JSON.parse(t[e]).major):1},setUserModelVersion(e,t){if(g.getUserMajorModelVersion(e)g.save("AG_GRID_DIMENSIONS_KEY",JSON.stringify(e)),getLastGridDimensions(){let e=g.get("AG_GRID_DIMENSIONS_KEY");return e?JSON.parse(e):{}},addUsedLocales(e){let t=g.get("AG_USED_LOCALES_KEY"),n=t?JSON.parse(t):[];n=[...new Set(n.concat(e))],g.save("AG_USED_LOCALES_KEY",JSON.stringify(n))},getUsedLocales(){let e=g.get("AG_USED_LOCALES_KEY");return e?JSON.parse(e):[]},getYTState(e){let t=g.get("AG_YT_STATE_KEY");return e?t?JSON.parse(t):null:t?JSON.parse(t)[g.getAutologinUser()]:null},saveYTState(e){let t=g.getYTState(!0)||{};return t[g.getAutologinUser()]=e,g.save("AG_YT_STATE_KEY",JSON.stringify(t))},getCurrentAppVersion:()=>g.get("AG_CURRENT_VERSION_KEY"),setCurrentAppVersion(e){g.save("AG_CURRENT_VERSION_KEY",e)}};function _(e){let t=g.get(e),n=JSON.parse(t),i=n instanceof Object;if("AG_LOCAL_METADATA_KEY"===e&&n&&n.modelName===h.getModelName()){let t={};return t[g.getAutologinUser()||g.getLastActiveUser()]=n,g.save(e,JSON.stringify(t)),t}return t&&i?n:(g.save(e,JSON.stringify({})),{})}function b(){let e=g.get("SYNCED_DBS_LIST_KEY");return e?JSON.parse(e):(g.save("SYNCED_DBS_LIST_KEY",JSON.stringify([])),[])}var E=n(47),y=n.n(E);let C={},w=g.get("CUSTOM_LANGUAGE_KEY")||"",T=null,A=["en","de"],N=JSON.parse('[{"de":"Abchasisch","en":"Abkhazian","code":"ab"},{"de":"Afar","en":"Afar","code":"aa"},{"de":"Afrikaans","en":"Afrikaans","code":"af"},{"de":"Akan","en":"Akan","code":"ak"},{"de":"Albanisch","en":"Albanian","code":"sq"},{"de":"Amharisch","en":"Amharic","code":"am"},{"de":"Arabisch","en":"Arabic","code":"ar"},{"de":"Aragonesisch","en":"Aragonese","code":"an"},{"de":"Armenisch","en":"Armenian","code":"hy"},{"de":"Aserbaidschanisch","en":"Azerbaijani","code":"az"},{"de":"Assamesisch","en":"Assamese","code":"as"},{"de":"Avarisch","en":"Avaric","code":"av"},{"de":"Avestisch","en":"Avestan","code":"ae"},{"de":"Aymara","en":"Aymara","code":"ay"},{"de":"Bambara","en":"Bambara","code":"bm"},{"de":"Baschkirisch","en":"Bashkir","code":"ba"},{"de":"Baskisch","en":"Basque","code":"eu"},{"de":"Bengalisch","en":"Bengali","code":"bn"},{"de":"Bihari","en":"Bihari languages","code":"bh"},{"de":"Birmanisch","en":"Burmese","code":"my"},{"de":"Bislama","en":"Bislama","code":"bi"},{"de":"Bokmål","en":"Norwegian Bokmål","code":"nb"},{"de":"Bosnisch","en":"Bosnian","code":"bs"},{"de":"Bretonisch","en":"Breton","code":"br"},{"de":"Bulgarisch","en":"Bulgarian","code":"bg"},{"de":"Chamorro","en":"Chamorro","code":"ch"},{"de":"Chichewa","en":"Chichewa","code":"ny"},{"de":"Chinesisch","en":"Chinese","code":"zh"},{"de":"Cree","en":"Cree","code":"cr"},{"de":"Dänisch","en":"Danish","code":"da"},{"de":"Deutsch","en":"German","code":"de"},{"de":"Dhivehi","en":"Divehi","code":"dv"},{"de":"Dzongkha","en":"Dzongkha","code":"dz"},{"de":"Englisch","en":"English","code":"en"},{"de":"Esperanto","en":"Esperanto","code":"eo"},{"de":"Estnisch","en":"Estonian","code":"et"},{"de":"Ewe","en":"Ewe","code":"ee"},{"de":"Färöisch","en":"Faroese","code":"fo"},{"de":"Fidschi","en":"Fijian","code":"fj"},{"de":"Finnisch","en":"Finnish","code":"fi"},{"de":"Französisch","en":"French","code":"fr"},{"de":"Fulfulde","en":"Fulah","code":"ff"},{"de":"Galicisch","en":"Galician","code":"gl"},{"de":"Georgisch","en":"Georgian","code":"ka"},{"de":"Griechisch","en":"Greek","code":"el"},{"de":"Grönländisch","en":"Kalaallisut","code":"kl"},{"de":"Guaraní","en":"Guarani","code":"gn"},{"de":"Gujarati","en":"Gujarati","code":"gu"},{"de":"Haitianisch","en":"Haitian","code":"ht"},{"de":"Hausa","en":"Hausa","code":"ha"},{"de":"Hebräisch","en":"Hebrew","code":"he"},{"de":"Hindi","en":"Hindi","code":"hi"},{"de":"Hiri Motu","en":"Hiri Motu","code":"ho"},{"de":"Ido","en":"Ido","code":"io"},{"de":"Igbo","en":"Igbo","code":"ig"},{"de":"Indonesisch","en":"Indonesian","code":"id"},{"de":"Interlingua","en":"Interlingua","code":"ia"},{"de":"Interlingue","en":"Interlingue","code":"ie"},{"de":"Inuktitut","en":"Inuktitut","code":"iu"},{"de":"Inupiaq","en":"Inupiaq","code":"ik"},{"de":"Irisch","en":"Irish","code":"ga"},{"de":"isiXhosa","en":"Xhosa","code":"xh"},{"de":"isiZulu","en":"Zulu","code":"zu"},{"de":"Isländisch","en":"Icelandic","code":"is"},{"de":"Italienisch","en":"Italian","code":"it"},{"de":"Japanisch","en":"Japanese","code":"ja"},{"de":"Javanisch","en":"Javanese","code":"jv"},{"de":"Jiddisch","en":"Yiddish","code":"yi"},{"de":"Kannada","en":"Kannada","code":"kn"},{"de":"Kanuri","en":"Kanuri","code":"kr"},{"de":"Kasachisch","en":"Kazakh","code":"kk"},{"de":"Kashmiri","en":"Kashmiri","code":"ks"},{"de":"Katalanisch","en":"Catalan","code":"ca"},{"de":"Khmer","en":"Central Khmer","code":"km"},{"de":"Kikongo","en":"Kongo","code":"kg"},{"de":"Kikuyu","en":"Kikuyu","code":"ki"},{"de":"Kiluba","en":"Luba-Katanga","code":"lu"},{"de":"Kinyarwanda","en":"Kinyarwanda","code":"rw"},{"de":"Kirchenslawisch","en":"Church Slavic","code":"cu"},{"de":"Kirgisisch","en":"Kirghiz","code":"ky"},{"de":"Kirundi","en":"Rundi","code":"rn"},{"de":"Komi","en":"Komi","code":"kv"},{"de":"Koreanisch","en":"Korean","code":"ko"},{"de":"Kornisch","en":"Cornish","code":"kw"},{"de":"Korsisch","en":"Corsican","code":"co"},{"de":"Kroatisch","en":"Croatian","code":"hr"},{"de":"Kurdisch","en":"Kurdish","code":"ku"},{"de":"Laotisch","en":"Lao","code":"lo"},{"de":"Latein","en":"Latin","code":"la"},{"de":"Lettisch","en":"Latvian","code":"lv"},{"de":"Limburgisch","en":"Limburgan","code":"li"},{"de":"Lingála","en":"Lingala","code":"ln"},{"de":"Litauisch","en":"Lithuanian","code":"lt"},{"de":"Luganda","en":"Ganda","code":"lg"},{"de":"Luxemburgisch","en":"Luxembourgish","code":"lb"},{"de":"Malagasy, Malagassi","en":"Malagasy","code":"mg"},{"de":"Malaiisch","en":"Malay","code":"ms"},{"de":"Malayalam","en":"Malayalam","code":"ml"},{"de":"Maltesisch","en":"Maltese","code":"mt"},{"de":"Manx","en":"Manx","code":"gv"},{"de":"Maori","en":"Maori","code":"mi"},{"de":"Marathi","en":"Marathi","code":"mr"},{"de":"Marshallesisch","en":"Marshallese","code":"mh"},{"de":"Mazedonisch","en":"Macedonian","code":"mk"},{"de":"Mongolisch","en":"Mongolian","code":"mn"},{"de":"Nauruisch","en":"Nauru","code":"na"},{"de":"Navajo","en":"Navajo","code":"nv"},{"de":"Ndonga","en":"Ndonga","code":"ng"},{"de":"Nepali","en":"Nepali","code":"ne"},{"de":"Niederländisch","en":"Dutch","code":"nl"},{"de":"Nord-Ndebele","en":"North Ndebele","code":"nd"},{"de":"Nordsamisch","en":"Northern Sami","code":"se"},{"de":"Norwegisch","en":"Norwegian","code":"no"},{"de":"Nynorsk","en":"Norwegian Nynorsk","code":"nn"},{"de":"Ojibwe","en":"Ojibwa","code":"oj"},{"de":"Okzitanisch","en":"Occitan","code":"oc"},{"de":"Oriya","en":"Oriya","code":"or"},{"de":"Oromo","en":"Oromo","code":"om"},{"de":"oshiKwanyama","en":"Kuanyama","code":"kj"},{"de":"Ossetisch","en":"Ossetian","code":"os"},{"de":"Otjiherero","en":"Herero","code":"hz"},{"de":"Pali","en":"Pali","code":"pi"},{"de":"Panjabi","en":"Panjabi","code":"pa"},{"de":"Paschtunisch","en":"Pashto","code":"ps"},{"de":"Persisch","en":"Persian","code":"fa"},{"de":"Polnisch","en":"Polish","code":"pl"},{"de":"Portugiesisch","en":"Portuguese","code":"pt"},{"de":"Quechua","en":"Quechua","code":"qu"},{"de":"Romanisch","en":"Romansh","code":"rm"},{"de":"Rumänisch","en":"Romanian","code":"ro"},{"de":"Russisch","en":"Russian","code":"ru"},{"de":"Samoanisch","en":"Samoan","code":"sm"},{"de":"Sango","en":"Sango","code":"sg"},{"de":"Sanskrit","en":"Sanskrit","code":"sa"},{"de":"Sardisch","en":"Sardinian","code":"sc"},{"de":"Schottisch-gälisch","en":"Scottish Gaelic","code":"gd"},{"de":"Schwedisch","en":"Swedish","code":"sv"},{"de":"Serbisch","en":"Serbian","code":"sr"},{"de":"Sesotho","en":"Southern Sotho","code":"st"},{"de":"Setswana","en":"Tswana","code":"tn"},{"de":"Shona","en":"Shona","code":"sn"},{"de":"Sindhi","en":"Sindhi","code":"sd"},{"de":"Singhalesisch","en":"Sinhala, Sinhalese","code":"si"},{"de":"Siswati","en":"Swati","code":"ss"},{"de":"Slowakisch","en":"Slovak","code":"sk"},{"de":"Slowenisch","en":"Slovenian","code":"sl"},{"de":"Somali","en":"Somali","code":"so"},{"de":"Spanisch","en":"Spanish","code":"es"},{"de":"Süd-Ndebele","en":"South Ndebele","code":"nr"},{"de":"Sundanesisch","en":"Sundanese","code":"su"},{"de":"Swahili","en":"Swahili","code":"sw"},{"de":"Tadschikisch","en":"Tajik","code":"tg"},{"de":"Tagalog","en":"Tagalog","code":"tl"},{"de":"Tahitianisch","en":"Tahitian","code":"ty"},{"de":"Tamil","en":"Tamil","code":"ta"},{"de":"Tatarisch","en":"Tatar","code":"tt"},{"de":"Telugu","en":"Telugu","code":"te"},{"de":"Thai","en":"Thai","code":"th"},{"de":"Tibetisch","en":"Tibetan","code":"bo"},{"de":"Tigrinya","en":"Tigrinya","code":"ti"},{"de":"Tongaisch","en":"Tonga","code":"to"},{"de":"Tschechisch","en":"Czech","code":"cs"},{"de":"Tschetschenisch","en":"Chechen","code":"ce"},{"de":"Tschuwaschisch","en":"Chuvash","code":"cv"},{"de":"Tshivenda","en":"Venda","code":"ve"},{"de":"Türkisch","en":"Turkish","code":"tr"},{"de":"Turkmenisch","en":"Turkmen","code":"tk"},{"de":"Twi","en":"Twi","code":"tw"},{"de":"Uigurisch","en":"Uighur","code":"ug"},{"de":"Ukrainisch","en":"Ukrainian","code":"uk"},{"de":"Ungarisch","en":"Hungarian","code":"hu"},{"de":"Urdu","en":"Urdu","code":"ur"},{"de":"Usbekisch","en":"Uzbek","code":"uz"},{"de":"Vietnamesisch","en":"Vietnamese","code":"vi"},{"de":"Volapük","en":"Volapük","code":"vo"},{"de":"Walisisch","en":"Welsh","code":"cy"},{"de":"Wallonisch","en":"Walloon","code":"wa"},{"de":"Weißrussisch","en":"Belarusian","code":"be"},{"de":"Westfriesisch","en":"Western Frisian","code":"fy"},{"de":"Wolof","en":"Wolof","code":"wo"},{"de":"Xitsonga","en":"Tsonga","code":"ts"},{"de":"Yi","en":"Sichuan Yi","code":"ii"},{"de":"Yoruba","en":"Yoruba","code":"yo"},{"de":"Zhuang","en":"Zhuang","code":"za"}]'),S="de";C.initDomI18n=function(){T||(T=window.domI18n({selector:"[data-i18n]",separator:" // ",languages:A,enableLog:!1})),T.changeLanguage(C.getBrowserLang())},C.getBrowserLang=function(){return w||navigator.language.substring(0,2).toLowerCase()},C.isBrowserLangDE=function(){return"de"===C.getBrowserLang()},C.isBrowserLangEN=function(){return"en"===C.getBrowserLang()},C.getAllLanguages=function(){let e="de"===C.getBrowserLang()?"de":"en";return e===S||(N.sort((t,n)=>t[e].toLowerCase()>n[e].toLowerCase()?1:-1),S=e),N},C.translate=function(e,...t){if(e&&e.indexOf(" // ")>-1){let n=e.split(" // "),i="en"===t[0]||"de"===t[0]?t[0]:C.getBrowserLang(),a=A.indexOf(i);return a=a>0?a:0,t.forEach(e=>{n[a]=n[a].replace("{?}",e)}),n[a]}let n=this.translations[this.getBrowserLang()]?this.getBrowserLang():"en",i=this.translations[n][e]?this.translations[n][e]:e;return t.forEach(e=>{i=i.replace("{?}",e)}),i},C.getTranslation=function(e,t,n){if(!e)return"";if(t=t||"en","string"==typeof e)return e;let i=C.getBrowserLang();if(e[i])return n?{lang:i,text:e[i]}:e[i];if(e[t])return n?{lang:t,text:e[t]}:e[t];let a=Object.keys(e);return e[a[0]]?n?{lang:a[0],text:e[a[0]]}:e[a[0]]:n?{lang:void 0,text:""}:""},C.getTranslationObject=function(e,t){t=t||C.getBrowserLang(),e=C.translate(e,t);let n={};return n[t]=e,n},C.setLanguage=function(e){w=e,T&&T.changeLanguage(e),g.save("CUSTOM_LANGUAGE_KEY",w),a()(document).trigger(r.EVENT_LANGUAGE_CHANGE)},C.getCustomLanguage=function(){return w},C.translations={},C.translations.en={GridActionSpeak:"Speak label",GridActionSpeakCustom:"Speak custom text",GridActionNavigate:"Navigate to other grid",GridActionARE:"AsTeRICS action",GridActionPredict:"Fill prediction elements",GridActionCollectElement:"Collect element action",GridActionWebradio:"Web radio action",GridActionYoutube:"YouTube action",GridActionChangeLang:"Change app language",COLLECT_ACTION_CLEAR:"Clear collect element",COLLECT_ACTION_REMOVE_WORD:"Delete last word",COLLECT_ACTION_REMOVE_CHAR:"Delete last character",COLLECT_ACTION_COPY_CLIPBOARD:"Copy text to clipboard",COLLECT_ACTION_APPEND_CLIPBOARD:"Append text to clipboard",COLLECT_ACTION_CLEAR_CLIPBOARD:"Clear clipboard",COLLECT_ACTION_TO_YOUTUBE:"Search text on YouTube",WEBRADIO_ACTION_START:"Turn radio on",WEBRADIO_ACTION_TOGGLE:"Turn radio on/off",WEBRADIO_ACTION_STOP:"Turn radio off",WEBRADIO_ACTION_NEXT:"Next radio channel",WEBRADIO_ACTION_PREV:"Previous radio channel",WEBRADIO_ACTION_VOLUP:"Radio volume up",WEBRADIO_ACTION_VOLDOWN:"Radio volume down",CONFIRM_IMPORT_BACKUP:'Caution: This action will delete the existing configuration and replace it with the data from file "{?}". Continue?',CONFIRM_DELETE_GRID:'Do you really want to delete the grid "{?}"?',CONFIRM_DELETE_DICT:'Do you really want to delete the dictionary "{?}"?',CONFIRM_RESET_DB:"Do you really want to reset to default configuration? All current grids will be deleted!",CONFIRM_DELETE_ALL_ELEMS:"Do you really want to delete all elements of the current grid?",CONFIRM_REMOVE_USER:'Do you really want to unlink user "{?}"? This will not delete the user itself, but all data of the user stored on this device.',CONFIRM_REMOVE_USER_LOCAL:'Do you really want to delete user "{?}"? Since the user is not synchronized this action will permanently delete the user.',PLACEHOLDER_SEARCH_GRID:"Search grid",LABEL_USER_LOCAL:"offline-only user",LABEL_USER_CLOUD:"user synced with the cloud",LABEL_USER_ONLINE:"only online, no offline synchronization",ERROR_CODE_UNAUTHORIZED:"Login failed, wrong username or password.",ERROR_CODE_NETWORK_ERROR:"Login failed (network error), please try again later.",DB_SYNC_STATE_SYNCINC:"synchronizing with cloud...",DB_SYNC_STATE_SYNCED:"synchronized with cloud",DB_SYNC_STATE_STOPPED:"synchronization with cloud paused",DB_SYNC_STATE_FAIL:"not synchronizing with cloud",DB_SYNC_STATE_ONLINEONLY:"online-only, no offline synchronization",VALIDATION_ERROR_REGEX:'Username must contain only lowercase letters, digits or the characters ["-", "_"], valid length is 3-50 characters.',VALIDATION_ERROR_EXISTING:"Username is already existing.",SEARCH_IMAGE_PLACEHOLDER:"input search term",HEADER_COMPARE_ONLINE_OFFLINE:"Information about online/offline users",ADVANCED_SETTINGS:"Advanced Settings",TEST_CONFIGURATION:"Test configuration",SELECT:"Select element",NEXT:"Next scanning group",NEXT_ELEMENT:"Next element",PREVIOUS_ELEMENT:"Previous Element",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event",ELEMENT_TYPE_COLLECT:"Collect element",ELEMENT_TYPE_PREDICTION:"Prediction element",ELEMENT_TYPE_YT_PLAYER:"YouTube player",YT_PLAY:"Play video",YT_PAUSE:"Pause video",YT_TOGGLE:"Play/pause video",YT_RESTART:"Restart video",YT_STOP:"Stop Video",YT_STEP_FORWARD:"Step forward within video",YT_STEP_BACKWARD:"Step backward within video",YT_NEXT_VIDEO:"Next video",YT_PREV_VIDEO:"Previous video",YT_PLAY_VIDEO:"Play single video",YT_PLAY_PLAYLIST:"Play playlist",YT_PLAY_SEARCH:"Play videos from search query",YT_PLAY_CHANNEL:"Play videos from channel",YT_ENTER_FULLSCREEN:"Show video in fullscreen",YT_VOLUME_UP:"Video volume up",YT_VOLUME_DOWN:"Video volume down",YT_VOLUME_MUTE:"Mute/unmute video"},C.translations.de={GridActionSpeak:"Label aussprechen",GridActionSpeakCustom:"Benutzerdefinierten Text aussprechen",GridActionNavigate:"Zu anderem Grid navigieren",GridActionARE:"AsTeRICS Aktion",GridActionPredict:"Vorhersage-Elemente füllen",GridActionCollectElement:"Sammelelement Aktion",GridActionWebradio:"Web-Radio Aktion",GridActionYoutube:"YouTube Aktion",GridActionChangeLang:"Anwendungssprache ändern",COLLECT_ACTION_CLEAR:"Sammelelement leeren",COLLECT_ACTION_REMOVE_WORD:"Letztes Word löschen",COLLECT_ACTION_REMOVE_CHAR:"Letzten Buchstaben löschen",COLLECT_ACTION_COPY_CLIPBOARD:"Text in die Zwischenablage kopieren",COLLECT_ACTION_APPEND_CLIPBOARD:"Text zu Zwischenablage hinzufügen",COLLECT_ACTION_CLEAR_CLIPBOARD:"Zwischenablage leeren",COLLECT_ACTION_TO_YOUTUBE:"Text auf YouTube suchen",WEBRADIO_ACTION_START:"Radio einschalten",WEBRADIO_ACTION_TOGGLE:"Radio ein-/ausschalten",WEBRADIO_ACTION_STOP:"Radio ausschalten",WEBRADIO_ACTION_NEXT:"Nächster Radiosender",WEBRADIO_ACTION_PREV:"Voriger Radiosender",WEBRADIO_ACTION_VOLUP:"Radio-Lautstärke erhöhen",WEBRADIO_ACTION_VOLDOWN:"Radio-Lautstärke vermindern",CONFIRM_IMPORT_BACKUP:'Achtung: Diese Aktion wird die aktuelle Konfiguration löschen und sie mit den Daten der Datei "{?}" ersetzen. Fortfahren?',CONFIRM_DELETE_GRID:'Möchten Sie das Grid "{?}" wirklich löschen?',CONFIRM_DELETE_DICT:'Möchten Sie das Wörterbuch "{?}" wirklich löschen?',CONFIRM_RESET_DB:"Möchten Sie wirklich die Standardkonfiguration wiederherstellen? Alle aktuellen Grids werden dadurch gelöscht!",CONFIRM_DELETE_ALL_ELEMS:"Möchten Sie wirklich alle Elemente des aktuellen Grids löschen?",CONFIRM_REMOVE_USER:'Möchten Sie den Account "{?}" wirklich von diesem Gerät abmelden? Diese Aktion löscht nicht den User selbst, aber alle Daten des Users auf diesem Gerät.',PLACEHOLDER_SEARCH_GRID:"Grid suchen",LABEL_USER_LOCAL:"nur offline gespeicherter User",CONFIRM_REMOVE_USER_LOCAL:'Möchten Sie den User "{?}" wirklich permanent löschen? Diese Aktion kann nicht rückgängig gemacht werden.',LABEL_USER_CLOUD:"mit Cloud synchronisierter User",LABEL_USER_ONLINE:"nur online, keine offline Synchronisation",ERROR_CODE_UNAUTHORIZED:"Login fehlgeschlagen, falscher Benutzername oder Passwort.",ERROR_CODE_NETWORK_ERROR:"Login fehlgeschlagen (Netzwerkproblem), bitte versuchen Sie es später nochmal.",DB_SYNC_STATE_SYNCINC:"synchronisiere mit Cloud...",DB_SYNC_STATE_SYNCED:"Mit Cloud synchronisiert",DB_SYNC_STATE_STOPPED:"Synchronisation mit Cloud pausiert",DB_SYNC_STATE_FAIL:"Keine Synchronisierung mit Cloud",DB_SYNC_STATE_ONLINEONLY:"nur online, keine Offline-Synchronisierung",VALIDATION_ERROR_REGEX:'Username darf nur Kleinbuchstaben, Ziffern und die Zeichen ["-", "_"] enthalten, erlaubte Länge ist 3-50 Zeichen.',VALIDATION_ERROR_EXISTING:"Username existiert bereits.",SEARCH_IMAGE_PLACEHOLDER:"Suchbegriff eingeben",HEADER_COMPARE_ONLINE_OFFLINE:"Informationen über Online-/Offline-User",ADVANCED_SETTINGS:"Erweiterte Einstellungen",TEST_CONFIGURATION:"Konfiguration testen",SELECT:"Element auswählen",NEXT:"Nächste Gruppe",NEXT_ELEMENT:"Nächstes Element",PREVIOUS_ELEMENT:"Vorheriges Element",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event",ELEMENT_TYPE_COLLECT:"Sammel-Element",ELEMENT_TYPE_PREDICTION:"Vorhersage-Element",ELEMENT_TYPE_YT_PLAYER:"YouTube Player",YT_PLAY:"Video abspielen",YT_PAUSE:"Video pausieren",YT_TOGGLE:"Video abspielen/pausieren",YT_RESTART:"Video neu starten",YT_STOP:"Video stoppen",YT_STEP_FORWARD:"Im Video weiterspringen",YT_STEP_BACKWARD:"Im Video zurückspringen",YT_NEXT_VIDEO:"Nächstes Video",YT_PREV_VIDEO:"Vorheriges Video",YT_PLAY_VIDEO:"Einzelnes Video abspielen",YT_PLAY_PLAYLIST:"Playlist abspielen",YT_PLAY_SEARCH:"Videos aus Suchanfrage abspielen",YT_PLAY_CHANNEL:"Videos aus Kanal abspielen",YT_ENTER_FULLSCREEN:"Zeige Video in Vollbild",YT_VOLUME_UP:"Videolautstärke erhöhen",YT_VOLUME_DOWN:"Videolautstärke vermindern",YT_VOLUME_MUTE:"Video stummschalten / Ton einschalten"};var I=n(7),k=n.n(I),O={},L="20px";O.getFontSizePx=function(e,t){let n=function(e){if(e.attr("data-label"))return e.attr("data-label");if($(e).find(".text-container span").text())return $(e).find(".text-container span").text();return""}(e),i=e.attr("data-type"),a=e.attr("data-img-id");if(!n)return"10px";var r=e[0].getBoundingClientRect(),s=r.height*r.width/(a?2:1),o=Math.floor(Math.sqrt(.5*s/Math.max(15,n.length))),l=t?n.length:Math.max.apply(null,n.split(" ").map(e=>e.length)),c=1.4*r.width/l;return c=t?Math.min(c,30):c,(L=Math.min(o,c))>r.height/3&&(L=.3*r.height),1===n.length&&"ELEMENT_TYPE_NORMAL"===i&&(L*=2),L+"px"},O.adaptFontSize=function(e){for(var t=0;t\n \n `},D.getGridItem=function(e,t){switch(e.type){case K.ELEMENT_TYPE_COLLECT:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • `}(e);case K.ELEMENT_TYPE_PREDICTION:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    ${t}
    \n
    \n
  • `}(e);case K.ELEMENT_TYPE_YT_PLAYER:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • `}(e);default:return function(e,t){e=R(e);var n="",i="",a="font-size:"+O.getLastFontSize()+";",r="1%";let s=C.getTranslation(e.label,t);var o=s?"80%":"100%";let l=e.backgroundColor?`background: ${e.backgroundColor};`:"";e.image?(n=e.image.data,i=e.image.id):(a+="flex: 1 1 auto;",r="0");return`\n
  • \n
    \n
    \n
    ${s}
    \n ${function(e){let t=e.hidden?'':"",n=e.actions.filter(e=>e.modelName===x.getModelName()).length>0?'':"";return`${t+" "+n}`}(e)}\n
    \n
  • `}(e,t)}};var M={};function P(e){try{let t=parseInt(e.documentElement.width.baseVal.value)||500,n=parseInt(e.documentElement.height.baseVal.value)||500;return e.documentElement.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,t),e.documentElement.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,n),e}catch(t){return e}}function G(e){try{return"data:image/svg+xml;base64,"+btoa((new XMLSerializer).serializeToString(e))}catch(e){return null}}M.getBase64FromImg=function(e,t,n){t=t||150;let i=0===e.src.indexOf("data:")?e.src.substring(5,e.src.indexOf(";")):null;i=i||(e.src.indexOf(".png")>-1?"image/png":null),i=i||(e.src.indexOf(".svg")>-1?"image/svg+xml":null),i=i||"image/jpeg";var a=document.createElement("canvas"),r=1;e.width>t&&(r=t/e.width),a.width=e.width*r,a.height=e.height*r,a.getContext("2d").drawImage(e,0,0,a.width,a.height);try{return a.toDataURL(i,n)}catch(e){throw"image converting failed!"}},M.getBase64FromInput=function(e){return new Promise(t=>{if(e.files&&e.files[0]){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.readAsDataURL(e.files[0])}})},M.convertBase64=function(e,t,n){return new Promise((i,a)=>{if(!e)return i(null);if("image/svg+xml"===e.substring(5,e.indexOf(";")))return i(e);t=t||150;var r=document.createElement("img");r.onload=function(){try{i(M.getBase64FromImg(r,t,n))}catch(e){i(null)}},r.src=e})},M.base64SvgToBase64Png=function(e,t,n){return new Promise(i=>{let a=document.createElement("img");a.onload=function(){if(!n&&(0===a.naturalWidth||0===a.naturalHeight)){let n=P(function(e){let t=atob(e.substring(e.indexOf("base64,")+7));return t=t.substring(t.indexOf("{i(e)})}let r=M.getImageDimensionsFromImg(a).ratio||1,s=document.createElement("canvas");s.width=t,s.height=t/r,s.getContext("2d").drawImage(a,0,0,s.width,s.height);try{let e=s.toDataURL("image/png");i(e)}catch(e){i(null)}},a.src=e})},M.urlToBase64=function(e){return new Promise((t,n)=>{if(e.lastIndexOf(".svg")===e.length-4)$.get(e,null,(function(e){let n=P(e);t(G(n))})).fail((function(){t(null)}));else{let n=new Image;n.crossOrigin="anonymous",n.onload=function(){try{t(M.getBase64FromImg(n,1e3))}catch(e){t(null)}},n.onerror=function(){t(null)},n.src=e}})},M.getScreenshot=function(e){return n.e(0).then(n.t.bind(null,316,7)).then(t=>t.default(document.querySelector(e),{scale:.2,logging:!1,ignoreElements:e=>r.IS_FIREFOX&&-1!==e.style["background-image"].indexOf("image/svg")}).then(e=>Promise.resolve(e.toDataURL())))},M.getEmptyImage=function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},M.getImageDimensionsFromDataUrl=function(e){return e?new Promise(t=>{let n=new Image;n.onload=function(){t(M.getImageDimensionsFromImg(n))},n.src=e}):Promise.resolve({})},M.getImageDimensionsFromImg=function(e){if(!e)return{};let t=e.naturalWidth,n=e.naturalHeight;return 0!==t&&0!==n||(document.body.appendChild(e),t=e.clientWidth,n=e.clientHeight,document.body.removeChild(e)),{width:t,height:n,ratio:t/n}};class U extends(d({id:String,modelName:String,modelVersion:String,data:[String],author:[String],authorURL:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,U)),this.id=this.id||s.generateId(U.getIdPrefix())}getImageType(){if(!this.data)return null;let e=this.data.substring("data:image/".length,this.data.indexOf(";base64"));switch(e){case"png":return U.IMAGE_TYPES.PNG;case"jpeg":return U.IMAGE_TYPES.JPEG;case"svg":case"svg+xml":return U.IMAGE_TYPES.SVG;default:return log.warn("not recognized image type: "+e),null}}getDimensions(){return M.getImageDimensionsFromDataUrl(this.data)}static getModelName(){return"GridImage"}static getIdPrefix(){return"grid-image"}}U.IMAGE_TYPES={PNG:"PNG",JPEG:"JPEG",SVG:"SVG"},U.defaults({id:"",modelName:U.getModelName(),modelVersion:r.MODEL_VERSION,data:null,author:null,authorURL:null});class F extends(d({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0]})){constructor(e,t){super(e=s.setDefaults(e,t,F)),this.id=this.id||s.generateId("grid-action-speak")}static getModelName(){return"GridActionSpeak"}}F.defaults({id:"",modelName:F.getModelName(),modelVersion:r.MODEL_VERSION});class V extends(d({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0],speakText:[Object,String]})){constructor(e,t){super(e=s.setDefaults(e,t,V)),this.id=this.id||s.generateId("grid-action-speak-custom")}static getModelName(){return"GridActionSpeakCustom"}}V.defaults({id:"",modelName:V.getModelName(),modelVersion:r.MODEL_VERSION,speakText:{}});class B extends(d({id:String,modelName:String,modelVersion:String,areURL:[String],areModelGridFileName:[String],componentId:[String],dataPortId:[String],dataPortSendData:[String],eventPortId:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,B)),this.id=this.id||s.generateId("grid-action-are")}static getModelName(){return"GridActionARE"}}B.defaults({id:"",modelName:B.getModelName(),modelVersion:r.MODEL_VERSION});class j extends(d({id:String,modelName:String,modelVersion:String,dictionaryKey:[String,void 0,null],suggestOnChange:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,j)),this.id=this.id||s.generateId("grid-action-predict")}static getModelName(){return"GridActionPredict"}}j.defaults({id:"",modelName:j.getModelName(),modelVersion:r.MODEL_VERSION,dictionaryKey:null,suggestOnChange:!1});class Y extends(d({id:String,modelName:String,modelVersion:String,action:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,Y)),this.id=this.id||s.generateId("grid-action-collect-elm")}static getModelName(){return"GridActionCollectElement"}static getActions(){return[Y.COLLECT_ACTION_CLEAR,Y.COLLECT_ACTION_REMOVE_WORD,Y.COLLECT_ACTION_REMOVE_CHAR,Y.COLLECT_ACTION_COPY_CLIPBOARD,Y.COLLECT_ACTION_APPEND_CLIPBOARD,Y.COLLECT_ACTION_CLEAR_CLIPBOARD,Y.COLLECT_ACTION_TO_YOUTUBE]}}Y.COLLECT_ACTION_CLEAR="COLLECT_ACTION_CLEAR",Y.COLLECT_ACTION_REMOVE_WORD="COLLECT_ACTION_REMOVE_WORD",Y.COLLECT_ACTION_REMOVE_CHAR="COLLECT_ACTION_REMOVE_CHAR",Y.COLLECT_ACTION_COPY_CLIPBOARD="COLLECT_ACTION_COPY_CLIPBOARD",Y.COLLECT_ACTION_APPEND_CLIPBOARD="COLLECT_ACTION_APPEND_CLIPBOARD",Y.COLLECT_ACTION_CLEAR_CLIPBOARD="COLLECT_ACTION_CLEAR_CLIPBOARD",Y.COLLECT_ACTION_TO_YOUTUBE="COLLECT_ACTION_TO_YOUTUBE",Y.defaults({id:"",modelName:Y.getModelName(),modelVersion:r.MODEL_VERSION});class H extends(d({id:String,modelName:String,modelVersion:String,action:[String],radioId:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,H)),this.id=this.id||s.generateId("grid-action-webradio")}static getModelName(){return"GridActionWebradio"}static getActions(){return[H.WEBRADIO_ACTION_START,H.WEBRADIO_ACTION_TOGGLE,H.WEBRADIO_ACTION_STOP,H.WEBRADIO_ACTION_NEXT,H.WEBRADIO_ACTION_PREV,H.WEBRADIO_ACTION_VOLUP,H.WEBRADIO_ACTION_VOLDOWN]}}H.WEBRADIO_ACTION_START="WEBRADIO_ACTION_START",H.WEBRADIO_ACTION_TOGGLE="WEBRADIO_ACTION_TOGGLE",H.WEBRADIO_ACTION_STOP="WEBRADIO_ACTION_STOP",H.WEBRADIO_ACTION_NEXT="WEBRADIO_ACTION_NEXT",H.WEBRADIO_ACTION_PREV="WEBRADIO_ACTION_PREV",H.WEBRADIO_ACTION_VOLUP="WEBRADIO_ACTION_VOLUP",H.WEBRADIO_ACTION_VOLDOWN="WEBRADIO_ACTION_VOLDOWN",H.defaults({id:"",modelName:H.getModelName(),modelVersion:r.MODEL_VERSION,radioId:"",action:H.WEBRADIO_ACTION_START});class W extends(d({id:String,modelName:String,language:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,W)),this.id=this.id||s.generateId("grid-action-change-lang")}static getModelName(){return"GridActionChangeLang"}}W.defaults({id:"",modelName:W.getModelName()});class z extends(d({id:String,modelName:String,modelVersion:String,action:[String],playType:[String],data:[String],stepSeconds:[Number],stepVolume:[Number],showCC:[Boolean],playMuted:[Boolean],performAfterNav:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,z)),this.id=this.id||s.generateId(z.getModelName())}static getModelName(){return"GridActionYoutube"}static getActions(){return Object.keys(z.actions)}static getPlayTypes(){return Object.keys(z.playTypes)}}z.actions={YT_PLAY:"YT_PLAY",YT_PAUSE:"YT_PAUSE",YT_TOGGLE:"YT_TOGGLE",YT_RESTART:"YT_RESTART",YT_STOP:"YT_STOP",YT_STEP_FORWARD:"YT_STEP_FORWARD",YT_STEP_BACKWARD:"YT_STEP_BACKWARD",YT_NEXT_VIDEO:"YT_NEXT_VIDEO",YT_PREV_VIDEO:"YT_PREV_VIDEO",YT_ENTER_FULLSCREEN:"YT_ENTER_FULLSCREEN",YT_VOLUME_UP:"YT_VOLUME_UP",YT_VOLUME_DOWN:"YT_VOLUME_DOWN",YT_VOLUME_MUTE:"YT_VOLUME_MUTE"},z.playTypes={YT_PLAY_VIDEO:"YT_PLAY_VIDEO",YT_PLAY_PLAYLIST:"YT_PLAY_PLAYLIST",YT_PLAY_SEARCH:"YT_PLAY_SEARCH",YT_PLAY_CHANNEL:"YT_PLAY_CHANNEL",YT_PLAY_RELATED:"YT_PLAY_RELATED"},z.defaults({id:"",modelName:z.getModelName(),modelVersion:r.MODEL_VERSION,stepSeconds:10,stepVolume:20,playType:z.playTypes.YT_PLAY_VIDEO});class K extends(d({id:String,modelName:String,modelVersion:String,width:Number,height:Number,x:[Number],y:[Number],label:[Object,String,void 0],backgroundColor:[String],hidden:[Boolean],image:[U],actions:[Object],type:String})){constructor(e,t){let n={id:"",modelName:K.getModelName(),modelVersion:r.MODEL_VERSION,label:{},width:1,height:1,type:K.ELEMENT_TYPE_NORMAL};(e=s.setDefaults(e,t,K)||{}).actions=e.actions||[new F],super(Object.assign(n,e)),this.id=this.id||s.generateId("grid-element")}duplicate(){var e=new K(JSON.parse(JSON.stringify(this)));return e.id=s.generateId("grid-element"),e}toHTML(e){return D.getGridItem(this,e)}hasSetPosition(){return null!=this.x&&null!=this.x&&null!=this.y&&null!=this.y}getNavigateGridId(){let e=this.actions.filter(e=>e.modelName===x.getModelName())[0];return e?e.toGridId:null}static getActionTypes(){return[F,x,V,j,Y,B,H,z,W]}static getActionInstance(e){var t=this.getActionTypes().filter(t=>t.getModelName()==e)[0];if(t)return new t;log.warn("action type not found: "+e)}static getModelName(){return"GridElement"}}K.ELEMENT_TYPE_NORMAL="ELEMENT_TYPE_NORMAL",K.ELEMENT_TYPE_COLLECT="ELEMENT_TYPE_COLLECT",K.ELEMENT_TYPE_PREDICTION="ELEMENT_TYPE_PREDICTION",K.ELEMENT_TYPE_YT_PLAYER="ELEMENT_TYPE_YT_PLAYER";class J extends(d({id:String,modelName:String,modelVersion:String,fileName:[String],dataBase64:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,J)),this.id=this.id||s.generateId(J.getModelName().toLowerCase())}static getModelName(){return"AdditionalGridFile"}}J.defaults({id:"",modelName:J.getModelName(),modelVersion:r.MODEL_VERSION});class X extends(d({id:String,modelName:String,modelVersion:String,radioId:[String],radioUUID:[String],radioName:[String],radioUrl:[String],faviconUrl:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,X)),this.id=this.id||s.generateId("webradio")}static getModelName(){return"Webradio"}}X.defaults({id:"",modelName:X.getModelName(),modelVersion:r.MODEL_VERSION});let q={};q.regenerateIDs=function(e){let t={},n=[];return e.forEach(e=>{let n=s.generateId("grid-data");t[e.id]=n,e._id=e.id=n,e._rev=null}),e.forEach(e=>{let i=JSON.stringify(e);Object.keys(t).forEach(e=>{i=i.replace(new RegExp(e,"g"),t[e])}),n.push(JSON.parse(i))}),{grids:n,idMapping:t}},q.sortGridElements=function(e){return e?e.sort((e,t)=>e.y!==t.y?e.y-t.y:e.x-t.x):e},q.generateGlobalGrid=function(e,t){let n=new K({width:1,height:1,x:0,y:0,label:C.getTranslationObject("Home // Start",t),image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMjgwLjM3IDE0OC4yNkw5NiAzMDAuMTFWNDY0YTE2IDE2IDAgMCAwIDE2IDE2bDExMi4wNi0uMjlhMTYgMTYgMCAwIDAgMTUuOTItMTZWMzY4YTE2IDE2IDAgMCAxIDE2LTE2aDY0YTE2IDE2IDAgMCAxIDE2IDE2djk1LjY0YTE2IDE2IDAgMCAwIDE2IDE2LjA1TDQ2NCA0ODBhMTYgMTYgMCAwIDAgMTYtMTZWMzAwTDI5NS42NyAxNDguMjZhMTIuMTkgMTIuMTkgMCAwIDAtMTUuMyAwek01NzEuNiAyNTEuNDdMNDg4IDE4Mi41NlY0NC4wNWExMiAxMiAwIDAgMC0xMi0xMmgtNTZhMTIgMTIgMCAwIDAtMTIgMTJ2NzIuNjFMMzE4LjQ3IDQzYTQ4IDQ4IDAgMCAwLTYxIDBMNC4zNCAyNTEuNDdhMTIgMTIgMCAwIDAtMS42IDE2LjlsMjUuNSAzMUExMiAxMiAwIDAgMCA0NS4xNSAzMDFsMjM1LjIyLTE5My43NGExMi4xOSAxMi4xOSAwIDAgMSAxNS4zIDBMNTMwLjkgMzAxYTEyIDEyIDAgMCAwIDE2LjktMS42bDI1LjUtMzFhMTIgMTIgMCAwIDAtMS43LTE2LjkzeiIvPjwvc3ZnPg"}),actions:[new x({toGridId:e})]}),i=new K({width:1,height:1,x:1,y:0,label:C.getTranslationObject("Back // Zurück",t),image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDUwNEMxMTkgNTA0IDggMzkzIDggMjU2UzExOSA4IDI1NiA4czI0OCAxMTEgMjQ4IDI0OC0xMTEgMjQ4LTI0OCAyNDh6bTExNi0yOTJIMjU2di03MC45YzAtMTAuNy0xMy0xNi4xLTIwLjUtOC41TDEyMS4yIDI0Ny41Yy00LjcgNC43LTQuNyAxMi4yIDAgMTYuOWwxMTQuMyAxMTQuOWM3LjYgNy42IDIwLjUgMi4yIDIwLjUtOC41VjMwMGgxMTZjNi42IDAgMTItNS40IDEyLTEydi02NGMwLTYuNi01LjQtMTItMTItMTJ6Ii8+PC9zdmc+"}),actions:[new x({toLastGrid:!0})]}),a=new F;t&&(a.speakLanguage=t);let r=new K({width:Math.max(4,-4),height:1,x:2,y:0,type:K.ELEMENT_TYPE_COLLECT,actions:[a]}),s=new K({label:C.getTranslationObject("Delete Word // Wort löschen",t),width:1,height:1,x:2+r.width,y:0,image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48cGF0aCBkPSJNNTc2IDY0SDIwNS4yNkE2My45NyA2My45NyAwIDAgMCAxNjAgODIuNzVMOS4zNyAyMzMuMzdjLTEyLjUgMTIuNS0xMi41IDMyLjc2IDAgNDUuMjVMMTYwIDQyOS4yNWMxMiAxMiAyOC4yOCAxOC43NSA0NS4yNSAxOC43NUg1NzZjMzUuMzUgMCA2NC0yOC42NSA2NC02NFYxMjhjMC0zNS4zNS0yOC42NS02NC02NC02NHptLTg0LjY5IDI1NC4wNmM2LjI1IDYuMjUgNi4yNSAxNi4zOCAwIDIyLjYzbC0yMi42MiAyMi42MmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMEwzODQgMzAxLjI1bC02Mi4wNiA2Mi4wNmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMGwtMjIuNjItMjIuNjJjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNMMzM4Ljc1IDI1NmwtNjIuMDYtNjIuMDZjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNsMjIuNjItMjIuNjJjNi4yNS02LjI1IDE2LjM4LTYuMjUgMjIuNjMgMEwzODQgMjEwLjc1bDYyLjA2LTYyLjA2YzYuMjUtNi4yNSAxNi4zOC02LjI1IDIyLjYzIDBsMjIuNjIgMjIuNjJjNi4yNSA2LjI1IDYuMjUgMTYuMzggMCAyMi42M0w0MjkuMjUgMjU2bDYyLjA2IDYyLjA2eiIvPjwvc3ZnPg"}),actions:[new Y({action:Y.COLLECT_ACTION_REMOVE_WORD})]}),o=new K({label:C.getTranslationObject("Clear // Leeren",t),width:1,height:1,x:3+r.width,y:0,image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDhDMTE5IDggOCAxMTkgOCAyNTZzMTExIDI0OCAyNDggMjQ4IDI0OC0xMTEgMjQ4LTI0OFMzOTMgOCAyNTYgOHptMTIxLjYgMzEzLjFjNC43IDQuNyA0LjcgMTIuMyAwIDE3TDMzOCAzNzcuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDI1NiAzMTJsLTY1LjEgNjUuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDEzNC40IDMzOGMtNC43LTQuNy00LjctMTIuMyAwLTE3bDY1LjYtNjUtNjUuNi02NS4xYy00LjctNC43LTQuNy0xMi4zIDAtMTdsMzkuNi0zOS42YzQuNy00LjcgMTIuMy00LjcgMTcgMGw2NSA2NS43IDY1LjEtNjUuNmM0LjctNC43IDEyLjMtNC43IDE3IDBsMzkuNiAzOS42YzQuNyA0LjcgNC43IDEyLjMgMCAxN0wzMTIgMjU2bDY1LjYgNjUuMXoiLz48L3N2Zz4"}),actions:[new Y({action:Y.COLLECT_ACTION_CLEAR})]});return new de({label:C.getTranslationObject("Global Grid",t),gridElements:[n,i,r,s,o],rowCount:3})},q.getOffset=function(e){let t=JSON.parse(JSON.stringify(e.gridElements)),n=[],i=1e5;for(let e=0;e<10;e++)for(let a=0;a<10&&!(e+a>=i);a++){let r=t.reduce((t,n)=>t&&(a>=n.y+n.height||e>=n.x+n.width),!0);r&&(i=e+a),n.push({x:e,y:a,sum:e+a,valid:r})}let a=n.filter(e=>i===e.sum&&e.valid)[0];return a?{x:a.x,y:a.y}:{x:e.getWidth(),y:e.getHeight()}},q.getFreeCoordinates=function(e){let t=new de({},e),n={};for(let e=0;e{for(let t=e.x;t({x:n[e].x,y:n[e].y}))},q.getFillElements=function(e){return q.getFreeCoordinates(e).map(e=>new K({x:e.x,y:e.y}))},q.updateOrAddGridElement=function(e,t){t=JSON.parse(JSON.stringify(t));let n=(e=JSON.parse(JSON.stringify(e))).gridElements.map(e=>e.id).indexOf(t.id);return-1!==n?e.gridElements[n]=t:e.gridElements.push(t),e},q.getGraphList=function(e,t){e=e.filter(e=>e.id!==t);let n=[],i={};return e.forEach(t=>{let a=e.filter(e=>{return n=e.gridElements,i=t.id,function(e,t){return e.filter(e=>e.actions.filter(e=>e.modelName===x.getModelName()&&e.toGridId===t).length>0)}(n,i).length>0;var n,i}),r=e.filter(e=>-1!==function(e){return e.gridElements.reduce((e,t)=>e.concat(t.actions.filter(e=>e.modelName===x.getModelName())),[]).map(e=>e.toGridId)}(t).indexOf(e.id)),s={grid:t,parents:a,children:r,navCount:a.length+r.length};n.push(s),i[t.id]=s}),n.sort((e,t)=>t.navCount-e.navCount),n.forEach(e=>{e.parents=e.parents.map(e=>i[e.id]),e.children=e.children.map(e=>i[e.id]),e.allRelatives=e.children.concat(e.parents.filter(t=>-1===e.children.indexOf(t)))}),n},q.getAllChildrenRecursive=function(e,t,n){return function e(t,n,i){let a=t.filter(e=>e.grid.id===n)[0];i=i||[];let r=[];return a.children.forEach(e=>{-1===i.indexOf(e.grid)&&(i.push(e.grid),r.push(e.grid.id))}),r.forEach(n=>{i=e(t,n,i)}),i}(e,t,n).filter(e=>e.id!==t)};class Z extends(d({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,Z)),this.id=this.id||s.generateId(Z.getModelName().toLowerCase())}static getModelName(){return"EncryptedObject"}}Z.defaults({modelVersion:r.MODEL_VERSION});let Q={},ee=["thumbnail"];Q.removeLongPropertyValues=function(e,t,n){if(!e)return e;n=void 0===n?"_removed_":n,t=t||500;let i=JSON.parse(JSON.stringify(e));return Object.keys(i).forEach(e=>{-1===ee.indexOf(e)&&(i[e]=function e(t,n,i){if(!t)return t;if("string"==typeof t||t instanceof String){if(t.length>n)return i}else if(t instanceof Array)for(let a=0;a{-1===ee.indexOf(a)&&(t[a]=e(t[a],n,i))});return t}(i[e],t,n))}),i},Q.getDefaultRemovedPlaceholder=function(){return"_removed_"};let te=window.sjcl,ne=window.log;function ie(){let e=this,t={},n={};function i(e,t){return e?new e(t):t}e.set=function(e,i,a){let r=i instanceof Array&&i.length>1?i[0]:i;"string"==typeof e?i?a&&"function"!=typeof a?ne.warn("object type has to be a constructor function or empty, aborting."):r&&r.isShortVersion?ne.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],a&&(n[e]=a)):ne.warn("cache-values has to be set, aborting."):ne.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"!=typeof e)return void ne.warn("cache-key has to be a string, aborting.");if(!t[e])return null;let a=JSON.parse(t[e]),r=n[e];return a instanceof Array?a.map(e=>i(r,e)):i(r,a)},e.getAsPromise=function(t){let n=e.get(t);return new Promise(e=>{setTimeout(()=>{e(n)},1)})},e.has=function(e){return"string"!=typeof e?(ne.warn("cache-key has to be a string, aborting."),!1):!!t[e]},e.clear=function(e){e&&(delete t[e],delete n[e])},e.clearAll=function(){t={},n={}}}let ae={},re=null,se=null,oe=!1,le=new ie;function ce(){if(!se||!re){let e="using encryptionService uninitialized is not possible, aborting...";throw ne.error(e),e}}ae.encryptObject=function(e,t){if(ce(),!e)return e;t=t||{};let n=new Z({id:e.id,modelName:e.modelName});n._id=e.id,e._rev&&(n._rev=e._rev);let i=JSON.stringify(e),a=JSON.stringify(Q.removeLongPropertyValues(e)),r=i!==a;return n.encryptedDataBase64=ae.encryptString(i,t.encryptionKey),n.encryptedDataBase64Short=r?ae.encryptString(a,t.encryptionKey):null,n},ae.decryptObjects=function(e,t){if(ce(),!e)return e;let n=(t=t||{}).onlyShortVersion,i=[];return(e=e instanceof Array?e:[e]).forEach(e=>{try{let a=null,r=null;if(n){let n=e.encryptedDataBase64Short||e.encryptedDataBase64;a=ae.decryptString(n,t.encryptionKey),r=JSON.parse(a),r.isShortVersion=!0}else a=ae.decryptString(e.encryptedDataBase64,t.encryptionKey),r=JSON.parse(a);r._id=e._id,r._rev=e._rev,i.push(r)}catch(t){throw ne.error("error decrypting object: "+e.modelName+", id: "+e.id),ne.error(t),t}}),i.length>1?i:i[0]},ae.encryptString=function(e,t){t||ce();let n=null;return n=(t=t||se)&&!oe?te.encrypt(t,e,{iter:1e3}):e,n},ae.decryptString=function(e,t){if(t||ce(),le.has(e))return ne.debug("using decryption cache..."),le.get(e);t=t||se;let n=null;(new Date).getTime();if(t&&!oe)n=te.decrypt(t,e);else try{n=e;let i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=te.decrypt(t,e))}catch(i){n=te.decrypt(t,e)}return le.set(e,n),n},ae.getStringHash=function(e){let t=te.hash.sha256.hash(e);return te.codec.hex.fromBits(t)},ae.getUserPasswordHash=function(e){return ae.getStringHash("STATIC_USER_PW_SALT"+e)},ae.setEncryptionProperties=function(e,t,n){e=e||"",re=t,se=ae.getStringHash(""+re+e),oe=n,le.clearAll(),ne.debug("new encryption key is: "+se)},ae.resetEncryptionProperties=function(){ne.debug("reset encryption properties..."),re=null,se=null,oe=!1};class de extends(d({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:d.Array(K),additionalFiles:[d.Array(J)],webRadios:[d.Array(X)],thumbnail:[Object]})){constructor(e,t){(e=s.setDefaults(e,t,de))&&(e.id=e.id?e.id:s.generateId(de.getIdPrefix())),super(e),this.minColumnCount=e.minColumnCount||this.getWidth()||g.getLastGridDimensions().minColumnCount||4,this.rowCount=e.rowCount||this.getHeight()||g.getLastGridDimensions().rowCount||3,this.id=this.id||s.generateId("grid-data")}hasSetPositions(){return this.gridElements.every(e=>e.hasSetPosition())}getHash(){let e="";return this.gridElements.forEach(t=>{e+=JSON.stringify(t.label)+t.x+t.y,t.image&&(e+=t.image.data.substring(t.image.data.length-30))}),ae.getStringHash(e)}hasOutdatedThumbnail(){return!this.thumbnail||!this.thumbnail.data||this.thumbnail.hash!==this.getHash()}getWidth(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map(e=>e.x+e.width))}getHeight(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map(e=>e.y+e.height))}getWidthWithBounds(){return Math.max(this.getWidth(),this.minColumnCount)}getHeightWithBounds(){return Math.max(this.getHeight(),this.rowCount)}isFull(){if(0===this.gridElements.length)return!1;return this.getWidthWithBounds()*this.getHeightWithBounds()===this.gridElements.reduce((e,t)=>e+t.width*t.height,0)}getNewXYPos(e){let t=this.gridElements.reduce((e,t)=>{let n=t.x+t.width;return 0===t.y&&n>e&&(e=n),e},0);if(e)return{x:t,y:0};let n=q.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}getNewGridElement(e){e=e||{};let t=this.getNewXYPos();return e=Object.assign(e,{x:t.x,y:t.y}),new K(e)}isEqual(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}getNextElementId(e,t){if(!this.gridElements||0===this.gridElements.length)return e;if(1===this.gridElements.length)return this.gridElements[0].id;var n=JSON.parse(JSON.stringify(this.gridElements)).sort((e,t)=>e.y!==t.y?e.y-t.y:e.x-t.x),i=(n=n.filter(e=>e.type===K.ELEMENT_TYPE_NORMAL)).map(e=>e.id),a=i.indexOf(e);if(-1===a)return i[0];var r=a+(t?-1:1);return i[r=(r=r>i.length-1?0:r)<0?i.length-1:r]}getPreviousElementId(e){return this.getNextElementId(e,!0)}getAdditionalFile(e){var t=this.additionalFiles.filter(t=>t.fileName===e);return t.length>0?t[0]:null}getAREModel(){let e=this.getAREFirstAction();if(e){return this.additionalFiles.filter(t=>t.fileName===e.areModelGridFileName)[0]}return null}hasAREModel(){return!!this.getAREModel()}getAREFirstAction(){let e=[];return this.gridElements.forEach(t=>{e=e.concat(t.actions)}),e.filter(e=>e.modelName===B.getModelName())[0]}getAREURL(){let e=this.getAREFirstAction();return e?e.areURL:null}clone(){let e=new de(this);return delete e._id,delete e._rev,e.id=s.generateId("grid-data"),Object.keys(this.label).forEach(t=>{e.label[t]=this.label[t]+" (Copy)"}),e}static getModelName(){return"GridData"}static getIdPrefix(){return"grid-data"}}de.defaults({id:"",modelName:de.getModelName(),modelVersion:r.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:C.getBrowserLang()});let ue={params:{PARAM_DEMO_MODE:"demo",PARAM_SCANNING:"scanning",PARAM_HUFFMAN:"huffman",PARAM_DIR_INPUT:"direction",PARAM_RESET_DATABASE:"reset",PARAM_DEFAULT_GRIDSET:"default"}},fe=!1,pe=!1;function he(e){return new URLSearchParams(window.location.search).has(e)}function me(e){return new URLSearchParams(window.location.search).get(e)}function ve(e){return"false"===me(e)}ue.isDemoMode=function(){return fe=fe||he(ue.params.PARAM_DEMO_MODE),function(e){if(!he(e))return;let t=new URLSearchParams(window.location.search);if(t.delete(e),history.replaceState){let e=t.toString().length>0?"?"+t.toString():"",n=window.location.protocol+"//"+window.location.host+window.location.pathname+e+window.location.hash;history.replaceState(null,"",n)}}(ue.params.PARAM_DEMO_MODE),fe},ue.isScanningEnabled=function(){return he(ue.params.PARAM_SCANNING)&&!ve(ue.params.PARAM_SCANNING)},ue.isDirectionEnabled=function(){return he(ue.params.PARAM_DIR_INPUT)&&!ve(ue.params.PARAM_DIR_INPUT)},ue.isHuffmanEnabled=function(){return he(ue.params.PARAM_HUFFMAN)&&!ve(ue.params.PARAM_HUFFMAN)},ue.shouldResetDatabase=function(){let e=!pe&&(ue.isDemoMode()||"true"===me(ue.params.PARAM_RESET_DATABASE));return pe=!0,e},ue.getDefaultGridsetName=function(){return me(ue.params.PARAM_DEFAULT_GRIDSET)};var ge=n(8),_e=n.n(ge);let be={};function Ee(e,t,n){if(!e)return e;let i=e instanceof Array;e=i?e:[e];for(let i=0;i{e[i]=n(e[i],t)})}return i?e:e[0]}function ye(e){let t=we(e);return t.push(ae.encryptObject),t}function Ce(e){let t=we(e);return e.major&&t.unshift(ae.decryptObjects),t}function we(e){if(e.major===s.getLatestModelVersion().major)return[];let t=[];switch(e.major){case 1:t.push((function(e,t){if(e.modelName===h.getModelName()){ne.info("converting model version from V1 to V2: "+e.modelName);let t=e.inputConfig;t.dirInputs=p.DEFAULT_DIR_INPUTS,t.huffInputs=p.DEFAULT_HUFF_INPUTS,t.scanInputs=p.DEFAULT_SCAN_INPUTS,t.scanKey&&(t.scanInputs=[],t.scanInputs.push(new u({label:p.SELECT,keyCode:t.scanKey,keyName:t.scanKeyName})),t.scanEnabled=t.scanAutostart,t.scanAuto=t.scanAutostart,delete t.scanKey,delete t.scanKeyName,delete t.scanAutostart,delete t.areEvents,delete t.areURL)}return e.modelVersion=s.getModelVersionString(),e}));case 2:t.push((function(e,t){if(e.modelName===de.getModelName()){if(ne.debug("converting model version from V2 to V3: "+e.modelName),e.locale=e.locale||C.getBrowserLang(),"string"==typeof e.label){let t=e.label;e.label={},e.label[e.locale]=t}else e.label={};e.gridElements.forEach(t=>{if("string"==typeof t.label){let n=t.label;t.label={},t.label[e.locale]=n}else t.label={};t.actions.forEach(t=>{if(t.modelName===V.getModelName()){let n=t.speakText;t.speakText={},t.speakText[e.locale]=n,t.speakLanguage=void 0}else t.modelName===F.getModelName()&&(t.speakLanguage=void 0)})})}return e.modelVersion=s.getModelVersionString(),e}))}return t}function Te(e,t,n,i,s){let o=this,l=null,c=null,d=null,u=!0,f=r.DB_SYNC_STATE_FAIL,p=!1,h=null,m={};function v(e,t){let n=new _e.a(e,{auto_compaction:!0});return n.info().then((function(t){return log.debug(e+" info:"),log.debug(t),Promise.resolve(n)}))}function _(){return c&&l?new Promise(t=>{let n=(new Date).getTime();function a(){g.markSyncedDatabase(e),d=l.sync(c,{live:!0,retry:!1}).on("paused",(function(e){log.debug("sync paused"),log.debug(e),b(r.DB_SYNC_STATE_SYNCED)})).on("active",(function(e){log.debug("sync active"),log.debug(e),b(r.DB_SYNC_STATE_SYNCINC)})).on("change",(function(e){y(e)})).on("error",(function(e){log.info("couchdb error"),log.info(e),E()}))}o.wasCurrentDatabaseSynced()||i?(a(),t()):(log.debug("database wasn't synced before, so temporarily use remote db until sync is done..."),u=!1,d=l.sync(c,{live:!1,retry:!1}).on("active",(function(e){b(r.DB_SYNC_STATE_SYNCINC)})).on("paused",(function(){b(r.DB_SYNC_STATE_SYNCED)})).on("error",(function(e){log.info("couchdb error"),log.error(e),E()})).on("complete",(function(e){log.debug("sync complete event"),log.debug(e);let t=e&&e.pull?e.pull.status:e&&e.push?e.push.status:null;"cancelled"===t?log.debug("sync cancelled!"):"complete"===t&&(log.info("couchdb sync complete! setting up live sync and using local db now..."),log.debug("initial sync took: "+((new Date).getTime()-n)+"ms"),u=!0,a())})),t())}):(log.error("trying to setupSync() but remoteDb or db is not specified! Aborting..."),Promise.reject())}function b(e){if(!p)try{f=e,a()(document).trigger(r.EVENT_DB_SYNC_STATE_CHANGE,e)}catch(e){log.error(e)}}function E(){p||(o.cancelSync(),c&&(c.close(),c=null),a()(document).trigger(r.EVENT_DB_CONNECTION_LOST),b(r.DB_SYNC_STATE_FAIL))}function y(e){if(s)try{log.debug(e);let t=[],n=[];C(e.change?e.change.docs:null),e.direction&&"pull"===e.direction?(e.change&&e.change.docs&&e.change.docs.length>0&&(n=e.change.docs.filter(e=>!!T(e)&&!function(e){return m[T(e)]&&w(e)T(e))),e.change.docs.length>0&&0===t.length?log.info("ignoring pull because of outdated revision"):log.info("pouchdb pulled updates...")):e.direction?log.info("pouchdb pushed updates..."):!e.direction&&e.id&&(log.info("change from remote database..."),t.push(e.id),e.doc&&n.push(e.doc)),!p&&(t.length>0||n.length>0)&&s(t,n)}catch(e){log.error(e)}}function C(e){e&&e.length>0&&e.forEach(e=>{let t=T(e),n=w(e);(!m[t]||m[t](l=e,Promise.resolve())),i.push(h)),t&&i.push(v(t,!0).then(e=>(c=e,n?(c.changes({since:"now",live:!0,include_docs:!0}).on("change",(function(e){y(e)})),Promise.resolve()):h.then(()=>_()))));let s=Promise.all(i);return s.then(()=>{a()(document).trigger(r.EVENT_DB_INITIALIZED)}),s},o.put=function(e){let t=o.getDbToUse().put(e);return t.then(e=>{C([e])}),t},o.bulkDocs=function(e){let t=o.getDbToUse().bulkDocs(e);return t.then(e=>{C([e])}),t},o.startSync=function(e){if(!c&&h)return h.then(()=>v(e,!0)).then(e=>(c=e,_()));log.warn("startSync() is not possible if remote database is already open, or local database not opened")},o.getDbToUse=function(){let e=u&&!n?l:c;if(!e||p)throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase().";return e},o.close=function(){if(p)return Promise.resolve();let e=[];p=!0,ae.resetEncryptionProperties(),o.cancelSync(),l&&e.push(l.close()),c&&e.push(c.close()),l=null,c=null;let t=Promise.all(e);return t.then(()=>{a()(document).trigger(r.EVENT_DB_CLOSED)}),t},o.destroyDb=function(e){return o.close().then(()=>new _e.a(e).destroy())},o.getOpenedDatabaseName=function(){return e},o.wasCurrentDatabaseSynced=function(){return g.isDatabaseSynced(e)},o.isUsingLocalDb=function(){return u},o.getSyncState=function(){return f},o.isSyncEnabled=function(){return!!d},o.cancelSync=function(){d&&(log.debug("canceling sync ..."),b(r.DB_SYNC_STATE_STOPPED),d.cancel(),d=null)},o.resumeSync=function(){if(!n&&!d&&c)return log.debug("resuming sync..."),_()}}be.convertLiveToDatabaseObjects=function(e,t){ne.trace("conversion to database - before filters:",e);let n=Ee(e,t,ye);return ne.trace("conversion to database - after filters:",n),n},be.convertDatabaseToLiveObjects=function(e,t){ne.trace("conversion to live - before filters:",e);let n=Ee(e,t,Ce);return ne.trace("conversion to live - after filters:",n),n},be.updateDataModel=function(e){return Ee(e,null,we)};let Ae={},Ne=null,Se=new ie,Ie=null;function ke(){return Oe().getDbToUse()}function Oe(){if(!Ne||!Ne.getDbToUse())throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase() or pouchDbService.createDatabase().";return Ne}function Le(){Ie&&(clearTimeout(Ie),Ie=null),Oe().isUsingLocalDb()&&Oe().getSyncState()!==r.DB_SYNC_STATE_SYNCINC||Oe().cancelSync()}function xe(){let e=Oe().wasCurrentDatabaseSynced()?0:2e3;Ie=setTimeout(()=>{Oe().resumeSync()},e)}function De(e,t){t.forEach(e=>{e._deleted?Se.clearAll():(Se.set(e.id,e),Se.clear(h.getIdPrefix()),Se.clear(de.getIdPrefix()))}),e=(t=t.filter(e=>!e._deleted)).map(e=>e.id);let n=t.map(e=>be.convertDatabaseToLiveObjects(e)),i=Ae.getOpenedDatabaseName(),s=g.getUserMajorModelVersion(i);n.forEach(e=>{g.setUserModelVersion(i,e.modelVersion)}),s===g.getUserMajorModelVersion(i)?a()(document).trigger(r.EVENT_DB_PULL_UPDATED,[e,n]):a()(document).trigger(r.EVENT_DB_DATAMODEL_UPDATE,[e,n])}Ae.initDatabase=function(e,t,n){return Ne&&Ne.getOpenedDatabaseName()===e&&t?Ne.startSync(t):(Se.clearAll(),Ae.closeCurrentDatabase(),Ne=new Te(e,t,n,!1,De),Ne.init())},Ae.createDatabase=function(e,t,n){return Se.clearAll(),Ae.closeCurrentDatabase(),Ne=new Te(e,t,n,!0,De),Ne.init()},Ae.all=function(e,t){if(t&&Se.has(t))return log.debug("using cache for retrieving id: "+t),Se.getAsPromise(t);if(!t&&e&&Se.has(e))return log.debug("using cache for retrieving bulk with id-prefix: "+e),Se.getAsPromise(e);let n=ke();return Le(),new Promise((i,a)=>{let r={include_docs:!0,attachments:!1};t?r.key=t:e&&(r.startkey=e,r.endkey=e+"￿"),n.allDocs(r).then((function(n){let a=function(e){let t=[];e.docs&&e.docs.length>0?e.docs.forEach(e=>{t.push(e)}):e.rows&&e.rows.length>0&&e.rows.forEach(e=>{e.doc&&e.doc.modelName&&t.push(e.doc)});return 0===t.length?null:1===t.length?t[0]:t}(n);t&&a?Se.set(t,a):!t&&e&&a&&Se.set(e,a),i(a)})).catch((function(e){log.error(e),a()})).finally(()=>{xe()})})},Ae.save=function(e,t){return log.debug("saving "+e+"..."),Le(),t.id&&(Se.clear(t.id,t),Se.clear(e)),new Promise((n,i)=>{if(!(t&&t._id&&e&&t.encryptedDataBase64))return log.error('did not specify needed parameter "idPrefix" or "_id" or data is not encrypted! aborting.'),i();Ne.put(t).then(i=>{t._rev=i.rev,Se.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()}).catch((function(e){t.id&&Se.clear(t.id),"conflict"===e.error?(log.warn("conflict with remote version updating document with id: "+t.id),n()):(log.error(e),i(e)),i()})).finally(()=>{xe()})})},Ae.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();Le(),Se.clearAll();let t=Ne.bulkDocs(e);return t.finally(()=>{xe()}),t},Ae.remove=function(e){let t=ke();return Ae.all(null,e).then(e=>(Se.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)))},Ae.resetDatabase=function(e){return Ae.isUsingLocalDb()&&Ae.getOpenedDatabaseName()===r.LOCAL_DEMO_USERNAME?(Se.clearAll(),new Promise(t=>{Ne.destroyDb(e).then((function(){Ne=null,Ae.initDatabase(e).then(()=>t())})).catch((function(e){log.error("error destroying database: "+e)}))})):Promise.reject("do not destroy!")},Ae.deleteDatabase=function(e){if(Ae.getOpenedDatabaseName()===e&&!Ae.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();Se.clearAll();let t=[];return Ae.getOpenedDatabaseName()===e&&t.push(Ae.closeCurrentDatabase()),Promise.all(t).then(()=>new _e.a(e).destroy())},Ae.closeCurrentDatabase=function(){if(!Ne)return Promise.resolve();Le();let e=Ne.close();return Ne=null,e},Ae.getOpenedDatabaseName=function(){return Ne?Ne.getOpenedDatabaseName():null},Ae.isUsingLocalDb=function(){return Ne?Ne.isUsingLocalDb():null},Ae.getSyncState=function(){return Ne?Ne.getSyncState():null},Ae.isSyncEnabled=function(){return Ne?Ne.isSyncEnabled():null};class Re extends(d({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,Re)),this.id=this.id||s.generateId(Re.getIdPrefix())}clone(){let e=new Re(this);return delete e._id,delete e._rev,e.id=s.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}static getModelName(){return"Dictionary"}static getIdPrefix(){return"dictionary"}}Re.defaults({id:"",modelName:Re.getModelName(),modelVersion:r.MODEL_VERSION,data:JSON.stringify({})});let Me={};Me.createItem=function(e,t){if(!e)throw'parameter "word" must be specified.';let n=parseInt(t),i={w:e,f:0,t:{}};var a;return(a=n)==parseInt(a)&&(i.r=n),i};var Pe=Me;var Ge=function(){let e=this,t={},n=null,i=null;function a(e){if(!e)return[];let n=[];return t[e]&&n.push(t[e]),t[e.toLowerCase()]&&-1===n.indexOf(t[e.toLowerCase()])&&n.push(t[e.toLowerCase()]),t[e.toUpperCase()]&&-1===n.indexOf(t[e.toUpperCase()])&&n.push(t[e.toUpperCase()]),t[s(e)]&&-1===n.indexOf(t[s(e)])&&n.push(t[s(e)]),n}function r(e){let t=a(e);return t.length>0?t[0]:null}function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}e.load=function(e){let n=JSON.parse(e);Object.keys(n).forEach(e=>{n[e].w=e}),t=n},e.toJSON=function(){let e=JSON.parse(JSON.stringify(t));return Object.keys(e).forEach(t=>{delete e[t].w}),JSON.stringify(e)},e.addWord=function(e,n){e&&(t[e]||(t[e]=Pe.createItem(e,n)))},e.addWords=function(t){if(!(t instanceof Array)||0===t.length)throw"words to add must be an array with at least one element.";t.forEach(t=>{e.addWord(t)})},e.deleteWord=function(e,n){Object.keys(t).forEach(i=>{if(n?e.toUpperCase()===i.toUpperCase():e===i)delete t[i];else{let a=t[i];Object.keys(a.t).forEach(t=>{(n?e.toUpperCase()===t.toUpperCase():e===t)&&delete a.t[t]})}})},e.contains=function(e,n){return n?!!t[e]:!!r(e)},e.predictCompleteWord=function(a,r){a=a||"",r=r||{};let s=[];if(Object.keys(t).forEach(e=>{0===e.toLowerCase().indexOf(a.toLowerCase())&&s.push(t[e])}),0===s.length&&a.length>1){let t=null;return t=n&&i&&0===a.indexOf(n)?i:e.predictCompleteWord(a.substring(0,a.length-1),r),t.forEach(e=>{e.fuzzyMatch=!0}),t}return n=a,i=s.map(e=>({word:e.w,frequency:e.f,rank:e.r})),i},e.predictNextWord=function(e,t){let n=a(e),i=[];return n.forEach(e=>{Object.keys(e.t).forEach(t=>{i.push({word:t,frequency:e.t[t]})})}),i},e.learn=function(t,n,i){if(!t||!e.contains(t)&&!i)return;i&&t&&!e.contains(t)&&e.addWord(t),i&&n&&!e.contains(n)&&e.addWord(n);let a=r(n),s=r(t);s.f++,a&&a.t&&(a.t[s.w]?a.t[s.w]++:a.t[s.w]=1)},e.getWords=function(){return Object.keys(t)}};function Ue(){this.DEFAULT_DICTIONARY_KEY="DEFAULT_DICTIONARY_KEY";let e=this,t={},n=null;function i(n,i,a){let r=[];(i=i||{}).maxPredictions=i.maxPredictions||i.maxPredicitons||10,i.applyToInput=i.applyToInput||!1,Object.keys(t).forEach(e=>{let s=t[e];if(!s.disabled){let e="PREDICT_METHOD_NEXT_WORD"===a?s.predictNextWord:"PREDICT_METHOD_COMPLETE_WORD"===a?s.predictCompleteWord:null;e=e||(Fe(n)?s.predictNextWord:s.predictCompleteWord),r=r.concat(e($e(n),i))}}),r.sort((e,t)=>e.fuzzyMatch!==t.fuzzyMatch?e.fuzzyMatch?1:-1:e.frequency!==t.frequency?e.frequency{e.loadDictionary(t.json,t.key)})},this.dictionaryToJSON=function(n){n=n||e.DEFAULT_DICTIONARY_KEY;let i=t[n];return i?i.toJSON():null},this.dictionariesToJSON=function(){let e=[];return Object.keys(t).forEach(n=>{e.push({key:n,json:t[n].toJSON()})}),JSON.stringify(e)},this.useDictionary=function(e){if(!e)throw"dictionaryKey must be specified.";Object.keys(t).forEach(n=>{t[n].disabled=e!==n})},this.useDictionaries=function(n){if(!(n instanceof Array))throw"dictionaryKeys must be specified and of type Array.";Object.keys(t).forEach(i=>{t[i].disabled=-1===n.indexOf(i)&&i!==e.DEFAULT_DICTIONARY_KEY})},this.useAllDictionaries=function(){Object.keys(t).forEach(e=>{t[e].disabled=!1})},this.addDictionary=function(n,i){if(!n)throw"dictionaryKey must be specified.";if(t[n])throw"dictionary already existing.";t[n]=new Ge,i&&i instanceof Array&&i.forEach(t=>{e.addWord(t,n)})},this.addWord=function(n,i){if(i=i||e.DEFAULT_DICTIONARY_KEY,!n)throw"element to add not specified.";t[i]||e.addDictionary(i);let a=t[i];"string"==typeof n?a.addWord(Ve(n)):n.word&&"string"==typeof n.word&&a.addWord(Ve(n.word),n.rank)},this.addWords=function(t,n){if(!(t instanceof Array))throw"elements to add must be instance of array specified.";t.forEach(t=>{e.addWord(t,n)})},this.delete=function(n,i){let a=$e(n);i=i||{},a&&(i.dictionaryKey?t[i.dictionaryKey]&&t[i.dictionaryKey].deleteWord(a,i.ignoreCase):e.getDictionaryKeys().forEach(e=>{t[e].deleteWord(a,i.ignoreCase)}))},this.parseWords=function(t,n){let i=(n=n||{}).elementSeparator||";",a=n.rankSeparator||" ",r=n.wordPosition||0,s=n.wordPosition2,o=n.rankPosition,l=n.addToDictionary||e.DEFAULT_DICTIONARY_KEY;t.split(i).forEach(t=>{let n=t.split(a),i=parseInt(n[o]);if(void 0!==r&&void 0!==s){let t=n[r],i=n[s];t&&i&&e.learn(i,t,l)}else if(n[r]){let t={word:n[r].trim()};isNaN(i)||(t.rank=i),e.addWord(t,l)}})},this.getWords=function(n){let i=[];return n?t[n]&&(i=t[n].getWords()):e.getDictionaryKeys().forEach(e=>{i=i.concat(t[e].getWords())}),i},this.hasWord=function(t,n,i){let a=" "+e.getWords(n).join(" ")+" ";return new RegExp(" "+t+" ",i?"":"i").test(a)},this.predict=function(e,t){return i(e,t)},this.predictCompleteWord=function(e,t){return i(e,t,"PREDICT_METHOD_COMPLETE_WORD")},this.predictNextWord=function(e,t){return i(e,t,"PREDICT_METHOD_NEXT_WORD")},this.applyPrediction=function(t,n,i){let a=(i=i||{}).addToDictionary||(e.isUsingOnlyDefaultDictionary()?e.DEFAULT_DICTIONARY_KEY:null),r=void 0!==i.shouldCompleteLastWord?i.shouldCompleteLastWord:!Fe(t),s=i.dontLearn,o=$e(t),l=$e(t,2),c=r?t.substring(0,t.lastIndexOf(o)):t;return c.length>0&&(!Fe(c)||new RegExp("[\\.\\?!,]").test(c[c.length-1]))&&(c+=" "),s||e.learn(n,r?l:o,a),c+n+" "},this.learn=function(n,i,a){n=Ve(n),i=Ve(i);let r=e.getDictionaryKeys(!0);if(a=1===r.length?r[0]:a,r.length>0&&(!a||!t[a])){let t=0;r.forEach(r=>{let s=0;e.hasWord(n,r)&&(s+=2),e.hasWord(i,r)&&s++,s>0&&s>=t&&(t=s,a=r)})}a=a||e.DEFAULT_DICTIONARY_KEY,t[a]||e.addDictionary(a),Object.keys(t).forEach(e=>{let r=t[e];r.disabled||r.learn(n,i,a===e)})},this.learnFromInput=function(t,i){if(Fe(t)){let a=$e(t,2),r=$e(t,3);if(a&&a!==n)return n=a,e.learn(a,r,i),!0}return!1},this.learnFromText=function(e,t){(e=e.replace(/\s\s/g," ")).split(new RegExp("[\\.\\?!]")).forEach(e=>{let n=e.split(" ");for(let e=0;e!t[e].disabled):Object.keys(t)},this.isUsingOnlyDefaultDictionary=function(){let t=e.getDictionaryKeys();return 0===t.length||1===t.length&&t[0]===e.DEFAULT_DICTIONARY_KEY}}function $e(e,t){t=t||1;let n=e.trim().split(new RegExp("[\\s\\.\\?!,]")).filter(e=>!!e);return(n[n.length-t]||"").replace(new RegExp("[\\s\\.\\?!,]","g"),"")}function Fe(e){return new RegExp("[\\s\\.\\?!,]").test(e[e.length-1])}function Ve(e){return(e=e||"").replace(/[^a-z0-9áéíóúñüäöß'`´’]/gim,"")}Ue.instance=function(){return new Ue};var Be=Ue;let je={},Ye=null,He=[],We=[],ze=!1,Ke=[],Je=null;function Xe(){ze&&(ze=!1,Ke.forEach(e=>{let t=We.filter(t=>t.dictionaryKey===e)[0]||new Re({dictionaryKey:e});t.data=Ye.dictionaryToJSON(e),dt.saveDictionary(t)}))}je.predict=function(e,t){if(void 0===e||0===He.length)return;t?(Ye.useDictionary(t),-1===Ke.indexOf(t)&&Ke.push(t)):(Ye.useAllDictionaries(),Ke=Ye.getDictionaryKeys());let n=Ye.predict(e,{maxPredicitons:He.length});for(let e=0;e{e&&e.type===K.ELEMENT_TYPE_PREDICTION&&He.push(JSON.parse(JSON.stringify(e)))}),He=He.sort((e,t)=>e.y!==t.y?e.yt.id===e)[0];if(t){let e=a()(`#${t.id} .text-container span`).text();Ye.learn(e),ze=!0}},je.getDictionaryKeys=function(){return Ye.getDictionaryKeys()},je.init=function(e){clearInterval(Je),He=e||[],ze=!1,Ye=Be.instance(),dt.getDictionaries().then(e=>{We=e,e.forEach(e=>{Ye.loadDictionary(e.data,e.dictionaryKey)}),Je=setInterval(Xe,6e5)})},a()(document).on(r.EVENT_DB_PULL_UPDATED,(e,t,n)=>{n.map(e=>e.modelName).indexOf(Re.getModelName())>-1&&je.init(He)});let qe={},Ze={},Qe={},et="";qe.DEFAULT_KEY="DEFAULT_KEY",qe.DEFAULT_KEY2="DEFAULT_KEY2",qe.debounce=function(e,t,n){n=n||qe.DEFAULT_KEY,e||t?(Ze[n]&&clearTimeout(Ze[n]),Ze[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},qe.clearDebounce=function(e){e=e||qe.DEFAULT_KEY,Ze[e]&&clearTimeout(Ze[e])},qe.throttle=function(e,t,n,i){if(!e||!e.apply)return;n=n||500;let a=i||e,r=Qe[a];(!r||(new Date).getTime()-r>n)&&(e.apply(null,t),Qe[a]=(new Date).getTime())},qe.copyToClipboard=function(e){let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";et=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},qe.appendToClipboard=function(e){qe.copyToClipboard(et+e)},qe.getClipboardContent=function(){return navigator.clipboard.readText().then(e=>Promise.resolve(e)).catch(e=>(log.warn("failed to read clipboard."),Promise.resolve(null)))},qe.getElement=function(e,t,n){let i=document.elementsFromPoint(t,n),a=null;return i.forEach(t=>{a=a||function(e,t){for(let n=0;e&&-1===t.indexOf(e)&&n<100;n++)e=e.parentElement;return e}(t,e)}),a},qe.splitInChunks=function(e,t){let n=[];for(let i=0,a=e.length;i"#"+t+t+n+n+i+i).substring(1).match(/.{2}/g).map(e=>parseInt(e,16));return t[0]&&t[1]&&t[2]?t:null},qe.cssRGBToRGB=function(e){if(!e)return null;let t=e.match(/[0-9.]+/gi).map(e=>parseInt(e));return t[0]&&t[1]&&t[2]?t:null};let tt={},nt=null,it=null,at=C.isBrowserLangDE()?"app/dictionaries/default_de.txt":"app/dictionaries/default_en.txt",rt=C.isBrowserLangDE()?"WoerterbuchDeutsch ":"EnglishDictionary";function st(e,t,n){let i=null;return nt=Promise.resolve().then(()=>{let e=[];return ue.shouldResetDatabase()&&e.push(Ae.resetDatabase(t)),Promise.all(e)}).then(()=>Ae.all(h.getIdPrefix())).then(t=>{let a=[];return t&&0!==t.length?(i=t instanceof Array?t[0]:t,ae.setEncryptionProperties(e,i.id,n),t.length&&t.length>1&&a.push(function(e,t){log.warn("fixing duplicated metadata...");let n=null;return Ae.all().then(i=>{let a=[];n=t.map(e=>e.id);let r=[];i.forEach(t=>{a.push(function t(n,i){let a=JSON.parse(JSON.stringify(i));try{return ae.decryptObjects(n)}catch(i){if(0===a.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return ae.setEncryptionProperties(e,a.pop()),t(n,a)}}(t,n))});let s=n.pop();return ae.setEncryptionProperties(e,s),log.warn("keeiping metadata: "+s),log.warn("decrypted docs:"),log.warn(a),log.warn("re-encrypting and saving them..."),a.forEach(e=>{let t=ot(e.modelName,e);r.push(t)}),Promise.all(r)}).then(()=>{let e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach(t=>{e.push(Ae.remove(t))}),Promise.all(e)}).then(()=>(log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()))}(e,t))):(i=new h,ae.setEncryptionProperties(e,i.id,n),a.push(ot(h.getIdPrefix(),i))),Promise.all(a)}).then(()=>Ae.all(Re.getIdPrefix()).then(e=>e?Promise.resolve():new Promise(e=>{log.info("importing dictionary: "+at),a.a.get(at).success(t=>{log.debug("success getting default dictionary."),e(t)}).fail(t=>{log.debug("error getting default dictionary."),e()})})).then(e=>{if(!e)return Promise.resolve();let t=new Re({dictionaryKey:rt,data:e,isDefault:!0});return ot(Re.getIdPrefix(),t)})),nt.then(()=>{it=null,je.init(),a()(document).trigger(r.EVENT_USER_CHANGED)}),nt}function ot(e,t){return new Promise((n,i)=>{let a=be.convertLiveToDatabaseObjects(t);Ae.save(e,a).then(()=>{log.debug("saved "+e+", id: "+t.id),n()}).catch((function(e){i(e)}))})}tt.getObject=function(e,t,n){return new Promise((i,a)=>{nt.then(()=>{if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),a();Ae.all(e.getIdPrefix(),t).then(t=>{let a={objectType:e,onlyShortVersion:n},r=be.convertDatabaseToLiveObjects(t,a),s=function(e){if(!e)return null;if(e.modelVersion)return e.modelVersion;if(e[0]&&e[0].modelVersion)return e[0].modelVersion;return null}(r);s&&it!==s&&(it=s,g.setUserModelVersion(Ae.getOpenedDatabaseName(),s)),i(r)}).catch(e=>{a(e)})})})},tt.getSingleObject=function(e,t,n){return tt.getObject(e,t,n).then(e=>Promise.resolve(e instanceof Array?e[0]:e))},tt.saveObject=function(e,t,n){return nt.then(()=>t&&e&&e.getModelName?t.isShortVersion?(log.warn("short versions of objects cannot be saved/updated! aborting."),Promise.reject()):(log.debug("saving "+e.getModelName()+"..."),tt.getObject(e,t.id)):(log.error('did not specify needed parameter "objectType"!'),Promise.reject())).then(i=>{if(i){log.debug(e.getModelName()+" already existing, doing update. id: "+i.id);let n=new e(t,i),a=JSON.parse(JSON.stringify(n));return a._id=i._id,a._rev=i._rev,ot(e.getIdPrefix(),a)}if(n)return log.warn("no existing "+e.getModelName()+" found to update, aborting."),Promise.reject();{let n=JSON.parse(JSON.stringify(t));return n._id=n.id,ot(e.getIdPrefix(),n)}})},tt.bulkSave=function(e){if(!e||0===e.length)return Promise.resolve();if(e[0].isShortVersion)return log.warn("not saving short version!"),Promise.resolve();let t=e.reduce((e,t)=>e+(t.gridElements?t.gridElements.length:0),0),n=Math.floor(t/e.length),i=[];if(be.convertLiveToDatabaseObjects(e).forEach(e=>{e._id=e.id}),t>1e3){let t=Math.floor(1e3/n);i=qe.splitInChunks(e,t)}else i=[e];return function e(t){let n=JSON.parse(JSON.stringify(t.shift()));return Ae.bulkDocs(n).then(()=>t.length>0?e(t):Promise.resolve())}(i)},tt.bulkDelete=function(e){return e.forEach(e=>{e._deleted=!0,e._id=e.id}),Ae.bulkDocs(JSON.parse(JSON.stringify(e)))},tt.removeObject=function(e){return Ae.remove(e)},tt.initForUser=function(e,t,n,i){let a=n&&!i||!1,r=Ae.getOpenedDatabaseName()===e,s=-1!==g.getSavedLocalUsers().indexOf(e);return r&&a===Ae.isSyncEnabled()?Promise.resolve():Ae.initDatabase(e,n,i).then(()=>r?Promise.resolve():st(t,e,s))},tt.registerForUser=function(e,t,n,i){let a=n&&!i,r=-1!==g.getSavedLocalUsers().indexOf(e);return Ae.getOpenedDatabaseName()===e&&a===Ae.isSyncEnabled()?Promise.resolve():Ae.createDatabase(e,n,i).then(()=>st(t,e,r))},tt.deleteDatabase=function(e){if(e)return Ae.deleteDatabase(e)},tt.closeCurrentDatabase=function(){return Ae.closeCurrentDatabase()},tt.getCurrentUsedDatabase=function(){return Ae.getOpenedDatabaseName()};let lt={};lt.gridDataToOBF=function(e){},lt.gridSetToOBZ=function(e){},lt.OBFToGridData=function(e,t){let n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():C.getBrowserLang(),a=new de({obfId:e.id,label:C.getTranslationObject(e.name,i),locale:i,rowCount:e.grid.rows,minColumnCount:e.grid.columns,gridElements:[]});return e.buttons.forEach(r=>{if(!r.hidden){let s=function(e,t){let n=t.grid.order,i=null;return n.forEach((t,n)=>{t.forEach((t,a)=>{t===e&&(i={x:a,y:n})})}),i}(r.id,e),o=new K({width:1,height:1,label:C.getTranslationObject(r.label,i),x:s.x,y:s.y,backgroundColor:r.background_color});o=function(e,t,n,i){t.vocalization&&(e.actions=e.actions.filter(e=>e.modelName!==F.getModelName()),e.actions.push(new V({speakText:t.vocalization,speakLanguage:n.locale})));if(t.load_board&&t.load_board.path){let n=function(e,t){if(!t)return null;let n=t["manifest.json"].paths.boards,i=null;return Object.keys(n).forEach(t=>{n[t]===e&&(i=t)}),i}(t.load_board.path,i);n&&e.actions.push(new x({toGridId:n}))}return e}(o,r,e,t),o.actions.filter(e=>e.modelName===F.getModelName()).forEach(t=>{t.speakLanguage=e.locale}),n.push(function(e,t,n){let i=t.images.filter(t=>t.id===e)[0],a=null,r=[];if(!i)return Promise.resolve(null);if(i.data)a=i.data;else if(i.path){let e=i.path.substring(i.path.lastIndexOf(".")),t=i.content_type||"image/png";t=".svg"===e?"image/svg+xml":t;let r=`data:${t};base64,`,s=n[i.path];a=r+s}else i.url&&r.push(M.urlToBase64(i.url).then(e=>(a=e,Promise.resolve())));return Promise.all(r).then(()=>a?Promise.resolve(new U({data:a})):(log.info("failed to import image: "+e),Promise.resolve(null)))}(r.image_id,e,t).then(e=>(o.image=e,Promise.resolve()))),a.gridElements.push(o)}}),Promise.all(n).then(()=>Promise.resolve(a))},lt.OBZToGridSet=function(e){let t=[],n=[];return Object.keys(e).forEach(i=>{-1!==i.indexOf(".obf")&&t.push(lt.OBFToGridData(e[i],e).then(e=>(n.push(e),Promise.resolve())))}),Promise.all(t).then(()=>(n.forEach(e=>{e.gridElements.forEach(e=>{e.actions.forEach(t=>{if(t.modelName===x.getModelName()){let i=t.toGridId,a=n.reduce((e,t)=>e||(t.obfId===i?t.id:null),null);a?t.toGridId=a:e.actions=e.actions.filter(e=>e.id!==t.id)}})})}),n.forEach(e=>{delete e.obfId}),Promise.resolve(n)))};let ct={readZip:function(e,t){let i={};return new Promise(a=>{Promise.all([n.e(3),n.e(1)]).then(n.t.bind(null,619,7)).then(n=>{n.loadAsync(e).then(e=>{let n=[];Object.keys(e.files).forEach(a=>{let r=e.files[a];n.push(r.async("base64").then(e=>{try{i[a]=t?JSON.parse(atob(e)):e}catch(t){i[a]=e}}))}),Promise.all(n).then(()=>{a(i)})})})})}},dt={},ut="app/examples/default.grd.json";ue.getDefaultGridsetName()&&(ut="app/examples/"+ue.getDefaultGridsetName()),dt.getGrid=async function(e,t){return e?tt.getSingleObject(de,e,t).then(e=>Promise.resolve(e?new de(e):null)):Promise.resolve(null)},dt.getGlobalGrid=function(e){return dt.getMetadata().then(t=>t.globalGridId&&(e||t.globalGridActive)?dt.getGrid(t.globalGridId).then(e=>Promise.resolve(e)):Promise.resolve(null))},dt.getGrids=function(e,t){return new Promise(n=>{tt.getObject(de,null,!e).then(e=>{if(!e)return void n([]);let i=e instanceof Array?e:[e];t?dt.getMetadata().then(e=>{n(i.filter(t=>t.id!==e.globalGridId))}):n(i)})})},dt.saveGrid=function(e){return e.gridElements=q.sortGridElements(e.gridElements),tt.saveObject(de,e)},dt.saveGrids=function(e){return e.forEach(e=>{e.gridElements=q.sortGridElements(e.gridElements)}),tt.bulkSave(e)},dt.updateGrid=function(e,t){return t.id=e,t.gridElements=q.sortGridElements(t.gridElements),tt.saveObject(de,t,!0)},dt.deleteGrid=function(e){return tt.removeObject(e)},dt.deleteAllGrids=function(){return dt.getGrids().then(e=>e&&0!==e.length?tt.bulkDelete(e):Promise.resolve()).then(()=>{return e="",dt.getMetadata().then(t=>(t.globalGridId=e,t.globalGridActive=!!e,dt.saveMetadata(t)));var e})},dt.importDefaultGridset=function(){return Promise.resolve().then(()=>a.a.get(ut)).then(e=>{if(!e)return Promise.resolve();log.info("importing default grid set "+ut);try{e=JSON.parse(e)}catch(e){}return dt.importData(e,!1,!0)})},dt.saveAdditionalGridFiles=function(e,t){return new Promise(n=>{t||n(),dt.getGrid(e).then(e=>{t.forEach(t=>{let n=(e=JSON.parse(JSON.stringify(e))).additionalFiles.findIndex(e=>e.fileName===t.fileName);-1!==n?e.additionalFiles[n]=t:e.additionalFiles.push(t)}),dt.saveGrid(e).then(()=>{n()})})})},dt.getGridElement=function(e,t){return new Promise(n=>{dt.getGrid(e).then(e=>{let i=e.gridElements.filter(e=>e.id===t)[0];i?n(i):dt.getGlobalGrid().then(e=>{n(e.gridElements.filter(e=>e.id===t)[0])})})})},dt.getGridsAttribute=function(e){return new Promise(t=>{dt.getGrids().then(n=>{let i={};n.forEach(t=>{i[t.id]=t[e]}),t(i)})})},dt.addGridElements=function(e,t){return new Promise(n=>{dt.getGrid(e).then(i=>{(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),dt.updateGrid(e,i).then(()=>{n()})})})},dt.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise(n=>{dt.getMetadata().then(i=>{if(i){let n=i instanceof Array?i[0].id:i.id;e.id=n,g.saveLocalMetadata(e),g.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():tt.saveObject(h,e).then(()=>{n()})})})},dt.getMetadata=function(){return new Promise(e=>{tt.getObject(h).then(t=>{let n=null;if(n=t?t instanceof Array?t[0]:t:new h,!g.shouldSyncNavigation()){let e=g.getLocalMetadata();e&&(n.locked=e.locked,n.fullscreen=e.fullscreen,n.lastOpenedGridId=e.lastOpenedGridId)}e(new h(n))})})},dt.saveImage=function(e){return function(e,t){let n=[];return new Promise((i,a)=>{dt.getMetadata().then(r=>{if(!r||!r.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void a();let o=null;r.hashCodes[e.getModelName()]?o=r.hashCodes[e.getModelName()]:(o={},r.hashCodes[e.getModelName()]=o);let l=s.hashCode(t);o[l]?(log.debug("saveHashedItemInternal: hash found, not saving new element"),t.id=o[l]):(log.debug("saveHashedItemInternal: hash not found, saving new element"),o[l]=t.id,n.push(tt.saveObject(e,t)),n.push(tt.saveObject(h,r))),Promise.all(n).then(()=>{i(t.id)})})})}(U,e)},dt.getImage=function(e){return tt.getObject(U,e)},dt.getDictionary=function(e){return e?tt.getSingleObject(Re,e).then(e=>Promise.resolve(new Re(e))):Promise.resolve(null)},dt.getDictionaries=function(){return new Promise(e=>{tt.getObject(Re).then(t=>{if(!t)return void e([]);let n=t instanceof Array?t.map(e=>new Re(e)):[new Re(t)];e(n)})})},dt.saveDictionary=function(e){return e.isDefault=!1,tt.saveObject(Re,e)},dt.deleteObject=function(e){return tt.removeObject(e)},dt.downloadSingleGrid=function(e){dt.getGrid(e).then(e=>{if(e){let t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});k.a.saveAs(t,C.getTranslation(e.label)+".grd")}})},window.backupPrepareForDefault=!1,dt.downloadBackup=function(){let e={},t=[];t.push(dt.getMetadata().then(t=>(e.metadata=t,Promise.resolve()))),t.push(dt.getDictionaries().then(t=>(t.reduce((e,t)=>e&&t.isDefault,!0)||(e.dictionaries=t),Promise.resolve()))),t.push(dt.getGrids(!0).then(t=>(e.grids=t,Promise.resolve()))),Promise.all(t).then(()=>{backupPrepareForDefault&&(delete e.dictionaries,e.metadata.inputConfig=new p,e.metadata.locked=void 0,e.metadata.fullscreen=void 0,e.metadata.hashCodes={});let t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});k.a.saveAs(t,"my-backup.grd")})},dt.downloadAllGridsSimple=function(){dt.getGrids(!0).then(e=>{e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:Q.removeLongPropertyValues(e)})))})},dt.importGridsFromFile=function(e,t,n){let i=e.name.substring(e.name.length-4),a=!1;return n=n||function(){},new Promise((r,s)=>{let o=new FileReader;o.onload=function(s){let o=s.target.result,l=[];t&&(n(10,C.translate("Deleting grids // Grids werden gelöscht")),l.push(dt.deleteAllGrids())),Promise.all(l).then(()=>{let s=null,l=[];if(n(40,C.translate("Extracting grids from file // Grids werden aus Datei extrahiert")),".grd"===i)s=JSON.parse(o);else if(".obf"===i)l.push(lt.OBFToGridData(JSON.parse(o)).then(e=>(s=e,Promise.resolve())));else if(".obz"===i){let n=ct.readZip(e,!0).then(e=>lt.OBZToGridSet(e)).then(e=>(s=e,t&&(a=!0),Promise.resolve()));l.push(n)}Promise.all(l).then(()=>{n(80,C.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),dt.importData(s,a,t).then(()=>{n(100),r()})})})},o.readAsText(e)})},dt.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();let i=null,a=null,r=null,o=[],l=null;return e instanceof Array?r=be.updateDataModel(e):(i=n?be.updateDataModel(e.dictionaries):null,a=n?be.updateDataModel(e.metadata):null,r=be.updateDataModel(e.grids),i||a||r||!e.id||(r=[be.updateDataModel(e)])),l=a?Promise.resolve(a):dt.getMetadata(),l.then(e=>(r&&o.push(dt.getGrids().then(n=>{let i=n.map(e=>C.getTranslation(e.label)),o=null,l=q.regenerateIDs(r);r=l.grids,a&&(e.lastOpenedGridId=l.idMapping[e.lastOpenedGridId],e.globalGridId=l.idMapping[e.globalGridId]),r.forEach(e=>{let t=C.getTranslation(e.label);e.label[C.getBrowserLang()]=s.getNewName(t,i)});let c=r[0]?r[0].locale:null;if(t){let t=r[0].id;o=q.generateGlobalGrid(t,c),r.unshift(o),e.globalGridId=o.id,e.globalGridActive=!!e.globalGridId}return dt.saveGrids(r).then(()=>dt.saveMetadata(e,!0))})),i&&o.push(dt.getDictionaries().then(e=>tt.bulkDelete(e)).then(()=>(i=i.map(e=>(delete e.id,delete e._id,delete e._rev,new Re(e))),tt.bulkSave(i).then(()=>(je.init(),Promise.resolve()))))),Promise.all(o)))},dt.getSyncState=function(){return Ae.getSyncState()},dt.getCurrentUser=function(){return tt.getCurrentUsedDatabase()};let ft={},pt="#asterics-grid-user-documentation",ht="",mt=pt,vt=ht,gt=mt;ft.setHelpLocation=function(e,t){vt=ht,gt=mt,ht=e,mt=t||""},ft.setHelpLocationIndex=function(){ft.setHelpLocation("",pt)},ft.revertToLastLocation=function(){ft.setHelpLocation(vt,gt)},ft.openHelp=function(){let e="https://www.asterics.eu/manuals/asterics-grid/"+(ht?ht+".html"+mt:mt);C.isBrowserLangDE()&&(e="https://translate.google.com/translate?sl=en&tl=de&u="+encodeURI(e)),window.open(e,"_blank")},window.onhelp=function(){return!1},window.addEventListener("keydown",(function(e){112!==(e.keyCode||e.which)&&"F1"!==e.key||(e.preventDefault(),ft.openHelp())}));var _t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"all-grids-view overflow-content box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon"),e._v(" "),e._m(0),e._v(" "),n("button",{staticClass:"spaced hide-mobile small",attrs:{tabindex:"31"},on:{click:function(t){return e.addGrid()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("New Grid // Neues Grid")])]),e._v(" "),n("div",{staticStyle:{display:"none"}},[n("input",{attrs:{type:"file",id:"inputFile",accept:".grd, .obf, .obz"},on:{change:e.importFromFile}}),e._v(" "),n("input",{attrs:{type:"file",id:"inputFileBackup",accept:".grd, .obz"},on:{change:e.importBackupFromFile}})])],1),e._v(" "),n("div",{staticClass:"row content text-content"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showLoading||null===e.grids,expression:"showLoading || grids === null"}],staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin",staticStyle:{position:"relative","margin-top":"30vh",top:"0"}})]),e._v(" "),e.selectedGraphElement?n("div",[n("h1",[e._v(e._s(e.headerDetails))]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("img",{staticStyle:{height:"150px","max-width":"100%",border:"1px solid lightgray"},attrs:{src:e.selectedGraphElement.grid.thumbnail?e.selectedGraphElement.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"five columns",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticStyle:{display:"block"},attrs:{for:"gridName","data-i18n":""}},[e._v("Name of grid // Grid-Name")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newLabel[e.currentLanguage],expression:"newLabel[currentLanguage]"}],staticStyle:{width:"77%"},attrs:{id:"gridName",type:"text",maxlength:"25"},domProps:{value:e.newLabel[e.currentLanguage]},on:{input:function(t){t.target.composing||e.$set(e.newLabel,e.currentLanguage,t.target.value)}}}),e._v(" "),n("button",{staticStyle:{width:"17%",padding:"0 1%"},attrs:{disabled:e.isLabelDuplicate(e.newLabel[e.currentLanguage]),title:e.i18nService.translate("Save name // Name speichern")},on:{click:e.saveGridLabel}},[n("i",{staticClass:"fas fa-check"})])])]),e._v(" "),e._m(1),e._v(" "),n("div",{staticClass:"action-buttons",attrs:{id:"actionGroup"}},[n("div",{staticStyle:{display:"flex"}},[n("button",{on:{click:function(t){return e.show(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Show // Öffnen")])]),e._v(" "),n("button",{on:{click:function(t){return e.edit(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(t){return e.clone(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.deleteGrid(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToFile(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"fas fa-file-export"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Export // Exportieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToPdf(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-file-pdf"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Save as PDF // Als PDF speichern")])])])])]):e._e(),e._v(" "),n("h1",{attrs:{"data-i18n":""}},[e._v("Grid list // Grid-Liste")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.graphList.length>0,expression:"graphList.length > 0"}],staticClass:"row",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticClass:"three columns",attrs:{for:"selectMode","data-i18n":""}},[e._v("Grids to show // Anzuzeigende Grids")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectValue,expression:"selectValue"}],staticClass:"four columns",attrs:{id:"selectMode"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectValue=t.target.multiple?n:n[0]},e.reinitContextMenu]}},[e.selectedGraphElement?n("option",{domProps:{value:e.selectValues.CONNECTED_GRIDS}},[e._v(e._s(e.connectedGridsOptionLabel))]):e._e(),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.NOT_REACHABLE_GRIDS}},[e._v("Not reachable grids // Nicht erreichbare Grids")]),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.ALL_GRIDS}},[e._v("All grids // Alle Grids")])]),e._v(" "),n("span",{staticClass:"three columns"},[e._v(e._s(e.graphElemsToShow.length)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("elements // Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",[e._l(e.graphElemsToShow,(function(t){return n("li",{staticStyle:{display:"inline-block","margin-right":"2em","margin-bottom":"1.5em",position:"relative"}},[n("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"javascript:;"},on:{click:function(n){return e.setSelectedGraphElement(t)}}},[n("div",{staticStyle:{width:"100%",border:"1px solid lightgray"}},[n("div",[e._v(e._s(e._f("extractTranslation")(t.grid.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px","max-width":"100%"},attrs:{src:t.grid.thumbnail?t.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("button",{staticClass:"gridOptions",staticStyle:{position:"absolute",bottom:"3px",right:"0",padding:"0 20px",margin:"0"},attrs:{"data-grid-id":t.grid.id,title:e.i18nService.translate("More // Mehr")}},[n("i",{staticClass:"fas fa-ellipsis-v"})])])})),e._v(" "),n("li",{directives:[{name:"show",rawName:"v-show",value:0===e.graphElemsToShow.length,expression:"graphElemsToShow.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("(no grids) // (keine Grids)")])])],2)]),e._v(" "),e.graphList.length>0?n("div",[n("h1",{attrs:{"data-i18n":""}},[e._v("Global grid // Globales Grid")]),e._v(" "),n("p",{attrs:{"data-i18n":""}},[e._v('A global grid is shown within each other grid and can contain elements like e.g. "back" or "home". // Ein globales Grid wird innerhalb jedes anderen Grids angezeigt und kann beispielsweise Elemente wie "Zurück" oder "Zum Start" beinhalten.')]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"globalGridActions","data-i18n":""}},[e._v("Actions for global grid // Aktionen für globales Grid")]),e._v(" "),e.metadata?n("div",{staticClass:"eight columns",attrs:{id:"globalGridActions"}},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.globalGridActive||!e.hasGlobalGrid,expression:"!metadata.globalGridActive || !hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!0)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Activate global Grid // Globales Grid aktivieren")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.globalGridActive&&e.hasGlobalGrid,expression:"metadata.globalGridActive && hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!1)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Deactivate global Grid // Globales Grid deaktivieren")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.edit(e.metadata.globalGridId)}}},[n("i",{staticClass:"fas fa-edit"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Edit global Grid // Globales Grid bearbeiten")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.resetGlobalGrid()}}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Reset global grid to default // Globales Grid zurücksetzen")])])]):e._e()])]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-bottom":"10em"}}),e._v(" "),e.linkModal.show?n("grid-link-modal",{attrs:{"grid-from-prop":e.linkModal.gridFrom,"grid-to-prop":e.linkModal.gridTo},on:{close:function(t){e.linkModal.show=!1},reload:function(t){return e.reload(e.linkModal.gridFrom.id)}}}):e._e(),e._v(" "),e.pdfModal.show?n("export-pdf-modal",{attrs:{"grids-data":e.grids},on:{close:function(t){e.pdfModal.show=!1}}}):e._e()],1)])};_t._withStripped=!0;var bt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return!e.fullHeader||e.show?n(e.tag,{tag:"component"},[n("div",{attrs:{"aria-hidden":"true"}},[e.show?n("div",[n("a",{staticStyle:{margin:"0.2em 1em 0 0.5em",color:"#266697"},attrs:{tabindex:"20",href:"javascript:void(0)"},on:{click:function(t){return e.openSidebar()}}},[n("i",{staticClass:"fas fa-2x fa-bars inline"})]),e._v(" "),n("a",{staticClass:"hide-mobile",attrs:{tabindex:"21",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{attrs:{id:"astericsIcon",src:"app/img/asterics-grid-icon-raw.svg",height:"40",width:"121",alt:"AsTeRICS Grid"}})])])]):e._e(),e._v(" "),n("a",{staticClass:"show-mobile",attrs:{tabindex:"22",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{staticStyle:{margin:"0"},attrs:{id:"astericsIcon",src:"app/img/asterics_icon.png",alt:"AsTeRICS Grid"}})])])])]):e._e()};bt._withStripped=!0;var Et=n(4),yt={},Ct={},wt=null,Tt=!1;function At(e){null!==Ct[e]&&(Ct[e].close(),Ct[e]=null,log.debug("SSE closed."))}function Nt(e){for(var t="",n=0;n{a.a.ajax({type:"PUT",beforeSend:function(e){e.setRequestHeader("Content-Type","text/plain")},url:yt.getRestURL(i)+"runtime/model/components/"+Nt(e)+"/ports/"+Nt(t)+"/data",datatype:"text",crossDomain:!0,data:n,success:function(e,t,n){r(n.responseText,t)},error:function(e,t,n){s(n,e.responseText)}})})},yt.triggerEvent=function(e,t,n){if(e&&t)return new Promise((i,r)=>{a.a.ajax({type:"PUT",url:yt.getRestURL(n)+"runtime/model/components/"+Nt(e)+"/events/"+Nt(t),datatype:"text",crossDomain:!0,success:function(e,t,n){i(n.responseText,t)},error:function(e,t,n){r(n,e.responseText)}})})},yt.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model/components/ids",datatype:"application/json",crossDomain:!0,success:function(e,n,i){t(JSON.parse(i.responseText),n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.uploadModelBase64=function(e,t){return new Promise((n,i)=>{e?a.a.ajax({type:"PUT",url:yt.getRestURL(t)+"runtime/model",contentType:"text/xml",data:window.atob(e),datatype:"text",crossDomain:!0,success:function(e,t,i){n(i.responseText,t)},error:function(e,t,n){i(n,e.responseText)}}):i()})},yt.uploadAndStartModel=function(e,t,n){return new Promise((i,a)=>{yt.getModelName(t).then(a=>{a!==n?yt.uploadModelBase64(e,t).then(()=>{yt.startModel(t).then(()=>{i()})}):yt.startModel(t).then(()=>{i()})})})},yt.downloadDeployedModelBase64=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model",datatype:"text/xml",crossDomain:!0,success:function(e,n,i){t(window.btoa(i.responseText),n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.startModel=function(e){return new Promise((t,n)=>{a.a.ajax({type:"PUT",url:yt.getRestURL(e)+"runtime/model/state/start",datatype:"text",crossDomain:!0,success:function(e,n,i){t(i.responseText,n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getModelName=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model/name",datatype:"text",crossDomain:!0,success:function(e,n,i){var a=i.responseText;-1!=(a=(a=a.substring(a.lastIndexOf("\\")+1)).substring(a.lastIndexOf("/")+1)).indexOf(".acs")&&(a=a.substring(0,a.indexOf(".acs")+4)),t(a,n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model/components/ids",datatype:"application/json",crossDomain:!0,success:function(e,n,i){t(JSON.parse(i.responseText),n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getComponentInputPortIds=function(e,t){return new Promise((n,i)=>{e?a.a.ajax({type:"GET",url:yt.getRestURL(t)+"runtime/model/components/"+Nt(e)+"/ports/input/ids",datatype:"application/json",crossDomain:!0,success:function(e,t,i){n(JSON.parse(i.responseText),t)},error:function(e,t,n){i(n,e.responseText)}}):n([])})},yt.getComponentEventPortIds=function(e,t){return new Promise((n,i)=>{e?a.a.ajax({type:"GET",url:yt.getRestURL(t)+"runtime/model/components/"+Nt(e)+"/channels/event/ids",datatype:"application/json",crossDomain:!0,success:function(e,t,i){n(JSON.parse(i.responseText),t)},error:function(e,t,n){i(n,e.responseText)}}):n([])})},yt.getRestURL=function(e){e||(e=window.location.hostname.indexOf("grid.asterics.eu")>-1?"http://127.0.0.1:8081":"http://"+window.location.hostname+":8081"),-1===e.indexOf("http")&&(e="http://"+e);var t=document.createElement("a");return t.href=e,t.pathname="/rest/",t.port||(t.port=8081),t.href},yt.getTypeId=function(e,t){let n=window.atob(t);return a()(n).find('components component[id="'+e+'"]').attr("type_id")},yt.getComponentDescriptorsAsXml=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"storage/components/descriptors/xml",datatype:"text/xml",crossDomain:!0,success:function(e,n,i){t(e,n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getPossibleEvents=function(e,t,n){return new Promise(i=>{yt.getComponentDescriptorsAsXml(n).then(n=>{let r=yt.getTypeId(e,t),s=a()(n).find('componentType[id="'+r+'"] eventListenerPort').map((function(){return this.id})).get();i(s)})})},yt.subscribeEvents=function(e,t,n){if("undefined"==typeof EventSource)return void log.warn("SSE not supported by browser");let i=yt.getRestURL(e);Ct[i]||(Ct[i]=new EventSource(i+"runtime/model/channels/event/listener"),Ct[i].onopen=function(e){log.debug("SSE opened."),Tt=!0},Ct[i].onerror=function(a){At(i),n&&n(a),Tt&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),wt=setTimeout((function(){wt=null,yt.subscribeEvents(e,t,n)}),3e3))}),Ct[i].addEventListener("event",(function(e){t(e.data,200)}),!1)},yt.unsubscribeEvents=function(e){wt&&clearTimeout(wt),Tt=!1,e?At(e):Object.keys(Ct).forEach(e=>{At(e)})};let St={},It=[],kt={},Ot=0;function Lt(){let e={},t=null,n=null,i=[],a=[],r=[],s=[],o=[],l=[],c=[],d=[],p=[],h=[],m={},v=document.body,g=!1,_={},b=Ot++;function E(e,t){yt.subscribeEvents(e.areURL,n=>{e.eventNames.indexOf(n)>-1&&t()})}function y(t,n){if(!t||!t.keyCode||!n)return;let i=t.keyCode+"",a=m[i]?m[i]:[];return m[i]=a,a.push(function(e,t){return{handler:e,inputEvent:t,lastKeydown:null,lastAction:null,counter:0,timeoutHandler:null}}(n,t)),e}function C(e){(e.clientY<5||e.clientX<5)&&D(i)}function w(e){D(l,[e],!0),n&&t?e.touches[0].clientY>n+100?(log.debug("swipe down."),n=null,D(r)):e.touches[0].clientYt+100?(log.debug("swipe right."),t=null,D(o)):e.touches[0].clientX0&&!e.repeat&&p.forEach(n=>{n(t,e.code,e)});let n=t+"";if(m[n]){if(e.preventDefault(),e.repeat)return;let t=m[n];function i(e){e.lastAction=(new Date).getTime(),e.handler(),O(t)}t=t.sort((e,t)=>e.counter-t.counter||e.inputEvent.repeat-t.inputEvent.repeat),t.forEach(e=>{e.inputEvent.timeout=e.inputEvent.repeat>1?e.inputEvent.timeout||500:e.inputEvent.timeout,L(e.lastKeydown,e.inputEvent.timeout)&&(e.counter=0)}),t.forEach(e=>{let n=e.inputEvent;if(n.repeat&&1!==n.repeat||n.holdDuration||!L(e.lastAction,n.timeout))if(n.repeat>1){if(e.counter++,e.counter===n.repeat){let a=t.filter(t=>t!==e&&t.inputEvent.repeat>n.repeat).length>0?n.timeout:0;e.counter=0,function(e){e.forEach(e=>clearTimeout(e.timeoutHandler))}(t),e.timeoutHandler=setTimeout(()=>{i(e)},a)}}else n.holdDuration&&(e.timeoutHandler=setTimeout(()=>{i(e)},n.holdDuration));else{let n=t.filter(t=>t!==e&&t.inputEvent.holdDuration).length>0,a=t.filter(t=>t!==e&&t.inputEvent.repeat>1),r=a.length>0,s=Math.max.apply(null,a.map(e=>e.counter));if(n)e.doOnKeyup=()=>{i(e)};else if(r&&s<1){let t=Math.max(...a.map(e=>e.inputEvent.timeout));e.timeoutHandler=setTimeout(()=>{i(e)},t+10)}else r||i(e)}e.lastKeydown=(new Date).getTime()})}}function S(e){if(e.repeat)return;let t=(e.which||e.keyCode)+"";if(m[t]){let e=m[t];e.forEach(t=>{t.doOnKeyup&&(t.doOnKeyup(),O(e)),t.inputEvent.holdDuration&&k(t)})}}function I(){document.fullscreenElement||D(h)}function k(e){clearTimeout(e.timeoutHandler),e.timeoutHandler=null,e.doOnKeyup=null,e.counter=0}function O(e){e.forEach(e=>k(e))}function L(e,t){return!e||!t||(new Date).getTime()-e>t}function x(t,n){return t&&n.push(t),e}function D(e,t,n){e.forEach(e=>{e.apply?n?e.apply(null,t):qe.throttle(()=>{e.apply(null,t)}):log.warn("handler seems to be not a function!")})}return e.startListening=function(){g||(g=!0,Object.keys(_).forEach(e=>{let t=_[e];E(t.inputEvent,t.fn)}),document.addEventListener("mousemove",C),document.addEventListener("keydown",N),document.addEventListener("keyup",S),document.addEventListener("fullscreenchange",I),v.addEventListener("touchmove",w,{passive:!1}),v.addEventListener("touchstart",A),v.addEventListener("touchend",T))},e.stopListening=function(){g=!1,Object.keys(_).forEach(e=>{let t=_[e];yt.unsubscribeEvents(t.areURL)}),document.removeEventListener("mousemove",C),document.removeEventListener("keydown",N),document.removeEventListener("keyup",S),document.removeEventListener("fullscreenchange",I),v.removeEventListener("touchmove",w),v.removeEventListener("touchstart",A),v.removeEventListener("touchend",T)},e.destroy=function(){e.stopListening(),It=It.filter(t=>t.getID()!==e.getID())},e.isListening=function(){return g},e.getID=function(){return b},e.onMouseUpperOrLeftBorder=function(e){return x(e,i)},e.onSwipedDown=function(e){return x(e,r)},e.onSwipedUp=function(e){return x(e,a)},e.onSwipedRight=function(e){return x(e,o)},e.onSwipedLeft=function(e){return x(e,s)},e.onEscape=function(e){return y(new u({keyCode:27}),e)},e.onAnyKey=function(e){return x(e,p)},e.onTouchMove=function(e){return x(e,l)},e.onTouchStart=function(e){return x(e,c)},e.onTouchEnd=function(e){return x(e,d)},e.onExitFullscreen=function(e){return x(e,h)},e.off=function(e){let t=t=>t!==e;i=i.filter(t),a=a.filter(t),r=r.filter(t),s=s.filter(t),o=o.filter(t),l=l.filter(t),c=c.filter(t),d=d.filter(t),p=p.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case u.getModelName():return y(e,t);case f.getModelName():_[e.id]={inputEvent:e,fn:t},g&&E(e,t)}},e}St.instance=function(){let e=new Lt;return It.push(e),e},St.pauseAll=function(){It.forEach(e=>{kt[e.getID()]=e.isListening(),e.stopListening()})},St.resumeAll=function(){It.forEach(e=>{kt[e.getID()]&&e.startListening()})},St.global=St.instance();var xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.tooltipHTML,expression:"tooltipHTML"}],staticStyle:{display:"flex"},attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),e.tooltipOptions.faIcon?n("i",{class:e.tooltipOptions.faIcon}):e._e(),e._v(" "),n("div",{staticStyle:{"padding-left":"0.5em"}},[n("span",{domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.tooltipOptions.actionLinkFn?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e(),e._v(" "),e.tooltipOptions.actionLinkUrl?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:e.tooltipOptions.actionLinkUrl,target:"_blank"}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e()]),e._v(" "),n("button",{staticStyle:{position:"absolute",top:"0",right:"10px",padding:"0 10px"},on:{click:function(t){e.tooltipHTML=""}}},[e._v("X")])])};xt._withStripped=!0;let Dt=null,Rt={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null,faIcon:null,msgType:null};var Mt={props:["fullHeader"],data:()=>({tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:Rt,currentToolTipID:null}),methods:{setTooltip:function(e,t){let n=this;switch(n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(Rt)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout(()=>{n.clearTooltip()},n.tooltipOptions.timeout)),n.tooltipOptions.msgType){case"warn":n.tooltipOptions.faIcon="fas fa-exclamation-triangle fa-2x";break;case"info":n.tooltipOptions.faIcon="fas fa-info-circle fa-2x"}return this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink,this.currentToolTipID=(new Date).getTime(),this.currentToolTipID},clearTooltip:function(e){if(e&&e!==this.currentToolTipID)return;let t=this;t.tooltipOptions.revertOnClose&&this.tooltipHTML?t.setTooltip(t.lastTooltipHTML,t.lastTooltipOptions):(this.tooltipHTML=null,this.actionLink=null,this.tooltipImageUrl=null),t.lastTooltipOptions={},t.lastTooltipHTML=null},onActionLink(){this.tooltipOptions.actionLinkFn&&this.tooltipOptions.actionLinkFn()}},mounted(){!function(){let e=document.getElementById("notificationBar"),t=document.getElementById("notificationBarImg"),n=JSON.stringify({x:window.innerWidth,y:window.innerHeight}),i=g.get(g.get("WINDOW_SIZE_KEY"));g.save("WINDOW_SIZE_KEY",n),i&&n!==i&&o();let r=g.get("NOTIFICATION_BAR_STYLE_KEY"),s=g.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");r&&(e.setAttribute("style",r),e.style.display="none");s&&t.setAttribute("style",s);function o(){let n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),g.save("NOTIFICATION_BAR_STYLE_KEY",""),g.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}a()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){qe.debounce(()=>{g.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),a()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",g.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){qe.debounce(()=>{g.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),window.addEventListener("resize",()=>{qe.debounce((function(){o()}),300,"RESIZE_RESET_NOTIFICATIONBAR")})}(),Dt=this},beforeDestroy(){}};n(52);function Pt(e,t,n,i,a,r,s,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var Gt=Pt(Mt,xt,[],!1,null,"7bec61b8",null);Gt.options.__file="src/vue-components/components/notificationBar.vue";var Ut=Gt.exports,$t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:function(t){return t.type.indexOf("key")||27===t.keyCode?e.close():null}}},[e.options.closable?n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header","data-i18n":""}},[e._v(e._s(e.options.header))])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"biggerFont"},[e._v(e._s(e.options.text)+" ...")]),e._v(" "),n("div",{staticStyle:{border:"1px solid","border-radius":"3px",width:"100%",height:"50px",margin:"0.5em 0"},attrs:{id:"progressWrapper"}},[n("div",{style:"width: "+e.progressPercentage+"%; height: 100%; background-color: green",attrs:{id:"progressBar"}})]),e._v(" "),n("div",{staticClass:"biggerFont",staticStyle:{"text-align":"right",width:"100%"}},[e._v(e._s(e.progressPercentage)+"%")])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.options.closable?n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])])]):e._e()])])])])])};$t._withStripped=!0;n(3);let Ft={header:"",closable:!1,cancelFn:null,text:""};var Vt={props:[],data:function(){return{progressPercentage:0,options:JSON.parse(JSON.stringify(Ft))}},methods:{setProgress(e,t){this.progressPercentage=Math.min(e,100),Object.keys(this.options).forEach(e=>{t&&void 0!==t[e]&&(this.options[e]=t[e])}),100===this.progressPercentage&&setTimeout(()=>{this.options=JSON.parse(JSON.stringify(Ft)),this.$emit("close")},200)},close(){this.options.closable&&(this.$emit("close"),this.options.cancelFn&&this.options.cancelFn(),this.options=JSON.parse(JSON.stringify(Ft)))}},mounted(){C.initDomI18n()}},Bt=(n(56),Pt(Vt,$t,[],!1,null,"2fce46f7",null));Bt.options.__file="src/vue-components/modals/progressBarModal.vue";var jt=Bt.exports;let Yt={},Ht=null;Yt.setViewComponent=function(e,t){Ht&&Ht.$refs.notificationBar.tooltipOptions.closeOnNavigate&&Yt.clearTooltip(),Ht.setComponent(e,t)},Yt.isSidebarOpen=function(){return Ht.showSidebar},Yt.setTooltip=function(e,t){if(Ht)return Ht.$refs.notificationBar.setTooltip(e,t)},Yt.setTooltipI18n=function(e,t){let n=C.translate(e);Yt.setTooltip(n,t)},Yt.clearTooltip=function(){Ht&&Ht.$refs.notificationBar.clearTooltip()},Yt.showProgressBar=function(e,t){Ht&&(Ht.showProgressBar=!0,Ht.$refs.progressBar.setProgress(e,t))},Yt.init=function(){Ht=new Et.a({el:"#app",components:{NotificationBar:Ut,ProgressBarModal:jt},data:()=>({component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:tt.getCurrentUsedDatabase(),isLocalUser:g.isSavedLocalUser(tt.getCurrentUsedDatabase()),syncState:dt.getSyncState(),showProgressBar:!1,constants:r,tooltipHTML:null,actionLink:null}),methods:{setComponent(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar(){a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)},openSidebar(){a()(document).trigger(r.EVENT_SIDEBAR_OPEN)},openHelp(){ft.openHelp()},moreNavigation(){a.a.contextMenu("destroy"),a.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":as.toRegister();break;case"CONTEXT_ADD_OFFLINE":as.toAddOffline();break;case"CONTEXT_ABOUT":as.toAbout()}}(e)},items:{CONTEXT_ADD_ONLINE:{name:"Add online user // Online-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ADD_OFFLINE:{name:"Add offline user // Offline-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ABOUT:{name:"About AsTeRICS Grid // Über AsTeRICS Grid",icon:"fas fa-info-circle"}},trigger:"left",zIndex:10}),C.initDomI18n(),a()("#moreNavigation").contextMenu()}},mounted(){let e=this;function t(){!e.showSidebar&&tt.getCurrentUsedDatabase()&&(qe.closeFullscreen(),dt.getMetadata().then(t=>{t.fullscreen&&(t.fullscreen=!1,dt.saveMetadata(t).then(()=>{e.openSidebar()}))}))}C.initDomI18n(),a()(document).on(r.EVENT_SIDEBAR_OPEN,()=>{if(!e.showSidebar)return tt.getCurrentUsedDatabase()?void dt.getMetadata().then(t=>{t.locked||t.fullscreen||(e.showSidebar=!0,this.$nextTick(()=>{a()(document).trigger(r.EVENT_SIDEBAR_OPENED),a()(document).trigger(r.EVENT_GRID_RESIZE)}))}):(e.showSidebar=!0,void this.$nextTick(()=>{a()(document).trigger(r.EVENT_SIDEBAR_OPENED),a()(document).trigger(r.EVENT_GRID_RESIZE)}))}),a()(document).on(r.EVENT_SIDEBAR_CLOSE,()=>{e.showSidebar=!1,this.$nextTick(()=>{a()(document).trigger(r.EVENT_GRID_RESIZE)})}),a()(document).on(r.EVENT_DB_INITIALIZED,()=>{e.currentUser=tt.getCurrentUsedDatabase(),e.isLocalUser=g.isSavedLocalUser(e.currentUser)}),a()(document).on(r.EVENT_DB_CLOSED,()=>{e.currentUser=tt.getCurrentUsedDatabase(),e.isLocalUser=g.isSavedLocalUser(e.currentUser)}),a()(document).on(r.EVENT_DB_SYNC_STATE_CHANGE,(t,n)=>{e.syncState=n}),e.syncState=dt.getSyncState(),window.addEventListener("resize",()=>{qe.debounce((function(){a()(document).trigger(r.EVENT_GRID_RESIZE)}),300,r.EVENT_GRID_RESIZE)}),St.global.onSwipedDown(t).onEscape(t).onExitFullscreen(t),St.global.startListening(),e.openSidebar()},updated(){C.initDomI18n()}})};var Wt=Pt({props:["fullHeader"],data:()=>({show:!Yt.isSidebarOpen(),tag:"div"}),methods:{openSidebar(){a()(document).trigger(r.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn(){this.show=!1},onCloseFn(){this.show=!0}},mounted(){a()(document).on(r.EVENT_SIDEBAR_CLOSE,this.onCloseFn),a()(document).on(r.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy(){a()(document).off(r.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},bt,[],!1,null,"4ff1a546",null);Wt.options.__file="src/vue-components/components/headerIcon.vue";var zt=Wt.exports,Kt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("button",{staticClass:"btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:e.toggleOpen}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.isOpen,expression:"!isOpen"}],staticClass:"fas fa-chevron-down arrow"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"fas fa-chevron-up arrow"}),e._v(" "),n(e.componentType,{tag:"component",staticStyle:{"margin-left":"2em",display:"inline-block"},attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.accLabel)))])],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"accordion-content",style:"background-color:"+e.backgroundColor},[e._t("default")],2)])};Kt._withStripped=!0;var Jt={props:["accLabel","accOpen","accLabelType","accBackgroundColor"],data(){return{isOpen:"true"===this.accOpen||!0===this.accOpen,componentType:this.accLabelType||"span",backgroundColor:this.accBackgroundColor||"whitesmoke"}},methods:{toggleOpen(){this.isOpen=!this.isOpen,this.isOpen?this.$emit("open"):this.$emit("close")},open(){this.isOpen=!0}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Xt=(n(59),Pt(Jt,Kt,[],!1,null,"66ff21d8",null));Xt.options.__file="src/vue-components/components/accordion.vue";var qt=Xt.exports,Zt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.gridFrom?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("div",[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridFrom.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridFrom.thumbnail?e.gridFrom.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-right hide-mobile two columns",staticStyle:{"margin-top":"2em"}}),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-down show-mobile two columns",staticStyle:{margin:"0.5em 20%"}}),e._v(" "),n("div",{staticClass:"four columns"},[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridTo.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridTo.thumbnail?e.gridTo.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementName","data-i18n":""}},[e._v("Connect with element // Verknüpfung über Element")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedElement,expression:"selectedElement"}],staticClass:"four columns",attrs:{id:"elementName"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedElement=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("create new Element // neues Element erstellen")]),e._v(" "),e._l(e.gridFrom.gridElements,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e.i18nService.getTranslation(t.label)||e.i18nService.translate("(empty element) // (leeres Element)")))])}))],2)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.selectedElement||!e.i18nService.getTranslation(e.selectedElement.label),expression:"!selectedElement || !i18nService.getTranslation(selectedElement.label)"}],staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementLabel","data-i18n":""}},[e._v("Label of new element // Label des neuen Elements")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newElementLabel[e.i18nService.getBrowserLang()],expression:"newElementLabel[i18nService.getBrowserLang()]"}],staticClass:"four columns",attrs:{type:"text",id:"elementLabel",maxlength:"35"},domProps:{value:e.newElementLabel[e.i18nService.getBrowserLang()]},on:{input:function(t){t.target.composing||e.$set(e.newElementLabel,e.i18nService.getBrowserLang(),t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedElement&&e.selectedElement.actions.filter((function(t){return t.modelName===e.GridActionNavigate.getModelName()})).length>0,expression:"selectedElement && selectedElement.actions.filter(e => e.modelName === GridActionNavigate.getModelName()).length > 0"}],staticClass:"row"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "),e._m(1)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Zt._withStripped=!0;var Qt={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:x,imageUtil:M,i18nService:C}},methods:{save(){this.saveInternal().then(()=>{this.$emit("reload"),this.$emit("close")})},saveInternal(){let e=this.selectedElement;if(!e){let t=new de(this.gridFrom).getNewXYPos();e=new K({label:this.newElementLabel,x:t.x,y:t.y}),this.gridFrom.gridElements.push(e)}return e.label=e.label||this.newElementLabel,e.actions=e.actions.filter(e=>e.modelName!==x.getModelName()),e.actions.push(new x({toGridId:this.gridTo.id})),dt.saveGrid(this.gridFrom)}},mounted(){this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),dt.getGrid(this.gridFromProp.id).then(e=>{this.gridFrom=JSON.parse(JSON.stringify(e)),C.initDomI18n()})},updated(){C.initDomI18n()}},en=(n(61),Pt(Qt,Zt,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Link grids // Grids verknüpfen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{attrs:{"data-i18n":""}},[t("span",[t("b",[this._v("Hint: ")]),this._v(" This element already navigates to another grid. This navigation will be overwritten.")]),this._v(" "),t("span",[t("b",[this._v("Hinweis: ")]),this._v(" Dieses Element navigiert bereits zu einem anderen Grid. Diese Navigation wird überschrieben.")])])}],!1,null,"00ff350d",null));en.options.__file="src/vue-components/modals/gridLinkModal.vue";var tn=en.exports,nn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"selectGrid","data-i18n":""}},[e._v("Select grid // Grid auswählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",attrs:{id:"selectGrid"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]},e.selectedGridChanged]}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("All grids // Alle Grids")]),e._v(" "),e._l(e.graphList,(function(t){return n("option",{domProps:{value:t.grid}},[e._v(e._s(e._f("extractTranslation")(t.grid.label)))])}))],2),e._v(" "),n("div",{staticClass:"four columns"},[e.selectedGrid&&e.selectedGrid.thumbnail?n("img",{attrs:{src:e.selectedGrid.thumbnail.data}}):e._e()])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedGrid&&e.allChildren&&e.allChildren.length>0,expression:"selectedGrid && allChildren && allChildren.length > 0"}],staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.exportConnected,expression:"options.exportConnected"}],attrs:{id:"exportConnected",type:"checkbox"},domProps:{checked:Array.isArray(e.options.exportConnected)?e._i(e.options.exportConnected,null)>-1:e.options.exportConnected},on:{change:function(t){var n=e.options.exportConnected,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"exportConnected",n.concat([null])):r>-1&&e.$set(e.options,"exportConnected",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"exportConnected",a)}}}),e._v(" "),n("label",{attrs:{for:"exportConnected"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Export all child grids // Alle untergeordneten Grids exportieren")]),e._v(" "),n("span",[e._v("("+e._s(e.allChildren?e.allChildren.length:0)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("grids // Grids")]),e._v(")")])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showLinks,expression:"options.showLinks"}],attrs:{id:"showLinks",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showLinks)?e._i(e.options.showLinks,null)>-1:e.options.showLinks},on:{change:function(t){var n=e.options.showLinks,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showLinks",n.concat([null])):r>-1&&e.$set(e.options,"showLinks",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showLinks",a)}}}),e._v(" "),n("label",{attrs:{for:"showLinks","data-i18n":""}},[e._v("Insert links between pages // Verknüpfungen zwischen Seiten anzeigen")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.printBackground,expression:"options.printBackground"}],attrs:{id:"printBackground",type:"checkbox"},domProps:{checked:Array.isArray(e.options.printBackground)?e._i(e.options.printBackground,null)>-1:e.options.printBackground},on:{change:function(t){var n=e.options.printBackground,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"printBackground",n.concat([null])):r>-1&&e.$set(e.options,"printBackground",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"printBackground",a)}}}),e._v(" "),n("label",{attrs:{for:"printBackground","data-i18n":""}},[e._v("Print background color // Hintergrundfarbe drucken")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showRegister,expression:"options.showRegister"}],attrs:{id:"showRegister",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showRegister)?e._i(e.options.showRegister,null)>-1:e.options.showRegister},on:{change:function(t){var n=e.options.showRegister,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showRegister",n.concat([null])):r>-1&&e.$set(e.options,"showRegister",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showRegister",a)}}}),e._v(" "),n("label",{attrs:{for:"showRegister","data-i18n":""}},[e._v("Print index at side edge // Griffregister am Seitenrand drucken")])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download PDF // PDF herunterladen")])])])])])])])])};nn._withStripped=!0;let an={},rn=null,sn=5,on=8,ln=3,cn=1,dn=1,un=.8;function fn(e,t,n){let i=[];t=new de(t);let a=n.showRegister&&n.pages>1?10:0,r=!1!==n.showFooter?on:0,s=(297-2*sn)/t.getWidth(),o=(210-2*sn-r-a)/t.getHeight();if(r>0){let i=210-sn-a,s=.4*r/.352778;e.setTextColor(0),e.setFontSize(s);let o=C.translate("Printed by AsTeRICS Grid, https://grid.asterics.eu // Gedruckt mit AsTeRICS Grid, https://grid.asterics.eu"),l=C.getTranslation(t.label),c=n.idParentsMap[t.id][0];if(n.showLinks&&c){l=JSON.stringify(n.idParentsMap[t.id].slice(0,5))+" => "+l;let a=e.getTextWidth(l);e.link(148.5-a/2,i-.4*r,a,.4*r,{pageNumber:c})}let d=(n.idPageMap[t.id]||1)+" / "+(Object.keys(n.idPageMap).length||1);e.text(o,sn+cn,i,{baseline:"bottom",align:"left"}),e.text(l,148.5,i,{baseline:"bottom",align:"center"}),e.text(d,297-sn-cn,i,{baseline:"bottom",align:"right"})}if(a>0){let t=30,i=1,r=n.pages;n.pages>t&&(i=Math.ceil(n.pages/t),r=Math.ceil(n.pages/i)),e.setFillColor(255,255,255),e.setDrawColor(0),e.roundedRect(0,210-a,297,a,0,0),e.setFontSize(13);let s=297/r;for(let t=0;t{let a=s*t.width-2*cn,r=o*t.height-2*cn,l=sn+s*t.x+cn,c=sn+o*t.y+cn;if(e.setDrawColor(0),n.printBackground){let n=qe.getRGB(t.backgroundColor);n=n||[173,216,230],e.setFillColor(n[0],n[1],n[2])}else e.setFillColor(255,255,255);e.roundedRect(l,c,a,r,3,3,"FD"),C.getTranslation(t.label)&&function(e,t,n,i,a,r){let s=C.getTranslation(t.label),o=t.image&&t.image.data,l=n-2*ln,c=function(e,t,n,i,a,r){let s=n,o=n/2;for(let n=0;n<10;n++){e.setFontSize(s);let n=e.getTextDimensions(t);if(r&&-1!==t.indexOf(" ")){let e=Math.floor(a/n.h),t=Math.ceil(n.w/i);n.w/e>.5*i||t>e?s-=o:s+=o}else n.w>i?s-=o:s+=o;o/=2}return Math.floor(Math.min(s,n))}(e,s,(o?i*(1-un):i/2)/.352778*.8,l,i-2*ln,!o);e.setTextColor(0,0,0),e.setFontSize(c);let d=e.getTextDimensions(s),u=Math.ceil(d.w/l),f=o?i-2*cn:(i-d.h*u)/2;e.text(s,a+n/2,r+f,{baseline:o?"bottom":"top",align:"center",maxWidth:l})}(e,t,a,r,l,c),i.push(function(e,t,n,i,a,r){if(!t||!t.image||!t.image.data||0!==t.image.data.indexOf("data:"))return Promise.resolve();return t.image.getDimensions().then(async s=>{let o=t.image.getImageType(),l=C.getTranslation(t.label)?un:1,c=n-2*dn,d=(i-2*dn)*l,u=c/d,f=c,p=d,h=0,m=0;s.ratio>=u?(isNaN(s.ratio)||(p=f/s.ratio),m=(d-p)/2):(isNaN(s.ratio)||(f=p*s.ratio),h=(c-f)/2);let v=a+dn+h,g=r+dn+m;if(o===U.IMAGE_TYPES.PNG)_("PNG");else if(o===U.IMAGE_TYPES.JPEG)_("JPEG");else if(o===U.IMAGE_TYPES.SVG){let n=f/.084666667,i=await M.base64SvgToBase64Png(t.image.data,n);e.addImage(i,o,v,g,f,p)}function _(n){e.addImage(t.image.data,n,v,g,f,p)}return Promise.resolve()})}(e,t,a,r,l,c).then(()=>{if(n.showLinks&&n.idPageMap[t.getNavigateGridId()]){let i=n.idPageMap[t.getNavigateGridId()],s=Math.max(a/10,7),o=a-s-1,d=1;if(e.setDrawColor(255),e.setFillColor(90,113,122),e.roundedRect(l+o,c+d,s,s,1,1,"FD"),e.link(l,c,a,r,{pageNumber:i}),i){let t=.6*s/.352778;e.setTextColor(255,255,255),e.setFontSize(t),e.text(i+"",l+o+s/2,c+d+s/2,{baseline:"middle",align:"center",maxWidth:s})}}return Promise.resolve()}))}),Promise.all(i)}an.initPrintHandlers=function(){window.addEventListener("beforeprint",()=>{rn&&($("#grid-container").width("27.7cm"),$("#grid-container").height("19cm"),rn.autosize())}),window.addEventListener("afterprint",()=>{rn&&($("#grid-container").width(""),$("#grid-container").height(""),rn.autosize())})},an.setGridInstance=function(e){rn=e},an.gridsToPdf=async function(e,t){n.e(5).then(n.bind(null,620)).then(async n=>{(t=t||{}).idPageMap={},t.idParentsMap={},e.forEach((e,n)=>{t.idPageMap[e.id]=n+1}),e.forEach(e=>{t.idParentsMap[e.id]=t.idParentsMap[e.id]||[],e.gridElements.forEach(n=>{let i=(n=new K(n)).getNavigateGridId();i&&(t.idParentsMap[i]=t.idParentsMap[i]||[],t.idParentsMap[i].push(t.idPageMap[e.id]))})});const i=new n.jsPDF({orientation:"landscape",compress:!0});t.pages=e.length;for(let n=0;n{t.abort=!0}),t.page=n+1,await fn(i,e[n],t),ne.grid);let t=e.map(e=>e.id);Promise.resolve().then(async()=>{if(e.length>this.gridsData.length/2)return dt.getGrids(!0,!0);{let e=[];for(let n=0;n{e=t.map(t=>e.filter(e=>e.id===t)[0]),an.gridsToPdf(e,{printBackground:this.options.printBackground,showLinks:this.options.showLinks,showRegister:this.options.showRegister,progressFn:(e,t,n)=>{Yt.showProgressBar(e,{header:C.translate("Creating PDF file // Erstelle PDF Datei"),text:t,cancelFn:n,closable:!0})}}),this.$emit("close")})},selectedGridChanged(){this.selectedGrid&&(this.allChildren=q.getAllChildrenRecursive(this.graphList,this.selectedGrid.id))}},mounted(){C.initDomI18n(),dt.getGlobalGrid().then(e=>{this.globalGridId=e?e.id:null,this.graphList=q.getGraphList(this.gridsData,this.globalGridId)})}},hn=(n(63),Pt(pn,nn,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Export grids to PDF // Grids als PDF exportieren\n ")])])}],!1,null,"7e9d09ff",null));hn.options.__file="src/vue-components/modals/exportPdfModal.vue";var mn=hn.exports;let vn=null;var gn={components:{ExportPdfModal:mn,GridLinkModal:tn,Accordion:qt,HeaderIcon:zt},data:()=>({metadata:null,grids:null,graphList:[],selectedGraphElement:null,newLabel:{},showLoading:!0,selectValues:{CONNECTED_GRIDS:"CONNECTED_GRIDS",NOT_REACHABLE_GRIDS:"NOT_REACHABLE_GRIDS",ALL_GRIDS:"ALL_GRIDS"},selectValue:null,linkModal:{show:!1,gridFrom:null,gridTo:null},pdfModal:{show:!1},i18nService:C,currentLanguage:C.getBrowserLang(),imageUtil:M}),methods:{setSelectedGraphElement(e,t){e&&(this.selectedGraphElement=e,this.newLabel=JSON.parse(JSON.stringify(this.selectedGraphElement.grid.label)),this.reinitContextMenu(),this.metadata.lastOpenedGridId=e.grid.id,dt.saveMetadata(this.metadata),t||a()(".all-grids-view").animate({scrollTop:0},200))},reinitContextMenu(){var e;!function(){a.a.contextMenu("destroy");let e=vn.selectedGraphElement?C.getTranslation(vn.selectedGraphElement.grid.label):"",t={CONTEXT_CONNECT:{name:C.translate('Connect to grid "{?}" // Verknüpfen mit Grid "{?}"',e),icon:"fas fa-external-link-alt",visible:()=>vn.selectValue!==vn.selectValues.CONNECTED_GRIDS},CONTEXT_SHOW:{name:"Show // Öffnen",icon:"far fa-eye"},CONTEXT_EDIT:{name:"Edit // Bearbeiten",icon:"far fa-edit"},CONTEXT_DUPLICATE:{name:"Clone // Duplizieren",icon:"far fa-clone"},CONTEXT_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt"},CONTEXT_EXPORT:{name:"Export // Exportieren",icon:"fas fa-file-export"},CONTEXT_EXPORT_PDF:{name:"Save as PDF // Als PDF speichern",icon:"far fa-file-pdf"}};a.a.contextMenu({selector:".gridOptions",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_CONNECT":vn.linkModal.gridFrom=vn.selectedGraphElement.grid,vn.linkModal.gridTo=vn.grids.filter(e=>e.id===t)[0],vn.linkModal.show=!0;break;case"CONTEXT_SHOW":vn.show(t);break;case"CONTEXT_EDIT":vn.edit(t);break;case"CONTEXT_DUPLICATE":vn.clone(t);break;case"CONTEXT_DELETE":vn.deleteGrid(t);break;case"CONTEXT_EXPORT":vn.exportToFile(t);break;case"CONTEXT_EXPORT_PDF":vn.exportToPdf(t)}}(e,t.$trigger.attr("data-grid-id"))},trigger:"left",items:t,zIndex:10})}(),e={CONTEXT_NEW:{name:"New grid // Neues Grid",icon:"fas fa-plus"},SEP1:"---------",CONTEXT_EXPORT:{name:"Export backup to file // Backup als Datei exportieren",icon:"fas fa-file-export"},CONTEXT_IMPORT:{name:"Import grid(s) from file // Grid(s) aus Datei importieren",icon:"fas fa-file-import"},CONTEXT_IMPORT_BACKUP:{name:"Clear all and import from file // Alles löschen und aus Datei importieren",icon:"fas fa-file-import"},SEP2:"---------",CONTEXT_EXPORT_PDF_MODAL:{name:"Save grids to PDF // Grids als PDF speichern",icon:"far fa-file-pdf"},SEP3:"---------",CONTEXT_DELETE_ALL:{name:"Delete all grids // Alle Grids löschen",icon:"fas fa-trash-alt",disabled:()=>0===vn.grids.length},CONTEXT_RESET:{name:"Reset to default configuration // Auf Standardkonfiguration zurücksetzen",icon:"fas fa-minus-circle"}},a.a.contextMenu({selector:"#moreButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_NEW":vn.addGrid();break;case"CONTEXT_IMPORT":document.getElementById("inputFile").click();break;case"CONTEXT_IMPORT_BACKUP":document.getElementById("inputFileBackup").click();break;case"CONTEXT_EXPORT_PDF_MODAL":vn.pdfModal.show=!0;break;case"CONTEXT_EXPORT":vn.exportToFile();break;case"CONTEXT_DELETE_ALL":vn.deleteAll();break;case"CONTEXT_RESET":vn.reset()}}(e)},trigger:"left",items:e,zIndex:10})},deleteGrid:function(e){log.debug("delete: "+e);let t=C.getTranslation(this.grids.filter(t=>t.id===e)[0].label);confirm(C.translate("CONFIRM_DELETE_GRID",t))&&dt.deleteGrid(e).then(()=>{this.reload()})},addGrid:function(){var e=this.grids.map(e=>C.getTranslation(e.label)),t=new de({label:C.getTranslationObject(s.getNewName("newGrid",e)),gridElements:[]});dt.saveGrid(t).then(()=>this.reload(t.id)).then(()=>{a()("#gridName").focus()})},isLabelDuplicate:function(e){return!e||this.grids.map(e=>C.getTranslation(e.label)).filter(t=>t===e).length>0},saveGridLabel(){this.selectedGraphElement.grid.label=JSON.parse(JSON.stringify(this.newLabel)),dt.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show(e){as.toGrid(e)},edit(e){as.toEditGrid(e)},clone(e){var t=this;dt.getGrid(e).then(e=>{let n=e.clone();dt.saveGrid(n).then(()=>{t.reload(n.id)})})},exportToFile(e){e?dt.downloadSingleGrid(e):dt.downloadBackup()},exportToPdf(e){dt.getGrid(e).then(e=>{an.gridsToPdf([e])})},importFromFile:function(e){this.importFromFileInternal(e,!1)},importBackupFromFile:function(e){let t=e.target&&e.target.files[0]&&e.target.files[0]?e.target.files[0].name:"";confirm(C.translate("CONFIRM_IMPORT_BACKUP",t))?this.importFromFileInternal(e,!0):this.resetFileInput(e)},reload:function(e){let t=this;return dt.getMetadata().then(e=>(t.metadata=JSON.parse(JSON.stringify(e)),dt.getGrids())).then(n=>{t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=q.getGraphList(t.grids,t.metadata.globalGridId);let i=e||t.metadata.lastOpenedGridId;return t.setSelectedGraphElement(t.graphList.filter(e=>e.grid.id===i)[0]||t.graphList[0],!0),Promise.resolve()})},onPullUpdate(){let e=this.selectedGraphElement?this.selectedGraphElement.grid.id:null;this.reload(e)},reset(){confirm(C.translate("CONFIRM_RESET_DB"))&&(this.showLoading=!0,Yt.showProgressBar(0,{header:C.translate("Reset to default gridset // Zurücksetzen auf Standard-Gridset"),text:C.translate("Deleting grids // Grids werden gelöscht")}),dt.deleteAllGrids().then(()=>(Yt.showProgressBar(50,{text:C.translate("Importing grids // Grids werden importiert")}),dt.importDefaultGridset())).then(()=>{Yt.showProgressBar(100),this.reload()}))},deleteAll(){confirm(C.translate("Do you really want to delete all grids? This operation cannot be undone! // Möchten Sie wirklich alle Grids löschen? Diese Aktion kann nicht rückgängig gemacht werden!"))&&(this.showLoading=!0,dt.deleteAllGrids().then(()=>{this.reload()}))},setGlobalGridActive(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,dt.saveMetadata(this.metadata)},resetGlobalGrid(e){(e||confirm(C.translate("Do you really want to reset the global grid to default? // Möchten Sie das globale Grid wirklich zurücksetzen?")))&&dt.getGlobalGrid(!0).then(e=>e?dt.deleteGrid(e.id):Promise.resolve()).then(()=>{let e=q.generateGlobalGrid(this.grids[0].id);return this.metadata.globalGridId=e.id,this.metadata.globalGridActive=!0,dt.saveGrid(e)}).then(()=>dt.saveMetadata(this.metadata)).then(()=>{this.reload()})},importFromFileInternal(e,t){let n=e.target.files[0];n&&n.name&&(this.showLoading=!0,Yt.showProgressBar(0,{header:C.translate("Importing grids // Grids werden importiert"),text:C.translate("Reading file // Datei wird gelesen")}),dt.importGridsFromFile(n,t,(e,t)=>{Yt.showProgressBar(e,{text:t})}).then(()=>{this.resetFileInput(e),this.reload()}))},resetFileInput(e){var t=a()(e.target);t.wrap("
    ").closest("form").get(0).reset(),t.unwrap()}},computed:{headerDetails:function(){return this.selectedGraphElement?C.translate("Details for grid {?} // Details für Grid {?}",`"${C.getTranslation(this.selectedGraphElement.grid.label)}"`):""},connectedGridsOptionLabel:function(){return this.selectedGraphElement?C.translate('Grids connected with "{?}" // Grid verknüpft mit "{?}"',C.getTranslation(this.selectedGraphElement.grid.label)):""},hasGlobalGrid:function(){return!(!this.grids||!this.metadata)&&(this.metadata.globalGridId&&!!this.grids.filter(e=>e.id===this.metadata.globalGridId)[0])},graphElemsToShow:function(){if(!this.graphList||!this.selectedGraphElement)return[];switch(this.selectValue){case this.selectValues.CONNECTED_GRIDS:return this.selectedGraphElement.allRelatives;case this.selectValues.NOT_REACHABLE_GRIDS:return this.graphList.filter(e=>0===e.parents.length);case this.selectValues.ALL_GRIDS:return this.graphList}}},created(){a()(document).on(r.EVENT_DB_PULL_UPDATED,this.onPullUpdate)},mounted:function(){vn=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then(()=>{this.reinitContextMenu(),C.initDomI18n()})},updated(){C.initDomI18n()},beforeDestroy(){a()(document).off(r.EVENT_DB_PULL_UPDATED,this.onPullUpdate),a.a.contextMenu("destroy")}},_n=(n(65),Pt(gn,_t,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"small",attrs:{tabindex:"32",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("label",{attrs:{for:"actionGroup","data-i18n":""}},[this._v("Actions // Aktionen")])])}],!1,null,"dd9feaca",null));_n.options.__file="src/vue-components/views/allGridsView.vue";var bn=_n.exports,En=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.gridData?n("div",{staticClass:"box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{staticClass:"left"}),e._v(" "),n("button",{staticClass:"spaced small left",attrs:{tabindex:"30",title:"Back"},on:{click:e.back}},[n("i",{staticClass:"fas fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing off // Bearbeiten aus")])]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"spaced btn-group"},[n("button",{staticClass:"small",attrs:{tabindex:"31",title:"Undo",disabled:!e.canUndo||e.doingUndoRedo},on:{click:e.undo}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Undo // Rückgängig")])]),e._v(" "),n("button",{staticClass:"small spaced",attrs:{tabindex:"32",title:"Redo",disabled:!e.canRedo||e.doingUndoRedo},on:{click:e.redo}},[n("i",{staticClass:"fas fa-redo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Redo // Wiederherstellen")])])])],1),e._v(" "),n("div",[e.showEditModal?n("edit-grid-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-instance":e.getGridInstance(),"grid-data-id":e.gridData.id},on:{close:function(t){e.showEditModal=!1},mark:e.markElement,actions:function(t){e.editElementId=t,e.showActionsModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showMultipleModal?n("add-multiple-modal",{attrs:{"grid-data":e.gridData,"grid-instance":e.getGridInstance()},on:{close:function(t){e.showMultipleModal=!1}}}):e._e()],1),e._v(" "),n("div",[e.showActionsModal?n("edit-actions-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-id-param":e.gridData.id},on:{close:function(t){e.showActionsModal=!1},reload:e.reload,edit:function(t){e.showEditModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showDimensionsModal?n("grid-dimension-modal",{attrs:{"grid-data-param":e.gridData,"is-global-grid":e.metadata.globalGridId===e.gridData.id},on:{close:function(t){e.showDimensionsModal=!1},save:e.setDimensions}}):e._e()],1),e._v(" "),n("div",[e.showMoveModal?n("element-move-modal",{attrs:{"grid-id":e.gridData.id,"grid-element-id":e.editElementId},on:{close:function(t){e.showMoveModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",[e.showTranslateModal?n("grid-translate-modal",{attrs:{"grid-data-id":e.gridData.id},on:{close:function(t){e.showTranslateModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",{staticClass:"row content"},[e.showGrid?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}}),e._v(" "),e._m(1)])]):e._e()};En._withStripped=!0;let yn={},Cn={},wn={};yn.setState=function(e,t){Cn[e]!==t&&(Cn[e]=t,wn[e]=wn[e]||[],wn[e].forEach(e=>{e(t)}))},yn.getState=function(e){return Cn[e]},yn.onStateChanged=function(e,t){wn[e]=wn[e]||[],wn[e].push(t)},yn.clearListeners=function(e){e?wn[e]=[]:wn={}};let Tn={};Tn.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",Tn.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";let An=g.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",Nn=[],Sn=JSON.parse('[{"name":"UK English Female","lang":"en-GB"},{"name":"UK English Male","lang":"en-GB"},{"name":"US English Female","lang":"en-US"},{"name":"US English Male","lang":"en-US"},{"name":"Arabic Male","lang":"ar-SA"},{"name":"Arabic Female","lang":"ar-SA"},{"name":"Armenian Male","lang":"hy-AM"},{"name":"Australian Female","lang":"en-AU"},{"name":"Australian Male","lang":"en-AU"},{"name":"Bangla Bangladesh Female","lang":"bn-BD"},{"name":"Bangla Bangladesh Male","lang":"bn-BD"},{"name":"Bangla India Female","lang":"bn-IN"},{"name":"Bangla India Male","lang":"bn-IN"},{"name":"Brazilian Portuguese Female","lang":"pt-BR"},{"name":"Chinese Female","lang":"zh-CN"},{"name":"Chinese Male","lang":"zh-CN"},{"name":"Chinese (Hong Kong) Female","lang":"zh-HK"},{"name":"Chinese (Hong Kong) Male","lang":"zh-HK"},{"name":"Chinese Taiwan Female","lang":"zh-TW"},{"name":"Chinese Taiwan Male","lang":"zh-TW"},{"name":"Czech Female","lang":"cs-CZ"},{"name":"Danish Female","lang":"da-DK"},{"name":"Deutsch Female","lang":"de-DE"},{"name":"Deutsch Male","lang":"de-DE"},{"name":"Dutch Female","lang":"nl-NL"},{"name":"Dutch Male","lang":"nl-NL"},{"name":"Estonian Male","lang":"et-EE"},{"name":"Filipino Female","lang":"fil-PH"},{"name":"Finnish Female","lang":"fi-FI"},{"name":"French Female","lang":"fr-FR"},{"name":"French Male","lang":"fr-FR"},{"name":"French Canadian Female","lang":"fr-CA"},{"name":"French Canadian Male","lang":"fr-CA"},{"name":"Greek Female","lang":"el-GR"},{"name":"Hindi Female","lang":"hi-IN"},{"name":"Hindi Male","lang":"hi-IN"},{"name":"Hungarian Female","lang":"hu-HU"},{"name":"Indonesian Female","lang":"id-ID"},{"name":"Indonesian Male","lang":"id-ID"},{"name":"Italian Female","lang":"it-IT"},{"name":"Italian Male","lang":"it-IT"},{"name":"Japanese Female","lang":"ja-JP"},{"name":"Japanese Male","lang":"ja-JP"},{"name":"Korean Female","lang":"ko-KR"},{"name":"Korean Male","lang":"ko-KR"},{"name":"Latin Male","lang":"la"},{"name":"Nepali","lang":"ne-NP"},{"name":"Norwegian Female","lang":"nb-NO"},{"name":"Norwegian Male","lang":"nb-NO"},{"name":"Polish Female","lang":"pl-PL"},{"name":"Polish Male","lang":"pl-PL"},{"name":"Portuguese Female","lang":"pt-BR"},{"name":"Portuguese Male","lang":"pt-BR"},{"name":"Romanian Female","lang":"ro-RO"},{"name":"Russian Female","lang":"ru-RU"},{"name":"Sinhala","lang":"si-LK"},{"name":"Slovak Female","lang":"sk-SK"},{"name":"Spanish Female","lang":"es-ES"},{"name":"Spanish Latin American Female","lang":"es-MX"},{"name":"Spanish Latin American Male","lang":"es-MX"},{"name":"Swedish Female","lang":"sv-SE"},{"name":"Swedish Male","lang":"sv-SE"},{"name":"Tamil Female","lang":"hi-IN"},{"name":"Tamil Male","lang":"hi-IN"},{"name":"Thai Female","lang":"th-TH"},{"name":"Thai Male","lang":"th-TH"},{"name":"Turkish Female","lang":"tr-TR"},{"name":"Turkish Male","lang":"tr-TR"},{"name":"Ukrainian Female","lang":"uk-UA"},{"name":"Vietnamese Female","lang":"vi-VN"},{"name":"Vietnamese Male","lang":"vi-VN"},{"name":"Afrikaans Male","lang":"af-ZA"},{"name":"Albanian Male","lang":"sq-AL"},{"name":"Bosnian Male","lang":"bs"},{"name":"Catalan Male","lang":"ca-ES"},{"name":"Croatian Male","lang":"hr-HR"},{"name":"Esperanto Male","lang":"eo"},{"name":"Icelandic Male","lang":"is-IS"},{"name":"Latvian Male","lang":"lv-LV"},{"name":"Macedonian Male","lang":"mk-MK"},{"name":"Moldavian Female","lang":"md"},{"name":"Montenegrin Male","lang":"me"},{"name":"Serbian Male","lang":"sr-RS"},{"name":"Serbo-Croatian Male","lang":"hr-HR"},{"name":"Swahili Male","lang":"sw-KE"},{"name":"Welsh Male","lang":"cy"},{"name":"Fallback UK Female","lang":"en-GB"}]');function In(e){let t=Nn.filter(t=>t.name===e);return t.length>0?t:null}function kn(e,t,n,i){-1===Nn.map(e=>e.name).indexOf(e)&&Nn.push({name:e,lang:t.substring(0,2),type:n,ref:i})}function On(){Nn.sort((e,t)=>e.type===Tn.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===Tn.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name))}Tn.speak=function(e,t,n){let i=null,a="string"==typeof e;if(!e||!a&&0===Object.keys(e).length)return;if(a)i=e;else{let n=e[t=function(e){let t=In(e);return t&&t[0]?t[0].lang:null}(An)||t]||C.getTranslation(e,null,!0);i=n.text?n.text:n,t=t||n.lang}Tn.stopSpeaking(),t=t||C.getBrowserLang();let s=In(n)||In(An)||function(e){return Nn.filter(t=>t.lang.substring(0,2)===e)}(t),o=s.filter(e=>e.type===Tn.VOICE_TYPE_NATIVE),l=s.filter(e=>e.type===Tn.VOICE_TYPE_RESPONSIVEVOICE);if(Tn.nativeSpeechSupported()&&o.length>0){var c=new SpeechSynthesisUtterance(i);c.voice=o[0].ref,log.debug("used voice: "+c.voice.name),window.speechSynthesis.speak(c)}else l.length>0&&responsiveVoice.speak(i,l[0].name);function d(){Tn.isSpeaking()&&yn.setState(r.STATE_ACTIVATED_TTS,!0)}d(),setTimeout(()=>{d()},700)},Tn.speakLabel=function(e,t){e&&t&&dt.getGridElement(e,t).then(e=>{Tn.speak(C.getTranslation(e.label))})},Tn.stopSpeaking=function(){Tn.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},Tn.isSpeaking=function(){return Tn.nativeSpeechSupported()&&window.speechSynthesis.speaking||responsiveVoice.isPlaying()},Tn.getVoicesLangs=function(){let e=Nn.map(e=>e.lang.substring(0,2));return C.getAllLanguages().filter(t=>-1!==e.indexOf(t.code))},Tn.getVoices=function(){return Nn},Tn.setPreferredVoiceName=function(e){An=e,g.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},Tn.getPreferredVoiceName=function(){return An},Tn.nativeSpeechSupported=function(){return!("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis||!window.speechSynthesis.getVoices)},Tn.nativeSpeechSupported()&&(window.speechSynthesis.getVoices(),setTimeout((function(){window.speechSynthesis.getVoices().forEach(e=>{kn(e.name,e.lang,Tn.VOICE_TYPE_NATIVE,e)}),On()}),100)),Sn.forEach(e=>{kn(e.name,e.lang,Tn.VOICE_TYPE_RESPONSIVEVOICE)}),On();let Ln={},xn=2,Dn=1,Rn={lastPlayType:z.playTypes.YT_PLAY_PLAYLIST,lastData:"https://www.youtube.com/watch?v=5ffLB4a9APc&list=PL0UXHkT03dGrIHldlEKR0ZWfNMkShuTNz",lastVideoId:null,lastTimes:{},lastPlaylistIndexes:{},dataApiCalls:{},muted:!1,volume:100},Mn=!1,Pn=null,Gn=g.getYTState()||JSON.parse(JSON.stringify(Rn)),Un=!1,$n=null,Fn=null,Vn=null;function Bn(e,t){return void 0!==e?e:Gn.lastTimes[t]}function jn(e,t){let n=null;try{n=new URL(e)}catch(e){}return n?n.searchParams.get(t):null}function Yn(){if(Pn){let e=Ln.getCurrentVideoId(),t=Pn.getPlaylistIndex();e&&(Gn.lastTimes[e]=Pn.getCurrentTime()),t>=0&&Gn.lastPlayType!==z.playTypes.YT_PLAY_VIDEO&&(Gn.lastPlaylistIndexes[Gn.lastData]=t)}JSON.stringify(Gn).length>1048576&&(Gn.lastPlaylistIndexes={},Gn.lastTimes={},Gn.dataApiCalls={}),g.saveYTState(Gn)}function Hn(){Vn=Yt.setTooltip(C.translate("Error on playing YouTube video. Please check internet connection. // Fehler bei der Wiedergabe des YouTube Videos. Bitte Internet-Verbindung überprüfen."),{timeout:3e4,msgType:"warn"})}Ln.doAction=function(e){if(e.performAfterNav)Ln.setActionAfterNavigate(e);else switch(e.action){case z.actions.YT_PLAY:Ln.play(e);break;case z.actions.YT_PAUSE:Ln.pause();break;case z.actions.YT_TOGGLE:Ln.toggle(e);break;case z.actions.YT_RESTART:Ln.restart(e);break;case z.actions.YT_STOP:Ln.stop();break;case z.actions.YT_STEP_FORWARD:Ln.seekToRelative(e.stepSeconds);break;case z.actions.YT_STEP_BACKWARD:Ln.seekToRelative(-e.stepSeconds);break;case z.actions.YT_NEXT_VIDEO:Ln.nextVideo();break;case z.actions.YT_PREV_VIDEO:Ln.previousVideo();break;case z.actions.YT_ENTER_FULLSCREEN:Ln.enterFullscreen();break;case z.actions.YT_VOLUME_UP:Ln.volumeUp(e.stepVolume);break;case z.actions.YT_VOLUME_DOWN:Ln.volumeDown(e.stepVolume);break;case z.actions.YT_VOLUME_MUTE:Ln.volumeToggleMute()}},Ln.play=function(e,t){let n=Promise.resolve();Yt.clearTooltip(Vn),Mn||(n=function(){if(Mn)return Promise.resolve();a()(document).on(r.EVENT_GRID_RESIZE,()=>{Pn&&setTimeout(()=>{let e=a()(".yt-container")[0].getBoundingClientRect();Pn.setSize(e.width,e.height)},400)}),a()(document).on(r.EVENT_USER_CHANGED,()=>{Gn=g.getYTState()||JSON.parse(JSON.stringify(Rn))}),window.addEventListener("beforeunload",e=>{Yn()});let e=document.createElement("script"),t=document.createElement("script");document.body.appendChild(e),document.body.appendChild(t),e.onerror=function(e){log.warn("error on loading YouTube Iframe API script"),Hn()},t.onerror=function(e){log.warn("error on loading YouTube data API script")};let n=new Promise(e=>{window.onYouTubeIframeAPIReady=function(){Mn=!0,e()}}),i=new Promise(e=>{t.addEventListener("load",(function(){e()}))}).then(()=>new Promise(e=>{gapi.load("client",e)})).then(()=>(gapi.client.setApiKey("AIzaSyCDOUROr3UWS8K-WJNlAG21yBTOsveWQn8"),gapi.client.load("https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest"))).catch(e=>(log.error("Error loading GAPI client for API",e),Promise.resolve()));return e.src="https://www.youtube.com/iframe_api",t.src="https://apis.google.com/js/api.js",Promise.all([i,n])}()),n.then(()=>{function n(){switch(e.playType){case z.playTypes.YT_PLAY_VIDEO:let r=Ln.getVideoId(e.data);if(!r)return;if(r===Ln.getCurrentVideoId())return void Pn.playVideo();Gn.lastVideoId=r,Pn.loadVideoById(r,Bn(t,r));break;case z.playTypes.YT_PLAY_SEARCH:Un=!0,(n="gapi.client.youtube.search.list",i={maxResults:100,q:e.data,type:"video",videoEmbeddable:!0},new Promise(e=>{a=a||9e5;let t=n.split("."),r=window;if(t.forEach(e=>{r&&(r=r[e])}),r){Gn.dataApiCalls=Gn.dataApiCalls||{};let t=n+JSON.stringify(i),s=Gn.dataApiCalls[t];if(s&&(new Date).getTime()-s.time(Gn.dataApiCalls[t]={time:(new Date).getTime(),response:JSON.stringify(n)},Yn(),e(n)),t=>(log.error("Execute Google API call error",t),e(null)))}})).then(t=>{let n=t.result.items.map(e=>e.id.videoId).filter(e=>!!e);Pn.loadPlaylist(n,Gn.lastPlaylistIndexes[e.data])});break;case z.playTypes.YT_PLAY_PLAYLIST:let s=Ln.getPlaylistId(e.data);Un=!0,Pn.loadPlaylist({list:s,listType:"playlist",index:Gn.lastPlaylistIndexes[e.data]});break;case z.playTypes.YT_PLAY_CHANNEL:let o=Ln.getChannelId(e.data),l=Ln.getChannelPlaylist(o);Un=!0,Pn.loadPlaylist({list:l,listType:"playlist",index:Gn.lastPlaylistIndexes[e.data]});break;case z.playTypes.YT_PLAY_RELATED:}var n,i,a;Yn()}e.data||(e.playType=Gn.lastPlayType,e.data=Gn.lastData),Gn.lastPlayType=e.playType,Gn.lastData=e.data,Pn?n():Pn=new YT.Player("player",{height:a()(".yt-container")[0].getBoundingClientRect().height,width:a()(".yt-container")[0].getBoundingClientRect().width,playerVars:{mute:e.playMuted?1:0,cc_load_policy:e.showCC?1:0,cc_lang_pref:C.getBrowserLang(),rel:0,iv_load_policy:3},events:{onReady:function(e){Fn=a()("#player")[0],Ln.setVolume(Gn.volume,!0),Gn.muted&&Pn.mute();n()},onStateChange:e=>{(Un&&e.data===Dn||e.data===xn)&&(Un=!1,function(){Pn.setLoop(!0),Gn.lastVideoId=Ln.getCurrentVideoId();let e=Bn(t,Ln.getCurrentVideoId());e&&Pn.seekTo(e,!0)}())},onError:()=>{log.warn("error on playing YouTube video"),Hn()}}})})},Ln.pause=function(){Pn&&(Pn.pauseVideo(),Yn())},Ln.stop=function(){Pn&&(Pn.seekTo(0),Ln.pause())},Ln.toggle=function(e){Ln.isPaused()?Pn.playVideo():Ln.isPlaying()?Ln.pause():Ln.play(e)},Ln.restart=function(e){Pn&&Pn.seekTo(0),Yn(),Ln.isPaused()?Pn.playVideo():Ln.isPlaying()||Ln.play(e,0)},Ln.nextVideo=function(){Pn&&Pn.nextVideo()},Ln.previousVideo=function(){Pn&&Pn.previousVideo()},Ln.seekToRelative=function(e){Pn&&(Pn.seekTo(Pn.getCurrentTime()+e),Yn())},Ln.enterFullscreen=function(){if(Pn&&Fn){let e=Fn.requestFullScreen||Fn.mozRequestFullScreen||Fn.webkitRequestFullScreen||Fn.msRequestFullscreen;e&&(e.bind(Fn)(),St.global.onAnyKey(Ln.exitFullscreen))}},Ln.exitFullscreen=function(){let e=document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.msExitFullscreen;e&&e.bind(document)(),St.global.off(Ln.exitFullscreen)},Ln.volumeUp=function(e){Ln.setVolume(Math.min(Pn.getVolume()+e,100))},Ln.volumeDown=function(e){Ln.setVolume(Math.max(Pn.getVolume()-e,0))},Ln.setVolume=function(e,t){Pn&&(Pn.setVolume(e),t||(Pn.isMuted&&(Pn.unMute(),Gn.muted=!1),Yt.setTooltip(C.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",e),{revertOnClose:!0,timeout:5e3}),Gn.volume=e,Yn()))},Ln.volumeToggleMute=function(){if(Pn){let e=Pn.isMuted();e?Pn.unMute():Pn.mute(),Gn.muted=!e,Yn()}},Ln.setActionAfterNavigate=function(e){e.performAfterNav=!1,$n=e},Ln.isPlaying=function(){return Pn&&Pn.getPlayerState()===Dn},Ln.isPaused=function(){return Pn&&Pn.getPlayerState()===xn},Ln.getCurrentVideoId=function(){if(Pn){if(-1!==Pn.getVideoUrl().indexOf("v="))return Ln.getVideoId(Pn.getVideoUrl())}return""},Ln.getVideoId=function(e){if(!e)return null;let t=jn(e,"v");if(t)return t;if(-1!==e.indexOf("youtu.be/")){let t=e.indexOf("youtu.be/")+"youtu.be/".length,n=-1!==e.indexOf("?")?e.indexOf("?"):void 0;return e.substring(t,n)}return e},Ln.getPlaylistId=function(e){if(!e)return null;let t=jn(e,"list");return t||e},Ln.getChannelId=function(e){if(!e)return null;let t=["channel/"];for(let n=0;n{$n&&(Ln.doAction($n),$n=null)});var Wn={},zn=[],Kn="";let Jn=0,Xn=null;function qn(e){Kn=e=void 0===e?Kn:e,je.learnFromInput(Kn,Xn),$('.item[data-type="ELEMENT_TYPE_COLLECT"] .collect-text').text(Kn),O.adaptFontSize($('.item[data-type="ELEMENT_TYPE_COLLECT"]'))}function Zn(e,t){if(!e)return null;let n=e.actions.map(e=>e.modelName).indexOf(t);return-1===n?null:e.actions[n]}function Qn(){var e=[],t=[];this.canUndo=function(){return e.length>0},this.canRedo=function(){return t.length>0},this.updateGrid=function(n){return new Promise(i=>{dt.getGrid(n.id).then(a=>{a.isEqual(n)?(log.debug("grid not updated, do noting"),i(!1)):(e.push(JSON.parse(JSON.stringify(a))),t=[],dt.saveGrid(n).then(()=>{i(!0)}))})})},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return dt.getGrid(n.id).then(e=>{t.push(JSON.parse(JSON.stringify(e))),dt.saveGrid(n)}),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return dt.getGrid(n.id).then(t=>{e.push(JSON.parse(JSON.stringify(t))),dt.saveGrid(n)}),n}}}function ei(e,t,n){var i=this,s=(e=e,t=t,!1),o=!1,l=null,c=null,d=null,u=null,f=null,p=null,h=null,m=null,v=null,g=new Qn;let _=!1;function b(e){return _=!1,(v=new Promise(t=>{e?(E(n,e),y(p).then(()=>{t()})):dt.getGrid(n.gridId).then(e=>{E(n,e),y(p).then(()=>{t()})})})).then(()=>{_=!0}),v}function E(e,t){e&&(l=e.gridId||l,s=null!=e.enableResizing?e.enableResizing:s,o=e.dragAndDrop),h=(p=t).rowCount,m=p.minColumnCount}function y(l){let u=[];return n.dragAndDrop||(l.gridElements=l.gridElements.filter(e=>!e.hidden),u.push(dt.getGlobalGrid().then(e=>{if(e){let t=!0,i=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,a=1,r=1;1===e.getHeight()&&(r=i*p.rowCount/(1-i),a=1/(p.rowCount*i)-1/p.rowCount,r>=1?(a=1,r=Math.round(r)):(r=1,a=Math.round(a)));let s=q.getOffset(e),o=t?e.getWidth()-s.x:1,l=t?p.getWidthWithBounds():1;e.gridElements.forEach(e=>{e.width*=l,e.x*=l,0===e.y&&(e.height*=r)}),p.gridElements.forEach(e=>{e.width*=o,e.x*=o,e.x+=s.x*l,e.y+=s.y*r+e.y*(a-1),e.height*=a}),p.rowCount*=a,p.rowCount+=s.y*r,h=p.rowCount,p.gridElements=e.gridElements.concat(p.gridElements)}return Promise.resolve()}))),Promise.all(u).then(()=>(Wn.initWithElements(p.gridElements,o),je.initWithElements(p.gridElements),a()(e).empty(),a()(e).append(D.getGridBase(l.id)),d=a()("#"+l.id),l.gridElements.forEach((function(e){d.append(e.toHTML())})),d.gridList({lanes:h,minColumns:m,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:o},{start:w,stop:A}),c=d.data("_gridList"),l.hasSetPositions()||(d.gridList("resize",h),i.toGridData().then(e=>{p=e,dt.updateGrid(p.id,p)})),function(){let e=[];s&&e.push(a()(t).resizable(C()));return a()(document).on(r.EVENT_GRID_RESIZE,()=>{i.autosize()}),Promise.all(e)}().then(()=>{i.autosize(200)}),Promise.resolve()))}function C(){var e=c._cellHeight,t=c._cellWidth;return{autoHide:!1,handles:"se",disabled:!s,start:w,stop(e,t){var n=t.element.parent(),i=t.element.attr("id");new Promise(e=>{var t=n.attr("data-img-id");t?dt.getImage(t).then(t=>{if(t){var r=a()("#"+i)[0].getBoundingClientRect().width;M.convertBase64(t.data,r).then(t=>{n.attr("data-img",t),n.children().children()[0].style.backgroundImage='url("'+t+'")',e()})}else e()}):e()}).then(()=>{A()})},resize:function(n,i){var a=i.element.parent();a.css("z-index",1);var r=Math.max(Math.round(i.element.width()/t),1),s=Math.max(Math.round(i.element.height()/e),1);s=s<=h?s:h,O.adaptFontSize(a),d.gridList("resizeItem",i.element.parent(),{w:r,h:s}),i.element.css("height",""),i.element.css("width","")}}}function w(){a.a.isFunction(u)&&u(p)}function T(){a.a.isFunction(f)&&setTimeout((function(){f(p)}),200)}function A(){return new Promise(e=>{i.toGridData().then(t=>{g.updateGrid(t).then(n=>{n&&(p=t,i.autosize(),T()),e()})})})}i.autosize=function(e){e=e||0,O.adaptFontSizeForGridElements(),setTimeout((function(){d.gridList("autosize"),setTimeout((function(){if(a()("#grid-layout-background-vertical")[0]){var e=c._cellWidth,t=c._cellHeight;a()("#grid-layout-background-vertical").css("margin-left",e-5+"px"),a()("#grid-layout-background-vertical").css("background-size",`${e}px ${e}px`),a()("#grid-layout-background-horizontal").css("margin-top",t-5+"px"),a()("#grid-layout-background-horizontal").css("background-size",`${t}px ${t}px`),a()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){O.adaptFontSizeForGridElements()}),200),s&&a()(t).resizable(C())}),e)},i.enableElementResizing=function(){a()(t).resizable("enable")},i.disableElementResizing=function(){a()(t).resizable("disable")},i.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(h=e,m=t,d.gridList("resize",h,t)),A()},i.removeElement=function(e){return w(),p.gridElements=p.gridElements.filter(t=>t.id!==e),b(p).then(()=>A()).then(()=>Promise.resolve(p))},i.duplicateElement=function(e){w();let t=p.gridElements.filter(t=>t.id===e)[0].duplicate();p.gridElements.push(t),b(p).then(()=>{c.resolveCollisions(t.id),A()})},i.reinit=function(e){return w(),b(e).then(()=>{T()}),v},i.fillGaps=function(){w(),d.gridList("fillGaps"),A()},i.undo=function(){if(g.canUndo()){var e=g.doUndo();b(p=new de(e)).then(()=>{T()})}},i.redo=function(){if(g.canRedo()){var e=g.doRedo();b(p=new de(e)).then(()=>{T()})}},i.updateGridWithUndo=function(e){return new Promise(t=>{g.updateGrid(e).then(e=>{e?(w(),b().then(()=>{t(!0),T()})):t(!1)})})},i.canUndo=()=>g.canUndo(),i.canRedo=()=>g.canRedo(),i.setLayoutChangedStartListener=function(e){u=e},i.setLayoutChangedEndListener=function(e){f=e},i.getCurrentGridId=function(){return p.id},i.toGridData=function(){return new Promise(e=>{var t=[];p.rowCount=h,p.minColumnCount=m,c.items.forEach((function(e){var n=e.$element.attr("data-id"),i=p.gridElements.filter(e=>e.id===n)[0];i.x=e.x,i.y=e.y,i.height=e.h,i.width=e.w,t.push(i)})),p.gridElements=t,e(p)})},i.getInitPromise=function(){return v},i.isInitialized=function(){return _},i.destroy=function(){a()(document).off(r.EVENT_GRID_RESIZE),i.setLayoutChangedEndListener(null),i.setLayoutChangedStartListener(null)},b()}Wn.initWithElements=function(e,t){zn=[];let n=0,i=0;if(Xn=null,e.forEach(e=>{if(e&&e.type===K.ELEMENT_TYPE_NORMAL){i++;let t=C.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===K.ELEMENT_TYPE_COLLECT){let t=JSON.parse(JSON.stringify(e));Xn=Xn||t.actions.reduce((e,t)=>{let n=j.getModelName()?t.dictionaryKey:null;return e||n},null),zn.push(t)}}),Jn=n/i,zn.length>0){let e=setInterval(()=>{$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(e),qn(),t||je.predict(Kn,Xn))},100)}},Wn.doAction=function(e){Zn(e,"GridActionPredict")&&je.predict(Kn,Xn);let t=e.actions.filter(e=>e.modelName===F.getModelName())[0],n=t&&t.speakLanguage?t.speakLanguage:C.getBrowserLang();Tn.speak(Kn,n)},Wn.doCollectElementActions=function(e){if(e){switch(e){case Y.COLLECT_ACTION_CLEAR:qn("");break;case Y.COLLECT_ACTION_REMOVE_WORD:let e=Kn.trim().split(" ");e.pop();let t=e.join(" ");qn(""===t?"":t+" ");break;case Y.COLLECT_ACTION_REMOVE_CHAR:qn(Kn.substring(0,Kn.length-1));break;case Y.COLLECT_ACTION_COPY_CLIPBOARD:qe.copyToClipboard(Kn);break;case Y.COLLECT_ACTION_APPEND_CLIPBOARD:qe.appendToClipboard(Kn);break;case Y.COLLECT_ACTION_CLEAR_CLIPBOARD:qe.copyToClipboard("");break;case Y.COLLECT_ACTION_TO_YOUTUBE:Ln.setActionAfterNavigate(new z({action:z.actions.YT_PLAY,playType:z.playTypes.YT_PLAY_SEARCH,data:Kn}))}je.predict(Kn,Xn)}},$(window).on(r.ELEMENT_EVENT_ID,(function(e,t){if(0!==zn.length&&!Zn(t,Y.getModelName())&&!Zn(t,x.getModelName())){if(!t.type||t.type===K.ELEMENT_TYPE_NORMAL){if(!C.getTranslation(t.label))return;let e=C.getTranslation(t.label),n=1===e.length&&Jn>.5?e.toLowerCase():e+" ";qn(Kn+n),zn.forEach(e=>{let t=Zn(e,"GridActionPredict");t&&t.suggestOnChange&&je.predict(Kn,Xn)})}if(t.type&&t.type===K.ELEMENT_TYPE_PREDICTION){let e=$(`#${t.id} .text-container span`).text();if(e){qn(je.applyPrediction(Kn||"",e,Xn)),zn.forEach(e=>{let t=Zn(e,"GridActionPredict");t&&t.suggestOnChange&&je.predict(Kn,Xn)})}}}}));var ti=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper",on:{dragenter:e.preventDefault,dragover:e.preventDefault,drop:e.imageDropped}},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.nextFromKeyboard():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[e.editElementId?n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n Edit grid item // Grid-Element bearbeiten\n ")]):e._e(),e._v(" "),e.editElementId?e._e():n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n New grid item // Neues Grid-Element\n ")])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputLabel"}},[e._v("Label")]),e._v(" "),e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.label[e.currentLang],expression:"gridElement.label[currentLang]"}],staticClass:"five columns",attrs:{type:"text",id:"inputLabel"},domProps:{value:e.gridElement.label[e.currentLang]},on:{input:function(t){t.target.composing||e.$set(e.gridElement.label,e.currentLang,t.target.value)}}}):e._e(),e._v(" "),n("button",{staticClass:"two columns",attrs:{label:e.i18nService.translate("Search for images // Suche nach Bildern")},on:{click:function(t){return e.search(e.gridElement.label[e.currentLang])}}},[n("i",{staticClass:"fas fa-search"})]),e._v(" "),n("div",{staticClass:"three columns"},[e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.hidden,expression:"gridElement.hidden"}],attrs:{type:"checkbox",id:"inputHidden"},domProps:{checked:Array.isArray(e.gridElement.hidden)?e._i(e.gridElement.hidden,null)>-1:e.gridElement.hidden},on:{change:function(t){var n=e.gridElement.hidden,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.gridElement,"hidden",n.concat([null])):r>-1&&e.$set(e.gridElement,"hidden",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.gridElement,"hidden",a)}}}):e._e(),e._v(" "),n("label",{attrs:{for:"inputHidden","data-i18n":""}},[e._v("Hide element // Element ausblenden")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputImg","data-i18n":""}},[e._v("Image // Bild")]),e._v(" "),n("button",{staticClass:"five columns file-input",attrs:{onclick:"document.getElementById('inputImg').click();"}},[n("input",{staticClass:"five columns",attrs:{type:"file",id:"inputImg",accept:"image/*"},on:{change:e.changedImg}}),e._v(" "),e._m(0)]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"five columns",on:{click:e.clearImage}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear image // Bild löschen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"img-preview offset-by-two four columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"show-mobile"},[n("i",{staticClass:"fas fa-image"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("no image chosen // kein Bild ausgewählt")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"hide-mobile"},[n("i",{staticClass:"fas fa-arrow-down"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("drop image here // Bild hierher ziehen")])]),e._v(" "),e.tempImage.data?n("img",{attrs:{id:"imgPreview",src:e.tempImage.data}}):e._e(),e._v(" "),e.tempImage.data&&e.tempImage.author?n("div",[e._v("\n by "),n("a",{attrs:{href:e.tempImage.authorURL,target:"_blank"}},[e._v(e._s(e.tempImage.author))])]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"img-preview five columns hide-mobile",staticStyle:{"margin-top":"50px"}},[e._m(1)])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputSearch","data-i18n":""}},[e._v("Image search // Bildsuche")]),e._v(" "),n("div",{staticClass:"five columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchText,expression:"searchText"}],attrs:{id:"inputSearch",type:"text",placeholder:e._f("translate")("SEARCH_IMAGE_PLACEHOLDER")},domProps:{value:e.searchText},on:{input:[function(t){t.target.composing||(e.searchText=t.target.value)},function(t){return e.searchInput(500,t)}]}}),e._v(" "),n("button",{attrs:{"aria-label":"Clear"},on:{click:e.clearSearch}},[n("i",{staticClass:"fas fa-times"})])]),e._v(" "),e._m(2)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"offset-by-two ten columns"},[e._l(e.searchResults,(function(t){return n("div",{staticClass:"inline"},[t.base64?n("img",{staticClass:"inline",attrs:{src:t.base64,title:"by "+t.author,width:"60",height:"60",role:"button"},on:{click:function(n){return e.setImage(t)}}}):e._e(),e._v(" "),t.base64||t.failed?e._e():n("span",{staticStyle:{position:"relative"}},[n("img",{staticClass:"inline",attrs:{src:"data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E",title:t.image_url,width:"60",height:"60"}}),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin",staticStyle:{position:"absolute",top:"-25px",left:"25px"}})])])})),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchResults&&e.searchResults.length>0&&e.hasNextChunk,expression:"searchResults && searchResults.length > 0 && hasNextChunk"}],staticClass:"inline"},[n("button",{staticStyle:{height:"60px",margin:"0 0 0 0.5em",padding:"0.7em",float:"left"},on:{click:e.searchMore}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("more // mehr")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.searchLoading,expression:"searchLoading"}]},[n("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("searching... // suche...")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[e._m(3),e._v(" "),e._m(4)]),n("br"),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[n("span"),e._v(" "),e._m(5)])],2)])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.gridElement?n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[e.editElementId?n("div",[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]):e._e(),e._v(" "),e.editElementId?e._e():n("div",[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.addNext()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, add another // OK, weiteres Element")])])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit actions // OK, Aktionen bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-bolt"})])])]):e._e()])])])])])};ti._withStripped=!0;let ni={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},ii=10,ai=1,ri=null,si=null,oi=!1;function li(e,t,n){n=n||ii,t=t||1;let i=[];return new Promise(r=>{if(!e)return r([]);function s(a){a&&a.length&&0!==a.length||(a=[]);let s=t*n-n,o=s+n-1;oi=a.length>o+1;for(let e=s;e<=o;e++)if(a[e]){let t=JSON.parse(JSON.stringify(a[e])),n=M.urlToBase64(t[ni.PROP_IMAGE_URL]);t.promise=n,n.then(e=>{e?t.base64=e:t.failed=!0}),i.push(t)}ri=e,r(i)}ri!==e?a.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){si=e,s(e)})):s(si)})}ni.query=function(e,t,n){return ai=t=t||1,ii=n||ii,li(e,t,n)},ni.nextChunk=function(){return ai++,li(ri,ai,ii)},ni.hasNextChunk=function(){return oi};var ci={props:["editElementIdParam","gridDataId","gridInstance"],data:function(){return{gridData:null,gridElement:null,metadata:null,originalGridElementJSON:null,elementW:null,editElementId:null,searchText:null,searchResults:null,searchLoading:!1,hasNextChunk:!0,tempImage:{},i18nService:C,currentLang:C.getBrowserLang()}},methods:{changedImg(){let e=this;e.clearImage(),M.getBase64FromInput($("#inputImg")[0]).then(t=>{e.tempImage.data=t})},imageDropped(e){if(e.preventDefault(),this.clearImage(),e.dataTransfer.files&&e.dataTransfer.files.length>0)$("#inputImg")[0].files=e.dataTransfer.files,this.changedImg();else{let t=e.dataTransfer.getData("URL");M.urlToBase64(t).then(e=>{this.tempImage.data=e})}},setImage(e){this.tempImage.data=e.base64,this.tempImage.author=e.author,this.tempImage.authorURL=e.author_url},clearImage(){this.tempImage.data=this.tempImage.author=this.tempImage.authorURL=null},save(e){this.saveInternal().then(t=>{this.$emit("close"),t&&!this.editElementId&&this.$emit("mark",this.gridElement.id),e&&this.$emit("actions",this.gridElement.id)})},addNext(){var e=this;e.saveInternal().then(()=>{e.initInternal(),$("#inputLabel").focus()})},editNext(e){var t=this;t.editElementId&&t.saveInternal().then(()=>{t.editElementId=new de(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#inputLabel").focus()})},nextFromKeyboard(){this.editElementId?this.editNext():this.addNext()},saveInternal(){var e=this;return new Promise(t=>{function n(){if(e.gridElement&&e.originalGridElementJSON!==JSON.stringify(e.gridElement)){let n=q.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then(e=>{t(e)})}else t(!1)}e.gridElement.image||(e.gridElement.image=new U),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,M.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then(e=>{let t=new U({data:e});return dt.saveImage(t)}).then(t=>(e.gridElement.image.id=t,M.convertBase64(e.tempImage.data,e.elementW))).then(t=>{e.gridElement.image.data=t,n()})):(e.tempImage.data||(e.gridElement.image=null),n())})},initInternal(){var e=this;e.resetInternal(),e.tempImage=JSON.parse(JSON.stringify(new U)),dt.getGrid(e.gridDataId).then(t=>{if(e.gridData=JSON.parse(JSON.stringify(t)),e.editElementId){let t=e.gridData.gridElements.filter(t=>t.id===e.editElementId)[0];e.gridElement=JSON.parse(JSON.stringify(t)),t.image&&t.image.data&&(e.tempImage=JSON.parse(JSON.stringify(new U(t.image)))),e.elementW=$("#"+this.gridElement.id)[0].getBoundingClientRect().width,e.originalGridElementJSON=JSON.stringify(t)}else{var n=t.getNewXYPos();log.debug("creating element: x "+n.x+" / y "+n.y),e.gridElement=JSON.parse(JSON.stringify(new K({x:n.x,y:n.y})));var i=Math.round($("#grid-container")[0].getBoundingClientRect().height/t.rowCount);e.elementW=2*i,e.originalGridElementJSON=JSON.stringify(e.gridElement)}}),dt.getMetadata().then(t=>{e.metadata=t})},resetInternal(){this.gridElement=this.metadata=this.originalGridElementJSON=this.elementW=null},preventDefault(e){e.preventDefault()},openHelp(){ft.openHelp()},search(e){this.searchText=e,this.searchInput(0)},searchInput(e,t){let n=this;n.searchText=t?t.target.value:n.searchText,e=void 0===e?500:e,n.searchResults=[],n.searchLoading=!0,qe.debounce((function(){ni.query(n.searchText).then(e=>{n.processSearchResults(e)})}),e)},searchMore(){let e=this;ni.nextChunk().then(t=>{e.processSearchResults(t)})},clearSearch(){this.searchLoading=!1,this.searchResults=null,this.searchText=""},processSearchResults(e){let t=this;t.hasNextChunk=ni.hasNextChunk(),t.searchResults=t.searchResults.concat(e),t.searchLoading=!1,t.$forceUpdate(),e.forEach(e=>{e.promise.then(()=>{t.$forceUpdate()})})}},mounted(){this.editElementId=this.editElementIdParam,this.initInternal(),ft.setHelpLocation("03_appearance_layout","#edit-modal")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation()}},di=(n(67),Pt(ci,ti,[function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-file-upload"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Choose file // Datei auswählen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-arrow-down"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("drop new image here // neues Bild hierher ziehen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("No search results.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("Keine Resultate.")]),this._v(" Versuchen Sie es ev. nochmal mit einem "),t("b",[this._v("englischen Suchbegriff")]),this._v(".")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("Für eine Symbolsuche auf Deutsch können Sie "),t("a",{attrs:{target:"_blank",href:"https://www.pictoselector.eu/de/home/download/"}},[this._v("Picto-Selector")]),this._v(" verwenden. Symbole aus diesem Programm können mit Drag & Drop direkt in AsTeRICS Grid eingefügt werden.")])}],!1,null,"2dc40afd",null));di.options.__file="src/vue-components/modals/editGridModal.vue";var ui=di.exports,fi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Element1;Element2;Element3;..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Elements // Erkannte Elemente")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.parsedElems.length))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Element(s) // Element(e)")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.parsedElems.length,expression:"parsedElems.length == 0"}],staticClass:"nine columns"},[n("span",{attrs:{"data-i18n":""}},[e._v("No elements // Keine Elemente")])])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]",disabled:0==e.parsedElems.length},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Insert elements // Elemente einfügen")])])])])])])])])};fi._withStripped=!0;var pi={props:["gridData","gridInstance"],data:function(){return{inputText:"",parsedElems:[]}},methods:{textChanged(){var e=(e=this.inputText||"").replace(/\n/gi,";").replace(/;;/gi,";");this.parsedElems=e.split(";").map(e=>e.trim()).filter(e=>e.length>0)},save(){if(0!==this.parsedElems.length){var e=new de(this.gridData);this.parsedElems.forEach(t=>{var n=new K({label:C.getTranslationObject(t),x:e.getNewXYPos().x,y:e.getNewXYPos().y});e.gridElements.push(n)}),this.gridInstance.updateGridWithUndo(e),this.$emit("close")}}},mounted(){C.initDomI18n(),ft.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy(){ft.revertToLastLocation()}},hi=(n(69),Pt(pi,fi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Add multiple grid items // Mehrere Grid-Elemente hinzufügen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("label",{staticClass:"three columns",attrs:{for:"inputText","data-i18n":""}},[this._v("Input // Eingabe")]),this._v(" "),t("span",{staticClass:"nine columns",attrs:{"data-i18n":""}},[this._v('Insert Labels for new elements, separated by ";" or [Enter] // Geben Sie Label für neue Elemente getrennt durch ";" oder [Enter] ein')])])}],!1,null,"761467a8",null));hi.options.__file="src/vue-components/modals/addMultipleModal.vue";var mi=hi.exports,vi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[e.gridElement?n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.editNext():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Edit actions // Aktionen bearbeiten")]),e._v(" "),n("span",[n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type === GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type!==e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type !== GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("translate")(e.gridElement.type))+'")')])]),e._v(" "),e.gridElement.image?n("img",{staticClass:"spaced",staticStyle:{"max-height":"1.5em","margin-bottom":"-0.3em"},attrs:{id:"imgPreview",src:e.gridElement.image.data}}):e._e()])]),e._v(" "),e.gridElement?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("New Action // Neue Aktion")]),e._v(" "),n("select",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.selectedNewAction,expression:"selectedNewAction"}],staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"},attrs:{id:"selectActionType"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedNewAction=t.target.multiple?n:n[0]}}},e._l(e.actionTypes,(function(t){return n("option",{domProps:{value:t.getModelName()}},[e._v(e._s(e._f("translate")(t.getModelName())))])})),0),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.addAction()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Add action // Aktion hinzufügen")])])]),e._v(" "),e._m(0),e._v(" "),n("ul",{attrs:{id:"actionList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.gridElement.actions.length,expression:"gridElement.actions.length == 0"}],staticClass:"row",attrs:{"data-i18n":""}},[e._m(1),e._v(" "),e._m(2)]),e._v(" "),e._l(e.gridElement.actions,(function(t){return n("li",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.editActionId!=t.id,expression:"editActionId != action.id"}]},[n("div",{staticClass:"four columns"},[e._v("\n "+e._s(e._f("translate")(t.modelName))+"\n ")]),e._v(" "),n("div",{staticClass:"eight columns actionbtns"},[n("button",{on:{click:function(n){return e.editAction(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteAction(t)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),"GridActionNavigate"!=t.modelName?n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])]):e._e()])]),e._v(" "),e.editActionId==t.id?n("div",[n("div",{},[n("b",[e._v(e._s(e._f("translate")(t.modelName)))]),e._v(" "),n("a",{staticClass:"black",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("div",["GridActionSpeak"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(3,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticStyle:{width:"55%"},attrs:{id:"selectLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2),e._v(" "),n("button",{staticClass:"inline spaced",on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionSpeakCustom"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(4,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticClass:"eight columns",attrs:{id:"selectLang2"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(5,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.speakText[e.currentLang],expression:"action.speakText[currentLang]"}],staticStyle:{width:"70%"},attrs:{id:"inCustomText",type:"text"},domProps:{value:t.speakText[e.currentLang]},on:{input:function(n){n.target.composing||e.$set(t.speakText,e.currentLang,n.target.value)}}}),e._v(" "),n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionNavigate"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.toLastGrid,expression:"action.toLastGrid"}],attrs:{id:"navigateBackChkbox",type:"checkbox"},domProps:{checked:Array.isArray(t.toLastGrid)?e._i(t.toLastGrid,null)>-1:t.toLastGrid},on:{change:function(n){var i=t.toLastGrid,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"toLastGrid",i.concat([null])):s>-1&&e.$set(t,"toLastGrid",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"toLastGrid",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"navigateBackChkbox","data-i18n":""}},[e._v("Navigate to last opened grid // Zum zuletzt geöffneten Grid navigieren")])]),e._v(" "),n("div",{staticClass:"row"},[e._m(6,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.toGridId,expression:"action.toGridId"}],staticClass:"eight columns",attrs:{id:"selectGrid",type:"text",disabled:t.toLastGrid},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"toGridId",n.target.multiple?i:i[0])}}},e._l(e.gridLabels,(function(t,i){return n("option",{domProps:{value:i}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionARE"==t.modelName?n("div",[n("edit-are-action",{attrs:{action:t,"grid-data":e.gridData,"model-file":e.additionalGridFiles[t.id],"set-grid-file-fn":e.setAdditionalGridFile,"end-edit-fn":e.endEditAction}})],1):e._e(),e._v(" "),"GridActionPredict"==t.modelName?n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElementClass.ELEMENT_TYPE_COLLECT,expression:"gridElement.type === GridElementClass.ELEMENT_TYPE_COLLECT"}],staticClass:"row"},[n("div",{staticClass:"eight columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.suggestOnChange,expression:"action.suggestOnChange"}],attrs:{id:"chkSuggestOnChange",type:"checkbox"},domProps:{checked:Array.isArray(t.suggestOnChange)?e._i(t.suggestOnChange,null)>-1:t.suggestOnChange},on:{change:function(n){var i=t.suggestOnChange,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"suggestOnChange",i.concat([null])):s>-1&&e.$set(t,"suggestOnChange",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"suggestOnChange",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"chkSuggestOnChange","data-i18n":""}},[e._v("Refresh suggestions on change // Vorschläge bei Änderung aktualisieren")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(7,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"action.dictionaryKey"}],staticClass:"eight columns",attrs:{id:"comboUseDict"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"dictionaryKey",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("all dictionaries // alle Wörterbücher")]),e._v(" "),e._l(e.dictionaryKeys,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionCollectElement"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectCollectElmAction","data-i18n":""}},[e._v("Perform action on collect element // Aktion für Sammelelement ausführen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectCollectElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.collectActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionWebradio"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadioElmAction","data-i18n":""}},[e._v("Web radio action // Web-Radio Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectRadioElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.webradioActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"WEBRADIO_ACTION_START"===t.action||"WEBRADIO_ACTION_TOGGLE"===t.action,expression:"action.action === 'WEBRADIO_ACTION_START' || action.action === 'WEBRADIO_ACTION_TOGGLE'"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadio","data-i18n":""}},[e._v("Webadio to play // Abzuspielendes Webradio")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.radioId,expression:"action.radioId"}],staticClass:"six columns",attrs:{id:"selectRadio"},on:{change:[function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"radioId",n.target.multiple?i:i[0])},function(n){return e.selectedRadioChanged(t.radioId)}]}},[n("option",{attrs:{value:"",selected:"","data-i18n":""}},[e._v("automatic (last played) // automatisch (zuletzt gespielt)")]),e._v(" "),e._l(e.gridData.webRadios,(function(t){return n("option",{domProps:{value:t.radioId}},[e._v("\n "+e._s(t.radioName)+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"twelve columns",attrs:{"acc-label":"Manage webradio list // Webradioliste verwalten","acc-open":0===e.gridData.webRadios.length?"true":"false"}},[n("radio-list-selector",{model:{value:e.gridData,callback:function(t){e.gridData=t},expression:"gridData"}})],1)],1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionYoutube"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytActions","data-i18n":""}},[e._v("YouTube video action // YouTube-Video Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"ytActions"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.GridActionYoutube.actions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytPlayType","data-i18n":""}},[e._v("Play type // Wiedergabe Typ")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.playType,expression:"action.playType"}],staticClass:"six columns",attrs:{id:"ytPlayType"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"playType",n.target.multiple?i:i[0])}}},e._l(Object.keys(e.GridActionYoutube.playTypes).filter((function(t){return t!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED})),(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("translate")(t)))])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType&&-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"action.playType && [GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED,expression:"action.playType !== GridActionYoutube.playTypes.YT_PLAY_RELATED"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_VIDEO,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_VIDEO"}],attrs:{"data-i18n":""}},[e._v("Video link // Video Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_SEARCH,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_SEARCH"}],attrs:{"data-i18n":""}},[e._v("YouTube search query // YouTube Suchanfrage")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_PLAYLIST,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_PLAYLIST"}],attrs:{"data-i18n":""}},[e._v("YouTube playlist link // YouTube Playlist Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_CHANNEL,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_CHANNEL"}],attrs:{"data-i18n":""}},[e._v("YouTube channel link // YouTube Channel-Link")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.data,expression:"action.data"}],staticClass:"six columns",attrs:{id:"ytList",type:"text"},domProps:{value:t.data},on:{input:function(n){n.target.composing||e.$set(t,"data",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.showCC,expression:"action.showCC"}],attrs:{id:"showCC",type:"checkbox"},domProps:{checked:Array.isArray(t.showCC)?e._i(t.showCC,null)>-1:t.showCC},on:{change:function(n){var i=t.showCC,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"showCC",i.concat([null])):s>-1&&e.$set(t,"showCC",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"showCC",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"showCC","data-i18n":""}},[e._v("Show video subtitles (if available) // Zeige Video-Untertitel (wenn verfügbar)")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.playMuted,expression:"action.playMuted"}],attrs:{id:"playMuted",type:"checkbox"},domProps:{checked:Array.isArray(t.playMuted)?e._i(t.playMuted,null)>-1:t.playMuted},on:{change:function(n){var i=t.playMuted,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"playMuted",i.concat([null])):s>-1&&e.$set(t,"playMuted",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"playMuted",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"playMuted","data-i18n":""}},[e._v("Start video muted // Video stummgeschaltet starten")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.performAfterNav,expression:"action.performAfterNav"}],attrs:{id:"afterNav",type:"checkbox"},domProps:{checked:Array.isArray(t.performAfterNav)?e._i(t.performAfterNav,null)>-1:t.performAfterNav},on:{change:function(n){var i=t.performAfterNav,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"performAfterNav",i.concat([null])):s>-1&&e.$set(t,"performAfterNav",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"performAfterNav",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"afterNav","data-i18n":""}},[e._v("Perform action after navigation // Aktion erst nach Navigation ausführen")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_STEP_FORWARD,e.GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_STEP_FORWARD, GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepSeconds","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(seconds) // (Sekunden)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepSeconds,expression:"action.stepSeconds"}],staticClass:"six columns",attrs:{id:"stepSeconds",type:"number",min:"0"},domProps:{value:t.stepSeconds},on:{input:function(n){n.target.composing||e.$set(t,"stepSeconds",n.target.value)}}})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_VOLUME_UP,e.GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_VOLUME_UP, GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepVolume","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(precent) // (Prozent)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepVolume,expression:"action.stepVolume"}],staticClass:"six columns",attrs:{id:"stepVolume",type:"number",min:"0",max:"100"},domProps:{value:t.stepVolume},on:{input:function(n){n.target.composing||e.$set(t,"stepVolume",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionChangeLang"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"changeLang","data-i18n":""}},[e._v("Change application language to // Sprache der Anwendung ändern zu")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.language,expression:"action.language"}],staticClass:"six columns",attrs:{id:"changeLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"language",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("System language // Systemsprache")]),e._v(" "),e._l(e.selectFromAllLanguages?e.allLanguages:e.gridLanguages,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectFromAllLanguages,expression:"selectFromAllLanguages"}],attrs:{id:"selectFromAllLangs",type:"checkbox"},domProps:{checked:Array.isArray(e.selectFromAllLanguages)?e._i(e.selectFromAllLanguages,null)>-1:e.selectFromAllLanguages},on:{change:function(t){var n=e.selectFromAllLanguages,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.selectFromAllLanguages=n.concat([null])):r>-1&&(e.selectFromAllLanguages=n.slice(0,r).concat(n.slice(r+1)))}else e.selectFromAllLanguages=a}}}),e._v(" "),n("label",{attrs:{for:"selectFromAllLangs","data-i18n":""}},[e._v("Show all Languages for selection // Zeige alle Sprachen zur Auswahl")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e()])]):e._e()])}))],2)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v('OK, to "edit element" // OK, zu "Element bearbeiten"')]),e._v(" "),n("i",{staticClass:"fas fa-pencil-alt"})])])])])]):e._e()])])])};vi._withStripped=!0;let gi="https://de1.api.radio-browser.info/json/",_i=["name","country","state","language","tag","tagList","order"],bi={},Ei=document.getElementById("audioPlayer"),yi=document.getElementById("videoPlayer"),Ci=g.get("WEBRADIO_LAST_PLAYED_ID_KEY"),wi=parseFloat(g.get("WEBRADIO_LAST_VOLUME_KEY")||1),Ti=!1,Ai=!1;function Ni(){Yt.setTooltip(C.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*wi)),{revertOnClose:!0,timeout:5e3})}function Si(e,t){return new Promise((n,i)=>{if(e.radioUrl)return n(e);a.a.ajax({type:"GET",url:gi+"url/"+e.radioId,dataType:"json"}),a.a.ajax({type:"GET",url:gi+"stations/byuuid/"+e.radioId,dataType:"json"}).then(i=>{let a=i[0];e.radioUrl=a.url_resolved||a.url,e.radioUrl.lastIndexOf("/")===e.radioUrl.length-1&&(e.radioUrl=e.radioUrl+";");let r=e.radioUrl.lastIndexOf(":");if(r>-1){let t=e.radioUrl.substring(r+1);parseInt(t)+""===t&&(e.radioUrl=e.radioUrl+"/;")}t&&dt.getGrid(t).then(t=>{let n=(t.webRadios||[]).filter(t=>e.radioId===t.radioId)[0];n&&(n.radioUrl=e.radioUrl,dt.saveGrid(t))}),n(e)})})}bi.doAction=function(e,t){dt.getGrid(e).then(n=>{let i=n.webRadios||[],a=t.radioId||Ci,r=i.filter(e=>a===e.radioId)[0]||i[0],s=0;if(r)switch(t.action){case H.WEBRADIO_ACTION_START:Si(r,e).then(e=>{bi.play(e)});break;case H.WEBRADIO_ACTION_TOGGLE:Si(r,e).then(e=>{bi.toggle(e)});break;case H.WEBRADIO_ACTION_STOP:bi.stop();break;case H.WEBRADIO_ACTION_NEXT:if(s=i.map(e=>e.radioId).indexOf(r.radioId),s<0||i.length<2)return;s=s+1{bi.play(e)});break;case H.WEBRADIO_ACTION_PREV:if(s=i.map(e=>e.radioId).indexOf(r.radioId),s<0||i.length<2)return;s=s-1>=0?s-1:i.length-1,Si(i[s],e).then(e=>{bi.play(e)});break;case H.WEBRADIO_ACTION_VOLUP:bi.volumeUp();break;case H.WEBRADIO_ACTION_VOLDOWN:bi.volumeDown()}else log.info("no radio station to play found.")})},bi.play=function(e){e&&(Ei.paused||Ci!==e.radioId)&&(Ei.paused&&yi.paused||bi.stop(),Ci=e.radioId||Ci,g.save("WEBRADIO_LAST_PLAYED_ID_KEY",Ci),Si(e).then(t=>{log.debug("playing: "+t.radioUrl);let i=Promise.resolve();-1!==e.radioUrl.indexOf(".m3u8")?(Ai=!0,yi.src=t.radioUrl,n.e(4).then(n.t.bind(null,621,7)).then(e=>{if((e=e.default).isSupported()){let n=new e;n.loadSource(t.radioUrl),n.attachMedia(yi),n.on(e.Events.MANIFEST_PARSED,(function(){yi.play()}))}})):(Ai=!1,Ei.src=t.radioUrl,Ei.volume=wi,i=Ei.play());let a=C.translate("playing: {?} // Wiedergabe: {?}",t.radioName);Yt.setTooltip(a,{closeOnNavigate:!1,actionLink:C.translate("Stop // Stopp"),actionLinkFn:bi.stop,imageUrl:t.faviconUrl}),i&&i.then&&i.catch(()=>{Ci===e.radioId&&function(e){Yt.setTooltip(C.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName),{msgType:"warn"})}(e)})}))},bi.stop=function(e){e&&e!==Ci||(Ei.pause(),yi.pause(),Yt.clearTooltip())},bi.toggle=function(e){!Ai&&Ei.paused||Ai&&yi.paused?bi.play(e):bi.stop()},bi.volumeUp=function(){wi=wi+.15<=1?wi+.15:1,wi=Math.round(100*wi)/100,g.save("WEBRADIO_LAST_VOLUME_KEY",wi),Ni(),Ei.volume=wi,yi.volume=wi},bi.volumeDown=function(){wi=wi-.15>=0?wi-.15:0,wi=Math.round(100*wi)/100,g.save("WEBRADIO_LAST_VOLUME_KEY",wi),Ni(),Ei.volume=wi,yi.volume=wi},bi.search=function(e,t,n){if(!e)return Promise.resolve([]);let i={},r=[];_i.forEach(t=>{let n=e.indexOf(t+":");n>-1&&r.push({param:t,position:n})}),r.sort((e,t)=>e.position-t.position),r.forEach((t,n,a)=>{let r=a[n+1],s=r?r.position-1:void 0,o=e.substring(t.position+t.param.length+1,s);o=o.replace(/(^")|("$)/g,""),i[t.param]=o}),0===Object.keys(i).length&&(i.name=e);let s=t||20;return s++,i.limit=s,n&&(i.offset=n),new Promise((e,t)=>{a.a.ajax({type:"POST",url:gi+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then(t=>{Ti=t.length===s;let n=t.filter(e=>"0"!==e.lastcheckok);n=n.slice(0,s-1),e(n.map(e=>({radioId:e.stationuuid,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon})))},e=>{t(e)})})},bi.hasMoreSearchResults=function(){return Ti};let Ii={};function ki(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak"),Tn.speak(e.label,t.speakLanguage);break;case"GridActionSpeakCustom":log.debug("action speak custom"),t.speakText&&Tn.speak(t.speakText,t.speakLanguage);break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?as.toLastGrid():as.isOnEditPage()?as.toEditGrid(t.toGridId):as.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?Oi(t,i):dt.getGrid(n).then(e=>{Oi(t,e)});break;case"GridActionPredict":log.debug("action predict"),je.predict(C.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),Wn.doCollectElementActions(t.action);break;case"GridActionWebradio":bi.doAction(n,t);break;case"GridActionYoutube":Ln.doAction(t);break;case"GridActionChangeLang":C.setLanguage(t.language),C.initDomI18n()}}function Oi(e,t){if(!e.componentId)return;let n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;yt.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then(()=>{e.dataPortId&&e.dataPortSendData&&yt.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&yt.triggerEvent(e.componentId,e.eventPortId,e.areURL)})}Ii.doAction=function(e,t){e&&t&&dt.getGridElement(e,t).then(n=>{switch(log.debug("do actions for: "+C.getTranslation(n.label)+", "+t),n.type){case K.ELEMENT_TYPE_COLLECT:Wn.doAction(n);break;case K.ELEMENT_TYPE_PREDICTION:je.doAction(n.id)}!function(e,t){e.actions.forEach(n=>{ki(e,n,t)})}(n,e),$(window).trigger(r.ELEMENT_EVENT_ID,[n])})},Ii.testAction=function(e,t,n){ki(e,t,n.id,n)};var Li=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[e._m(0),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.areURL,expression:"action.areURL"}],staticClass:"six columns",attrs:{id:"inputAREURI",type:"text"},domProps:{value:e.action.areURL},on:{change:function(t){return e.fixAreUrl()},input:function(t){t.target.composing||e.$set(e.action,"areURL",t.target.value)}}}),e._v(" "),n("div",{staticClass:"six columns"},[n("button",{staticStyle:{width:"70%"},on:{click:function(t){return e.testAREUrl(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test URL // URL testen")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:void 0===e.areConnected,expression:"areConnected === undefined"}],staticClass:"spaced"},[n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areConnected,expression:"areConnected"}],staticClass:"spaced",staticStyle:{color:"green"}},[n("i",{staticClass:"fas fa-check"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.areConnected,expression:"areConnected == false"}],staticClass:"spaced",staticStyle:{color:"red"}},[n("i",{staticClass:"fas fa-times"})])])])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],attrs:{"data-i18n":""}},[e._v("Loading Model from ARE... // Lade Modell von ARE...")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Could not load Model from ARE! // Konnte Modell nicht von ARE laden!")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&!e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && !areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("(no ARE model) // (kein ARE Modell)")]),e._v(" "),!e.loading&&e.areModelFile&&e.areModelFile.dataBase64?n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.downloadModelFile(e.areModelFile)}}},[e._v(e._s(e.areModelFile.fileName))])]):e._e()])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.reloadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-download"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download from ARE // Download von ARE")])]),e._v(" "),e.areModelFile&&e.areModelFile.dataBase64?n("button",{staticClass:"six columns",on:{click:function(t){return e.uploadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-upload"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Upload to ARE // Upload zu ARE")])]):e._e()])])]),e._v(" "),e.areModelSync?e._e():n("div",{staticClass:"row"},[n("div",{staticClass:"ten columns offset-by-two"},[n("i",{staticClass:"fas fa-info-circle"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&e.areModelFile.dataBase64,expression:"areModelFile && areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Upload the saved model or download current ARE model in order to define the action. // Laden Sie das gespeicherte Modell hoch oder das aktuelle ARE Modell herunter um die Aktion zu definieren.")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&!e.areModelFile.dataBase64,expression:"areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Download the current ARE model in order to define the action. // Laden Sie das aktuelle ARE Modell herunter um die Aktion zu definieren.")])])]),e._v(" "),e.areModelSync?n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.componentId,expression:"action.componentId"}],staticClass:"five columns",attrs:{id:"inputComponentId"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"componentId",t.target.multiple?n:n[0])},function(t){return e.reloadPorts(e.action)}]}},e._l(e.areComponentIds,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentPorts.length?n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputDataPortId"}},[e._v("Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortId,expression:"action.dataPortId"}],staticClass:"full-width",attrs:{id:"inputDataPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"dataPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"inputDataPortData","data-i18n":""}},[e._v("Data // Daten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortSendData,expression:"action.dataPortSendData"}],staticClass:"full-width",attrs:{id:"inputDataPortData",type:"text"},domProps:{value:e.action.dataPortSendData},on:{input:function(t){t.target.composing||e.$set(e.action,"dataPortSendData",t.target.value)}}})])]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentEventPorts.length?n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputeventPortId"}},[e._v("Event-Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.eventPortId,expression:"action.eventPortId"}],staticClass:"full-width",attrs:{id:"inputeventPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"eventPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentEventPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.testAction(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test action // Aktion Testen")])]),e._v(" "),n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])};Li._withStripped=!0;var xi={props:["action","gridData","modelFile","setGridFileFn","endEditFn"],data:function(){return{loading:!1,areConnected:null,areComponentIds:[],areComponentPorts:[],areComponentEventPorts:[],areModelFile:null,areModelSync:!1}},methods:{endEditAction(){this.endEditFn()},testAction(e){let t=this.areModelFile.dataBase64?{additionalFiles:[this.areModelFile]}:{};Ii.testAction(null,e,new de(t,this.gridData))},reloadAREModel(e){var t=this;t.loading=!0,yt.downloadDeployedModelBase64(e.areURL).then(n=>{yt.getModelName(e.areURL).then(i=>{t.areModelFile.dataBase64=n,t.areModelFile.fileName=i,e.areModelGridFileName=i,t.setGridFileFn(t.action,t.areModelFile),t.loading=!1,t.areModelSync=!0,t.reloadComponentIds(e),t.reloadPorts(e)})}).catch(()=>{t.areModelFile.dataBase64=null,t.setGridFileFn(t.action,null),t.loading=!1})},uploadAREModel(e){var t=this;yt.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then(()=>{t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0})},reloadComponentIds(e){var t=this;yt.getRuntimeComponentIds(e.areURL).then(e=>{t.areComponentIds=e})},reloadPorts(e){var t=this;yt.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then(e=>{t.areComponentEventPorts=e}),yt.getComponentInputPortIds(e.componentId,e.areURL).then(e=>{t.areComponentPorts=e})},testAREUrl(e){var t=this;e.areURL=yt.getRestURL(e.areURL),t.areConnected=void 0,yt.getModelName(e.areURL).then(()=>{t.areConnected=!0}).catch(()=>{t.areConnected=!1})},downloadModelFile(e){var t=new Blob([window.atob(e.dataBase64)],{type:"text/plain;charset=utf-8"}),n=-1!=e.fileName.indexOf(".acs")?e.fileName:e.fileName+".acs";k.a.saveAs(t,n)},fixAreUrl(){this.action.areURL=yt.getRestURL(this.action.areURL)}},mounted(){this.action.areURL=this.action.areURL||yt.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new de(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new J),ft.setHelpLocation("05_actions","#asterics-action")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation()}},Di=(n(71),Pt(xi,Li,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputAREURI"}},[this._v("ARE URL")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text"},[this._v("ARE Model")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputComponentId","data-i18n":""}},[this._v("Component // Komponente")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputDataPortId","data-i18n":""}},[t("span",[this._v("Send data "),t("span",{staticClass:"show-mobile"},[this._v("to port")])]),this._v(" "),t("span",[this._v("Sende Daten "),t("span",{staticClass:"show-mobile"},[this._v("zu Port")])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputeventPortId","data-i18n":""}},[t("span",[this._v("Trigger event "),t("span",{staticClass:"show-mobile"},[this._v("on event port")])]),this._v(" "),t("span",[this._v("Event triggern "),t("span",{staticClass:"show-mobile"},[this._v("auf Event-Port")])])])])}],!1,null,"74c379ae",null));Di.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var Ri=Di.exports,Mi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[n("h3",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),e._v(" "),n("button",{staticClass:"six columns",on:{click:e.addAllRadioElements}},[e._v("Grid-Elemente für Radios erstellen")])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.selectedRadioList,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",on:{click:function(n){return e.removeRadio(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Remove // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop")]),e._v(" "),n("i",{staticClass:"fas fa-pause"})]):e._e(),e._v(" "),n("button",{staticClass:"right",on:{click:function(n){return e.moveWebradioUp(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Up // Nach oben")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-up"})])])])])})),0),e._v(" "),0===e.selectedRadioList.length?n("div",{attrs:{"data-i18n":""}},[e._v("No selected radio stations, use search bar below to add radio stations. // Keine ausgewählten Radiosender, verwenden Sie die Suche unten um Radiosender hinzuzufügen.")]):e._e()]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"searchwebradios","data-i18n":""}},[e._v("Search term // Suchbegriff")]),e._v(" "),n("i",{staticClass:"fas fa-info-circle hide-mobile",attrs:{title:e._f("translate")("by default searches for radio station name, advanced search possible like e.g. tag:jazz, language:english or country:austria // sucht standardmäßig nach Radiosender-Name, erweiterte Suche z.B. möglich mit tag:jazz, language:english oder country:austria")}})]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.webradioSearch,expression:"webradioSearch"}],staticClass:"six columns",attrs:{id:"searchwebradios",type:"text"},domProps:{value:e.webradioSearch},on:{input:[function(t){t.target.composing||(e.webradioSearch=t.target.value)},function(t){return e.searchWebradios(t)}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.webradioSearchResults,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",attrs:{disabled:e.selectedRadioList.map((function(e){return e.radioId})).indexOf(t.radioId)>-1},on:{click:function(n){e.selectedRadioList.push(t),e.modelChanged()}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Select // Wählen")]),e._v(" "),n("i",{staticClass:"fas fa-plus"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop ")]),n("i",{staticClass:"fas fa-pause"})]):e._e()])])])})),0),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.webradioSearchResults.length&&e.webradioSearch&&!e.webradioSearching&&!e.webradioSearchError,expression:"webradioSearchResults.length === 0 && webradioSearch && !webradioSearching && !webradioSearchError"}],attrs:{"data-i18n":""}},[e._v("No radio stations found, try an other search term. // Keine Radiosender gefunden, versuchen Sie einen anderen Suchbegriff.")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchError,expression:"webradioSearchError"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Searching failed, no connection to internet. // Suche fehlgeschlagen, keine Verbindung zum Internet.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:e.searchWebradios}},[e._v("Retry // Erneut versuchen")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchResults.length>0,expression:"webradioSearchResults.length > 0"}],staticStyle:{display:"flex","margin-top":"0.5em"}},[n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:0===e.webradioStartIndex},on:{click:e.prevSearchResults}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Previous page // Vorige Seite")])]),e._v(" "),n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:!e.hasMoreWebradios},on:{click:e.nextSearchResults}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Next page // Nächste Seite")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])])])};Mi._withStripped=!0;var Pi={props:{value:Object},watch:{value:{handler:function(e){this.gridData=JSON.parse(JSON.stringify(e)),this.selectedRadioList=this.gridData.webRadios},deep:!0}},data:()=>({gridData:null,selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:bi,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}),methods:{modelChanged(){this.gridData.webRadios=this.selectedRadioList,this.$emit("input",JSON.parse(JSON.stringify(this.gridData)))},addAllRadioElements(){if(!confirm(C.translate("This action adds {?} new elements to the grid. Continue? // Diese Aktion fügt {?} neue Elemente zum Grid hinzu. Fortfahren?",this.gridData.webRadios.length)))return;let e=this,t=Promise.resolve();e.gridData.webRadios.forEach((n,i)=>{var a;t=t.then((a=n,()=>M.urlToBase64(a.faviconUrl).then(t=>{let n=t?new U({data:t}):void 0,i=new de(e.gridData).getNewGridElement({label:C.getTranslationObject(a.radioName),actions:[new H({radioId:a.radioId,action:H.WEBRADIO_ACTION_START})],image:n});return e.gridData.gridElements.push(i),Promise.resolve()})))}),t.then(()=>{this.modelChanged()})},searchWebradios(e){this.webradioSearch=e.target.value,this.webradioStartIndex=0,this.searchWebradiosInternal()},nextSearchResults(){this.webradioStartIndex+=10,this.searchWebradiosInternal()},prevSearchResults(){this.webradioStartIndex-=10,this.searchWebradiosInternal()},searchWebradiosInternal(){let e=this;e.webradioSearching=!0,e.webradioSearchError=!1,qe.debounce(()=>{bi.search(e.webradioSearch,10,e.webradioStartIndex).then(t=>{e.hasMoreWebradios=bi.hasMoreSearchResults(),e.webradioSearchResults=t,e.webradioSearching=!1}).catch(t=>{e.webradioSearchError=!0,e.webradioSearching=!1})},500)},moveWebradioUp(e){let t=this.selectedRadioList.indexOf(e);t>0&&(this.selectedRadioList.splice(t-1,0,this.selectedRadioList.splice(t,1)[0]),this.modelChanged())},removeRadio(e){bi.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter(t=>t.radioId!==e.radioId),this.modelChanged()}},mounted(){this.gridData=JSON.parse(JSON.stringify(this.value)),this.selectedRadioList=this.gridData.webRadios,C.initDomI18n()},updated(){C.initDomI18n()}},Gi=(n(73),Pt(Pi,Mi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h3",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Webradio search // Webradio Suche")]),this._v(" "),t("span",{staticClass:"six columns",attrs:{id:"poweredby","data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])])])])}],!1,null,"a1b68270",null));Gi.options.__file="src/vue-components/components/radioListSelector.vue";var Ui={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:K,editActionId:null,selectedNewAction:K.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:K.getActionTypes(),voiceLangs:Tn.getVoicesLangs(),dictionaryKeys:je.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:Y.getActions(),webradioActions:H.getActions(),currentLang:C.getBrowserLang(),allLanguages:C.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1,GridActionYoutube:z,GridElement:K}},components:{RadioListSelector:Gi.exports,Accordion:qt,EditAreAction:Ri},methods:{selectedRadioChanged(e){let t=this.gridData.webRadios.filter(t=>t.radioId===e)[0].faviconUrl;t&&M.urlToBase64(t).then(e=>{e&&(this.gridElement.image=new U({data:e}))})},deleteAction(e){this.setAdditionalGridFile(e,null),this.gridElement.actions=this.gridElement.actions.filter(t=>t.id!=e.id)},editAction(e){this.editActionId=e.id},endEditAction(){this.editActionId=null},testAction(e){let t=this.additionalGridFiles[e.id]?{additionalFiles:[this.additionalGridFiles[e.id]]}:{};Ii.testAction(this.gridElement,e,new de(t,this.gridData))},addAction(){let e=JSON.parse(JSON.stringify(K.getActionInstance(this.selectedNewAction)));e.modelName===x.getModelName()&&(e.toGridId=Object.keys(this.gridLabels)[0]),this.gridElement.actions.push(e),this.editActionId=e.id},setAdditionalGridFile(e,t){t?this.additionalGridFiles[e.id]=t:delete this.additionalGridFiles[e.id]},save(e){var t=this;t.saveInternal().then(()=>{t.$emit("close"),e&&t.$emit("edit")})},openHelp(){ft.openHelp()},editNext(e){var t=this;t.saveInternal().then(()=>{t.editElementId=new de(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#selectActionType").focus()})},saveInternal(){let e=this;return e.gridData.gridElements.forEach((t,n)=>{t.id===e.gridElement.id&&(e.gridData.gridElements[n]=e.gridElement)}),dt.saveGrid(e.gridData).then(()=>dt.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then(()=>(e.$emit("reload"),Promise.resolve())))},initInternal(){let e=this;dt.getGrid(e.gridIdParam).then(t=>{e.gridData=JSON.parse(JSON.stringify(t));let n=Object.keys(e.gridData.label);e.gridLanguages=e.allLanguages.filter(e=>-1!==n.indexOf(e.code)),e.gridElement=e.gridData.gridElements.filter(t=>t.id===e.editElementId)[0]}),dt.getGridsAttribute("label").then(t=>{e.gridLabels=t})}},mounted(){this.editElementId=this.editElementIdParam,this.initInternal(),ft.setHelpLocation("05_actions","#edit-actions-modal")},updated(){C.initDomI18n()},beforeDestroy(){ft.setHelpLocation("02_navigation","#edit-view")}},$i=(n(75),Pt(Ui,vi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h2",{staticClass:"twelve columns",staticStyle:{"margin-top":"1em","font-size":"1.2em"},attrs:{for:"actionList","data-i18n":""}},[this._v("Current actions // Aktuelle Aktionen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("No actions defined, click on '"),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Add action")]),this._v("' to add one.")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v('Keine Aktionen definiert, klicken Sie auf "'),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Aktion hinzufügen")]),this._v('" um eine Aktion zu definieren.')])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang2","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inCustomText","data-i18n":""}},[this._v("Text to speak // Auszusprechender Text")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectGrid","data-i18n":""}},[this._v("Navigate to grid // Navigieren zu Grid")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"comboUseDict","data-i18n":""}},[this._v("Dictionary to use // Zu verwendendes Wörterbuch")])])}],!1,null,"07fb84aa",null));$i.options.__file="src/vue-components/modals/editActionsModal.vue";var Fi=$i.exports,Vi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",staticStyle:{"max-width":"500px"},on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridRows","data-i18n":""}},[e._v("Number of rows // Anzahl der Zeilen")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.rowCount,expression:"gridData.rowCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridRows",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.rowCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"rowCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridCols","data-i18n":""}},[e._v("Minimum number of columns // Minimale Anzahl der Spalten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.minColumnCount,expression:"gridData.minColumnCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridCols",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.minColumnCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"minColumnCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),e.isGlobalGrid&&e.metadata&&1===e.gridHeight?n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"metadataHeight","data-i18n":""}},[e._v("Height of first global grid row [%] // Höhe der ersten Zeile des globalen Grids [%]")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.metadata.globalGridHeightPercentage,expression:"metadata.globalGridHeightPercentage",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"metadataHeight",type:"number",min:"5",max:"50"},domProps:{value:e.metadata.globalGridHeightPercentage},on:{input:function(t){t.target.composing||e.$set(e.metadata,"globalGridHeightPercentage",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]):e._e()]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Vi._withStripped=!0;var Bi={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new de(this.gridDataParam).getHeight(),metadata:null}},methods:{save(){g.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});let e=[];this.metadata&&e.push(dt.saveMetadata(this.metadata)),Promise.all(e).then(()=>{this.$emit("save",this.gridData.rowCount,this.gridData.minColumnCount),this.$emit("close")})}},mounted(){this.isGlobalGrid&&dt.getMetadata().then(e=>{this.metadata=JSON.parse(JSON.stringify(e)),setTimeout(()=>C.initDomI18n(),10)}),C.initDomI18n()}},ji=(n(77),Pt(Bi,Vi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Set grid size // Grid-Größe anpassen\n ")])])}],!1,null,"5f4007c6",null));ji.options.__file="src/vue-components/modals/gridDimensionModal.vue";var Yi=ji.exports,Hi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.otherGrids&&e.gridElement&&e.selectedGrid?n("div",{staticClass:"modal-body container"},[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"moveGrid"}},[e._v(e._s(e.i18nService.translate('Move element "{?}" to grid // Verschiebe Element "{?}" nach Grid',e.i18nService.getTranslation(this.gridElement.label))))]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",staticStyle:{"margin-bottom":"1em"},attrs:{id:"moveGrid"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]}}},e._l(e.otherGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.selectedGrid.thumbnail?e.selectedGrid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"four columns"},[n("button",{staticStyle:{width:"49%"},on:{click:e.prev}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Back // Zurück")])]),e._v(" "),n("button",{staticStyle:{width:"49%"},on:{click:e.next}},[n("span",{attrs:{"data-i18n":""}},[e._v("Next // Weiter")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.moveAllElements,expression:"moveAllElements"}],attrs:{id:"moveAll",type:"checkbox"},domProps:{checked:Array.isArray(e.moveAllElements)?e._i(e.moveAllElements,null)>-1:e.moveAllElements},on:{change:function(t){var n=e.moveAllElements,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.moveAllElements=n.concat([null])):r>-1&&(e.moveAllElements=n.slice(0,r).concat(n.slice(r+1)))}else e.moveAllElements=a}}}),e._v(" "),n("label",{attrs:{for:"moveAll","data-i18n":""}},[e._v("Move all elements to this grid // Alle Elemente zu diesem Grid verschieben")])])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Hi._withStripped=!0;var Wi={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:C,imageUtil:M}},methods:{prev(){let e=null;this.otherGrids.forEach((t,n)=>{if(this.selectedGrid===t){let t=n-1<0?this.otherGrids.length-1:n-1;e=this.otherGrids[t]}}),this.selectedGrid=e},next(){let e=null;this.otherGrids.forEach((t,n)=>{if(this.selectedGrid===t){let t=n+1{this.$emit("reload"),this.$emit("close")})},saveInternal(){return dt.getGrid(this.selectedGrid.id).then(e=>{(this.moveAllElements?this.gridData.gridElements:[this.gridElement]).forEach(t=>{let n=t.width>1||t.height>1,i=e.getNewXYPos(n);t.x=i.x,t.y=i.y,e.gridElements.push(t)}),this.gridData.gridElements=this.moveAllElements?[]:this.gridData.gridElements.filter(e=>e.id!==this.gridElement.id);let t=[];return t.push(dt.saveGrid(this.gridData)),t.push(dt.saveGrid(e)),Promise.all(t)})}},mounted(){dt.getGrid(this.gridId).then(e=>{this.gridData=JSON.parse(JSON.stringify(e)),this.gridElement=this.gridData.gridElements.filter(e=>e.id===this.gridElementId)[0],C.initDomI18n()}),dt.getGrids(!1,!0).then(e=>{this.otherGrids=JSON.parse(JSON.stringify(e)).filter(e=>e.id!==this.gridId),this.selectedGrid=this.otherGrids[0]})},updated(){C.initDomI18n()}},zi=(n(79),Pt(Wi,Hi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Move grid element // Grid-Element verschieben\n ")])])}],!1,null,"0fc126e0",null));zi.options.__file="src/vue-components/modals/elementMoveModal.vue";var Ki=zi.exports,Ji=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),void 0!==e.gridData?n("div",{staticClass:"modal-body"},[n("div",[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"gridSelect","data-i18n":""}},[e._v("Grid to translate // Zu übersetzendes Grid")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.gridData,expression:"gridData"}],staticClass:"four columns",attrs:{id:"gridSelect"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.gridData=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("show all Grids // alle Grids anzeigen")]),e._v(" "),e._l(e.allGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])}))],2)]),e._v(" "),e.usedLocales.length>0?n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{"data-i18n":""}},[e._v("Select already used languages // Auswahl bereits verwendeter Sprachen")]),e._v(" "),n("span",{staticClass:"six columns"},e._l(e.usedLocales,(function(t){return t!==e.currentLocale?n("button",{staticStyle:{"margin-right":"0.5em"},on:{click:function(n){e.chosenLocale=t}}},[e._v(e._s(e.getLocaleTranslation(t)))]):e._e()})),0)]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-top":"2em"}},[n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v(" "),n("strong",[e._v(e._s(e.currentLangTranslated)+" ("+e._s(e.currentLocale)+")")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.currentLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.currentLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])]),e._v(" "),n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v("\n  "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.chosenLocale,expression:"chosenLocale"}],on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.chosenLocale=t.target.multiple?n:n[0]}}},e._l(e.allLanguages.filter((function(t){return t.code!==e.currentLocale})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.chosenLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.chosenLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])])]),e._v(" "),n("div",{attrs:{id:"translationList"}},e._l(e.gridData?[e.gridData]:e.allGrids,(function(t){return n("ul",[n("li",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.currentLocale],expression:"data.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:t.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.currentLocale,n.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.chosenLocale],expression:"data.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:t.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.chosenLocale,n.target.value)}}})])]),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",[i.label[e.currentLocale]||i.label[e.chosenLocale]?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.currentLocale],expression:"el.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.chosenLocale],expression:"el.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.chosenLocale,t.target.value)}}})]):e._e()]):e._e()})),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",e._l(i.actions,(function(i){return i.modelName===e.GridActionSpeakCustom.getModelName()&&(i.speakText[e.currentLocale]||i.speakText[e.chosenLocale])?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.currentLocale],expression:"action.speakText[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.speakText[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.chosenLocale],expression:"action.speakText[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.speakText[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.chosenLocale,t.target.value)}}})]):e._e()})),0):e._e()}))],2)})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"three columns offset-by-six",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"three columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Save // Speichern")])])])])])])])])};Ji._withStripped=!0,window.hideKeyboardTranslations=!0;var Xi={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:C.getBrowserLang(),chosenLocale:C.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:V,allLanguages:C.getAllLanguages(),usedLocales:g.getUsedLocales(),changedGrids:[]}},computed:{currentLangTranslated:function(){return this.getLocaleTranslation(this.currentLocale)},chosenLangTranslated:function(){return this.getLocaleTranslation(this.chosenLocale)}},methods:{save(){let e=this,t=e.gridData||e.allGrids[0];g.addUsedLocales(Object.keys(t.label)),dt.saveGrids(JSON.parse(JSON.stringify(e.changedGrids))).then(()=>{e.$emit("reload"),e.$emit("close")})},changedGrid(e){e?-1===this.changedGrids.indexOf(e)&&this.changedGrids.push(e):this.changedGrids=this.allGrids},getLocaleTranslation(e){return C.getTranslation(this.allLanguages.filter(t=>t.code===e)[0])},copy(e){let t=a()(`#translationList input[lang='${e}']`).toArray().reduce((e,t)=>e+t.value+"\n","");qe.copyToClipboard(t)},paste(e){qe.getClipboardContent().then(t=>{if(!t)return;this.changedGrid(this.gridData);let n=t.trim().split("\n");a()(`#translationList input[lang='${e}']`).toArray().forEach((e,t)=>{n[t]&&(a()(e).val(n[t]),a()(e)[0].dispatchEvent(new Event("input")))})})},showGridElements(e){return!window.hideKeyboardTranslations||null!==this.gridData||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))}},mounted(){dt.getGrids(!0).then(e=>{this.allGrids=JSON.parse(JSON.stringify(e)),this.allGrids.sort((e,t)=>C.getTranslation(e.label).localeCompare(C.getTranslation(t.label))),this.gridData=this.allGrids.filter(e=>e.id===this.gridDataId)[0]}),C.initDomI18n()},updated(){C.initDomI18n()}},qi=(n(81),Pt(Xi,Ji,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Translate Grids // Grids übersetzen\n ")])])}],!1,null,"7d6c5d35",null));qi.options.__file="src/vue-components/modals/gridTranslateModal.vue";var Zi=qi.exports;let Qi=null,ea=null;var ta=Pt({props:["gridId"],data:()=>({gridData:null,metadata:null,canUndo:!1,canRedo:!1,doingUndoRedo:!1,showEditModal:!1,showMultipleModal:!1,showActionsModal:!1,showDimensionsModal:!1,showMoveModal:!1,showTranslateModal:!1,editElementId:null,showGrid:!1,constants:r,markedElement:null}),components:{GridTranslateModal:Zi,ElementMoveModal:Ki,GridDimensionModal:Yi,EditGridModal:ui,AddMultipleModal:mi,EditActionsModal:Fi,HeaderIcon:zt},methods:{setDimensions:function(e,t){ea.setDimensions(e,t)},fillGaps:function(){ea.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){ea.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){ea.redo()}),10)},reload(e){ea.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back(){as.toMain()},editElement(e){this.editElementId=e,this.showEditModal=!0},removeElement(e){let t=this;ea.removeElement(e).then(e=>{t.gridData=e})},newElement(e){switch(e){case K.ELEMENT_TYPE_PREDICTION:case K.ELEMENT_TYPE_COLLECT:case K.ELEMENT_TYPE_YT_PLAYER:var t=new de(this.gridData).getNewXYPos(),n=new K({type:e,x:t.x,y:t.y});if(e===K.ELEMENT_TYPE_YT_PLAYER){let e=new z({action:z.actions.YT_TOGGLE});n.actions=[e]}this.gridData.gridElements.push(n),ea.updateGridWithUndo(this.gridData);break;default:this.editElementId=null,this.showEditModal=!0}},editActions(e){this.editElementId=e,this.showActionsModal=!0},newElements(){this.showMultipleModal=!0},clearElements(){confirm(C.translate("CONFIRM_DELETE_ALL_ELEMS"))&&(this.gridData.gridElements=[],ea.updateGridWithUndo(this.gridData))},fillElements(){let e=q.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),ea.updateGridWithUndo(this.gridData)},reloadFn(e,t,n){if(Qi&&t.includes(Qi.gridData.id)&&ea&&ea.isInitialized()){let e=new de(n.filter(e=>e.id===Qi.gridData.id)[0]);e.isEqual(Qi.gridData)||(log.debug("reloading on remote update..."),Qi.reload(e))}},markElement(e){a()(".grid-item-content").removeClass("marked"),e&&setTimeout(()=>{qe.throttle(()=>{this.markedElement&&this.markedElement.id===e?this.markedElement=null:(this.markedElement=e?this.gridData.gridElements.filter(t=>t.id===e)[0]:null,a()("#"+e).addClass("marked"))},null,200)},10)},getGridInstance:()=>ea},created(){a()(document).on(r.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){let e=this;Qi=e,St.global.stopListening(),dt.getGrid(this.gridId).then(t=>t?(e.gridData=JSON.parse(JSON.stringify(t)),Promise.resolve()):(log.warn("grid not found! gridId: "+this.gridId),as.toMain(),Promise.reject())).then(()=>dt.getMetadata().then(t=>(e.metadata=JSON.parse(JSON.stringify(t)),e.metadata.globalGridId===e.gridData.id?Promise.resolve():(e.metadata.lastOpenedGridId=e.gridData.id,dt.saveMetadata(e.metadata))))).then(()=>{return t=e.gridData,ea=new ei("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:t.id}),an.setGridInstance(ea),ea.getInitPromise();var t}).then(()=>{ea.setLayoutChangedEndListener(t=>{e.canUndo=ea.canUndo(),e.canRedo=ea.canRedo(),e.doingUndoRedo=!1,e.gridData=JSON.parse(JSON.stringify(t))}),function(){var e={CONTEXT_NEW_GROUP:{name:"New // Neu",icon:"fas fa-plus-circle",items:{CONTEXT_NEW_SINGLE:{name:"New Element // Neues Element",icon:"fas fa-plus"},CONTEXT_NEW_MASS:{name:"Many new elements // Mehrere neue Elemente",icon:"fas fa-clone"},CONTEXT_NEW_COLLECT:{name:"New collect element // Neues Sammel-Element",icon:"far fa-comment-dots"},CONTEXT_NEW_PREDICT:{name:"New prediction element // Neues Vorhersage-Element",icon:"fas fa-magic"},CONTEXT_NEW_YT_PLAYER:{name:"New YouTube Player // Neuer YouTube Player",icon:"fas fa-play-circle"}}}},t={CONTEXT_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit"},CONTEXT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt"},CONTEXT_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt"},CONTEXT_MORE_GROUP:{name:"More // Mehr",icon:"fas fa-bars",items:{CONTEXT_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone"},CONTEXT_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt"},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export"}}}};let n=JSON.parse(JSON.stringify(t));delete n.CONTEXT_EDIT;let i=()=>!!Qi.markedElement;var r={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:()=>Qi.markedElement&&Qi.markedElement.type===K.ELEMENT_TYPE_NORMAL},CONTEXT_ACTION_EDIT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt",visible:i},CONTEXT_ACTION_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt",visible:i},CONTEXT_ACTION_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone",visible:i},CONTEXT_ACTION_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt",visible:i},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export",visible:i},SEP0:"---------",CONTEXT_NEW_GROUP:e.CONTEXT_NEW_GROUP,CONTEXT_FILL_EMPTY:{name:"Fill with empty elements // Mit leeren Elementen füllen",icon:"fas fa-fill",visible:()=>!new de({},Qi.gridData).isFull()},CONTEXT_DELETE_ALL:{name:"Delete all elements // Alle Elemente löschen",icon:"fas fa-minus-circle"},SEP1:"---------",CONTEXT_GRID_DIMENSIONS:{name:"Change grid dimensions // Grid-Größe anpassen",icon:"fas fa-expand-arrows-alt"},CONTEXT_GRID_TRANSLATION:{name:"Translate grid // Grid übersetzen",icon:"fas fa-language"},CONTEXT_LAYOUT_FILL:{name:"Fill gaps // Lücken füllen",icon:"fas fa-angle-double-left"},CONTEXT_EDIT_GLOBAL_GRID:{name:"Edit global grid // Globales Grid bearbeiten",icon:"fas fa-globe",visible:!!Qi.metadata.globalGridId&&Qi.metadata.globalGridActive&&Qi.metadata.globalGridId!==Qi.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:Qi.metadata.globalGridId===Qi.gridData.id}};function s(e,t){switch(e){case"CONTEXT_EDIT":Qi.editElement(t);break;case"CONTEXT_DUPLICATE":ea.duplicateElement(t);break;case"CONTEXT_DO_ACTION":Ii.doAction(Qi.gridData.id,t);break;case"CONTEXT_ACTIONS":Qi.editActions(t);break;case"CONTEXT_DELETE":Qi.removeElement(t);break;case"CONTEXT_NEW_SINGLE":Qi.newElement();break;case"CONTEXT_NEW_MASS":Qi.newElements();break;case"CONTEXT_NEW_COLLECT":Qi.newElement(K.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":Qi.newElement(K.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_NEW_YT_PLAYER":Qi.newElement(K.ELEMENT_TYPE_YT_PLAYER);break;case"CONTEXT_DELETE_ALL":Qi.clearElements();break;case"CONTEXT_FILL_EMPTY":Qi.fillElements();break;case"CONTEXT_LAYOUT_FILL":Qi.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":Qi.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":Qi.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":Qi.editElement(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":Qi.editActions(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_DELETE":Qi.removeElement(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":ea.duplicateElement(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":Ii.doAction(Qi.gridData.id,Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_MOVE_TO":Qi.editElementId=t||Qi.markedElement.id,Qi.markElement(null),Qi.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":as.toEditGrid(Qi.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":as.toEditGrid(Qi.metadata.lastOpenedGridId)}}a()(".grid-container").on("click",(function(e){if(Qi){let t=null,n=e.target;for(;!t&&n.parentNode;)t=a()(n).attr("data-id"),n=n.parentNode;Qi.markElement(t)}})),a.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){s(e,a()(this).attr("data-id"))},items:t,zIndex:10}),a.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){s(e,a()(this).attr("data-id"))},items:n,zIndex:10}),a.a.contextMenu({selector:".grid-container",callback:function(e,t){s(e)},items:e,zIndex:10}),a.a.contextMenu({selector:"#moreButton",callback:function(e,t){s(e)},trigger:"left",items:r,zIndex:10})}(),C.initDomI18n(),e.showGrid=!0})},updated(){C.initDomI18n()},beforeDestroy(){a()(document).off(r.EVENT_DB_PULL_UPDATED,this.reloadFn),Qi=null,St.global.startListening(),ea&&(ea.destroy(),ea=null,an.setGridInstance(null)),a.a.contextMenu("destroy")}},En,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"spaced",attrs:{tabindex:"33",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"grid-container",staticStyle:{margin:"10px",display:"none"},attrs:{id:"grid-layout-background-wrapper"}},[t("div",{staticClass:"grid-container",staticStyle:{"margin-left":"204px","background-size":"209px 209px","background-image":"linear-gradient(to right, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-vertical"}}),this._v(" "),t("div",{staticClass:"grid-container",staticStyle:{"margin-top":"204px","background-size":"209px 209px","background-image":"linear-gradient(to bottom, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-horizontal"}})])}],!1,null,"6c00303f",null);ta.options.__file="src/vue-components/views/gridEditView.vue";var na=ta.exports,ia=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"box"},[e.metadata&&!e.metadata.fullscreen?n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"left"}),e._v(" "),n("div",{staticClass:"btn-group left"},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"spaced small",attrs:{tabindex:"30"},on:{click:function(t){return e.toEditGrid()}}},[n("i",{staticClass:"fas fa-pencil-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing on // Bearbeiten ein")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"31",id:"inputConfigButton"}},[n("i",{staticClass:"fas fa-cog"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Input options // Eingabeoptionen")])])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.locked,expression:"metadata.locked"}],staticClass:"small",attrs:{tabindex:"34"},on:{click:function(t){return e.unlock()}}},[n("i",{staticClass:"fas fa-unlock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Unlock // Entsperren")]),e._v(" "),e.unlockCounter!==e.unlockCount?n("span",[e._v(e._s(e.unlockCounter))]):e._e()]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"33"},on:{click:function(t){return e.lock()}}},[n("i",{staticClass:"fas fa-lock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Lock // Sperren")])]),e._v(" "),n("button",{staticClass:"spaced small",attrs:{tabindex:"32"},on:{click:function(t){return e.applyFullscreen()}}},[n("i",{staticClass:"fas fa-expand"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Fullscreen // Vollbild")])])],1):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_HUFFMAN?n("huffman-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_DIRECTION?n("direction-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_MOUSE?n("mouse-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SCANNING?n("scanning-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SEQUENTIAL?n("sequential-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_UNLOCK?n("unlock-modal",{on:{unlock:function(t){return e.unlock(!0)},close:function(t){e.showModal=null}}}):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.viewInitialized&&e.gridData.gridElements&&0===e.gridData.gridElements.length&&(!e.globalGridData||0===e.globalGridData.length),expression:"viewInitialized && gridData.gridElements && gridData.gridElements.length === 0 && (!globalGridData || globalGridData.length === 0)"}],staticClass:"row content spaced"},[n("div",{staticStyle:{"margin-top":"2em"},attrs:{"data-i18n":""}},[n("span",[e._v("No elements, click "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Edit grid")]),e._v(" to enter edit mode.")]),e._v(" "),n("span",[e._v("Keine Elemente, klicke auf "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Grid bearbeiten")]),e._v(" um das Grid zu bearbeiten.")])])]),e._v(" "),n("div",{staticClass:"row content"},[e.viewInitialized?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}})])],1)};ia._withStripped=!0;var aa=function(e){if(e instanceof Node||e instanceof NodeList||e instanceof Array)return e;var t="querySelectorAll";return 0===e.indexOf("#")&&(t="getElementById",e=e.substr(1,e.length)),document[t](e)};function ra(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},aa.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},aa.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},aa.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;nArray.isArray(t)?e.concat(aa.flattenArrayDeep(t)):e.concat(t),[])},aa.convertToKeyCode=function(e){return/^[a-zA-Z0-9]$/.test(e)?e.toUpperCase().charCodeAt(0):null},aa.getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},window.L=aa;let sa={};function oa(e,t,n){var i=this,a=(e=e,t=t,""),r=1e3,s=!1,o=3,l=3,c=!1,d=!0,f=1,p=!0,h=null,m=!1,v=null,g=null,_=null,b=!1,E=null,y=null;let C=null,w=null;function T(e){e&&(r=e.scanTimeoutMs||r,o=e.subScanRepeat||o,l=e.minBinarySplitThreshold||l,a=e.scanInactiveClass||a,s=null!=e.scanVertical?e.scanVertical:s,c=null!=e.scanBinary?e.scanBinary:c,d=null!=e.touchScanning?e.touchScanning:d,f=null!=e.scanTimeoutFirstElementFactor?e.scanTimeoutFirstElementFactor:f,p=void 0===e.autoScan||e.autoScan),d&&i.enableTouchScanning(),C=St.instance(),e.inputEventSelect?C.onInputEvent(e.inputEventSelect,i.select):C.onInputEvent(new u({keyCode:32}),i.select),e.inputEventNext&&C.onInputEvent(e.inputEventNext,i.next)}function A(e,t){for(var n=t?L:k,i=t?x:O,a=t?k:L,r=I(S(n),function(e,t){return function(n,i){var a=Math.abs(t(n)-e(n));return Math.abs(t(i)-e(i))-a}}(n,i),(function(e,t){return e.id?e.id.localeCompare(t.id):t.id?-1*t.id.localeCompare(e.id):0})),s=I(S(a),S(n)),o=(e=e.sort(r)).slice(),l=[],d=0;o.length>0&&d<1e3;){d++;var u=N(o,e,t);l.push(u),o=o.filter(e=>!u.includes(e))}return c&&(l=function(e){for(var t=[],n=0;n=0&&(a=e[n-1]),n+1!t.includes(e))}(l)),l.forEach(e=>e.sort(s)),l}function N(e,t,n){var i=n?L:k,a=n?x:O,r=e[0],s=i(r),o=a(r);return e.filter(e=>s>=i(e)&&s<=a(e)||i(e)<=o&&a(e)>=o||i(e)>=s&&a(e)<=o)}function S(e){return function(t,n){return e(t)-e(n)}}function I(){var e=arguments;return function(t,n){for(var i=0;i=o*n.length)i.restartScanning();else if(aa.removeClass(e,t),aa.addClass(e,a),m&&(aa.addClass(n[l],t),aa.removeClass(n,a),v=n[l],w=()=>{D(n,!0,l+1,c+1)},p)){let e=0===l&&s&&n.length>2?r*f:r;g=setTimeout((function(){w()}),e)}}function R(e){var t=[];e=e||[];var n=1;c&&e.length>l&&(n=Math.ceil(e.length/2));for(var i=0,a=e.length;i1?D(R(v),!0):aa.flattenArray(v).length>1?D(R(aa.flattenArray(v)),!0):(h&&h(aa.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){w&&(clearTimeout(g),w())},i.enableTouchScanning=function(){E||(E=function(){i.select()},(y=aa(".area")[0]?aa(".area")[0]:aa("#grid-container")).addEventListener("click",E))},i.disableTouchScanning=function(){E&&(y.removeEventListener("click",E),E=null)},T(n)}sa.getInstanceFromConfig=function(e,t,n,i){return new oa(t,n,{autoScan:e.scanAuto,scanVertical:e.scanVertical,subScanRepeat:3,scanBinary:e.scanBinary,scanInactiveClass:i,minBinarySplitThreshold:3,scanTimeoutMs:e.scanTimeoutMs,scanTimeoutFirstElementFactor:e.scanTimeoutFirstElementFactor,touchScanning:!e.mouseclickEnabled,inputEventSelect:e.scanInputs.filter(e=>e.label===p.SELECT)[0],inputEventNext:e.scanInputs.filter(e=>e.label===p.NEXT)[0]})};let la={};function ca(e,t){var n=e,i=void 0!==t.timeoutMs?t.timeoutMs:1e3;let s=t.demoMode,o=t.selectionListener,l=t.activeListener;var c={};let d=[],u=null,f=null,p=!1,h=null;function m(e,t){var n=t||this;e.preventDefault(),T(n),u=n,f=e}function v(e,t){if(p){var n=t||this;e.preventDefault(),A(n)}}function g(e){p||S(!1),qe.debounce(()=>{S(!0)},i+300,"hovering-mouseMove")}function _(){A(u)}function b(e){let t=N(e);T(t),u=t}function E(e){A(u)}function y(e){s||e.preventDefault(),qe.throttle(()=>{let t=N(e);T(t),u=t,f=e},[],50,"hovering-touchmove")}function w(e){Tn.speak(C.translate("speech output activated // Sprachausgabe aktiviert")),Yt.clearTooltip(),yn.setState(r.STATE_ACTIVATED_TTS,!0),S(!0),d.forEach((function(e){e.removeEventListener("click",w)}))}function T(e){u&&u!==e&&A(u),e&&!c[e]&&(aa.addClass(e,"mouseentered"),l&&e!==u&&l(e),0!==i&&(c[e]=setTimeout((function(){o&&o(e)}),i)))}function A(e){e&&(aa.removeClass(e,"mouseentered"),clearTimeout(c[e]),c[e]=null,u=null)}function N(e){if(e.touches&&0===e.touches.length&&(e=f),!e)return void log.warn("no event");let t=e.touches?e.touches[0].pageX:e.pageX||e.clientX,n=e.touches?e.touches[0].pageY:e.pageY||e.clientY;return qe.getElement(d,t,n)}function S(e){p=!e,s||(e?a()("#touchElement").show():a()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(a()(n).css("cursor","none"),a()("#touchElement").css("cursor","none"),t.containerClass&&a()(t.containerClass).css("cursor","none")),d=aa.selectAsList(n);let e=yn.getState(r.STATE_ACTIVATED_TTS);!Tn.nativeSpeechSupported()||e||s?S(!0):(Yt.setTooltip(C.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),yn.onStateChanged(r.STATE_ACTIVATED_TTS,e=>{e&&Yt.clearTooltip()}),d.forEach((function(e){e.addEventListener("click",w)}))),d.forEach((function(e){e.addEventListener("mouseenter",m),e.addEventListener("mouseleave",v),e.addEventListener("mouseup",_)})),h=St.instance(),h.onTouchStart(b),h.onTouchEnd(E),h.onTouchMove(y),h.startListening(),document.addEventListener("mousemove",g)},this.destroy=function(){t.hideCursor&&(a()(n).css("cursor","default"),a()("#touchElement").css("cursor","default"),t.containerClass&&a()(t.containerClass).css("cursor","default")),qe.clearDebounce("hovering-mouseMove"),d.forEach((function(e){e.removeEventListener("mouseenter",m),e.removeEventListener("mouseleave",v),e.removeEventListener("mouseup",_),e.removeEventListener("click",w)})),h.destroy(),document.removeEventListener("mousemove",g),Object.keys(c).forEach(e=>{clearTimeout(c[e])}),yn.clearListeners(r.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){i=e},this.setSelectionListener=function(e){o=e}}function da(e){let t=e,n=null,i=[];function a(e){n&&n(e.currentTarget)}function r(e){let t=e.which||e.keyCode;13!==t&&32!==t||n&&n(e.currentTarget)}this.startClickcontrol=function(){i=aa.selectAsList(t),i.forEach((function(e){e.addEventListener("click",a),e.addEventListener("keydown",r)}))},this.destroy=function(){i.forEach((function(e){e.removeEventListener("click",a),e.removeEventListener("keydown",r)}))},this.setSelectionListener=function(e){n=e}}la.getInstanceFromConfig=function(e,t,n){return new ca(t,{selectionListener:(n=n||{}).selectionListener,activeListener:n.activeListener,containerClass:n.containerClass,inputEventSelect:e.seqInputs.filter(e=>e.label===p.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===p.NEXT)[0],timeoutMs:e.hoverTimeoutMs,demoMode:n.demoMode||e.hoverDisableHoverpane,hideCursor:e.hoverHideCursor})};var ua=n(48),fa=n.n(ua);let pa={};function ha(e,t,n,i){let r=this,s=e,o=t,l=n,c=!1,d=!0,u=!1,f=0,p=1e3,h=!0,m=[],v=null,g=null,_=null,b=null,E="",y=null,C="",w=!1,T=null;function A(){if(y=St.instance(),C="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");a.a.isFunction(e.selectionListener)&&(v=e.selectionListener);c=void 0!==e.printCodes&&e.printCodes,d=void 0===e.printColors||e.printColors,u=void 0!==e.colorWholeElement&&e.colorWholeElement,h=void 0===e.markInactive||e.markInactive,m=e.colors||m,f=e.elementCount||0,p=e.timeout||1e3,e.inputEvents.forEach((e,t)=>{C+=t+1,y.onInputEvent(e,()=>{r.input(t+1)})})}(i),g=a()(s),0===g.length)return;let e=g.toArray().map(e=>e.id);if(e.lengthn?t.length:n})),t.assignCodeWords(C,(function(e,t){if(e.name&&(e.codeWord=t,e.element=document.getElementById(e.name),d||c)){let t="";e.codeWord.split("").forEach(e=>{let i=d?I(e):"",a=function(e){if(!e)return"";let t=(n=e,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null);var n,i;return.299*t.r+.587*t.g+.114*t.b>149?"#000000":"#ffffff"}(i);t+=`${c?e:" "}`});let i=c?"10px":"3px",r=a()(e.element).width()+"px";a()(e.element).append(`
    ${t}
    `)}})),b=b.filter(e=>e.name),N()}function N(){u&&b.forEach(e=>{if(0===e.codeWord.indexOf(E)){let t=e.codeWord.substring(E.length)[0];e.element.style.background=I(t)}})}function S(e){g.removeClass(l);let t=e.map(e=>e.id),n=g.toArray().filter(e=>-1===t.indexOf(e.id));a()(n).addClass(l)}function I(e){let t=parseInt(e)-1;return m[t]}r.start=function(){w=!0,u&&a()(g).addClass("noanimation"),y.startListening()},r.stop=function(){w=!1,a()(g).find(".huffman-code-visualization").remove(),u&&(a()(g).removeClass("noanimation"),a()(g).css("background","")),y.stopListening()},r.destroy=function(){r.stop(),y.destroy()},r.reinit=function(){w&&(r.stop(),A(),r.start())},r.input=function(e){if(e+="",clearTimeout(T),1!==e.length)return;E+=e,N();let t=b.filter(e=>e.codeWord===E).map(e=>e.element),n=b.filter(e=>0===e.codeWord.indexOf(E)).map(e=>e.element);var i;g.removeClass(o),t[0]?(i=t[0],_=i||_,g.removeClass(o),a()(_).addClass(o),S(g.toArray()),v&&v(t[0])):h&&S(n),(t[0]||0===n.length)&&(S(g.toArray()),E="",N()),p>0&&(T=setTimeout(()=>{S(g.toArray()),E="",N()},p))},r.getCurrentInput=function(){return E},A()}pa.getInstanceFromConfig=function(e,t,n,i,a){return new ha(t,n,i,{printCodes:e.huffShowNumbers,printColors:e.huffShowColors,colorWholeElement:e.huffColorWholeElement,colors:e.huffColors,inputEvents:e.huffInputs,elementCount:e.huffElementCount,timeout:e.huffTimeout,markInactive:e.huffMarkInactive,selectionListener:a})};let ma={};function va(e,t,n){let i=this,r=e,s=t,o=!0,l=!1,c=null,d=null,u=null,f={},p=St.instance();function h(e){f[u.id]&&m(f[u.id][e])}function m(e){u=e||u,d.removeClass(s),a()(u).addClass(s)}i.start=function(){m(d[0]),p.startListening()},i.destroy=function(){d.removeClass(s),p.destroy()},i.left=function(){h("left")},i.right=function(){h("right")},i.up=function(){h("up")},i.down=function(){h("down")},i.select=function(){c&&c(u),l&&m(d[0])},d=a()(r),0!==d.length&&(setTimeout(()=>{d.toArray().forEach(e=>{let t=d.toArray().filter(t=>t.id!==e.id),n=e.getBoundingClientRect(),i=(e,t,n,i)=>e>0&&t>0&&n>0&&i>0,a=(e,t,n,i)=>e<0&&t<0&&n<0&&i<0,r=t.map(e=>{let t=e.getBoundingClientRect(),r=n.left-t.right,s=n.right-t.left,o=n.right-t.right,l=n.left-t.left,c=n.top-t.bottom,d=n.bottom-t.top,u=n.top-t.top,f=n.bottom-t.bottom,p=Math.min(Math.abs(r),Math.abs(s),Math.abs(o),Math.abs(l)),h=Math.min(Math.abs(c),Math.abs(d),Math.abs(u),Math.abs(f));return{element:e,left:i(r,s,o,l),right:a(r,s,o,l),up:i(c,d,u,f),down:a(c,d,u,f),absDiffX:p,absDiffY:h,absDiff:p+h}});function s(e,t,n,i,a){let r=e.filter(e=>e[t]);if(r.length>0)return r[0].element;if(o){let t=Math.min(...e.map(e=>e[a])),r=e.filter(e=>e[a]===t&&e[n]),s=Math.max(...r.map(e=>e[i])),o=r.filter(e=>e[i]===s)[0];return o?o.element:null}return null}r=r.sort((e,t)=>e.absDiff-t.absDiff);let l=s(r,"left","right","absDiffX","absDiffY"),c=s(r,"right","left","absDiffX","absDiffY"),u=s(r,"up","down","absDiffY","absDiffX"),p=s(r,"down","up","absDiffY","absDiffX");f[e.id]={element:e,left:l,right:c,up:u,down:p}})},200),function(e){e&&(a.a.isFunction(e.selectionListener)&&(c=e.selectionListener),o=void 0!==e.wrapAround&&e.wrapAround,l=void 0!==e.resetToStart&&e.resetToStart,p.onInputEvent(e.inputEventLeft,i.left),p.onInputEvent(e.inputEventRight,i.right),p.onInputEvent(e.inputEventUp,i.up),p.onInputEvent(e.inputEventDown,i.down),p.onInputEvent(e.inputEventSelect,i.select))}(n))}ma.getInstanceFromConfig=function(e,t,n,i){return new va(t,n,{inputEventLeft:e.dirInputs.filter(e=>e.label===p.LEFT)[0],inputEventRight:e.dirInputs.filter(e=>e.label===p.RIGHT)[0],inputEventUp:e.dirInputs.filter(e=>e.label===p.UP)[0],inputEventDown:e.dirInputs.filter(e=>e.label===p.DOWN)[0],inputEventSelect:e.dirInputs.filter(e=>e.label===p.SELECT)[0],wrapAround:e.dirWrapAround,resetToStart:e.dirResetToStart,selectionListener:i})};let ga={};function _a(e,t){let n=this,i=e,r=null,s=null,o=null,l=null,c=null,d=0;function u(e){l.removeClass(r),a()(e).addClass(r),o&&o(e)}n.start=function(){c.startListening(),u(l[0]),d=0},n.destroy=function(){c.destroy(),l.removeClass(r)},n.next=function(){d++,d>l.length-1&&(d=0),u(l[d])},n.prev=function(){d--,d<0&&(d=l.length-1),u(l[d])},n.select=function(){s&&s(l[d])},c=St.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(a.a.isFunction(e.selectionListener)&&(s=e.selectionListener),a.a.isFunction(e.activeListener)&&(o=e.activeListener),r=e.activeClass||"scanFocus",c.onInputEvent(e.inputEventSelect,()=>{n.select()}),c.onInputEvent(e.inputEventNext,()=>{n.next()}),c.onInputEvent(e.inputEventPrev,()=>{n.prev()}))}(t),l=a()(i)}ga.getInstanceFromConfig=function(e,t,n){return new _a(t,{selectionListener:n.selectionListener,activeListener:n.activeListener,inputEventSelect:e.seqInputs.filter(e=>e.label===p.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===p.NEXT_ELEMENT)[0],inputEventPrev:e.seqInputs.filter(e=>e.label===p.PREVIOUS_ELEMENT)[0]})};var ba=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Scanning input method: 1-2 input events // Eingabemethode Scanning: 1-2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}],attrs:{type:"checkbox",id:"enableScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanEnabled)?e._i(e.inputConfig.scanEnabled,null)>-1:e.inputConfig.scanEnabled},on:{change:function(t){var n=e.inputConfig.scanEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableScanning","data-i18n":""}},[e._v("Enable Scanning // Scanning aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.NEXT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.scanInputs,callback:function(t){e.$set(e.inputConfig,"scanInputs",t)},expression:"inputConfig.scanInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanVertical,expression:"inputConfig.scanVertical"}],attrs:{type:"checkbox",id:"chkVerticalScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanVertical)?e._i(e.inputConfig.scanVertical,null)>-1:e.inputConfig.scanVertical},on:{change:function(t){var n=e.inputConfig.scanVertical,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanVertical",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanVertical",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanVertical",a)}}}),e._v(" "),n("label",{attrs:{for:"chkVerticalScanning","data-i18n":""}},[e._v("Vertical scanning // Scanning vertikal")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanBinary,expression:"inputConfig.scanBinary"}],attrs:{type:"checkbox",id:"chkBinaryScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanBinary)?e._i(e.inputConfig.scanBinary,null)>-1:e.inputConfig.scanBinary},on:{change:function(t){var n=e.inputConfig.scanBinary,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanBinary",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanBinary",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanBinary",a)}}}),e._v(" "),n("label",{attrs:{for:"chkBinaryScanning","data-i18n":""}},[e._v("Binary scanning // Scanning binär")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.touchScanning,expression:"touchScanning"}],attrs:{type:"checkbox",id:"chkTouchScanning"},domProps:{checked:Array.isArray(e.touchScanning)?e._i(e.touchScanning,null)>-1:e.touchScanning},on:{change:[function(t){var n=e.touchScanning,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.touchScanning=n.concat([null])):r>-1&&(e.touchScanning=n.slice(0,r).concat(n.slice(r+1)))}else e.touchScanning=a},e.changeTouchScanning]}}),e._v(" "),n("label",{attrs:{for:"chkTouchScanning","data-i18n":""}},[e._v("Scanning-selection by mouse click or tap // Scanning-Auswahl durch Mausklick oder tippen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],attrs:{type:"checkbox",id:"chkAutoScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanAuto)?e._i(e.inputConfig.scanAuto,null)>-1:e.inputConfig.scanAuto},on:{change:function(t){var n=e.inputConfig.scanAuto,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanAuto",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanAuto",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanAuto",a)}}}),e._v(" "),n("label",{attrs:{for:"chkAutoScanning","data-i18n":""}},[e._v("Automatic (timed) scanning // Automatisches (zeitgesteuertes) Scanning")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inScanTime","data-i18n":""}},[e._v("Scanning Time (ms) // Scanning Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inScanTime",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inFirstElement","data-i18n":""}},[e._v("Time factor first element // Zeit-Faktor erstes Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"range",id:"inFirstElement",min:"1",max:"5",step:"0.1"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"number",min:"1",max:"5",step:"0.5"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};ba._withStripped=!0;var Ea=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("ul",e._l(e.inputs,(function(t,i){return n("li",[n("div",{staticClass:"row nomargin"},[n("label",{staticClass:"three columns input-label",attrs:{for:t.label+i}},[n("span",[e._v(e._s(e._f("translate")(t.label)))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.label===e.InputConfig.GENERAL_INPUT,expression:"input.label === InputConfig.GENERAL_INPUT"}]},[e._v(e._s(i+1))])]),e._v(" "),n("select",{staticClass:"five columns",attrs:{id:t.label+i},on:{change:function(t){return e.typeChange(i,t.target.value)}}},[e._m(0,!0),e._v(" "),e._l(e.inputEventTypes,(function(i){return n("option",{domProps:{value:i.getModelName(),selected:i.getModelName()===t.modelName}},[e._v("\n "+e._s(e._f("translate")(i.getModelName()))+"\n ")])}))],2),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.errorInputs.indexOf(t.label)>-1,expression:"errorInputs.indexOf(input.label) > -1"}],staticClass:"two columns"},[n("i",{staticClass:"warn fas fa-exclamation-triangle"})])]),e._v(" "),t.modelName===e.InputEventKey.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordKey(t,i)}}},[n("i",{staticClass:"fas fa-keyboard"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("Record key // Taste aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("press key ... // Taste drücken ...")))])]),e._v(" "),n("span",{staticClass:"four columns"},[n("b",{attrs:{"data-i18n":""}},[e._v("Current key: // Aktuelle Taste:")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.keyCode,expression:"!input.keyCode"}],attrs:{"data-i18n":""}},[e._v("(no key) // (keine Taste)")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.keyCode,expression:"input.keyCode"}]},[e._v(e._s(t.keyName+" ("+t.keyCode+")"))])])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"nine columns offset-by-three",attrs:{"acc-label":"more // mehr"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inTimeout"+i}},[e._v("Timeout (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:t.timeout,expression:"input.timeout",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inTimeout"+i,type:"number",min:"0",max:"5000",step:"100"},domProps:{value:t.timeout},on:{input:[function(n){n.target.composing||e.$set(t,"timeout",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Repetitions // Wiederholungen")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:0===t.holdDuration,expression:"input.holdDuration === 0"},{name:"model",rawName:"v-model.number",value:t.repeat,expression:"input.repeat",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"1",max:"9"},domProps:{value:t.repeat},on:{input:[function(n){n.target.composing||e.$set(t,"repeat",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.holdDuration>0,expression:"input.holdDuration > 0"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if hold duration is set. // deaktiviert bei gesetzter Haltedauer.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.holdDuration=0,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Hold duration (ms) // Haltedauer (ms)")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:1===t.repeat,expression:"input.repeat === 1"},{name:"model",rawName:"v-model.number",value:t.holdDuration,expression:"input.holdDuration",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"0",max:"5000",step:"100",disabled:t.repeat>1},domProps:{value:t.holdDuration},on:{input:[function(n){n.target.composing||e.$set(t,"holdDuration",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.repeat>1,expression:"input.repeat > 1"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if repetitions are set. // deaktiviert bei gesetzten Wiederholungen.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.repeat=1,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])])])],1)]):e._e(),e._v(" "),t.modelName===e.InputEventARE.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordAREEvent(t,i)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("Record ARE event // ARE Event aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("waiting for event ... // warte auf Event ...")))])]),e._v(" "),n("label",{staticClass:"four columns",attrs:{for:"inputAreUrl"}},[e._v("ARE URL")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.areURL,expression:"input.areURL"}],staticClass:"four columns",attrs:{id:"inputAreUrl",type:"text",placeholder:e._f("translate")("empty = automatic // leer = automatisch")},domProps:{value:t.areURL},on:{change:function(n){return e.changedAreURL(t)},input:[function(n){n.target.composing||e.$set(t,"areURL",n.target.value)},function(n){e.areError[t.label+i]=!1}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.areError[t.label+i],expression:"areError[input.label+index]"}],staticClass:"nine columns offset-by-three"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v("\n "+e._s(e._f("translate")("Error connecting to ARE! // Verbindung zu ARE konnte nicht hergestellt werden!"))+" "+e._s("("+e.areService.getRestURL(t.areURL)+")")+"\n ")])]),e._v(" "),n("div",{staticClass:"row"},e._l(t.eventNames,(function(i,a){return n("span",{staticClass:"nine columns offset-by-three"},[n("b",[e._v("Event:")]),e._v(" "+e._s(e.formatAreEvent(i))+" "),n("button",{staticStyle:{"margin-left":"1em",padding:"0 0.5em"},attrs:{title:e._f("translate")("Delete // Löschen")},on:{click:function(n){return e.removeAREEvent(t,a)}}},[n("i",{staticClass:"fas fa-trash"})])])})),0)]):e._e()])})),0)])};Ea._withStripped=!0;var ya={components:{Accordion:qt},props:{value:Array,inputLabels:Array,canAdd:Boolean,maxElements:Number,errorInputs:Array,minInputs:Number,maxInputs:Number},watch:{value:{handler:function(e){this.initWithValue(e)},deep:!0}},data:()=>({inputs:[],inputEventTypes:p.getInputEventTypes(),InputEventKey:u,InputEventARE:f,InputConfig:p,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:St.instance(),lastInitTime:null,areService:yt}),methods:{typeChange(e,t){let n=this.inputs[e],i=this.inputs.filter(e=>!e.modelName);if(!t)return n.modelName="",this.minInputs&&this.inputs.length>this.minInputs&&i.length>=1&&this.inputs.splice(e,1),void this.modelChanged();let a=p.getInputEventInstance(t,{label:n.label});Et.a.set(this.inputs,e,JSON.parse(JSON.stringify(a))),this.maxInputs&&this.inputs.length{r.preventDefault(),n.localEventHandler.destroy(),e.keyCode=t,e.keyName=a,Object.assign(e,{repeat:1,timeout:0,holdDuration:0}),Et.a.set(n.keyRecording,i,!1),n.modelChanged()}),n.localEventHandler.startListening()},recordAREEvent(e,t){let n=this,i=e.label+t;if(n.areError[i]=!1,n.keyRecording[i])return void r();Et.a.set(n.keyRecording,i,!0),yt.unsubscribeEvents();let a=null;function r(){Et.a.set(n.keyRecording,i,!1),yt.unsubscribeEvents()}yt.subscribeEvents(e.areURL,t=>{a||(a=setTimeout(()=>{Et.a.set(n.keyRecording,i,!1),yt.unsubscribeEvents(),n.modelChanged()},1e3)),e.eventNames.push(t)},()=>{n.areError[i]=!0,r()})},removeAREEvent(e,t){e.eventNames.splice(t,1),this.modelChanged()},formatAreEvent(e){let t=JSON.parse(e);return t.channelId+" -> "+t.targetComponentId},changedAreURL(e){e.areURL&&(e.areURL=yt.getRestURL(e.areURL))},modelChanged(){let e=this.inputs.filter(e=>{if(!e.modelName)return!1;return p.getInputEventInstance(e.modelName,e).isValid()}),t=JSON.parse(JSON.stringify(e));JSON.stringify(t)!==JSON.stringify(this.lastEmitValue)&&(this.lastInitTime=(new Date).getTime(),this.$emit("input",t),this.lastEmitValue=t)},addInput(e){e=e||1;for(let t=0;te.label);this.inputLabels.filter(t=>-1===e.indexOf(t)).forEach(e=>{let n=new f({label:e});n.modelName="",t.push(n)}),t.sort((e,t)=>this.inputLabels.indexOf(e.label)-this.inputLabels.indexOf(t.label))}this.inputs=JSON.parse(JSON.stringify(t));let n=this.inputs.filter(e=>!e.modelName);this.maxInputs&&this.inputs.length({rows:10,columns:10,width:0,height:0}),methods:{calcWidthHeight(){this.width=100/this.columns,this.height=100/this.rows}},mounted(){this.calcWidthHeight()},updated(){}},Na=(n(85),Pt(Aa,Ta,[],!1,null,"2f9b4098",null));Na.options.__file="src/vue-components/modals/input/testArea.vue";var Sa=Na.exports,Ia={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,touchScanning:null,metadata:null,InputConfig:p,error:"",errorInputs:[],scanner:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.scanEnabled||(0===this.inputConfig.scanInputs.filter(e=>e.label===p.SELECT).length&&this.errorInputs.push(p.SELECT),0!==this.inputConfig.scanInputs.filter(e=>e.label===p.NEXT).length||this.inputConfig.scanAuto||this.errorInputs.push(p.NEXT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"scanInputs",JSON.parse(JSON.stringify(p.DEFAULT_SCAN_INPUTS))),this.inputChanged()},changeTouchScanning(){this.inputConfig.mouseclickEnabled=!this.touchScanning},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.scanEnabled&&(this.scanner=sa.getInstanceFromConfig(this.inputConfig,".area-element-inner","active","inactive"),this.scanner.setSelectionListener(e=>{this.selectedTestElement=e}),this.scanner.startScanning())},100)},stopTest(){this.scanner&&this.scanner.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled}),ft.setHelpLocation("04_input_options","#scanning")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},ka=(n(87),Pt(Ia,ba,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header"}},[this._v("\n Scanning\n ")])])}],!1,null,"3cc44ad7",null));ka.options.__file="src/vue-components/modals/input/scanningModal.vue";var Oa=ka.exports,La=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.mouseclickEnabled,expression:"inputConfig.mouseclickEnabled"}],attrs:{type:"checkbox",id:"enableClick"},domProps:{checked:Array.isArray(e.inputConfig.mouseclickEnabled)?e._i(e.inputConfig.mouseclickEnabled,null)>-1:e.inputConfig.mouseclickEnabled},on:{change:function(t){var n=e.inputConfig.mouseclickEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"mouseclickEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"mouseclickEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"mouseclickEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableClick","data-i18n":""}},[e._v("Select with mouse click (or tap) // Auswahl mit Mausklick (oder Antippen)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],attrs:{type:"checkbox",id:"enableHover"},domProps:{checked:Array.isArray(e.inputConfig.hoverEnabled)?e._i(e.inputConfig.hoverEnabled,null)>-1:e.inputConfig.hoverEnabled},on:{change:function(t){var n=e.inputConfig.hoverEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHover","data-i18n":""}},[e._v("Enable hovering // Hovering aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inHoverTime","data-i18n":""}},[e._v("Hover Time (ms) // Hovering Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inHoverTime",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverHideCursor,expression:"inputConfig.hoverHideCursor"}],attrs:{type:"checkbox",id:"hoverHideCursor"},domProps:{checked:Array.isArray(e.inputConfig.hoverHideCursor)?e._i(e.inputConfig.hoverHideCursor,null)>-1:e.inputConfig.hoverHideCursor},on:{change:function(t){var n=e.inputConfig.hoverHideCursor,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverHideCursor",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverHideCursor",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverHideCursor",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"hoverHideCursor","data-i18n":""}},[e._v("Hide Cursor // Cursor verstecken")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.hoverDisableHoverpane,expression:"inputConfig.hoverDisableHoverpane"}],attrs:{type:"checkbox",id:"chkDisableHoverpane"},domProps:{checked:Array.isArray(e.inputConfig.hoverDisableHoverpane)?e._i(e.inputConfig.hoverDisableHoverpane,null)>-1:e.inputConfig.hoverDisableHoverpane},on:{change:function(t){var n=e.inputConfig.hoverDisableHoverpane,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverDisableHoverpane",a)}}}),e._v(" "),n("label",{attrs:{for:"chkDisableHoverpane","data-i18n":""}},[e._v("Disable hover pane // Hover-Fläche deaktivieren")])])]),e._v(" "),n("accordion",{staticClass:"row",attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1)],1):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};La._withStripped=!0;var xa=Pt({props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,clicker:null,hover:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")})},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},initTest(){setTimeout(()=>{let e=this;this.stopTest(),e.inputConfig.hoverEnabled&&(e.hover=la.getInstanceFromConfig(e.inputConfig,".area-element-inner",{demoMode:!0,containerClass:".area .area-row"}),e.hover.setSelectionListener((function(t){e.selectedTestElement=t})),e.hover.startHovering()),e.inputConfig.mouseclickEnabled&&(e.clicker=new da(".area-element-inner"),e.clicker.setSelectionListener((function(t){e.selectedTestElement=t})),e.clicker.startClickcontrol())},100)},stopTest(){this.clicker&&this.clicker.destroy(),this.hover&&this.hover.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#mousetouch-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},La,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Mouse/Touch input // Maus-/Toucheingabe")])])}],!1,null,"33ee2cbd",null);xa.options.__file="src/vue-components/modals/input/mouseModal.vue";var Da=xa.exports,Ra=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Direction input method: 2-5 input events // Richtungs-Eingabe: 2-5 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}],attrs:{type:"checkbox",id:"enableDirinput"},domProps:{checked:Array.isArray(e.inputConfig.dirEnabled)?e._i(e.inputConfig.dirEnabled,null)>-1:e.inputConfig.dirEnabled},on:{change:function(t){var n=e.inputConfig.dirEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableDirinput","data-i18n":""}},[e._v("Enable direction input // Richtungs-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.RIGHT,e.InputConfig.DOWN,e.InputConfig.LEFT,e.InputConfig.UP],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.dirInputs,callback:function(t){e.$set(e.inputConfig,"dirInputs",t)},expression:"inputConfig.dirInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirWrapAround,expression:"inputConfig.dirWrapAround"}],attrs:{type:"checkbox",id:"chkWrapAround"},domProps:{checked:Array.isArray(e.inputConfig.dirWrapAround)?e._i(e.inputConfig.dirWrapAround,null)>-1:e.inputConfig.dirWrapAround},on:{change:function(t){var n=e.inputConfig.dirWrapAround,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirWrapAround",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirWrapAround",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirWrapAround",a)}}}),e._v(" "),n("label",{attrs:{for:"chkWrapAround","data-i18n":""}},[e._v("Wrap around (jump to first element after last element) // Enden verbinden (springe zu erstem Element nach letztem Element)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirResetToStart,expression:"inputConfig.dirResetToStart"}],attrs:{type:"checkbox",id:"chkReset"},domProps:{checked:Array.isArray(e.inputConfig.dirResetToStart)?e._i(e.inputConfig.dirResetToStart,null)>-1:e.inputConfig.dirResetToStart},on:{change:function(t){var n=e.inputConfig.dirResetToStart,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirResetToStart",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirResetToStart",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirResetToStart",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReset","data-i18n":""}},[e._v("Go to start position after select // Zu Startposition nach Auswahl")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ra._withStripped=!0;var Ma={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,error:"",errorInputs:[],dirInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.dirEnabled||(0===this.inputConfig.dirInputs.filter(e=>e.label===p.SELECT).length&&this.errorInputs.push(p.SELECT),this.inputConfig.dirInputs.length<2&&this.errorInputs.push(p.RIGHT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"dirInputs",JSON.parse(JSON.stringify(p.DEFAULT_DIR_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.dirEnabled&&(e.dirInput=ma.getInstanceFromConfig(e.inputConfig,".area-element-inner","active",t=>{e.selectedTestElement=t}),e.dirInput.start())},100)},stopTest(){this.dirInput&&this.dirInput.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#direction-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},Pa=(n(89),Pt(Ma,Ra,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Direction Input // Richtungs-Eingabe")])])}],!1,null,"4c9162fd",null));Pa.options.__file="src/vue-components/modals/input/directionInputModal.vue";var Ga=Pa.exports,Ua=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Huffman input method: 2 or more input events // Huffman-Eingabe: 2 oder mehr Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}],attrs:{type:"checkbox",id:"enableHuffinput"},domProps:{checked:Array.isArray(e.inputConfig.huffEnabled)?e._i(e.inputConfig.huffEnabled,null)>-1:e.inputConfig.huffEnabled},on:{change:function(t){var n=e.inputConfig.huffEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHuffinput","data-i18n":""}},[e._v("Enable huffman input // Huffman-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"min-inputs":2,"max-inputs":9,"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.huffInputs,callback:function(t){e.$set(e.inputConfig,"huffInputs",t)},expression:"inputConfig.huffInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowNumbers,expression:"inputConfig.huffShowNumbers"}],attrs:{type:"checkbox",id:"chkNumbers"},domProps:{checked:Array.isArray(e.inputConfig.huffShowNumbers)?e._i(e.inputConfig.huffShowNumbers,null)>-1:e.inputConfig.huffShowNumbers},on:{change:function(t){var n=e.inputConfig.huffShowNumbers,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowNumbers",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowNumbers",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowNumbers",a)}}}),e._v(" "),n("label",{attrs:{for:"chkNumbers","data-i18n":""}},[e._v("Show numbers // Zeige Nummern")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowColors,expression:"inputConfig.huffShowColors"}],attrs:{type:"checkbox",id:"chkColors"},domProps:{checked:Array.isArray(e.inputConfig.huffShowColors)?e._i(e.inputConfig.huffShowColors,null)>-1:e.inputConfig.huffShowColors},on:{change:function(t){var n=e.inputConfig.huffShowColors,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowColors",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowColors",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowColors",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColors","data-i18n":""}},[e._v("Show colors // Zeige Farben")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColorWholeElement,expression:"inputConfig.huffColorWholeElement"}],attrs:{type:"checkbox",id:"chkColorWholeElement"},domProps:{checked:Array.isArray(e.inputConfig.huffColorWholeElement)?e._i(e.inputConfig.huffColorWholeElement,null)>-1:e.inputConfig.huffColorWholeElement},on:{change:function(t){var n=e.inputConfig.huffColorWholeElement,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffColorWholeElement",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffColorWholeElement",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffColorWholeElement",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColorWholeElement","data-i18n":""}},[e._v("Color whole element // Färbe ganzes Element")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffMarkInactive,expression:"inputConfig.huffMarkInactive"}],attrs:{type:"checkbox",id:"chkMarkInactive"},domProps:{checked:Array.isArray(e.inputConfig.huffMarkInactive)?e._i(e.inputConfig.huffMarkInactive,null)>-1:e.inputConfig.huffMarkInactive},on:{change:function(t){var n=e.inputConfig.huffMarkInactive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffMarkInactive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffMarkInactive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffMarkInactive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkMarkInactive","data-i18n":""}},[e._v("Mark inactive elements // Markiere inaktive Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inTimeout","data-i18n":""}},[e._v("Timeout in ms (0 means disabled) // Timeout in ms (0 ist deaktiviert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"range",id:"inTimeout",min:"0",max:"10000",step:"100"},domProps:{value:e.inputConfig.huffTimeout},on:{__r:function(t){e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"10000",step:"200"},domProps:{value:e.inputConfig.huffTimeout},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inElementCount","data-i18n":""}},[e._v("Number of elements (0 means automatic) // Anzahl der Elemente (0 ist automatisch)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"range",min:"0",max:"300",id:"inElementCount"},domProps:{value:e.inputConfig.huffElementCount},on:{__r:function(t){e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"300",id:"inElementCount2"},domProps:{value:e.inputConfig.huffElementCount},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},e._l(e.inputConfig.huffInputs.length,(function(t){return n("div",[n("label",{staticStyle:{"margin-right":"1em"},attrs:{for:"colorInput"+t}},[n("span",{attrs:{"data-i18n":""}},[e._v("Color // Farbe")]),e._v(" "+e._s(t))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColors[t-1],expression:"inputConfig.huffColors[i-1]"}],attrs:{id:"colorInput"+t,type:"color"},domProps:{value:e.inputConfig.huffColors[t-1]},on:{input:function(n){n.target.composing||e.$set(e.inputConfig.huffColors,t-1,n.target.value)}}})])})),0),e._v(" "),n("button",{staticClass:"four columns",staticStyle:{"margin-top":"1em"},attrs:{"data-i18n":""},on:{click:function(t){e.inputConfig.huffColors=JSON.parse(JSON.stringify(e.InputConfig.DEFAULT_HUFF_COLORS))}}},[e._v("Reset colors // Farben zurücksetzen")])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ua._withStripped=!0;var $a={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,error:"",errorInputs:[],huffInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.inputConfig.huffElementCount=this.inputConfig.huffElementCount||0,this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.huffEnabled||(this.inputConfig.huffInputs.length<2&&this.errorInputs.push(p.GENERAL_INPUT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"huffInputs",JSON.parse(JSON.stringify(p.DEFAULT_HUFF_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.huffEnabled&&(this.huffInput=pa.getInstanceFromConfig(this.inputConfig,".area-element-inner","active","inactive",e=>{this.selectedTestElement=e}),this.huffInput.start())},100)},stopTest(){this.huffInput&&this.huffInput.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#huffman-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},Fa=(n(91),Pt($a,Ua,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Huffman Input // Huffman-Eingabe")])])}],!1,null,"fff4292a",null));Fa.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var Va=Fa.exports,Ba=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Sequential input method: 2 input events // Sequentielle Eingabe: 2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}],attrs:{type:"checkbox",id:"enableSeqinput"},domProps:{checked:Array.isArray(e.inputConfig.seqEnabled)?e._i(e.inputConfig.seqEnabled,null)>-1:e.inputConfig.seqEnabled},on:{change:function(t){var n=e.inputConfig.seqEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"seqEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"seqEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"seqEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableSeqinput","data-i18n":""}},[e._v("Enable sequential input // Sequentielle Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.NEXT_ELEMENT,e.InputConfig.PREVIOUS_ELEMENT,e.InputConfig.SELECT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.seqInputs,callback:function(t){e.$set(e.inputConfig,"seqInputs",t)},expression:"inputConfig.seqInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ba._withStripped=!0;var ja={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,error:"",errorInputs:[],seqInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.seqEnabled||(0===this.inputConfig.seqInputs.filter(e=>e.label===p.NEXT_ELEMENT).length&&this.errorInputs.push(p.NEXT_ELEMENT),0===this.inputConfig.seqInputs.filter(e=>e.label===p.SELECT).length&&this.errorInputs.push(p.SELECT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"seqInputs",JSON.parse(JSON.stringify(p.DEFAULT_SEQ_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.seqEnabled&&(e.seqInput=ga.getInstanceFromConfig(e.inputConfig,".area-element-inner",{selectionListener:t=>{e.selectedTestElement=t}}),e.seqInput.start())},100)},stopTest(){this.seqInput&&this.seqInput.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#sequential-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},Ya=(n(93),Pt(ja,Ba,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Sequential Input // Sequentielle Eingabe")])])}],!1,null,"071e6452",null));Ya.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var Ha=Ya.exports,Wa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"number-row",staticStyle:{"text-align":"center","margin-bottom":"1em"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Input passcode // PIN eingeben")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("(use buttons or keyboard) // (verwenden Sie Buttons oder Tastatur)")]),n("br"),e._v(" "),n("span",{staticStyle:{"font-size":"3em"},attrs:{"aria-hidden":"true"}},[e._l(e.inputPasscode.length,(function(t){return n("span",[e._v("●")])})),e._v(" "),e._l(Math.max(0,e.passcode.length-e.inputPasscode.length),(function(t){return n("span",[e._v("_")])}))],2)]),e._v(" "),n("div",{staticClass:"number-row"},e._l([1,2,3],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([4,5,6],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([7,8,9],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},[n("button",{staticStyle:{"margin-left":"33%"},on:{click:function(t){return e.inputDigit(0)}}},[e._v("0")])])]),e._v(" "),n("div",{staticClass:"modal-footer"})])])])])};Wa._withStripped=!0;var za={props:[],data:function(){return{passcode:g.getUnlockPasscode(),inputPasscode:"",timeoutHandler:null,masterkeyPossible:!0,timeoutMasterkeyHandler:null,keyHandler:null}},methods:{inputDigit(e){this.resetTimeout(),this.inputPasscode=this.inputPasscode+e,this.inputPasscode===this.passcode?(this.$emit("unlock"),this.$emit("close")):!this.masterkeyPossible&&this.inputPasscode.length>=this.passcode.length?this.$emit("close"):this.masterkeyPossible&&10===this.inputPasscode.length&&(this.$emit("unlock"),this.$emit("close"))},resetTimeout(){clearTimeout(this.timeoutHandler),clearTimeout(this.timeoutMasterkeyHandler),this.timeoutHandler=setTimeout(()=>{this.$emit("close")},5e3),this.timeoutMasterkeyHandler=setTimeout(()=>{this.masterkeyPossible=!1},500)}},mounted(){this.keyHandler=St.instance(),this.keyHandler.onAnyKey(e=>{let t=e-48;t>=0&&t<=9&&this.inputDigit(t)}),this.keyHandler.startListening(),C.initDomI18n(),this.resetTimeout()},beforeDestroy(){this.keyHandler.destroy()}},Ka=(n(95),Pt(za,Wa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Unlock application // Anwendung entsperren\n ")])])}],!1,null,"1e4b04a9",null));Ka.options.__file="src/vue-components/modals/unlockModal.vue";var Ja=Ka.exports;let Xa=null,qa=null,Za={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL",MODAL_UNLOCK:"MODAL_UNLOCK"};function Qa(){Xa&&window.removeEventListener("resize",Xa.resizeListener,!0),Xa&&a()(document).off(r.EVENT_GRID_RESIZE,Xa.resizeListener),Xa&&Xa.scanner&&Xa.scanner.destroy(),Xa&&Xa.hover&&Xa.hover.destroy(),Xa&&Xa.clicker&&Xa.clicker.destroy(),Xa&&Xa.directionInput&&Xa.directionInput.destroy(),Xa&&Xa.huffmanInput&&Xa.huffmanInput.destroy(),Xa&&Xa.seqInput&&Xa.seqInput.destroy()}function er(){a.a.contextMenu("destroy");function e(e,t){return e?t?" (aktiv)":" (active)":""}function t(t,n,i){return`${t}${e(i)} // ${n}${e(i,!0)}`}let n=Xa.metadata.inputConfig,i=n.mouseclickEnabled||n.hoverEnabled,r={CONTEXT_MOUSE:{name:t("Mouse/Touch input","Maus-/Toucheingabe",i),icon:"fas fa-mouse-pointer",className:i?"boldFont":""},CONTEXT_SCANNING:{name:t("Scanning","Scanning",n.scanEnabled),icon:"fas fa-sort-amount-down",className:n.scanEnabled?"boldFont":""},CONTEXT_DIRECTION:{name:t("Direction input","Richtungs-Eingabe",n.dirEnabled),icon:"fas fa-arrows-alt",className:n.dirEnabled?"boldFont":""},CONTEXT_HUFFMAN:{name:t("Huffman input","Huffman-Eingabe",n.huffEnabled),icon:"fas fa-ellipsis-h",className:n.huffEnabled?"boldFont":""},CONTEXT_SEQUENTIAL:{name:t("Sequential input","Sequentielle Eingabe",n.seqEnabled),icon:"fas fa-arrow-right",className:n.seqEnabled?"boldFont":""}};a.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":Xa.openModal(Za.MODAL_MOUSE);break;case"CONTEXT_SCANNING":Xa.openModal(Za.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":Xa.openModal(Za.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":Xa.openModal(Za.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":Xa.openModal(Za.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:r,zIndex:10})}var tr=Pt({props:["gridId"],data:()=>({gridData:{},globalGridData:null,metadata:null,updatedMetadataDoc:null,scanner:null,hover:null,clicker:null,directionInput:null,seqInput:null,huffmanInput:null,showModal:null,modalTypes:Za,viewInitialized:!1,unlockCount:8,unlockCounter:8}),components:{UnlockModal:Ja,SequentialInputModal:Ha,HuffmanInputModal:Va,DirectionInputModal:Ga,MouseModal:Da,ScanningModal:Oa,HeaderIcon:zt},methods:{openModal(e){this.showModal=e,Qa()},lock(){this.metadata.locked=!0,this.unlockCounter=8,dt.saveMetadata(this.metadata).then(()=>{a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)})},unlock(e){let t=this;e||!g.getUnlockPasscode()?(t.unlockCounter--,qe.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,dt.saveMetadata(t.metadata).then(()=>{a()(document).trigger(r.EVENT_SIDEBAR_OPEN)}))):t.showModal=Za.MODAL_UNLOCK},applyFullscreen(e){qe.openFullscreen(),this.metadata.fullscreen=!0;let t=Promise.resolve();e||(t=dt.saveMetadata(this.metadata)),t.then(()=>{a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)})},initInputMethods(){let e=this;if(!qa)return;let t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),a()(document).on(r.EVENT_GRID_RESIZE,e.resizeListener);let n=t=>{aa.removeAddClass(t,"selected"),Ii.doAction(e.gridData.id,t.id)},i=n=>{t.globalReadActive&&Tn.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=ga.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',{selectionListener:n,activeListener:i}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=ma.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=pa.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=sa.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus","scanInactive"),e.scanner.setSelectionListener(n),qa.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),qa.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=la.getInstanceFromConfig(t,".grid-item-content",{activeListener:i,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):a()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new da(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())},reinitInputMethods(){let e=this;Qa(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),er(),e.initInputMethods()})},reload(e){qa.reinit(e).then(()=>{e&&(this.gridData=JSON.parse(JSON.stringify(e))),this.reinitInputMethods()})},reloadOnLangChange(){this.reload()},toEditGrid(){as.toEditGrid(this.gridData.id)},toManageGrids(){as.toManageGrids()},toLogin(){as.toLogin()},reloadFn(e,t,n){let i=this;if(!Xa||!qa||!qa.isInitialized())return void setTimeout(()=>{i.reloadFn(e,t,n)},500);log.debug("got update event, ids updated:"+t);let s=n.filter(e=>Xa.gridData&&e.id===Xa.gridData.id)[0];this.updatedMetadataDoc=n.filter(e=>Xa.metadata&&e.id===Xa.metadata.id)[0]||this.updatedMetadataDoc,s&&Xa.reload(new de(s)),g.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==Xa.gridData.id?dt.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then(e=>{e.hasOutdatedThumbnail()||as.toLastOpenedGrid()}):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==Xa.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?Xa.applyFullscreen(!0):a()(document).trigger(r.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==Xa.metadata.locked&&(this.updatedMetadataDoc.locked?Xa.lock():Xa.unlock(!0))))},onSidebarOpen(){Xa&&Xa.metadata&&(Xa.metadata.fullscreen=!1,a()(document).trigger(r.EVENT_GRID_RESIZE))},resizeListener(){let e=this;qe.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created(){a()(document).on(r.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).on(r.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).on(r.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){let e=this;Xa=e,dt.getGlobalGrid().then(t=>(e.globalGridData=t,dt.getGrid(e.gridId))).then(t=>{if(!t)return log.warn("grid not found! gridId: "+this.gridId),dt.getGrids(!1,!0).then(e=>(e[0]?as.toGrid(e[0].id):as.toManageGrids(),Promise.reject()));if(t.hasAREModel()){let e=t.getAREModel();yt.uploadAndStartModel(e.dataBase64,t.getAREURL(),e.fileName)}return e.gridData=JSON.parse(JSON.stringify(t)),as.addToGridHistory(e.gridData.id),Promise.resolve()}).then(()=>dt.getMetadata()).then(t=>{let n=JSON.parse(JSON.stringify(t||new h));return n.lastOpenedGridId=this.gridId,n.locked=void 0===n.locked?ue.isDemoMode()&&dt.getCurrentUser()===r.LOCAL_DEMO_USERNAME:n.locked,n.fullscreen=void 0===n.fullscreen?ue.isDemoMode()&&dt.getCurrentUser()===r.LOCAL_DEMO_USERNAME:n.fullscreen,n.inputConfig.scanEnabled=!!ue.isScanningEnabled()||n.inputConfig.scanEnabled,n.inputConfig.dirEnabled=!!ue.isDirectionEnabled()||n.inputConfig.dirEnabled,n.inputConfig.huffEnabled=!!ue.isHuffmanEnabled()||n.inputConfig.huffEnabled,dt.saveMetadata(n).then(()=>{n.locked&&a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)}),e.metadata=n,Promise.resolve()}).then(()=>{return t=e.gridData.id,qa=new ei("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:t,globalGridHeightPercentage:Xa.metadata.globalGridHeightPercentage}),an.setGridInstance(qa),qa.getInitPromise();var t}).then(()=>{er(),e.viewInitialized=!0,a()(document).trigger(r.EVENT_GRID_LOADED);let t=new de(e.gridData);t.hasOutdatedThumbnail()&&M.getScreenshot("#grid-container").then(n=>{let i={data:n,hash:t.getHash()};e.gridData.thumbnail=i,dt.saveGrid(e.gridData)}),e.initInputMethods()}).catch(e=>{e&&log.warn(e)})},updated(){C.initDomI18n()},beforeDestroy(){a()(document).off(r.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).off(r.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).off(r.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),Qa(),a.a.contextMenu("destroy"),Xa=null,qa&&(qa.destroy(),qa=null,an.setGridInstance(null))}},ia,[],!1,null,"cc4f17d6",null);tr.options.__file="src/vue-components/views/gridView.vue";var nr=tr.exports,ir=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced",on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginPlain(e.user,e.password)}}},[e._m(0),e._v(" "),n("div",{staticClass:"eleven columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"eleven columns"},e._l(e.allUsersList,(function(t){return n("div",{staticClass:"row saved-user",staticStyle:{"margin-bottom":"0"}},[n("div",{class:t===e.activeUser?"loggedIn":""},[n("div",{staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"}},[n("span",{staticStyle:{"margin-right":"0.6em"}},[e.savedLocalUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_LOCAL")}},[n("i",{staticClass:"fas fa-user fa-2x"})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_CLOUD")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-cloud fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)||e.savedLocalUsers.includes(t)?e._e():n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_ONLINE")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-globe fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})])]),e._v(" "),n("strong",[e._v(e._s(t))]),e._v(" "),n("em",{directives:[{name:"show",rawName:"v-show",value:t===e.activeUser,expression:"username === activeUser"}],attrs:{"data-i18n":""}},[e._v("(active) // (aktiv)")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.loginStored(t)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.loginTryUser!==t,expression:"loginTryUser !== username"}],staticClass:"fas fa-sign-in-alt"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:null==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == undefined && loginTryUser === username"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == false && loginTryUser === username"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == true && loginTryUser === username"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.removeStoredUser(t)}}},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.savedLocalUsers.includes(t),expression:"!savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logout // Ausloggen")]),e._v(" "),n("i",{staticClass:"fas fa-user-times"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.savedLocalUsers.includes(t),expression:"savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Delete // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hasValidMajorModelVersion(t),expression:"!hasValidMajorModelVersion(username)"}],staticClass:"eight columns"},[e._m(1,!0),e._v(" "),e._m(2,!0)])])])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("form",{staticClass:"eleven columns saved-user",attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[e._m(3),e._v(" "),n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),e.savedUsers.includes(e.user)&&e.hasValidMajorModelVersion(e.user)?n("button",{staticClass:"four columns",attrs:{type:"button"},on:{click:function(t){return e.loginStored(e.user)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{staticClass:"fas fa-sign-in-alt"})]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[e._m(5),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[n("div",{staticClass:"four columns offset-by-two",staticStyle:{"margin-bottom":"1.0em"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(6)]),e._v(" "),n("button",{staticClass:"five columns offset-by-one",attrs:{type:"button",disabled:!e.user||!e.password},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Login // Einloggen")]),e._v(" "),n("span",[n("i",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess === undefined && loginTryUser === user"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == false && loginTryUser === user"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == true && loginTryUser === user"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.allUsersList.length,expression:"allUsersList.length == 0"}]},[n("form",{attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(7),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser2",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(8),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword2",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember2"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(9),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check for a one-time login on a foreign device. // Für einmaliges Einloggen auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-one",attrs:{disabled:!e.user||!e.password,"data-i18n":""},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[e._v("Login // Einloggen")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess,expression:"loginSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logging in // Einloggen")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!1===e.loginSuccess,expression:"loginSuccess === false"}]},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.loginErrorCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.loginSuccess,expression:"loginSuccess === true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Login successful // Login erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}],attrs:{"data-i18n":""}},[e._v("No account? // Kein Account?")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}],attrs:{"data-i18n":""}},[e._v("Add new account? // Weiteren Account hinzufügen?")]),e._v(" "),n("a",{attrs:{href:"#register","data-i18n":""}},[e._v("Register now // Jetzt registrieren")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("AsTeRICS Grid is free and all you need is to register is a username and a password. // AsTeRICS Grid ist kostenlos und Sie benötigen nur einen Usernamen und ein Passwort.")])])])]),e._v(" "),e._m(10)])])],1)};ir._withStripped=!0;var ar=n(6),rr=n.n(ar);let sr,or={},lr=null,cr=null,dr=null,ur=null,fr=!1,pr=null,hr=null,mr=r.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function vr(e,t,n){return dr!==e?Promise.reject():(ur=e,pr=t,hr=n,e=e.trim(),rr.a.login({username:e,password:t}).then(i=>(log.info("login success!"),or.stopAutoRetryLogin(),lr=i,cr=e,g.setLastActiveUser(e),g.setAutologinUser(n?e:""),n&&g.saveUserPassword(e,t),Promise.resolve())))}function gr(e,t,n){return vr(e,t,n).then(()=>tt.initForUser(e,t,or.getLoggedInUserDatabase(),!n).then(()=>Promise.resolve(!0)),i=>dr!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),g.isDatabaseSynced(e)?(log.info("using offline local database..."),g.setLastActiveUser(e),g.setAutologinUser(n?e:""),_r(i)!==or.ERROR_CODE_UNAUTHORIZED&&br(e,t,n),tt.initForUser(e,t).then(()=>Promise.resolve(!1))):Promise.reject(_r(i))))}function _r(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?or.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?or.ERROR_CODE_NETWORK_ERROR:void 0}function br(e,t,n){or.stopAutoRetryLogin(),sr=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),gr(e,t,n)}),1e4)}or.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",or.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",or.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",rr.a.configure({serverUrl:mr,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),or.getLoggedInUsername=function(){return cr},or.getLoggedInUserDatabase=function(){if(!lr||!lr.userDBs)return null;let e=Object.keys(lr.userDBs);return lr.userDBs[e[0]]},or.loginPlainPassword=function(e,t,n){dr=e;let i=ae.getUserPasswordHash(t);return or.loginHashedPassword(e,i,n)},or.loginHashedPassword=function(e,t,n){return dr=e,gr(e,t,n)},or.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if(fr)return log.warn("login currently in progress - aborting..."),Promise.reject();dr=e,fr=!0;let n=g.getSavedOnlineUsers(),i=g.getSavedLocalUsers(),a=new Promise((t,a)=>{if(or.getLoggedInUsername()===e)return t();if(or.logout(),n.includes(e)&&g.isDatabaseSynced(e)){let n=g.getUserPassword(e);tt.initForUser(e,n).then(()=>{or.loginHashedPassword(e,n,!0),t()})}else if(n.includes(e)){log.info("waiting for successful login because user wasn't completely synced before...");let n=g.getUserPassword(e);or.loginHashedPassword(e,n,!0).then(()=>{t()}).catch(e=>{a(e)})}else i.includes(e)&&(g.setAutologinUser(e),tt.initForUser(e,e).then(()=>{t()}))});return a.then(()=>{t||as.toMain()}),a.finally(()=>{fr=!1}),a},or.logout=function(){or.stopAutoRetryLogin(),cr&&(log.debug("logging out user: "+cr),tt.closeCurrentDatabase(),rr.a.logout(cr),cr=null,lr=null)},or.register=function(e,t,n){dr=e,or.stopAutoRetryLogin(),e=e.trim();let i=ae.getUserPasswordHash(t);return log.debug("password hash: "+i),rr.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then(t=>vr(e,i,n)).then(()=>(log.info("registration successful!"),tt.registerForUser(cr,i,or.getLoggedInUserDatabase(),!n))).then(()=>dt.importDefaultGridset()).catch(e=>(log.info("registration failed!"),log.info(e),Promise.reject(e)))},or.registerOffline=function(e,t){return or.logout(),g.saveLocalUser(e),g.setAutologinUser(e),tt.registerForUser(e,t).then(()=>dt.importDefaultGridset())},or.validateUsername=function(e){return new Promise((t,n)=>{e&&r.USERNAME_REGEX.test(e)?g.isSavedLocalUser(e)||e===r.LOCAL_DEMO_USERNAME?t(r.VALIDATION_ERROR_EXISTING):rr.a.validateUsername(e).then(()=>{t(r.VALIDATION_VALID)},e=>{log.debug(e),t(r.VALIDATION_ERROR_EXISTING)}):t(r.VALIDATION_ERROR_REGEX)})},or.stopAutoRetryLogin=function(){sr&&(window.clearInterval(sr),sr=null)},or.ping=function(){a.a.get(mr+"/ping")},a()(document).on(r.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),ur&&pr&&br(ur,pr,hr)})),a()(document).on(r.EVENT_DB_DATAMODEL_UPDATE,(function(){or.logout(),g.setAutologinUser(""),as.toLogin()}));var Er={components:{HeaderIcon:zt},props:[],data:()=>({user:null,password:null,remember:!0,loginTryUser:null,loginSuccess:null,loginErrorCode:null,savedUsers:[],savedOnlineUsers:[],savedLocalUsers:[],allUsersList:[],activeUser:null}),methods:{toMain(){as.toMain()},loginPlain(e,t){let n=this;this.savedUsers.includes(e)?n.loginStored(e):e&&t&&(n.loginTryUser=e,n.loginSuccess=void 0,n.loginErrorCode="",or.loginPlainPassword(e,t,this.remember).then(()=>{n.loginSuccess=!0,as.toMain()}).catch(e=>{n.loginSuccess=!1,n.loginErrorCode=e}))},loginStored(e){let t=this;e&&(t.savedUsers.includes(e)||or.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",or.loginStoredUser(e).then(()=>{t.loginSuccess=!0}).catch(e=>{t.loginSuccess=!1,t.loginErrorCode=e}))},removeStoredUser(e){if(this.savedOnlineUsers.includes(e)||this.savedLocalUsers.includes(e)){let t=this.savedOnlineUsers.includes(e)?"CONFIRM_REMOVE_USER":"CONFIRM_REMOVE_USER_LOCAL";if(!confirm(C.translate(t,e)))return;g.unmarkSyncedDatabase(e),g.removeUserPassword(e),or.getLoggedInUsername()===e&&or.logout(),tt.deleteDatabase(e)}else or.logout();this.allUsersList=g.getSavedUsers(this.activeUser),this.savedUsers=g.getSavedUsers(this.activeUser),this.savedOnlineUsers=g.getSavedOnlineUsers(),this.savedLocalUsers=g.getSavedLocalUsers()},hasValidMajorModelVersion:e=>g.getUserMajorModelVersion(e)<=s.getLatestModelVersion().major},mounted(){let e=or.getLoggedInUsername();this.activeUser=g.getAutologinUser()||e,this.savedUsers=g.getSavedUsers(this.activeUser),this.allUsersList=g.getSavedUsers(this.activeUser),this.savedOnlineUsers=g.getSavedOnlineUsers(),this.savedLocalUsers=g.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:g.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),C.initDomI18n()},updated(){C.initDomI18n()}},yr=(n(123),Pt(Er,ir,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Login // Einloggen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("i",{staticClass:"fas fa-exclamation-triangle"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Incompatible data model version! // Inkompatible Version des Datenmodells!")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{"data-i18n":""}},[t("span",[this._v("Change to "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" to open this user.")]),this._v(" "),t("span",[this._v("Wechseln sie zu "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" um diesen User zu verwenden.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("strong",{attrs:{"data-i18n":""}},[this._v("Login with other user // Login mit anderem User")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputPassword"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputUser2"}},[t("span",{staticClass:"desktop-right"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputPassword2"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember2"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"twelve columns"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to create an offline-only user? // Möchten Sie einen Offline-User erstellen?")]),this._v(" "),t("a",{attrs:{href:"#add","data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])])}],!1,null,"906058d8",null));yr.options.__file="src/vue-components/views/loginView.vue";var Cr=yr.exports,wr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("form",{attrs:{autocomplete:"off",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"},{name:"debounce",rawName:"v-debounce",value:300,expression:"300"},{name:"focus",rawName:"v-focus"}],staticClass:"six columns",attrs:{type:"text",name:"username",id:"inputUser"},domProps:{value:e.user},on:{change:e.validateUsername,input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&0==e.usernameValid,expression:"user != null && usernameValid == false"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",[e._v(e._s(e._f("translate")(e.usernameValidationCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&1==e.usernameValid,expression:"user != null && usernameValid == true"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Valid username // Username OK")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"six columns",attrs:{type:"password",id:"inputPassword"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password2,expression:"password2"}],staticClass:"six columns",attrs:{type:"password",id:"inputConfirmPassword"},domProps:{value:e.password2},on:{input:function(t){t.target.composing||(e.password2=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password!==e.password2,expression:"!!password && password2 !== null && password !== password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords do not match // Passwörter stimmen nicht überein")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords match // Passwörter stimmen überein")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("i",{staticClass:"fas fa-2x fa-info-circle",staticStyle:{color:"blue"}}),e._v(" "),e._m(4)])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(5),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check if you are using a foreign device. // Auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns offset-by-two",attrs:{disabled:!(e.user&&e.password&&e.password2&&e.password===e.password2&&e.usernameValid),"data-i18n":""},on:{click:e.register}},[e._v("Register // Registrieren")])]),e._v(" "),e._m(6),e._v(" "),e._m(7),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"six columns offset-by-two"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.registerSuccess,expression:"registerSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering // Registriere")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.registerSuccess,expression:"registerSuccess == false"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering failed // Registrierung fehlgeschlagen")]),e._v(" "),n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("ul",e._l(e.validationErrors,(function(t){return n("li",[e._v(e._s(t))])})),0)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:1==e.registerSuccess,expression:"registerSuccess == true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Successfully registered // Registrierung erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])]),e._v(" "),n("comparison-component")],1)],1)};wr._withStripped=!0;var Tr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("accordion",{staticClass:"six columns offset-by-two",attrs:{"acc-label":"HEADER_COMPARE_ONLINE_OFFLINE"}},[n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Offline user // Offline-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline // alle Grids werden offline gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all functions available // voller Funktionsumfang")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("ideal for using on a single device // optimal für Nutzung auf einem einzelnen Gerät")])])])]),e._v(" "),n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Online user // Online-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline and online // alle Grids werden offline und online gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("automatic synchronization across multiple devices (e.g. PC, tablet, smartphone) // automatische Synchronisierung zwischen verschiedenen Geräten (z.B. PC, Tablet, Smartphone)")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all data is end-to-end encrypted and only you are able to access it // alle Daten werden verschlüsselt und es kann niemand außer Sie darauf zugreifen")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("for registration only a username and a password is needed // für die Registrierung wird nur ein Username und ein Passwort benötigt")])])])])])],1)};Tr._withStripped=!0;var Ar={props:[],components:{Accordion:qt},data:()=>({showInfo:!1}),methods:{},mounted(){C.initDomI18n()}},Nr=(n(125),Pt(Ar,Tr,[],!1,null,"2a375b84",null));Nr.options.__file="src/vue-components/components/comparisonComponent.vue";var Sr=Nr.exports,Ir={components:{ComparisonComponent:Sr,HeaderIcon:zt},props:[],data:()=>({user:null,usernameValid:null,usernameValidationCode:null,password:null,password2:null,remember:!0,registerSuccess:null,creationTime:(new Date).getTime(),spamTime:1e4,validationErrors:[]}),methods:{toMain(){as.toMain()},register(){let e=this,t=(new Date).getTime()-e.creationTime;if(t{log.info("successfully registered!"),e.registerSuccess=!0,as.toMain()}).catch(t=>{e.registerSuccess=!1,log.warn(t),t.validationErrors&&(e.validationErrors=[],Object.keys(t.validationErrors).forEach(n=>{e.validationErrors=e.validationErrors.concat(t.validationErrors[n])}))})},validateUsername(){var e=this;or.validateUsername(e.user).then(t=>{e.usernameValid=t===r.VALIDATION_VALID,e.usernameValidationCode=t})}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},kr=(n(127),Pt(Ir,wr,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Register online user // Online-User registrieren")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",{staticClass:"desktop-right inputlabel"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns inputlabel",attrs:{for:"inputPassword"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns inputlabel",attrs:{for:"inputConfirmPassword"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Confirm password // Passwort wiederholen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{attrs:{"data-i18n":""}},[t("span",[this._v("Your password will be used in order to encrypt your private data, before being synchronized with the cloud. A stronger password means better encryption.")]),this._v(" "),t("span",[this._v("Das Passwort wird verwendet um Ihre privaten Konfigurationsdaten zu verschlüsseln, bevor sie mit der Cloud synchronisiert werden. Ein stärkeres Passwort bedeutet bessere Verschlüsselung.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Already have an account? // Sie haben bereits einen Account?")]),this._v(" "),t("a",{attrs:{href:"#login","data-i18n":""}},[this._v("Login // Zum Login")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to create an offline-only user? // Möchten Sie einen Offline-User erstellen?")]),this._v(" "),t("a",{attrs:{href:"#add","data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])])}],!1,null,"287c2172",null));kr.options.__file="src/vue-components/views/registerView.vue";var Or=kr.exports,Lr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("form",{attrs:{autocomplete:"off",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"},{name:"debounce",rawName:"v-debounce",value:300,expression:"300"},{name:"focus",rawName:"v-focus"}],staticClass:"six columns",attrs:{type:"text",name:"username",id:"inputUser"},domProps:{value:e.user},on:{input:[function(t){t.target.composing||(e.user=t.target.value)},function(t){e.validationError=void 0}],change:e.validateUsername}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:""!=e.user&&e.validationError,expression:"user != '' && validationError"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.validationError)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.user&&void 0!==e.validationError&&!e.validationError,expression:"user && validationError !== undefined && !validationError"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Valid username // Username OK")])])])]),e._v(" "),e._m(2),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns offset-by-two",attrs:{disabled:!e.user||void 0===e.validationError||e.validationError},on:{click:e.addUser}},[n("span",{attrs:{"data-i18n":""}},[e._v("Add user // User hinzufügen")]),e._v("  "),e.loading?n("i",{staticClass:"fas fa-spinner fa-spin"}):e._e()])]),e._v(" "),e._m(3),e._v(" "),e._m(4),e._v(" "),n("comparison-component")],1)],1)};Lr._withStripped=!0;var xr={components:{ComparisonComponent:Sr,HeaderIcon:zt},props:[],data:()=>({user:null,validationError:void 0,showInfo:!1,savedUsers:g.getSavedUsers(),loading:!1}),methods:{toMain(){as.toMain()},addUser(){this.loading=!0,null==this.validationError&&or.registerOffline(this.user,this.user).then(()=>{as.toMain()})},validateUsername(){this.validationError=void 0,r.USERNAME_REGEX.test(this.user)?this.savedUsers.includes(this.user)||or.getLoggedInUsername()===this.user?this.validationError=r.VALIDATION_ERROR_EXISTING:this.validationError=null:this.validationError=r.VALIDATION_ERROR_REGEX}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Dr=(n(129),Pt(xr,Lr,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",{staticClass:"desktop-right"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("i",{staticClass:"fas fa-2x fa-info-circle",staticStyle:{color:"blue"}}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[t("span",[this._v("A local user is stored only on this device, in this browser. If you want to set up a user which is synchronized across several devices using the cloud, you can register an online user.")]),this._v(" "),t("span",[this._v("Ein lokaler User ist nur auf diesem Gerät, in diesem Browser gespeichert. Wenn Sie einen User erstellen möchen, der auf verschiedenen Geräten synchronisiert wird, registrieren Sie einen Online-User.")])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to register an online user devices? // Möchten Sie einen Online-User registrieren?")]),this._v(" "),t("a",{attrs:{href:"#register","data-i18n":""}},[this._v("Register // Zur Registrierung")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Already have an account? // Sie haben bereits einen Account?")]),this._v(" "),t("a",{attrs:{href:"#login","data-i18n":""}},[this._v("Login // Zum Login")])])])}],!1,null,"45d59551",null));Dr.options.__file="src/vue-components/views/addOfflineView.vue";var Rr=Dr.exports,Mr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("div",{staticClass:"eight columns offset-by-one"},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),e._m(2),e._v(" "),n("button",{on:{click:function(t){return e.useDefaultUser()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Use AsTeRICS Grid without registration // AsTeRICS Grid ohne Registrierung verwenden")]),e._v("  "),e.loading?n("i",{staticClass:"fas fa-spinner fa-spin"}):e._e()]),e._v(" "),e._m(3)]),e._v(" "),n("div",{staticClass:"row"},[e._m(4),e._v(" "),e._m(5),e._v(" "),n("button",{attrs:{"data-i18n":""},on:{click:function(t){return e.toRegister()}}},[e._v("Register now // Zur Registrierung")])]),e._v(" "),e._m(6),e._v(" "),n("div",{staticClass:"row"},[n("b",{attrs:{"data-i18n":""}},[e._v("Hint: // Hinweis:")]),e._v(" "),n("span",[n("span",{attrs:{"data-i18n":""}},[e._v("If you need help within AsTeRICS Grid, just click the help icon ( // Wenn Sie Hilfe bei der Verwendung von AsTeRICS Grid benötigen, klicken Sie einfach auf das Hilfe-Icon (")]),e._v(" "),n("a",{attrs:{href:"javascript:;"},on:{click:e.openHelp}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(") or press [F1] on the keyboard in order to open the user documentation at the relevant part. // ) oder drücken Sie [F1] auf der Tastatur um die Benutzerdokumentation an der entsprechenden Stelle zu öffnen.")])])])])])],1)};Mr._withStripped=!0;var Pr={components:{HeaderIcon:zt},props:[],data:()=>({loading:!1}),methods:{toMain(){as.toMain()},toRegister(){as.toRegister()},useDefaultUser(){this.loading=!0,or.registerOffline(r.LOCAL_NOLOGIN_USERNAME,r.LOCAL_NOLOGIN_USERNAME).then(()=>{as.toMain()})},openHelp(){ft.openHelp()}},mounted(){C.initDomI18n()}},Gr=(n(131),Pt(Pr,Mr,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Welcome // Willkommen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("h3",{attrs:{"data-i18n":""}},[t("span",[this._v("Use AsTeRICS Grid "),t("strong",[this._v("without registration")])]),this._v(" "),t("span",[this._v("AsTeRICS Grid "),t("strong",[this._v("ohne Registrierung")]),this._v(" verwenden")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("ul",{staticClass:"fa-ul"},[t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all grids are saved offline // alle Grids werden offline gespeichert")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all functions available // voller Funktionsumfang")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("ideal for using on a single device // optimal für Nutzung auf einem einzelnen Gerät")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("span",{staticClass:"fa fa-info-circle"}),t("span",{staticClass:"break-word",attrs:{"data-i18n":""}},[this._v("it's always possible to register later. // eine spätere Registrierung ist jederzeit möglich.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("h3",{attrs:{"data-i18n":""}},[t("span",[this._v("Use AsTeRICS Grid "),t("strong",[this._v("with registration")])]),this._v(" "),t("span",[this._v("AsTeRICS Grid "),t("strong",[this._v("mit Registrierung")]),this._v(" verwenden")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("ul",{staticClass:"fa-ul"},[t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all grids are saved offline and online // alle Grids werden offline und online gespeichert")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("automatic synchronization across multiple devices (e.g. PC, tablet, smartphone) // automatische Synchronisierung zwischen verschiedenen Geräten (z.B. PC, Tablet, Smartphone)")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all data is end-to-end encrypted and only you are able to access it // alle Daten werden verschlüsselt und es kann niemand außer Sie darauf zugreifen")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("for registration only a username and a password is needed // für die Registrierung wird nur ein Username und ein Passwort benötigt")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("span",{attrs:{"data-i18n":""}},[this._v("Already have an account? // Sie haben bereits einen Account?")]),this._v(" "),t("a",{attrs:{href:"#login","data-i18n":""}},[this._v("Login // Zum Login")])])}],!1,null,"20be1b0d",null));Gr.options.__file="src/vue-components/views/welcomeView.vue";var Ur=Gr.exports,$r=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"overflow-content"},[t("header-icon",{attrs:{"full-header":"true"}}),this._v(" "),this._m(0)],1)};$r._withStripped=!0;var Fr={components:{HeaderIcon:zt},props:[],data:()=>({}),methods:{toMain(){as.toMain()},toRegister(){as.toRegister()}},mounted(){C.initDomI18n()}},Vr=(n(133),Pt(Fr,$r,[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row content spaced"},[n("h2",{attrs:{"data-i18n":""}},[e._v("About AsTeRICS Grid // Über das AsTeRICS Grid")]),e._v(" "),n("div",{staticClass:"eight columns offset-by-one"},[n("div",{staticClass:"row"},[n("h3",{attrs:{"data-i18n":""}},[e._v("General information // Allgemeine Informationen")]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n The initial development of AsTeRICS Grid was done at the UAS Technikum Wien within the project ToRaDes, funded by the city of Vienna (project number 18-04)."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/torades/index.php"}},[e._v("More information about project ToRaDes")]),e._v(" "),n("br"),n("br"),e._v('\n\n Current development of AsTeRICS Grid is done in the project "Knowledge Hub for Accessible Technologies" (WBT), funded by the city of Vienna (project number 26-02).'),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/khat/index.php"}},[e._v("More information about project WBT")]),e._v(" "),n("br"),n("br"),e._v("\n\n AsTeRICS Grid is free and open source and hosted on github.com."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid"}},[e._v("AsTeRICS Grid on github")])]),e._v(" "),n("span",[e._v("\n Die erste Version von AsTeRICS Grid wurde an der FH Technikum Wien im Projekt ToRaDes entwickelt, das von von der Stadt Wien gefördert wurde (Projektnummer 18-04)."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/torades/index.php"}},[e._v("Mehr Informationen zum Projekt ToRaDes")]),e._v(" "),n("br"),n("br"),e._v('\n\n Die Weiterentwicklung von AsTeRICS Grid erfolgt derzeit im Projekt "Wissensdrehscheibe für Barrierefreie Technologien" (WBT), gefördert von der Stadt Wien (Projektnummer 26-02).'),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/khat/index.php"}},[e._v("Mehr Informationen zum Projekt WBT")]),e._v(" "),n("br"),n("br"),e._v("\n\n AsTeRICS Grid ist kostenlos und OpenSource und als Projekt auf github.com verfügbar."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid"}},[e._v("AsTeRICS Grid auf github")])])]),n("br"),e._v(" "),n("img",{attrs:{src:"app/img/ma23-gefoerdertvon.jpg",width:"80px",alt:"Logo MA23 Stadt Wien"}})]),e._v(" "),n("div",{staticClass:"row"},[n("h3",[e._v("Feedback")]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n If you encounter an error, have suggestions for improvement or any general feedback please don't hesitate to contact us on:"),n("br"),e._v(" "),n("a",{attrs:{href:"mailto:office@asterics-foundation.org"}},[e._v("office@asterics-foundation.org")]),e._v(" "),n("br"),n("br"),e._v("\n\n If you are a github user, you are also welcome to file an issue directly on github:"),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/issues/"}},[e._v("AsTeRICS Grid issues on github")]),e._v(" "),n("br")]),e._v(" "),n("span",[e._v("\n Wenn Sie einen Fehler finden, Verbesserungsvorschläge haben oder allgemeines Feedback rückmelden möchten, kontaktieren Sie uns bitte unter:"),n("br"),e._v(" "),n("a",{attrs:{href:"mailto:office@asterics-foundation.org"}},[e._v("office@asterics-foundation.org")]),e._v(" "),n("br"),n("br"),e._v("\n Wenn Sie auf github aktiv sind, können Sie dort ein Issue eintragen:"),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/issues/"}},[e._v("AsTeRICS Grid Issues auf github")]),e._v(" "),n("br")])])]),e._v(" "),n("div",{staticClass:"row"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Acknowledgements // Dank")]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n We thank "),n("a",{attrs:{target:"_blank",href:"https://crossbrowsertesting.com/"}},[e._v("crossbrowsertesting.com")]),e._v(" for providing us a free open source license."),n("br")]),e._v(" "),n("span",[e._v("\n Wir danken "),n("a",{attrs:{target:"_blank",href:"https://crossbrowsertesting.com/"}},[e._v("crossbrowsertesting.com")]),e._v(" für eine kostenlose OpenSource Lizenz."),n("br")])]),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://crossbrowsertesting.com/"}},[n("img",{attrs:{src:"app/img/CBT_OS-logo_2Color-H.png",width:"300px"}})]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n We thank "),n("a",{attrs:{target:"_blank",href:"https://responsivevoice.org"}},[e._v("ResponsiveVoice.org")]),e._v(" for free non-commercial usage."),n("br")]),e._v(" "),n("span",[e._v("\n Wir danken "),n("a",{attrs:{target:"_blank",href:"https://responsivevoice.org"}},[e._v("ResponsiveVoice.org")]),e._v(" für die kostenlose nicht-kommerzielle Verwendung."),n("br")])]),e._v(" "),n("div",[n("a",{attrs:{href:"https://responsivevoice.org"}},[e._v("ResponsiveVoice-NonCommercial")]),e._v(" licensed under "),n("a",{attrs:{href:"https://creativecommons.org/licenses/by-nc-nd/4.0/"}},[n("img",{attrs:{title:"ResponsiveVoice Text To Speech",src:"https://responsivevoice.org/wp-content/uploads/2014/08/95x15.png",alt:"95x15",width:"95",height:"15"}})])])]),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-top":"3em"}},[n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n You are using version "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/releases/tag/release-2021-02-04-10.37/+0100"}},[e._v("release-2021-02-04-10.37/+0100")]),e._v(" of AsTeRICS Grid.\n ")]),e._v(" "),n("span",[e._v("\n Sie verwenden AsTeRICS Grid Version "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/releases/tag/release-2021-02-04-10.37/+0100"}},[e._v("release-2021-02-04-10.37/+0100")]),e._v(".\n ")])])])])])}],!1,null,"af4ab890",null));Vr.options.__file="src/vue-components/views/aboutView.vue";var Br=Vr.exports,jr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content box"},[n("div",{staticClass:"all-dicts-view"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon"),e._v(" "),n("button",{on:{click:function(t){return e.addDictionary()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("New Dictionary // Neues Wörterbuch")])])],1),e._v(" "),n("div",{staticClass:"row content text-content"},[e.dicts?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("h2",{attrs:{"data-i18n":""}},[e._v("Saved Dictionaries // Gespeicherte Wörterbücher")]),e._v(" "),n("ul",{directives:[{name:"show",rawName:"v-show",value:e.dicts&&e.dicts.length>0,expression:"dicts && dicts.length > 0"}],attrs:{id:"dictList"}},[e._m(0),e._v(" "),e._l(e.dicts,(function(t){return n("li",{staticClass:"dict-table-elem"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[e.editModeId!==t.id?n("div",[e._v("\n "+e._s(t.dictionaryKey)+"\n "),n("button",{staticClass:"small-button",on:{click:function(n){return e.enableEditName(t)}}},[n("i",{staticClass:"far fa-edit"})])]):e._e(),e._v(" "),e.editModeId===t.id?n("div",[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"dict.dictionaryKey"}],attrs:{type:"text"},domProps:{value:t.dictionaryKey},on:{input:function(n){n.target.composing||e.$set(t,"dictionaryKey",n.target.value)}}}),e._v(" "),n("div",{staticClass:"inline"},[e.originalLabel?n("button",{staticClass:"small-button",on:{click:function(t){return e.cancelEditName()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("button",{staticClass:"small-button",attrs:{disabled:e.isLabelDuplicate(t.dictionaryKey)},on:{click:function(n){return e.finishEditName(t)}}},[n("i",{staticClass:"fas fa-check"})])])]):e._e()]),e._v(" "),n("div",{staticClass:"eight columns actionbuttons",staticStyle:{display:"flex"}},[n("div",{staticClass:"four columns show-mobile",staticStyle:{margin:"0.5em 0 0 0.2em"},attrs:{"data-i18n":""}},[e._v("Actions\n // Aktionen\n ")]),e._v(" "),n("button",{on:{click:function(n){return e.edit(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.clone(t.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteDict(t.id,t.dictionaryKey)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])])])]),e._v(" "),e.editId===t.id?n("div",{staticClass:"edit-container"},[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchWord,expression:"searchWord"}],staticClass:"four columns",attrs:{type:"text",placeholder:"Search word"},domProps:{value:e.searchWord},on:{input:[function(t){t.target.composing||(e.searchWord=t.target.value)},function(t){return e.inputSearchWord()}]}}),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){e.showImportModal=!0}}},[n("i",{staticClass:"fas fa-file-import"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Import words // Wörter importieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Words: // Wörter:")]),e._v(" "),n("ul",{staticStyle:{"margin-left":"0"}},e._l(e.wordlist,(function(i){return n("li",[n("button",{staticClass:"small-button",staticStyle:{"margin-right":"0.5em"},on:{click:function(n){return e.deleteWord(i,t)}}},[n("i",{staticClass:"far fa-trash-alt"})]),e._v(e._s(i)+"\n ")])})),0),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.totalWords>e.wordlist.length&&""===e.searchWord,expression:"totalWords > wordlist.length && searchWord === ''"}]},[e._v("\n "+e._s(e.totalWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) available. Type in search field to filter. // mehr Wörter verfügbar. Tippe in Suchfeld um zu filtern.")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.filterWords>e.wordlist.length&&""!==e.searchWord,expression:"filterWords > wordlist.length && searchWord !== ''"}]},[e._v("\n "+e._s(e.filterWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) for this filter. Refine search to show more. // mehr Wörter für diese Suche. Verfeinere die Suche um mehr anzuzeigen.")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchWord&&e.totalWords>0&&0===e.wordlist.length,expression:"searchWord && totalWords > 0 && wordlist.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("No words for this filter. Clear search field to show elements. // Keine Wörter für diese Suche. Lösche Suchfeld um Elemente anzuzeigen.")]),e._v(" "),n("button",{on:{click:function(t){return e.inputSearchWord("")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear // Löschen")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.totalWords,expression:"totalWords === 0"}],attrs:{"data-i18n":""}},[e._v("This dictionary contains no words. // Dieses Wörterbuch enthält keine Wörter.")])])]):e._e(),e._v(" "),n("div",[e.showImportModal?n("import-dictionary-modal",{attrs:{"dict-data":t},on:{close:function(t){e.showImportModal=!1},reload:e.reload}}):e._e()],1)])}))],2),e._v(" "),e.dicts&&0!==e.dicts.length?e._e():n("p",{attrs:{"data-i18n":""}},[e._v("\n No dictionaries found! // Keine Ergebnisse gefunden!\n ")])])])])};jr._withStripped=!0;var Yr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body container"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"nine columns offset-by-three btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:function(){e.showAdvanced=!e.showAdvanced}}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.showAdvanced,expression:"!showAdvanced"}],staticClass:"fas fa-chevron-down"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.showAdvanced,expression:"showAdvanced"}],staticClass:"fas fa-chevron-up"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Advanced options // Erweiterte Einstellungen")])])]),e._v(" "),e.showAdvanced?n("div",{staticClass:"row"},[n("div",{staticClass:"nine columns offset-by-three",staticStyle:{"background-color":"whitesmoke"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElementSeparator","data-i18n":""}},[e._v("Element separator // Trennzeichen Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.elementSeparator,expression:"elementSeparator"}],attrs:{id:"inputElementSeparator",type:"text"},domProps:{value:e.elementSeparator},on:{input:[function(t){t.target.composing||(e.elementSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankSeparator","data-i18n":""}},[e._v("In-element separator // Trennzeichen innerhalb Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankSeparator,expression:"rankSeparator"}],attrs:{id:"inputRankSeparator",type:"text"},domProps:{value:e.rankSeparator},on:{input:[function(t){t.target.composing||(e.rankSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElIndex","data-i18n":""}},[e._v("Word index (0-based) // Index Wort (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.wordPosition,expression:"wordPosition"}],attrs:{id:"inputElIndex",type:"number"},domProps:{value:e.wordPosition},on:{input:[function(t){t.target.composing||(e.wordPosition=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankIndex","data-i18n":""}},[e._v("Rank index (0-based) // Index Rank (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankPosition,expression:"rankPosition"}],attrs:{id:"inputRankIndex",type:"number"},domProps:{value:e.rankPosition},on:{input:[function(t){t.target.composing||(e.rankPosition=t.target.value)},e.textChanged]}})])])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Word1 Word2 Word3..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Words // Erkannte Wörter")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.elementCount))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Word(s) // Wörter")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))]),e._v(" "),e.parsedElems.length{e.$emit("reload",e.dictData),e.$emit("close")})},parseInternal(e){try{e.parseWords(this.inputText,{elementSeparator:new RegExp(this.elementSeparator),rankSeparator:new RegExp(this.rankSeparator),wordPosition:this.wordPosition,rankPosition:this.rankPosition,addToDictionary:this.dictData.dictionaryKey})}catch(e){log.warn("error parsing words: "+e)}},openHelp(){ft.openHelp()}},mounted(){C.initDomI18n(),this.originalPredictionary=Be.instance(),this.originalPredictionary.loadDictionary(this.dictData.data,this.dictData.dictionaryKey),ft.setHelpLocation("07_dictionaries","#add-words")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation()}},zr=(n(135),Pt(Wr,Yr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Import words to dictionary // Wörter zu Wörterbuch hinzufügen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("label",{staticClass:"three columns",attrs:{for:"inputText","data-i18n":""}},[this._v("Input // Eingabe")]),this._v(" "),t("span",{staticClass:"nine columns",attrs:{"data-i18n":""}},[this._v('Insert Words, separated by space. ";" or [Enter] // Geben Sie Wörter ein, getrennt durch Leertaste, ";" oder [Enter]')])])}],!1,null,"ebf1d49c",null));zr.options.__file="src/vue-components/modals/importDictionaryModal.vue";var Kr=zr.exports;let Jr=null;var Xr={data:()=>({dicts:null,editModeId:"",editId:null,originalLabel:"",showLoading:!0,predictionary:null,wordlist:[],searchWord:"",showImportModal:!1,totalWords:0,filterWords:0}),components:{ImportDictionaryModal:Kr,HeaderIcon:zt},methods:{deleteDict:function(e,t){let n=this;confirm(C.translate("CONFIRM_DELETE_DICT",t))&&dt.deleteObject(e).then(()=>{n.reload()})},addDictionary:function(){log.debug("add dictionary!");let e=this.dicts.map(e=>e.dictionaryKey),t=new Re({dictionaryKey:s.getNewName("newDictionary",e)});dt.saveDictionary(t).then(()=>{this.editModeId=t.id,this.reload()})},finishEditName:function(e){dt.saveDictionary(e),this.editModeId="",this.originalLabel=""},enableEditName:function(e){this.cancelEditName(),this.editModeId=e.id,this.originalLabel=e.dictionaryKey},cancelEditName:function(){if(this.editModeId){let e=this.dicts.filter(e=>e.id===this.editModeId)[0];e.dictionaryKey=this.originalLabel||e.dictionaryKey}this.editModeId="",this.originalLabel=""},isLabelDuplicate:function(e){return this.dicts.map(e=>e.dictionaryKey).filter(t=>t===e).length>1},show(e){},edit(e){this.cancelEditName(),this.editId!==e.id?(this.editId=e.id,this.predictionary=Be.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),ft.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished(){this.editId=null,this.searchWord="",ft.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord(e){let t=this,n=void 0===e?200:0;qe.debounce((function(){t.searchWord=void 0===e?t.searchWord:e;let n=t.predictionary.predict(t.searchWord,{maxPredicitons:1e4});t.filterWords=n.length,t.wordlist=n.slice(0,9)}),n,qe.DEFAULT_KEY2)},clone(e){let t=this;dt.getDictionary(e).then(e=>{dt.saveDictionary(e.clone()).then(()=>{t.reload()})})},deleteWord(e,t){let n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,qe.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),dt.saveDictionary(t)}),2e3,qe.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){let t=this;dt.getDictionaries().then(n=>{this.dicts=JSON.parse(JSON.stringify(n)),t.editId&&e&&e.data&&(t.editFinished(),t.edit(e))})},updatedHandler(e,t,n){n[0].modelName===Re.getModelName()&&this.reload(n[0])}},created(){let e=this;a()(document).on(r.EVENT_DB_PULL_UPDATED,e.updatedHandler),dt.getDictionaries().then(t=>{log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1})},mounted:function(){Jr=this,C.initDomI18n()},updated(){C.initDomI18n()},beforeDestroy(){je.init(),a()(document).off(r.EVENT_DB_PULL_UPDATED,this.updatedHandler),a.a.contextMenu("destroy")}},qr=(n(137),Pt(Xr,jr,[function(){var e=this.$createElement,t=this._self._c||e;return t("li",{staticClass:"hide-mobile table-headers"},[t("span",{staticClass:"four columns"},[this._v("Dictionary Name")]),this._v(" "),t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Actions // Aktionen")]),t("br")])}],!1,null,"594606fa",null));qr.options.__file="src/vue-components/views/dictionariesView.vue";var Zr=qr.exports,Qr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),e.show?n("div",{staticClass:"row content spaced"},[n("div",{staticClass:"row"},[n("h2",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("General settings // Allgemeine Einstellungen")]),e._v(" "),e.saveSuccess?n("div",{staticStyle:{"padding-top":"1.7em"}},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("All changes saved! // Alle Änderungen gespeichert!")])]):e._e()]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Application Language // Anwendungs-Sprache")]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"inLanguage","data-i18n":""}},[e._v("Select language // Sprache wählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.langCode,expression:"langCode"}],staticClass:"five columns",attrs:{id:"inLanguage"},on:{input:function(t){return e.saveLangCode()},change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.langCode=t.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.allLanguages.filter((function(t){return-1!==["de","en"].indexOf(t.code)||-1!==e.gridLanguages.indexOf(t.code)})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])}))],2)]),e._v(" "),e._m(0),e._v(" "),e._m(1)]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Voice // Stimme")]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedVoiceName,expression:"selectedVoiceName"}],staticClass:"five columns",attrs:{id:"inVoice"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedVoiceName=t.target.multiple?n:n[0]},function(t){return e.saveVoice()}]}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.voices,(function(t){return n("option",{domProps:{value:t.name}},[e._v(e._s(t.name))])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.testText,expression:"testText"}],staticClass:"five columns",attrs:{type:"text"},domProps:{value:e.testText},on:{input:function(t){t.target.composing||(e.testText=t.target.value)}}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{id:"testVoice","data-i18n":""},on:{click:e.testSpeak}},[e._v("Test // Testen")])])]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Miscellaneous // Diverses")]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.syncNavigation,expression:"syncNavigation"}],attrs:{id:"chkSyncNavigation",type:"checkbox"},domProps:{checked:Array.isArray(e.syncNavigation)?e._i(e.syncNavigation,null)>-1:e.syncNavigation},on:{change:[function(t){var n=e.syncNavigation,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.syncNavigation=n.concat([null])):r>-1&&(e.syncNavigation=n.slice(0,r).concat(n.slice(r+1)))}else e.syncNavigation=a},function(t){return e.saveSyncNavigation()}]}}),e._v(" "),n("label",{attrs:{for:"chkSyncNavigation","data-i18n":""}},[e._v("Synchronize navigation and locked/fullscreen state for online users // Navigation und Sperr- bzw. Vollbildstatus für online User synchronisieren")])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"unlockPass","data-i18n":""}},[e._v("Passcode for unlocking user interface (only numbers) // PIN um Oberfläche zu entsperren (nur Ziffern)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.unlockPasscode,expression:"unlockPasscode"}],staticClass:"five columns",attrs:{id:"unlockPass",type:"number",placeholder:e.i18nService.translate("(no passcode) // (kein PIN)")},domProps:{value:e.unlockPasscode},on:{input:[function(t){t.target.composing||(e.unlockPasscode=t.target.value)},function(t){e.unlockPasscode=e.unlockPasscode.substring(0,6),e.savePasscode()}]}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{"data-i18n":""},on:{click:function(t){e.unlockPasscode=null,e.savePasscode()}}},[e._v("Reset // Löschen")])])])]):e._e()],1)};Qr._withStripped=!0;var es={components:{HeaderIcon:zt},props:[],data:()=>({metadata:null,show:!1,langCode:"",gridLanguages:[],allLanguages:C.getAllLanguages(),currentLang:C.getBrowserLang(),saveSuccess:null,speechService:Tn,syncNavigation:g.shouldSyncNavigation(),unlockPasscode:g.getUnlockPasscode(),voices:Tn.getVoices(),selectedVoiceName:Tn.getPreferredVoiceName(),testText:C.translate("This is an english sentence. // Das ist ein deutscher Satz."),i18nService:C}),methods:{saveLangCode(){this.saveSuccess=void 0,qe.debounce(()=>{C.setLanguage(this.langCode),C.initDomI18n(),this.saveSuccess=!0},300,"SAVE_LANG")},saveVoice(){this.saveSuccess=void 0,qe.debounce(()=>{Tn.setPreferredVoiceName(this.selectedVoiceName),this.saveSuccess=!0},300,"SAVE_VOICE")},saveSyncNavigation(){this.saveSuccess=void 0,qe.debounce(()=>{g.setShouldSyncNavigation(this.syncNavigation),this.saveSuccess=!0},300,"SAVE_NAV")},savePasscode(){this.saveSuccess=void 0,qe.debounce(()=>{g.setUnlockPasscode(this.unlockPasscode),this.saveSuccess=!0},500,"SAVE_UNLOCK")},testSpeak(){Tn.speak(this.testText,null,this.selectedVoiceName)}},mounted(){let e=this;C.initDomI18n(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0}),dt.getGrids(!1,!0).then(t=>{e.gridLanguages=t[0]?Object.keys(t[0].label):[]}),e.langCode=C.getCustomLanguage()},updated(){C.initDomI18n()}},ts=(n(139),Pt(es,Qr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word"},[t("span",{attrs:{"data-i18n":""}},[t("span",[this._v('Grids can be translated to every language. To add or edit a translation use "Edit grid -> More -> Translate Grid".')]),this._v(" "),t("span",[this._v('Grids können in alle Sprachen übersetzt werden. Um eine Übersetzung zu bearbeiten oder hinzuzufügen, verwenden Sie "Grid bearbeiten -> Mehr -> Grid übersetzen".')])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word",attrs:{"data-i18n":""}},[t("span",[this._v("For user interface only English (en) and German (de) are available. For all other languages English will be used.")]),this._v(" "),t("span",[this._v("Das User-Interface ist nur in Englisch (en) and Deutsch (de) verfügbar. Für andere Sprachen wird Englisch verwendet.")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Preferred voice // Bevorzugte Stimme")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Test text // Test-Text")])])}],!1,null,"747d2ef2",null));ts.options.__file="src/vue-components/views/settingsView.vue";var ns=ts.exports;let is=["#login","#register","#welcome","#add","#about"],as={},rs=null,ss=null,os=null,ls=!1,cs=null,ds=[];function us(){let e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function fs(e,t){os=t?null:location.hash,location.hash=e}function ps(e,t,n){var i;cs=e,e!==nr&&a()("#touchElement").hide(),i=n||us(),a()("nav button").removeClass("selected"),a()(`nav a[href='${i}'] button`).addClass("selected"),log.debug("loading view: "+e.__file),Yt.setViewComponent(e,t)}function hs(){dt.getMetadata().then(e=>{let t=e?e.lastOpenedGridId:null;ps(nr,{gridId:t})})}as.init=function(e,t){ls=!0,ss=e,rs=new y.a(null,!0),rs.on({main:function(){ft.setHelpLocation("02_navigation","#main-view"),hs()},"grids/":function(){ft.setHelpLocation("02_navigation","#manage-grids-view"),ps(bn)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),ft.setHelpLocation("02_navigation","#main-view"),ps(nr,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),ft.setHelpLocation("02_navigation","#main-view"),dt.getGrids().then(t=>{let n=t.filter(t=>C.getTranslation(t.label)===e.gridName),i=n[0]?n[0].id:null;i?ps(nr,{gridId:i},"#main"):(log.warn(`no grid with name ${e.gridName} found!`),hs())})},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),ft.setHelpLocation("02_navigation","#edit-view"),ps(na,{gridId:e.gridId})},login:function(){ft.setHelpLocation("02_navigation","#change-user-view"),ps(Cr)},register:function(){ft.setHelpLocation("06_users","#online-users"),ps(Or)},add:function(){ft.setHelpLocation("06_users","#offline-users"),ps(Rr)},welcome:function(){ft.setHelpLocationIndex(),ps(Ur)},about:function(){ft.setHelpLocationIndex(),ps(Br)},dictionaries:function(){ft.setHelpLocation("02_navigation","#manage-dictionaries-view"),ps(Zr)},settings:function(){ps(ns)},"*":function(){ft.setHelpLocation("02_navigation","#main-view"),as.toMain()}}),rs.hooks({before:function(e,t){cs&&cs.destroy&&(cs.destroy(),cs=null);let n=function(){let e=location.hash;if(!tt.getCurrentUsedDatabase()){let t=g.getLastActiveUser()||g.getSavedUsers().length>0;e=is.includes(e)?e:null,e=e||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),fs(n)):e(),Ln.destroy()},after:function(e){},leave:function(e){}}),t&&fs(t),rs.resolve()},as.isInitialized=function(){return ls},as.toMain=function(){0===us().indexOf("#main")?fs("#main?date="+(new Date).getTime()):fs("#main")},as.toRegister=function(){fs("#register")},as.toAddOffline=function(){fs("#add")},as.toAbout=function(){fs("#about")},as.toLogin=function(){fs("#login")},as.toLastOpenedGrid=function(){dt.getMetadata().then(e=>{as.toGrid(e.lastOpenedGridId)})},as.toGrid=function(e){e&&fs("#grid/"+e+"?date="+(new Date).getTime())},as.toEditGrid=function(e){e&&fs("#grid/edit/"+e)},as.toManageGrids=function(){fs("#grids")},as.back=function(){os&&os!==location.hash?fs(os,!0):this.toMain()},as.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},as.getCurrentView=function(){return cs},as.addToGridHistory=function(e){ds.length>0&&ds[ds.length-1]===e||(-1===ds.indexOf(e)?ds.push(e):ds=[e])},as.toLastGrid=function(){if(1===ds.length)return;ds.pop();let e=ds.pop();as.toGrid(e)};let ms={},vs=null;ms.init=function(){Et.a.directive("focus",{inserted:function(e,t){(t.value||void 0===t.value)&&(e.focus&&e.focus(),e.select&&e.select())},updated:function(e,t){t.value&&(e.focus&&e.focus(),e.select&&e.select())}}),Et.a.directive("debounce",{inserted:function(e,t){e.oninput=function(n){clearTimeout(vs),vs=setTimeout((function(){e.dispatchEvent(new Event("change"))}),parseInt(t.value)||500)}}}),Et.a.filter("translate",(function(e){return C.translate(e)})),Et.a.filter("extractTranslation",(function(e){return C.getTranslation(e)}))};n(141),n(143),n(145);let gs={init:function(){St.global.onAnyKey((e,t,n)=>{if(n.ctrlKey&&n.shiftKey&&39===e){let e=g.getSavedUsers(),t=dt.getCurrentUser(),n=e.indexOf(t);n=n+1{let t=C.translate("You're now using new Version '{?}'. // Sie verwenden nun die neue Version '{?}'.",r.CURRENT_VERSION);Yt.setTooltip(t,{closeOnNavigate:!0,timeout:3e4,actionLink:"More information // Mehr Informationen",actionLinkUrl:"https://github.com/asterics/AsTeRICS-Grid/releases/tag/"+r.CURRENT_VERSION,msgType:"info"}),a()(document).off(r.EVENT_GRID_LOADED,e)};a()(document).on(r.EVENT_GRID_LOADED,e)}g.setCurrentAppVersion(r.CURRENT_VERSION)}(),function(){if(!r.IS_ENVIRONMENT_PROD)return void log.warn("Not installing Service Worker because on development environment.");"serviceWorker"in navigator&&(window.loaded?e():window.addEventListener("load",()=>{e()}));function e(){navigator.serviceWorker.register("./serviceWorker.js").then(e=>{let t=!1;setInterval(()=>{log.debug("Check for serviceworker update..."),e.update()},9e5),e.addEventListener("updatefound",(function(){navigator.serviceWorker.controller&&(t=!0)})),navigator.serviceWorker.addEventListener("message",e=>{t&&e.data&&e.data.activated&&Yt.setTooltipI18n("New version available! The next time you re-open AsTeRICS Grid you'll automatically use the updated version. // Neue Version verfügbar! Beim nächsten Start von AsTeRICS Grid verwenden Sie automatisch die neue Version.",{closeOnNavigate:!1,actionLink:"Update now // Jetzt aktualisieren",actionLinkFn:()=>{window.location.reload()},msgType:"info"})})})}}(),an.initPrintHandlers(),or.ping(),ms.init(),gs.init();let t=g.getLastActiveUser(),n=g.getAutologinUser();g.getUserMajorModelVersion(n)>s.getLatestModelVersion().major&&(log.info(`data model version of user "${n}" is newer than version of running AsTeRICS Grid -> prevent autologin.`),n=null,g.setAutologinUser("")),log.info("autologin user: "+n),ue.isDemoMode()?(e.push(or.registerOffline(r.LOCAL_DEMO_USERNAME,r.LOCAL_DEMO_USERNAME)),g.setAutologinUser("")):e.push(or.loginStoredUser(n,!0)),Promise.all(e).finally(()=>{Yt.init();let e=n||ue.isDemoMode(),i=t||g.getSavedUsers().length>0;g.setLastActiveUser(n||t||"");let a=location.hash||(e?"#main":i?"#login":"#welcome");as.isInitialized()||as.init("#injectView",a)})}()}]); \ No newline at end of file + */!function(r){var s=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(){this._events={},this._conf&&l.call(this,this._conf)}function l(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=void 0!==e.maxListeners?e.maxListeners:10,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=10}function c(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==i&&i.emitWarning){var a=new Error(n);a.name="MaxListenersExceededWarning",a.emitter=this,a.count=e,i.emitWarning(a)}else console.error(n),console.trace&&console.trace()}function d(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,l.call(this,e)}function u(e,t,n,i){if(!n)return[];var a,r,s,o,l,c,d,f=[],p=t.length,h=t[i],m=t[i+1];if(i===p&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(a=0,r=n._listeners.length;a0&&a._listeners.length>this._maxListeners&&(a._listeners.warned=!0,c.call(this,a._listeners.length,r))):a._listeners=t,!0;r=e.shift()}return!0}d.EventEmitter2=d,d.prototype.delimiter=".",d.prototype.setMaxListeners=function(e){void 0!==e&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},d.prototype.event="",d.prototype.once=function(e,t){return this._once(e,t,!1)},d.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},d.prototype._once=function(e,t,n){return this._many(e,1,t,n),this},d.prototype.many=function(e,t,n){return this._many(e,t,n,!1)},d.prototype.prependMany=function(e,t,n){return this._many(e,t,n,!0)},d.prototype._many=function(e,t,n,i){var a=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function r(){return 0==--t&&a.off(e,r),n.apply(this,arguments)}return r._origin=n,this._on(e,r,i),a},d.prototype.emit=function(){this._events||o.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,n,i,a,r,s=arguments.length;if(this._all&&this._all.length){if(r=this._all.slice(),s>3)for(t=new Array(s),a=0;a3)for(t=new Array(s-1),a=1;a3)for(t=new Array(l),a=1;a3)for(t=new Array(l-1),a=1;a0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,c.call(this,this._events[e].length,e))):this._events[e]=t,this)},d.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var a="string"==typeof e?e.split(this.delimiter):e.slice();i=u.call(this,null,a,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var r=0;r0&&e(t[a]),0===Object.keys(r).length&&delete t[a])}}}(this.listenerTree),this},d.prototype.offAny=function(e){var t,n=0,i=0;if(e&&this._all&&this._all.length>0){for(n=0,i=(t=this._all).length;ni,.context-menu-icon.context-menu-icon--fa5.context-menu-hover svg{color:#fff}.context-menu-icon.context-menu-icon--fa5.context-menu-disabled i,.context-menu-icon.context-menu-icon--fa5.context-menu-disabled svg{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.5);box-shadow:0 2px 5px rgba(0,0,0,0.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:\'\';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type="checkbox"],.context-menu-input>label>input[type="radio"]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type="text"],.context-menu-input>label>textarea,.context-menu-input>label>select{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}\n',""])},function(e,t,n){var i=n(146);"string"==typeof i&&(i=[[e.i,i,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,a);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".holy-grail{min-height:100vh}.holy-grail,.holy-grail-body{display:flex;flex:1 1 auto;flex-direction:row}.holy-grail-content{flex:1 1 auto}.holy-grail-sidebar-1{order:-1;border-right:2px solid lightgray;max-height:98vh;overflow-x:hidden;padding-top:2vh;display:flex;flex-flow:column}.hg-sidebar{flex:0 0 250px;z-index:3}nav li:focus{outline:none}@media (max-width: 850px){.hg-sidebar{flex:0 0 50px}#astericsIcon{margin-bottom:1em}nav li button{padding-left:0.5em}.hg-sidebar button{padding-left:0;padding-right:0;text-align:center}}@media (max-width: 850px) and (max-height: 500px){.hg-sidebar{flex:0 0 12vh}.hg-sidebar button,#syncVisualization{font-size:3vh;line-height:0}#astericsIcon{height:10vh}header button,header a,header input{height:10vh !important;max-height:40px;font-size:4vh;line-height:0}}\n",""])},function(e,t,n){"use strict";n.r(t);var i=n(0),a=n.n(i),r={ELEMENT_EVENT_ID:"ELEMENT_EVENT_ID",MODEL_VERSION:'{"major": 3, "minor": 0, "patch": 0}',LOCAL_NOLOGIN_USERNAME:"default-user",LOCAL_DEMO_USERNAME:"local-demo-user",USERNAME_REGEX:/^[a-z][a-z0-9_-]{2,50}$/,VALIDATION_ERROR_REGEX:"VALIDATION_ERROR_REGEX",VALIDATION_ERROR_EXISTING:"VALIDATION_ERROR_EXISTING",VALIDATION_VALID:"VALIDATION_VALID",EVENT_DB_CONNECTION_LOST:"EVENT_DB_CONNECTION_LOST",EVENT_DB_PULL_UPDATED:"EVENT_DB_PULL_UPDATED",EVENT_DB_SYNC_STATE_CHANGE:"EVENT_DB_SYNC_STATE_CHANGE",EVENT_DB_INITIALIZED:"EVENT_DB_INITIALIZED",EVENT_DB_CLOSED:"EVENT_DB_CLOSED",EVENT_DB_DATAMODEL_UPDATE:"EVENT_DB_DATAMODEL_UPDATE",EVENT_SIDEBAR_OPEN:"event-sidebar-open",EVENT_SIDEBAR_OPENED:"event-sidebar-opened",EVENT_SIDEBAR_CLOSE:"event-sidebar-close",EVENT_GRID_RESIZE:"EVENT_GRID_RESIZE",EVENT_GRID_LOADED:"EVENT_GRID_LOADED",EVENT_USER_CHANGED:"EVENT_USER_CHANGED",EVENT_LANGUAGE_CHANGE:"EVENT_LANGUAGE_CHANGE",DB_SYNC_STATE_SYNCINC:"DB_SYNC_STATE_SYNCINC",DB_SYNC_STATE_SYNCED:"DB_SYNC_STATE_SYNCED",DB_SYNC_STATE_STOPPED:"DB_SYNC_STATE_STOPPED",DB_SYNC_STATE_FAIL:"DB_SYNC_STATE_FAIL",DB_SYNC_STATE_ONLINEONLY:"DB_SYNC_STATE_ONLINEONLY",ENVIRONMENT:"PROD"};r.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===r.ENVIRONMENT,r.IS_ENVIRONMENT_PROD=!r.IS_ENVIRONMENT_DEV,r.CURRENT_VERSION="release-2021-02-05-14.44/+0100",r.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),r.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var s={},o=100;let l=JSON.parse(r.MODEL_VERSION),c={major:null,minor:null,patch:null};s.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+o++},s.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},s.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},s.setDefaults=function(e,t,n){if(t&&e&&n&&n.definition){var i=Object.keys(n.definition);Object.keys(t).forEach((function(n){i.includes(n)&&null==e[n]&&(e[n]=t[n])}))}return e},s.hashCode=function(e){e=e||{};var t=JSON.parse(JSON.stringify(e));return delete t._rev,delete t._id,delete t.id,JSON.stringify(t).split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0)},s.getModelVersionString=function(){return r.MODEL_VERSION},s.getModelVersionObject=function(e){if(!e)return c;let t=JSON.parse(e);return t.major&&(t.major=parseInt(t.major),t.minor=parseInt(t.minor),t.patch=parseInt(t.patch)),t.major?t:c},s.getLatestModelVersion=function(){return l};let d=window.Model;class u extends(d({id:String,modelName:String,modelVersion:String,label:[String],keyCode:[Number],keyName:[String],repeat:[Number],timeout:[Number],holdDuration:[Number]})){constructor(e,t){super(e=s.setDefaults(e,t,u)),this.id=this.id||s.generateId("input-event-key")}isValid(){return this.modelName&&this.label&&this.keyCode}static getModelName(){return"InputEventKey"}}u.defaults({id:"",modelName:u.getModelName(),modelVersion:r.MODEL_VERSION,repeat:1,timeout:0,holdDuration:0});class f extends(d({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[d.Array(String)],areURL:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,f)),this.id=this.id||s.generateId("input-event-are")}isValid(){return this.modelName&&this.label&&this.eventNames.length>0}static getModelName(){return"InputEventARE"}}f.defaults({id:"",modelName:f.getModelName(),modelVersion:r.MODEL_VERSION,eventNames:[]});class p extends(d({id:String,modelName:String,modelVersion:String,globalReadActive:[Boolean],scanEnabled:[Boolean],scanAuto:[Boolean],scanTimeoutMs:[Number],scanTimeoutFirstElementFactor:[Number],scanVertical:[Boolean],scanBinary:[Boolean],scanInputs:[d.Array(Object)],hoverEnabled:[Boolean],hoverTimeoutMs:Number,hoverHideCursor:[Boolean],hoverDisableHoverpane:[Boolean],mouseclickEnabled:[Boolean],dirEnabled:[Boolean],dirInputs:[d.Array(Object)],dirWrapAround:[Boolean],dirResetToStart:[Boolean],seqEnabled:[Boolean],seqInputs:[d.Array(Object)],huffEnabled:[Boolean],huffElementCount:[Number],huffInputs:[d.Array(Object)],huffColors:[d.Array(String)],huffShowColors:[Boolean],huffShowNumbers:[Boolean],huffColorWholeElement:[Boolean],huffTimeout:[Number],huffMarkInactive:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,p)),this.id=this.id||s.generateId("input-config")}static getModelName(){return"InputConfig"}static getInputEventTypes(){return[u,f]}static getInputEventInstance(e,t){let n=this.getInputEventTypes().filter(t=>t.getModelName()===e)[0];if(n)return new n(t);log.warn("input event type not found: "+e)}}p.UP="UP",p.DOWN="DOWN",p.LEFT="LEFT",p.RIGHT="RIGHT",p.SELECT="SELECT",p.NEXT="NEXT",p.NEXT_ELEMENT="NEXT_ELEMENT",p.PREVIOUS_ELEMENT="PREVIOUS_ELEMENT",p.GENERAL_INPUT="GENERAL_INPUT",p.getNumConst=e=>"NUM"+e,p.DEFAULT_SCAN_INPUTS=[new u({label:p.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new u({label:p.NEXT,keyCode:32,keyName:"Space"})],p.DEFAULT_SEQ_INPUTS=[new u({label:p.SELECT,keyCode:32,keyName:"Space"}),new u({label:p.NEXT_ELEMENT,keyCode:39,keyName:"ArrowRight"}),new u({label:p.PREVIOUS_ELEMENT,keyCode:37,keyName:"ArrowLeft"})],p.DEFAULT_DIR_INPUTS=[new u({label:p.SELECT,keyCode:32,keyName:"Space"}),new u({label:p.LEFT,keyCode:37,keyName:"ArrowLeft"}),new u({label:p.RIGHT,keyCode:39,keyName:"ArrowRight"}),new u({label:p.UP,keyCode:38,keyName:"ArrowUp"}),new u({label:p.DOWN,keyCode:40,keyName:"ArrowDown"})],p.DEFAULT_HUFF_INPUTS=[new u({label:p.GENERAL_INPUT,keyCode:49,keyName:"Digit1"}),new u({label:p.GENERAL_INPUT,keyCode:50,keyName:"Digit2"}),new u({label:p.GENERAL_INPUT,keyCode:51,keyName:"Digit3"}),new u({label:p.GENERAL_INPUT,keyCode:52,keyName:"Digit4"})],p.DEFAULT_HUFF_COLORS=["#D55E00","#F0E442","#009E73","#0072B2","#CC79A7","#E69F00","#56B4E9","#000000","#016619"],p.defaults({id:"",modelName:p.getModelName(),modelVersion:r.MODEL_VERSION,scanAuto:!1,scanTimeoutMs:1e3,scanTimeoutFirstElementFactor:1,scanBinary:!0,hoverTimeoutMs:1e3,mouseclickEnabled:!0,scanInputs:p.DEFAULT_SCAN_INPUTS,dirInputs:p.DEFAULT_DIR_INPUTS,seqInputs:p.DEFAULT_SEQ_INPUTS,dirWrapAround:!0,huffInputs:p.DEFAULT_HUFF_INPUTS,huffColors:p.DEFAULT_HUFF_COLORS,huffShowColors:!0,huffShowNumbers:!0,huffElementCount:0,huffTimeout:4e3,huffMarkInactive:!0});class h extends(d({id:String,modelName:String,modelVersion:String,lastOpenedGridId:[String],globalGridId:[String],globalGridActive:[Boolean],globalGridHeightPercentage:[Number],locked:[Boolean],fullscreen:[Boolean],hashCodes:[Object],inputConfig:p})){constructor(e,t){super(e=s.setDefaults(e,t,h)||{}),this.id=this.id||s.generateId(h.getIdPrefix())}isEqual(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}static getModelName(){return"MetaData"}static getIdPrefix(){return"meta-data"}}h.defaults({id:"",modelName:h.getModelName(),modelVersion:r.MODEL_VERSION,locked:void 0,fullscreen:void 0,hashCodes:{},inputConfig:new p,globalGridActive:!1,globalGridHeightPercentage:15});var m="could not access local storage, maybe disabled by user? Error: ",v=null;if("undefined"!=typeof Storage)try{v=window.localStorage}catch(e){log.error(m+e)}var g={save:function(e,t){if(v)try{return v.setItem(e,t)}catch(e){log.error(m+e)}},get:function(e){if(v)try{return v.getItem(e)}catch(e){log.error(m+e)}},remove:function(e){if(v)try{return v.removeItem(e)}catch(e){log.error(m+e)}},getUserPassword:e=>e?_("USER_PASSWORDS_KEY")[e]:null,saveLocalUser(e){let t=_("USER_PASSWORDS_KEY");t[e]="",g.save("USER_PASSWORDS_KEY",JSON.stringify(t))},isSavedLocalUser:e=>""===_("USER_PASSWORDS_KEY")[e],isLastActiveUserLocal:()=>""===_("USER_PASSWORDS_KEY")[g.getLastActiveUser()],saveUserPassword(e,t){let n=_("USER_PASSWORDS_KEY");n[e]=t,g.save("USER_PASSWORDS_KEY",JSON.stringify(n))},removeUserPassword(e){let t=_("USER_PASSWORDS_KEY");delete t[e],g.save("USER_PASSWORDS_KEY",JSON.stringify(t)),g.getAutologinUser()===e&&g.setAutologinUser("")},getSavedUsers(e){let t=g.getSavedLocalUsers(),n=g.getSavedOnlineUsers().concat(t);return e&&n.includes(e)&&(n=n.filter(t=>t!==e),n.unshift(e)),n},getSavedLocalUsers(){let e=_("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""===e[t]).sort((e,t)=>e===r.LOCAL_DEMO_USERNAME?1:t===r.LOCAL_DEMO_USERNAME?-1:e.localeCompare(t))},getSavedOnlineUsers(){let e=_("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""!==e[t]).sort()},setLastActiveUser(e){g.save("LAST_ACTIVEUSER_KEY",e)},getLastActiveUser:()=>g.get("LAST_ACTIVEUSER_KEY"),setAutologinUser(e){e!==r.LOCAL_DEMO_USERNAME&&g.save("AUTOLOGIN_USER_KEY",e)},getAutologinUser:()=>g.get("AUTOLOGIN_USER_KEY"),markSyncedDatabase(e){let t=b();t.includes(e)||t.push(e),g.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},isDatabaseSynced:e=>b().includes(e),unmarkSyncedDatabase(e){let t=b();t=t.filter(t=>t!==e),g.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},getUserMajorModelVersion(e){let t=_("USER_MODELVERSION_KEY");return t[e]?parseInt(JSON.parse(t[e]).major):1},setUserModelVersion(e,t){if(g.getUserMajorModelVersion(e)g.save("AG_GRID_DIMENSIONS_KEY",JSON.stringify(e)),getLastGridDimensions(){let e=g.get("AG_GRID_DIMENSIONS_KEY");return e?JSON.parse(e):{}},addUsedLocales(e){let t=g.get("AG_USED_LOCALES_KEY"),n=t?JSON.parse(t):[];n=[...new Set(n.concat(e))],g.save("AG_USED_LOCALES_KEY",JSON.stringify(n))},getUsedLocales(){let e=g.get("AG_USED_LOCALES_KEY");return e?JSON.parse(e):[]},getYTState(e){let t=g.get("AG_YT_STATE_KEY");return e?t?JSON.parse(t):null:t?JSON.parse(t)[g.getAutologinUser()]:null},saveYTState(e){let t=g.getYTState(!0)||{};return t[g.getAutologinUser()]=e,g.save("AG_YT_STATE_KEY",JSON.stringify(t))},getCurrentAppVersion:()=>g.get("AG_CURRENT_VERSION_KEY"),setCurrentAppVersion(e){g.save("AG_CURRENT_VERSION_KEY",e)}};function _(e){let t=g.get(e),n=JSON.parse(t),i=n instanceof Object;if("AG_LOCAL_METADATA_KEY"===e&&n&&n.modelName===h.getModelName()){let t={};return t[g.getAutologinUser()||g.getLastActiveUser()]=n,g.save(e,JSON.stringify(t)),t}return t&&i?n:(g.save(e,JSON.stringify({})),{})}function b(){let e=g.get("SYNCED_DBS_LIST_KEY");return e?JSON.parse(e):(g.save("SYNCED_DBS_LIST_KEY",JSON.stringify([])),[])}var E=n(47),y=n.n(E);let C={},w=g.get("CUSTOM_LANGUAGE_KEY")||"",T=null,A=["en","de"],N=JSON.parse('[{"de":"Abchasisch","en":"Abkhazian","code":"ab"},{"de":"Afar","en":"Afar","code":"aa"},{"de":"Afrikaans","en":"Afrikaans","code":"af"},{"de":"Akan","en":"Akan","code":"ak"},{"de":"Albanisch","en":"Albanian","code":"sq"},{"de":"Amharisch","en":"Amharic","code":"am"},{"de":"Arabisch","en":"Arabic","code":"ar"},{"de":"Aragonesisch","en":"Aragonese","code":"an"},{"de":"Armenisch","en":"Armenian","code":"hy"},{"de":"Aserbaidschanisch","en":"Azerbaijani","code":"az"},{"de":"Assamesisch","en":"Assamese","code":"as"},{"de":"Avarisch","en":"Avaric","code":"av"},{"de":"Avestisch","en":"Avestan","code":"ae"},{"de":"Aymara","en":"Aymara","code":"ay"},{"de":"Bambara","en":"Bambara","code":"bm"},{"de":"Baschkirisch","en":"Bashkir","code":"ba"},{"de":"Baskisch","en":"Basque","code":"eu"},{"de":"Bengalisch","en":"Bengali","code":"bn"},{"de":"Bihari","en":"Bihari languages","code":"bh"},{"de":"Birmanisch","en":"Burmese","code":"my"},{"de":"Bislama","en":"Bislama","code":"bi"},{"de":"Bokmål","en":"Norwegian Bokmål","code":"nb"},{"de":"Bosnisch","en":"Bosnian","code":"bs"},{"de":"Bretonisch","en":"Breton","code":"br"},{"de":"Bulgarisch","en":"Bulgarian","code":"bg"},{"de":"Chamorro","en":"Chamorro","code":"ch"},{"de":"Chichewa","en":"Chichewa","code":"ny"},{"de":"Chinesisch","en":"Chinese","code":"zh"},{"de":"Cree","en":"Cree","code":"cr"},{"de":"Dänisch","en":"Danish","code":"da"},{"de":"Deutsch","en":"German","code":"de"},{"de":"Dhivehi","en":"Divehi","code":"dv"},{"de":"Dzongkha","en":"Dzongkha","code":"dz"},{"de":"Englisch","en":"English","code":"en"},{"de":"Esperanto","en":"Esperanto","code":"eo"},{"de":"Estnisch","en":"Estonian","code":"et"},{"de":"Ewe","en":"Ewe","code":"ee"},{"de":"Färöisch","en":"Faroese","code":"fo"},{"de":"Fidschi","en":"Fijian","code":"fj"},{"de":"Finnisch","en":"Finnish","code":"fi"},{"de":"Französisch","en":"French","code":"fr"},{"de":"Fulfulde","en":"Fulah","code":"ff"},{"de":"Galicisch","en":"Galician","code":"gl"},{"de":"Georgisch","en":"Georgian","code":"ka"},{"de":"Griechisch","en":"Greek","code":"el"},{"de":"Grönländisch","en":"Kalaallisut","code":"kl"},{"de":"Guaraní","en":"Guarani","code":"gn"},{"de":"Gujarati","en":"Gujarati","code":"gu"},{"de":"Haitianisch","en":"Haitian","code":"ht"},{"de":"Hausa","en":"Hausa","code":"ha"},{"de":"Hebräisch","en":"Hebrew","code":"he"},{"de":"Hindi","en":"Hindi","code":"hi"},{"de":"Hiri Motu","en":"Hiri Motu","code":"ho"},{"de":"Ido","en":"Ido","code":"io"},{"de":"Igbo","en":"Igbo","code":"ig"},{"de":"Indonesisch","en":"Indonesian","code":"id"},{"de":"Interlingua","en":"Interlingua","code":"ia"},{"de":"Interlingue","en":"Interlingue","code":"ie"},{"de":"Inuktitut","en":"Inuktitut","code":"iu"},{"de":"Inupiaq","en":"Inupiaq","code":"ik"},{"de":"Irisch","en":"Irish","code":"ga"},{"de":"isiXhosa","en":"Xhosa","code":"xh"},{"de":"isiZulu","en":"Zulu","code":"zu"},{"de":"Isländisch","en":"Icelandic","code":"is"},{"de":"Italienisch","en":"Italian","code":"it"},{"de":"Japanisch","en":"Japanese","code":"ja"},{"de":"Javanisch","en":"Javanese","code":"jv"},{"de":"Jiddisch","en":"Yiddish","code":"yi"},{"de":"Kannada","en":"Kannada","code":"kn"},{"de":"Kanuri","en":"Kanuri","code":"kr"},{"de":"Kasachisch","en":"Kazakh","code":"kk"},{"de":"Kashmiri","en":"Kashmiri","code":"ks"},{"de":"Katalanisch","en":"Catalan","code":"ca"},{"de":"Khmer","en":"Central Khmer","code":"km"},{"de":"Kikongo","en":"Kongo","code":"kg"},{"de":"Kikuyu","en":"Kikuyu","code":"ki"},{"de":"Kiluba","en":"Luba-Katanga","code":"lu"},{"de":"Kinyarwanda","en":"Kinyarwanda","code":"rw"},{"de":"Kirchenslawisch","en":"Church Slavic","code":"cu"},{"de":"Kirgisisch","en":"Kirghiz","code":"ky"},{"de":"Kirundi","en":"Rundi","code":"rn"},{"de":"Komi","en":"Komi","code":"kv"},{"de":"Koreanisch","en":"Korean","code":"ko"},{"de":"Kornisch","en":"Cornish","code":"kw"},{"de":"Korsisch","en":"Corsican","code":"co"},{"de":"Kroatisch","en":"Croatian","code":"hr"},{"de":"Kurdisch","en":"Kurdish","code":"ku"},{"de":"Laotisch","en":"Lao","code":"lo"},{"de":"Latein","en":"Latin","code":"la"},{"de":"Lettisch","en":"Latvian","code":"lv"},{"de":"Limburgisch","en":"Limburgan","code":"li"},{"de":"Lingála","en":"Lingala","code":"ln"},{"de":"Litauisch","en":"Lithuanian","code":"lt"},{"de":"Luganda","en":"Ganda","code":"lg"},{"de":"Luxemburgisch","en":"Luxembourgish","code":"lb"},{"de":"Malagasy, Malagassi","en":"Malagasy","code":"mg"},{"de":"Malaiisch","en":"Malay","code":"ms"},{"de":"Malayalam","en":"Malayalam","code":"ml"},{"de":"Maltesisch","en":"Maltese","code":"mt"},{"de":"Manx","en":"Manx","code":"gv"},{"de":"Maori","en":"Maori","code":"mi"},{"de":"Marathi","en":"Marathi","code":"mr"},{"de":"Marshallesisch","en":"Marshallese","code":"mh"},{"de":"Mazedonisch","en":"Macedonian","code":"mk"},{"de":"Mongolisch","en":"Mongolian","code":"mn"},{"de":"Nauruisch","en":"Nauru","code":"na"},{"de":"Navajo","en":"Navajo","code":"nv"},{"de":"Ndonga","en":"Ndonga","code":"ng"},{"de":"Nepali","en":"Nepali","code":"ne"},{"de":"Niederländisch","en":"Dutch","code":"nl"},{"de":"Nord-Ndebele","en":"North Ndebele","code":"nd"},{"de":"Nordsamisch","en":"Northern Sami","code":"se"},{"de":"Norwegisch","en":"Norwegian","code":"no"},{"de":"Nynorsk","en":"Norwegian Nynorsk","code":"nn"},{"de":"Ojibwe","en":"Ojibwa","code":"oj"},{"de":"Okzitanisch","en":"Occitan","code":"oc"},{"de":"Oriya","en":"Oriya","code":"or"},{"de":"Oromo","en":"Oromo","code":"om"},{"de":"oshiKwanyama","en":"Kuanyama","code":"kj"},{"de":"Ossetisch","en":"Ossetian","code":"os"},{"de":"Otjiherero","en":"Herero","code":"hz"},{"de":"Pali","en":"Pali","code":"pi"},{"de":"Panjabi","en":"Panjabi","code":"pa"},{"de":"Paschtunisch","en":"Pashto","code":"ps"},{"de":"Persisch","en":"Persian","code":"fa"},{"de":"Polnisch","en":"Polish","code":"pl"},{"de":"Portugiesisch","en":"Portuguese","code":"pt"},{"de":"Quechua","en":"Quechua","code":"qu"},{"de":"Romanisch","en":"Romansh","code":"rm"},{"de":"Rumänisch","en":"Romanian","code":"ro"},{"de":"Russisch","en":"Russian","code":"ru"},{"de":"Samoanisch","en":"Samoan","code":"sm"},{"de":"Sango","en":"Sango","code":"sg"},{"de":"Sanskrit","en":"Sanskrit","code":"sa"},{"de":"Sardisch","en":"Sardinian","code":"sc"},{"de":"Schottisch-gälisch","en":"Scottish Gaelic","code":"gd"},{"de":"Schwedisch","en":"Swedish","code":"sv"},{"de":"Serbisch","en":"Serbian","code":"sr"},{"de":"Sesotho","en":"Southern Sotho","code":"st"},{"de":"Setswana","en":"Tswana","code":"tn"},{"de":"Shona","en":"Shona","code":"sn"},{"de":"Sindhi","en":"Sindhi","code":"sd"},{"de":"Singhalesisch","en":"Sinhala, Sinhalese","code":"si"},{"de":"Siswati","en":"Swati","code":"ss"},{"de":"Slowakisch","en":"Slovak","code":"sk"},{"de":"Slowenisch","en":"Slovenian","code":"sl"},{"de":"Somali","en":"Somali","code":"so"},{"de":"Spanisch","en":"Spanish","code":"es"},{"de":"Süd-Ndebele","en":"South Ndebele","code":"nr"},{"de":"Sundanesisch","en":"Sundanese","code":"su"},{"de":"Swahili","en":"Swahili","code":"sw"},{"de":"Tadschikisch","en":"Tajik","code":"tg"},{"de":"Tagalog","en":"Tagalog","code":"tl"},{"de":"Tahitianisch","en":"Tahitian","code":"ty"},{"de":"Tamil","en":"Tamil","code":"ta"},{"de":"Tatarisch","en":"Tatar","code":"tt"},{"de":"Telugu","en":"Telugu","code":"te"},{"de":"Thai","en":"Thai","code":"th"},{"de":"Tibetisch","en":"Tibetan","code":"bo"},{"de":"Tigrinya","en":"Tigrinya","code":"ti"},{"de":"Tongaisch","en":"Tonga","code":"to"},{"de":"Tschechisch","en":"Czech","code":"cs"},{"de":"Tschetschenisch","en":"Chechen","code":"ce"},{"de":"Tschuwaschisch","en":"Chuvash","code":"cv"},{"de":"Tshivenda","en":"Venda","code":"ve"},{"de":"Türkisch","en":"Turkish","code":"tr"},{"de":"Turkmenisch","en":"Turkmen","code":"tk"},{"de":"Twi","en":"Twi","code":"tw"},{"de":"Uigurisch","en":"Uighur","code":"ug"},{"de":"Ukrainisch","en":"Ukrainian","code":"uk"},{"de":"Ungarisch","en":"Hungarian","code":"hu"},{"de":"Urdu","en":"Urdu","code":"ur"},{"de":"Usbekisch","en":"Uzbek","code":"uz"},{"de":"Vietnamesisch","en":"Vietnamese","code":"vi"},{"de":"Volapük","en":"Volapük","code":"vo"},{"de":"Walisisch","en":"Welsh","code":"cy"},{"de":"Wallonisch","en":"Walloon","code":"wa"},{"de":"Weißrussisch","en":"Belarusian","code":"be"},{"de":"Westfriesisch","en":"Western Frisian","code":"fy"},{"de":"Wolof","en":"Wolof","code":"wo"},{"de":"Xitsonga","en":"Tsonga","code":"ts"},{"de":"Yi","en":"Sichuan Yi","code":"ii"},{"de":"Yoruba","en":"Yoruba","code":"yo"},{"de":"Zhuang","en":"Zhuang","code":"za"}]'),S="de";C.initDomI18n=function(){T||(T=window.domI18n({selector:"[data-i18n]",separator:" // ",languages:A,enableLog:!1})),T.changeLanguage(C.getBrowserLang())},C.getBrowserLang=function(){return w||navigator.language.substring(0,2).toLowerCase()},C.isBrowserLangDE=function(){return"de"===C.getBrowserLang()},C.isBrowserLangEN=function(){return"en"===C.getBrowserLang()},C.getAllLanguages=function(){let e="de"===C.getBrowserLang()?"de":"en";return e===S||(N.sort((t,n)=>t[e].toLowerCase()>n[e].toLowerCase()?1:-1),S=e),N},C.translate=function(e,...t){if(e&&e.indexOf(" // ")>-1){let n=e.split(" // "),i="en"===t[0]||"de"===t[0]?t[0]:C.getBrowserLang(),a=A.indexOf(i);return a=a>0?a:0,t.forEach(e=>{n[a]=n[a].replace("{?}",e)}),n[a]}let n=this.translations[this.getBrowserLang()]?this.getBrowserLang():"en",i=this.translations[n][e]?this.translations[n][e]:e;return t.forEach(e=>{i=i.replace("{?}",e)}),i},C.getTranslation=function(e,t,n){if(!e)return"";if(t=t||"en","string"==typeof e)return e;let i=C.getBrowserLang();if(e[i])return n?{lang:i,text:e[i]}:e[i];if(e[t])return n?{lang:t,text:e[t]}:e[t];let a=Object.keys(e);return e[a[0]]?n?{lang:a[0],text:e[a[0]]}:e[a[0]]:n?{lang:void 0,text:""}:""},C.getTranslationObject=function(e,t){t=t||C.getBrowserLang(),e=C.translate(e,t);let n={};return n[t]=e,n},C.setLanguage=function(e){w=e,T&&T.changeLanguage(e),g.save("CUSTOM_LANGUAGE_KEY",w),a()(document).trigger(r.EVENT_LANGUAGE_CHANGE)},C.getCustomLanguage=function(){return w},C.translations={},C.translations.en={GridActionSpeak:"Speak label",GridActionSpeakCustom:"Speak custom text",GridActionNavigate:"Navigate to other grid",GridActionARE:"AsTeRICS action",GridActionPredict:"Fill prediction elements",GridActionCollectElement:"Collect element action",GridActionWebradio:"Web radio action",GridActionYoutube:"YouTube action",GridActionChangeLang:"Change app language",COLLECT_ACTION_CLEAR:"Clear collect element",COLLECT_ACTION_REMOVE_WORD:"Delete last word",COLLECT_ACTION_REMOVE_CHAR:"Delete last character",COLLECT_ACTION_COPY_CLIPBOARD:"Copy text to clipboard",COLLECT_ACTION_APPEND_CLIPBOARD:"Append text to clipboard",COLLECT_ACTION_CLEAR_CLIPBOARD:"Clear clipboard",COLLECT_ACTION_TO_YOUTUBE:"Search text on YouTube",WEBRADIO_ACTION_START:"Turn radio on",WEBRADIO_ACTION_TOGGLE:"Turn radio on/off",WEBRADIO_ACTION_STOP:"Turn radio off",WEBRADIO_ACTION_NEXT:"Next radio channel",WEBRADIO_ACTION_PREV:"Previous radio channel",WEBRADIO_ACTION_VOLUP:"Radio volume up",WEBRADIO_ACTION_VOLDOWN:"Radio volume down",CONFIRM_IMPORT_BACKUP:'Caution: This action will delete the existing configuration and replace it with the data from file "{?}". Continue?',CONFIRM_DELETE_GRID:'Do you really want to delete the grid "{?}"?',CONFIRM_DELETE_DICT:'Do you really want to delete the dictionary "{?}"?',CONFIRM_RESET_DB:"Do you really want to reset to default configuration? All current grids will be deleted!",CONFIRM_DELETE_ALL_ELEMS:"Do you really want to delete all elements of the current grid?",CONFIRM_REMOVE_USER:'Do you really want to unlink user "{?}"? This will not delete the user itself, but all data of the user stored on this device.',CONFIRM_REMOVE_USER_LOCAL:'Do you really want to delete user "{?}"? Since the user is not synchronized this action will permanently delete the user.',PLACEHOLDER_SEARCH_GRID:"Search grid",LABEL_USER_LOCAL:"offline-only user",LABEL_USER_CLOUD:"user synced with the cloud",LABEL_USER_ONLINE:"only online, no offline synchronization",ERROR_CODE_UNAUTHORIZED:"Login failed, wrong username or password.",ERROR_CODE_NETWORK_ERROR:"Login failed (network error), please try again later.",DB_SYNC_STATE_SYNCINC:"synchronizing with cloud...",DB_SYNC_STATE_SYNCED:"synchronized with cloud",DB_SYNC_STATE_STOPPED:"synchronization with cloud paused",DB_SYNC_STATE_FAIL:"not synchronizing with cloud",DB_SYNC_STATE_ONLINEONLY:"online-only, no offline synchronization",VALIDATION_ERROR_REGEX:'Username must contain only lowercase letters, digits or the characters ["-", "_"], valid length is 3-50 characters.',VALIDATION_ERROR_EXISTING:"Username is already existing.",SEARCH_IMAGE_PLACEHOLDER:"input search term",HEADER_COMPARE_ONLINE_OFFLINE:"Information about online/offline users",ADVANCED_SETTINGS:"Advanced Settings",TEST_CONFIGURATION:"Test configuration",SELECT:"Select element",NEXT:"Next scanning group",NEXT_ELEMENT:"Next element",PREVIOUS_ELEMENT:"Previous Element",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event",ELEMENT_TYPE_COLLECT:"Collect element",ELEMENT_TYPE_PREDICTION:"Prediction element",ELEMENT_TYPE_YT_PLAYER:"YouTube player",YT_PLAY:"Play video",YT_PAUSE:"Pause video",YT_TOGGLE:"Play/pause video",YT_RESTART:"Restart video",YT_STOP:"Stop Video",YT_STEP_FORWARD:"Step forward within video",YT_STEP_BACKWARD:"Step backward within video",YT_NEXT_VIDEO:"Next video",YT_PREV_VIDEO:"Previous video",YT_PLAY_VIDEO:"Play single video",YT_PLAY_PLAYLIST:"Play playlist",YT_PLAY_SEARCH:"Play videos from search query",YT_PLAY_CHANNEL:"Play videos from channel",YT_ENTER_FULLSCREEN:"Show video in fullscreen",YT_VOLUME_UP:"Video volume up",YT_VOLUME_DOWN:"Video volume down",YT_VOLUME_MUTE:"Mute/unmute video"},C.translations.de={GridActionSpeak:"Label aussprechen",GridActionSpeakCustom:"Benutzerdefinierten Text aussprechen",GridActionNavigate:"Zu anderem Grid navigieren",GridActionARE:"AsTeRICS Aktion",GridActionPredict:"Vorhersage-Elemente füllen",GridActionCollectElement:"Sammelelement Aktion",GridActionWebradio:"Web-Radio Aktion",GridActionYoutube:"YouTube Aktion",GridActionChangeLang:"Anwendungssprache ändern",COLLECT_ACTION_CLEAR:"Sammelelement leeren",COLLECT_ACTION_REMOVE_WORD:"Letztes Word löschen",COLLECT_ACTION_REMOVE_CHAR:"Letzten Buchstaben löschen",COLLECT_ACTION_COPY_CLIPBOARD:"Text in die Zwischenablage kopieren",COLLECT_ACTION_APPEND_CLIPBOARD:"Text zu Zwischenablage hinzufügen",COLLECT_ACTION_CLEAR_CLIPBOARD:"Zwischenablage leeren",COLLECT_ACTION_TO_YOUTUBE:"Text auf YouTube suchen",WEBRADIO_ACTION_START:"Radio einschalten",WEBRADIO_ACTION_TOGGLE:"Radio ein-/ausschalten",WEBRADIO_ACTION_STOP:"Radio ausschalten",WEBRADIO_ACTION_NEXT:"Nächster Radiosender",WEBRADIO_ACTION_PREV:"Voriger Radiosender",WEBRADIO_ACTION_VOLUP:"Radio-Lautstärke erhöhen",WEBRADIO_ACTION_VOLDOWN:"Radio-Lautstärke vermindern",CONFIRM_IMPORT_BACKUP:'Achtung: Diese Aktion wird die aktuelle Konfiguration löschen und sie mit den Daten der Datei "{?}" ersetzen. Fortfahren?',CONFIRM_DELETE_GRID:'Möchten Sie das Grid "{?}" wirklich löschen?',CONFIRM_DELETE_DICT:'Möchten Sie das Wörterbuch "{?}" wirklich löschen?',CONFIRM_RESET_DB:"Möchten Sie wirklich die Standardkonfiguration wiederherstellen? Alle aktuellen Grids werden dadurch gelöscht!",CONFIRM_DELETE_ALL_ELEMS:"Möchten Sie wirklich alle Elemente des aktuellen Grids löschen?",CONFIRM_REMOVE_USER:'Möchten Sie den Account "{?}" wirklich von diesem Gerät abmelden? Diese Aktion löscht nicht den User selbst, aber alle Daten des Users auf diesem Gerät.',PLACEHOLDER_SEARCH_GRID:"Grid suchen",LABEL_USER_LOCAL:"nur offline gespeicherter User",CONFIRM_REMOVE_USER_LOCAL:'Möchten Sie den User "{?}" wirklich permanent löschen? Diese Aktion kann nicht rückgängig gemacht werden.',LABEL_USER_CLOUD:"mit Cloud synchronisierter User",LABEL_USER_ONLINE:"nur online, keine offline Synchronisation",ERROR_CODE_UNAUTHORIZED:"Login fehlgeschlagen, falscher Benutzername oder Passwort.",ERROR_CODE_NETWORK_ERROR:"Login fehlgeschlagen (Netzwerkproblem), bitte versuchen Sie es später nochmal.",DB_SYNC_STATE_SYNCINC:"synchronisiere mit Cloud...",DB_SYNC_STATE_SYNCED:"Mit Cloud synchronisiert",DB_SYNC_STATE_STOPPED:"Synchronisation mit Cloud pausiert",DB_SYNC_STATE_FAIL:"Keine Synchronisierung mit Cloud",DB_SYNC_STATE_ONLINEONLY:"nur online, keine Offline-Synchronisierung",VALIDATION_ERROR_REGEX:'Username darf nur Kleinbuchstaben, Ziffern und die Zeichen ["-", "_"] enthalten, erlaubte Länge ist 3-50 Zeichen.',VALIDATION_ERROR_EXISTING:"Username existiert bereits.",SEARCH_IMAGE_PLACEHOLDER:"Suchbegriff eingeben",HEADER_COMPARE_ONLINE_OFFLINE:"Informationen über Online-/Offline-User",ADVANCED_SETTINGS:"Erweiterte Einstellungen",TEST_CONFIGURATION:"Konfiguration testen",SELECT:"Element auswählen",NEXT:"Nächste Gruppe",NEXT_ELEMENT:"Nächstes Element",PREVIOUS_ELEMENT:"Vorheriges Element",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event",ELEMENT_TYPE_COLLECT:"Sammel-Element",ELEMENT_TYPE_PREDICTION:"Vorhersage-Element",ELEMENT_TYPE_YT_PLAYER:"YouTube Player",YT_PLAY:"Video abspielen",YT_PAUSE:"Video pausieren",YT_TOGGLE:"Video abspielen/pausieren",YT_RESTART:"Video neu starten",YT_STOP:"Video stoppen",YT_STEP_FORWARD:"Im Video weiterspringen",YT_STEP_BACKWARD:"Im Video zurückspringen",YT_NEXT_VIDEO:"Nächstes Video",YT_PREV_VIDEO:"Vorheriges Video",YT_PLAY_VIDEO:"Einzelnes Video abspielen",YT_PLAY_PLAYLIST:"Playlist abspielen",YT_PLAY_SEARCH:"Videos aus Suchanfrage abspielen",YT_PLAY_CHANNEL:"Videos aus Kanal abspielen",YT_ENTER_FULLSCREEN:"Zeige Video in Vollbild",YT_VOLUME_UP:"Videolautstärke erhöhen",YT_VOLUME_DOWN:"Videolautstärke vermindern",YT_VOLUME_MUTE:"Video stummschalten / Ton einschalten"};var I=n(7),k=n.n(I),O={},L="20px";O.getFontSizePx=function(e,t){let n=function(e){if(e.attr("data-label"))return e.attr("data-label");if($(e).find(".text-container span").text())return $(e).find(".text-container span").text();return""}(e),i=e.attr("data-type"),a=e.attr("data-img-id");if(!n)return"10px";var r=e[0].getBoundingClientRect(),s=r.height*r.width/(a?2:1),o=Math.floor(Math.sqrt(.5*s/Math.max(15,n.length))),l=t?n.length:Math.max.apply(null,n.split(" ").map(e=>e.length)),c=1.4*r.width/l;return c=t?Math.min(c,30):c,(L=Math.min(o,c))>r.height/3&&(L=.3*r.height),1===n.length&&"ELEMENT_TYPE_NORMAL"===i&&(L*=2),L+"px"},O.adaptFontSize=function(e){for(var t=0;t\n \n `},D.getGridItem=function(e,t){switch(e.type){case K.ELEMENT_TYPE_COLLECT:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • `}(e);case K.ELEMENT_TYPE_PREDICTION:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    ${t}
    \n
    \n
  • `}(e);case K.ELEMENT_TYPE_YT_PLAYER:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • `}(e);default:return function(e,t){e=R(e);var n="",i="",a="font-size:"+O.getLastFontSize()+";",r="1%";let s=C.getTranslation(e.label,t);var o=s?"80%":"100%";let l=e.backgroundColor?`background: ${e.backgroundColor};`:"";e.image?(n=e.image.data,i=e.image.id):(a+="flex: 1 1 auto;",r="0");return`\n
  • \n
    \n
    \n
    ${s}
    \n ${function(e){let t=e.hidden?'':"",n=e.actions.filter(e=>e.modelName===x.getModelName()).length>0?'':"";return`${t+" "+n}`}(e)}\n
    \n
  • `}(e,t)}};var M={};function P(e){try{let t=parseInt(e.documentElement.width.baseVal.value)||500,n=parseInt(e.documentElement.height.baseVal.value)||500;return e.documentElement.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,t),e.documentElement.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,n),e}catch(t){return e}}function G(e){try{return"data:image/svg+xml;base64,"+btoa((new XMLSerializer).serializeToString(e))}catch(e){return null}}M.getBase64FromImg=function(e,t,n){t=t||150;let i=0===e.src.indexOf("data:")?e.src.substring(5,e.src.indexOf(";")):null;i=i||(e.src.indexOf(".png")>-1?"image/png":null),i=i||(e.src.indexOf(".svg")>-1?"image/svg+xml":null),i=i||"image/jpeg";var a=document.createElement("canvas"),r=1;e.width>t&&(r=t/e.width),a.width=e.width*r,a.height=e.height*r,a.getContext("2d").drawImage(e,0,0,a.width,a.height);try{return a.toDataURL(i,n)}catch(e){throw"image converting failed!"}},M.getBase64FromInput=function(e){return new Promise(t=>{if(e.files&&e.files[0]){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.readAsDataURL(e.files[0])}})},M.convertBase64=function(e,t,n){return new Promise((i,a)=>{if(!e)return i(null);if("image/svg+xml"===e.substring(5,e.indexOf(";")))return i(e);t=t||150;var r=document.createElement("img");r.onload=function(){try{i(M.getBase64FromImg(r,t,n))}catch(e){i(null)}},r.src=e})},M.base64SvgToBase64Png=function(e,t,n){return new Promise(i=>{let a=document.createElement("img");a.onload=function(){if(!n&&(0===a.naturalWidth||0===a.naturalHeight)){let n=P(function(e){let t=atob(e.substring(e.indexOf("base64,")+7));return t=t.substring(t.indexOf("{i(e)})}let r=M.getImageDimensionsFromImg(a).ratio||1,s=document.createElement("canvas");s.width=t,s.height=t/r,s.getContext("2d").drawImage(a,0,0,s.width,s.height);try{let e=s.toDataURL("image/png");i(e)}catch(e){i(null)}},a.src=e})},M.urlToBase64=function(e){return new Promise((t,n)=>{if(e.lastIndexOf(".svg")===e.length-4)$.get(e,null,(function(e){let n=P(e);t(G(n))})).fail((function(){t(null)}));else{let n=new Image;n.crossOrigin="anonymous",n.onload=function(){try{t(M.getBase64FromImg(n,1e3))}catch(e){t(null)}},n.onerror=function(){t(null)},n.src=e}})},M.getScreenshot=function(e){return n.e(0).then(n.t.bind(null,316,7)).then(t=>t.default(document.querySelector(e),{scale:.2,logging:!1,ignoreElements:e=>r.IS_FIREFOX&&-1!==e.style["background-image"].indexOf("image/svg")}).then(e=>Promise.resolve(e.toDataURL())))},M.getEmptyImage=function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},M.getImageDimensionsFromDataUrl=function(e){return e?new Promise(t=>{let n=new Image;n.onload=function(){t(M.getImageDimensionsFromImg(n))},n.src=e}):Promise.resolve({})},M.getImageDimensionsFromImg=function(e){if(!e)return{};let t=e.naturalWidth,n=e.naturalHeight;return 0!==t&&0!==n||(document.body.appendChild(e),t=e.clientWidth,n=e.clientHeight,document.body.removeChild(e)),{width:t,height:n,ratio:t/n}};class U extends(d({id:String,modelName:String,modelVersion:String,data:[String],author:[String],authorURL:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,U)),this.id=this.id||s.generateId(U.getIdPrefix())}getImageType(){if(!this.data)return null;let e=this.data.substring("data:image/".length,this.data.indexOf(";base64"));switch(e){case"png":return U.IMAGE_TYPES.PNG;case"jpeg":return U.IMAGE_TYPES.JPEG;case"svg":case"svg+xml":return U.IMAGE_TYPES.SVG;default:return log.warn("not recognized image type: "+e),null}}getDimensions(){return M.getImageDimensionsFromDataUrl(this.data)}static getModelName(){return"GridImage"}static getIdPrefix(){return"grid-image"}}U.IMAGE_TYPES={PNG:"PNG",JPEG:"JPEG",SVG:"SVG"},U.defaults({id:"",modelName:U.getModelName(),modelVersion:r.MODEL_VERSION,data:null,author:null,authorURL:null});class F extends(d({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0]})){constructor(e,t){super(e=s.setDefaults(e,t,F)),this.id=this.id||s.generateId("grid-action-speak")}static getModelName(){return"GridActionSpeak"}}F.defaults({id:"",modelName:F.getModelName(),modelVersion:r.MODEL_VERSION});class V extends(d({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0],speakText:[Object,String]})){constructor(e,t){super(e=s.setDefaults(e,t,V)),this.id=this.id||s.generateId("grid-action-speak-custom")}static getModelName(){return"GridActionSpeakCustom"}}V.defaults({id:"",modelName:V.getModelName(),modelVersion:r.MODEL_VERSION,speakText:{}});class B extends(d({id:String,modelName:String,modelVersion:String,areURL:[String],areModelGridFileName:[String],componentId:[String],dataPortId:[String],dataPortSendData:[String],eventPortId:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,B)),this.id=this.id||s.generateId("grid-action-are")}static getModelName(){return"GridActionARE"}}B.defaults({id:"",modelName:B.getModelName(),modelVersion:r.MODEL_VERSION});class Y extends(d({id:String,modelName:String,modelVersion:String,dictionaryKey:[String,void 0,null],suggestOnChange:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,Y)),this.id=this.id||s.generateId("grid-action-predict")}static getModelName(){return"GridActionPredict"}}Y.defaults({id:"",modelName:Y.getModelName(),modelVersion:r.MODEL_VERSION,dictionaryKey:null,suggestOnChange:!1});class j extends(d({id:String,modelName:String,modelVersion:String,action:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,j)),this.id=this.id||s.generateId("grid-action-collect-elm")}static getModelName(){return"GridActionCollectElement"}static getActions(){return[j.COLLECT_ACTION_CLEAR,j.COLLECT_ACTION_REMOVE_WORD,j.COLLECT_ACTION_REMOVE_CHAR,j.COLLECT_ACTION_COPY_CLIPBOARD,j.COLLECT_ACTION_APPEND_CLIPBOARD,j.COLLECT_ACTION_CLEAR_CLIPBOARD,j.COLLECT_ACTION_TO_YOUTUBE]}}j.COLLECT_ACTION_CLEAR="COLLECT_ACTION_CLEAR",j.COLLECT_ACTION_REMOVE_WORD="COLLECT_ACTION_REMOVE_WORD",j.COLLECT_ACTION_REMOVE_CHAR="COLLECT_ACTION_REMOVE_CHAR",j.COLLECT_ACTION_COPY_CLIPBOARD="COLLECT_ACTION_COPY_CLIPBOARD",j.COLLECT_ACTION_APPEND_CLIPBOARD="COLLECT_ACTION_APPEND_CLIPBOARD",j.COLLECT_ACTION_CLEAR_CLIPBOARD="COLLECT_ACTION_CLEAR_CLIPBOARD",j.COLLECT_ACTION_TO_YOUTUBE="COLLECT_ACTION_TO_YOUTUBE",j.defaults({id:"",modelName:j.getModelName(),modelVersion:r.MODEL_VERSION});class H extends(d({id:String,modelName:String,modelVersion:String,action:[String],radioId:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,H)),this.id=this.id||s.generateId("grid-action-webradio")}static getModelName(){return"GridActionWebradio"}static getActions(){return[H.WEBRADIO_ACTION_START,H.WEBRADIO_ACTION_TOGGLE,H.WEBRADIO_ACTION_STOP,H.WEBRADIO_ACTION_NEXT,H.WEBRADIO_ACTION_PREV,H.WEBRADIO_ACTION_VOLUP,H.WEBRADIO_ACTION_VOLDOWN]}}H.WEBRADIO_ACTION_START="WEBRADIO_ACTION_START",H.WEBRADIO_ACTION_TOGGLE="WEBRADIO_ACTION_TOGGLE",H.WEBRADIO_ACTION_STOP="WEBRADIO_ACTION_STOP",H.WEBRADIO_ACTION_NEXT="WEBRADIO_ACTION_NEXT",H.WEBRADIO_ACTION_PREV="WEBRADIO_ACTION_PREV",H.WEBRADIO_ACTION_VOLUP="WEBRADIO_ACTION_VOLUP",H.WEBRADIO_ACTION_VOLDOWN="WEBRADIO_ACTION_VOLDOWN",H.defaults({id:"",modelName:H.getModelName(),modelVersion:r.MODEL_VERSION,radioId:"",action:H.WEBRADIO_ACTION_START});class W extends(d({id:String,modelName:String,language:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,W)),this.id=this.id||s.generateId("grid-action-change-lang")}static getModelName(){return"GridActionChangeLang"}}W.defaults({id:"",modelName:W.getModelName()});class z extends(d({id:String,modelName:String,modelVersion:String,action:[String],playType:[String],data:[String],stepSeconds:[Number],stepVolume:[Number],showCC:[Boolean],playMuted:[Boolean],performAfterNav:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,z)),this.id=this.id||s.generateId(z.getModelName())}static getModelName(){return"GridActionYoutube"}static getActions(){return Object.keys(z.actions)}static getPlayTypes(){return Object.keys(z.playTypes)}}z.actions={YT_PLAY:"YT_PLAY",YT_PAUSE:"YT_PAUSE",YT_TOGGLE:"YT_TOGGLE",YT_RESTART:"YT_RESTART",YT_STOP:"YT_STOP",YT_STEP_FORWARD:"YT_STEP_FORWARD",YT_STEP_BACKWARD:"YT_STEP_BACKWARD",YT_NEXT_VIDEO:"YT_NEXT_VIDEO",YT_PREV_VIDEO:"YT_PREV_VIDEO",YT_ENTER_FULLSCREEN:"YT_ENTER_FULLSCREEN",YT_VOLUME_UP:"YT_VOLUME_UP",YT_VOLUME_DOWN:"YT_VOLUME_DOWN",YT_VOLUME_MUTE:"YT_VOLUME_MUTE"},z.playTypes={YT_PLAY_VIDEO:"YT_PLAY_VIDEO",YT_PLAY_PLAYLIST:"YT_PLAY_PLAYLIST",YT_PLAY_SEARCH:"YT_PLAY_SEARCH",YT_PLAY_CHANNEL:"YT_PLAY_CHANNEL",YT_PLAY_RELATED:"YT_PLAY_RELATED"},z.defaults({id:"",modelName:z.getModelName(),modelVersion:r.MODEL_VERSION,stepSeconds:10,stepVolume:20,playType:z.playTypes.YT_PLAY_VIDEO});class K extends(d({id:String,modelName:String,modelVersion:String,width:Number,height:Number,x:[Number],y:[Number],label:[Object,String,void 0],backgroundColor:[String],hidden:[Boolean],image:[U],actions:[Object],type:String})){constructor(e,t){let n={id:"",modelName:K.getModelName(),modelVersion:r.MODEL_VERSION,label:{},width:1,height:1,type:K.ELEMENT_TYPE_NORMAL};(e=s.setDefaults(e,t,K)||{}).actions=e.actions||[new F],super(Object.assign(n,e)),this.id=this.id||s.generateId("grid-element")}duplicate(){var e=new K(JSON.parse(JSON.stringify(this)));return e.id=s.generateId("grid-element"),e}toHTML(e){return D.getGridItem(this,e)}hasSetPosition(){return null!=this.x&&null!=this.x&&null!=this.y&&null!=this.y}getNavigateGridId(){let e=this.actions.filter(e=>e.modelName===x.getModelName())[0];return e?e.toGridId:null}static getActionTypes(){return[F,x,V,Y,j,B,H,z,W]}static getActionInstance(e){var t=this.getActionTypes().filter(t=>t.getModelName()==e)[0];if(t)return new t;log.warn("action type not found: "+e)}static getModelName(){return"GridElement"}}K.ELEMENT_TYPE_NORMAL="ELEMENT_TYPE_NORMAL",K.ELEMENT_TYPE_COLLECT="ELEMENT_TYPE_COLLECT",K.ELEMENT_TYPE_PREDICTION="ELEMENT_TYPE_PREDICTION",K.ELEMENT_TYPE_YT_PLAYER="ELEMENT_TYPE_YT_PLAYER";class J extends(d({id:String,modelName:String,modelVersion:String,fileName:[String],dataBase64:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,J)),this.id=this.id||s.generateId(J.getModelName().toLowerCase())}static getModelName(){return"AdditionalGridFile"}}J.defaults({id:"",modelName:J.getModelName(),modelVersion:r.MODEL_VERSION});class X extends(d({id:String,modelName:String,modelVersion:String,radioId:[String],radioUUID:[String],radioName:[String],radioUrl:[String],faviconUrl:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,X)),this.id=this.id||s.generateId("webradio")}static getModelName(){return"Webradio"}}X.defaults({id:"",modelName:X.getModelName(),modelVersion:r.MODEL_VERSION});let q={};q.regenerateIDs=function(e){let t={},n=[];return e.forEach(e=>{let n=s.generateId("grid-data");t[e.id]=n,e._id=e.id=n,e._rev=null}),e.forEach(e=>{let i=JSON.stringify(e);Object.keys(t).forEach(e=>{i=i.replace(new RegExp(e,"g"),t[e])}),n.push(JSON.parse(i))}),{grids:n,idMapping:t}},q.sortGridElements=function(e){return e?e.sort((e,t)=>e.y!==t.y?e.y-t.y:e.x-t.x):e},q.generateGlobalGrid=function(e,t){let n=new K({width:1,height:1,x:0,y:0,label:C.getTranslationObject("Home // Start",t),image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMjgwLjM3IDE0OC4yNkw5NiAzMDAuMTFWNDY0YTE2IDE2IDAgMCAwIDE2IDE2bDExMi4wNi0uMjlhMTYgMTYgMCAwIDAgMTUuOTItMTZWMzY4YTE2IDE2IDAgMCAxIDE2LTE2aDY0YTE2IDE2IDAgMCAxIDE2IDE2djk1LjY0YTE2IDE2IDAgMCAwIDE2IDE2LjA1TDQ2NCA0ODBhMTYgMTYgMCAwIDAgMTYtMTZWMzAwTDI5NS42NyAxNDguMjZhMTIuMTkgMTIuMTkgMCAwIDAtMTUuMyAwek01NzEuNiAyNTEuNDdMNDg4IDE4Mi41NlY0NC4wNWExMiAxMiAwIDAgMC0xMi0xMmgtNTZhMTIgMTIgMCAwIDAtMTIgMTJ2NzIuNjFMMzE4LjQ3IDQzYTQ4IDQ4IDAgMCAwLTYxIDBMNC4zNCAyNTEuNDdhMTIgMTIgMCAwIDAtMS42IDE2LjlsMjUuNSAzMUExMiAxMiAwIDAgMCA0NS4xNSAzMDFsMjM1LjIyLTE5My43NGExMi4xOSAxMi4xOSAwIDAgMSAxNS4zIDBMNTMwLjkgMzAxYTEyIDEyIDAgMCAwIDE2LjktMS42bDI1LjUtMzFhMTIgMTIgMCAwIDAtMS43LTE2LjkzeiIvPjwvc3ZnPg"}),actions:[new x({toGridId:e})]}),i=new K({width:1,height:1,x:1,y:0,label:C.getTranslationObject("Back // Zurück",t),image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDUwNEMxMTkgNTA0IDggMzkzIDggMjU2UzExOSA4IDI1NiA4czI0OCAxMTEgMjQ4IDI0OC0xMTEgMjQ4LTI0OCAyNDh6bTExNi0yOTJIMjU2di03MC45YzAtMTAuNy0xMy0xNi4xLTIwLjUtOC41TDEyMS4yIDI0Ny41Yy00LjcgNC43LTQuNyAxMi4yIDAgMTYuOWwxMTQuMyAxMTQuOWM3LjYgNy42IDIwLjUgMi4yIDIwLjUtOC41VjMwMGgxMTZjNi42IDAgMTItNS40IDEyLTEydi02NGMwLTYuNi01LjQtMTItMTItMTJ6Ii8+PC9zdmc+"}),actions:[new x({toLastGrid:!0})]}),a=new F;t&&(a.speakLanguage=t);let r=new K({width:Math.max(4,-4),height:1,x:2,y:0,type:K.ELEMENT_TYPE_COLLECT,actions:[a]}),s=new K({label:C.getTranslationObject("Delete Word // Wort löschen",t),width:1,height:1,x:2+r.width,y:0,image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48cGF0aCBkPSJNNTc2IDY0SDIwNS4yNkE2My45NyA2My45NyAwIDAgMCAxNjAgODIuNzVMOS4zNyAyMzMuMzdjLTEyLjUgMTIuNS0xMi41IDMyLjc2IDAgNDUuMjVMMTYwIDQyOS4yNWMxMiAxMiAyOC4yOCAxOC43NSA0NS4yNSAxOC43NUg1NzZjMzUuMzUgMCA2NC0yOC42NSA2NC02NFYxMjhjMC0zNS4zNS0yOC42NS02NC02NC02NHptLTg0LjY5IDI1NC4wNmM2LjI1IDYuMjUgNi4yNSAxNi4zOCAwIDIyLjYzbC0yMi42MiAyMi42MmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMEwzODQgMzAxLjI1bC02Mi4wNiA2Mi4wNmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMGwtMjIuNjItMjIuNjJjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNMMzM4Ljc1IDI1NmwtNjIuMDYtNjIuMDZjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNsMjIuNjItMjIuNjJjNi4yNS02LjI1IDE2LjM4LTYuMjUgMjIuNjMgMEwzODQgMjEwLjc1bDYyLjA2LTYyLjA2YzYuMjUtNi4yNSAxNi4zOC02LjI1IDIyLjYzIDBsMjIuNjIgMjIuNjJjNi4yNSA2LjI1IDYuMjUgMTYuMzggMCAyMi42M0w0MjkuMjUgMjU2bDYyLjA2IDYyLjA2eiIvPjwvc3ZnPg"}),actions:[new j({action:j.COLLECT_ACTION_REMOVE_WORD})]}),o=new K({label:C.getTranslationObject("Clear // Leeren",t),width:1,height:1,x:3+r.width,y:0,image:new U({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDhDMTE5IDggOCAxMTkgOCAyNTZzMTExIDI0OCAyNDggMjQ4IDI0OC0xMTEgMjQ4LTI0OFMzOTMgOCAyNTYgOHptMTIxLjYgMzEzLjFjNC43IDQuNyA0LjcgMTIuMyAwIDE3TDMzOCAzNzcuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDI1NiAzMTJsLTY1LjEgNjUuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDEzNC40IDMzOGMtNC43LTQuNy00LjctMTIuMyAwLTE3bDY1LjYtNjUtNjUuNi02NS4xYy00LjctNC43LTQuNy0xMi4zIDAtMTdsMzkuNi0zOS42YzQuNy00LjcgMTIuMy00LjcgMTcgMGw2NSA2NS43IDY1LjEtNjUuNmM0LjctNC43IDEyLjMtNC43IDE3IDBsMzkuNiAzOS42YzQuNyA0LjcgNC43IDEyLjMgMCAxN0wzMTIgMjU2bDY1LjYgNjUuMXoiLz48L3N2Zz4"}),actions:[new j({action:j.COLLECT_ACTION_CLEAR})]});return new de({label:C.getTranslationObject("Global Grid",t),gridElements:[n,i,r,s,o],rowCount:3})},q.getOffset=function(e){let t=JSON.parse(JSON.stringify(e.gridElements)),n=[],i=1e5;for(let e=0;e<10;e++)for(let a=0;a<10&&!(e+a>=i);a++){let r=t.reduce((t,n)=>t&&(a>=n.y+n.height||e>=n.x+n.width),!0);r&&(i=e+a),n.push({x:e,y:a,sum:e+a,valid:r})}let a=n.filter(e=>i===e.sum&&e.valid)[0];return a?{x:a.x,y:a.y}:{x:e.getWidth(),y:e.getHeight()}},q.getFreeCoordinates=function(e){let t=new de({},e),n={};for(let e=0;e{for(let t=e.x;t({x:n[e].x,y:n[e].y}))},q.getFillElements=function(e){return q.getFreeCoordinates(e).map(e=>new K({x:e.x,y:e.y}))},q.updateOrAddGridElement=function(e,t){t=JSON.parse(JSON.stringify(t));let n=(e=JSON.parse(JSON.stringify(e))).gridElements.map(e=>e.id).indexOf(t.id);return-1!==n?e.gridElements[n]=t:e.gridElements.push(t),e},q.getGraphList=function(e,t){e=e.filter(e=>e.id!==t);let n=[],i={};return e.forEach(t=>{let a=e.filter(e=>{return n=e.gridElements,i=t.id,function(e,t){return e.filter(e=>e.actions.filter(e=>e.modelName===x.getModelName()&&e.toGridId===t).length>0)}(n,i).length>0;var n,i}),r=e.filter(e=>-1!==function(e){return e.gridElements.reduce((e,t)=>e.concat(t.actions.filter(e=>e.modelName===x.getModelName())),[]).map(e=>e.toGridId)}(t).indexOf(e.id)),s={grid:t,parents:a,children:r,navCount:a.length+r.length};n.push(s),i[t.id]=s}),n.sort((e,t)=>t.navCount-e.navCount),n.forEach(e=>{e.parents=e.parents.map(e=>i[e.id]),e.children=e.children.map(e=>i[e.id]),e.allRelatives=e.children.concat(e.parents.filter(t=>-1===e.children.indexOf(t)))}),n},q.getAllChildrenRecursive=function(e,t,n){return function e(t,n,i){let a=t.filter(e=>e.grid.id===n)[0];i=i||[];let r=[];return a.children.forEach(e=>{-1===i.indexOf(e.grid)&&(i.push(e.grid),r.push(e.grid.id))}),r.forEach(n=>{i=e(t,n,i)}),i}(e,t,n).filter(e=>e.id!==t)};class Z extends(d({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]})){constructor(e,t){super(e=s.setDefaults(e,t,Z)),this.id=this.id||s.generateId(Z.getModelName().toLowerCase())}static getModelName(){return"EncryptedObject"}}Z.defaults({modelVersion:r.MODEL_VERSION});let Q={},ee=["thumbnail"];Q.removeLongPropertyValues=function(e,t,n){if(!e)return e;n=void 0===n?"_removed_":n,t=t||500;let i=JSON.parse(JSON.stringify(e));return Object.keys(i).forEach(e=>{-1===ee.indexOf(e)&&(i[e]=function e(t,n,i){if(!t)return t;if("string"==typeof t||t instanceof String){if(t.length>n)return i}else if(t instanceof Array)for(let a=0;a{-1===ee.indexOf(a)&&(t[a]=e(t[a],n,i))});return t}(i[e],t,n))}),i},Q.getDefaultRemovedPlaceholder=function(){return"_removed_"};let te=window.sjcl,ne=window.log;function ie(){let e=this,t={},n={};function i(e,t){return e?new e(t):t}e.set=function(e,i,a){let r=i instanceof Array&&i.length>1?i[0]:i;"string"==typeof e?i?a&&"function"!=typeof a?ne.warn("object type has to be a constructor function or empty, aborting."):r&&r.isShortVersion?ne.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],a&&(n[e]=a)):ne.warn("cache-values has to be set, aborting."):ne.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"!=typeof e)return void ne.warn("cache-key has to be a string, aborting.");if(!t[e])return null;let a=JSON.parse(t[e]),r=n[e];return a instanceof Array?a.map(e=>i(r,e)):i(r,a)},e.getAsPromise=function(t){let n=e.get(t);return new Promise(e=>{setTimeout(()=>{e(n)},1)})},e.has=function(e){return"string"!=typeof e?(ne.warn("cache-key has to be a string, aborting."),!1):!!t[e]},e.clear=function(e){e&&(delete t[e],delete n[e])},e.clearAll=function(){t={},n={}}}let ae={},re=null,se=null,oe=!1,le=new ie;function ce(){if(!se||!re){let e="using encryptionService uninitialized is not possible, aborting...";throw ne.error(e),e}}ae.encryptObject=function(e,t){if(ce(),!e)return e;t=t||{};let n=new Z({id:e.id,modelName:e.modelName});n._id=e.id,e._rev&&(n._rev=e._rev);let i=JSON.stringify(e),a=JSON.stringify(Q.removeLongPropertyValues(e)),r=i!==a;return n.encryptedDataBase64=ae.encryptString(i,t.encryptionKey),n.encryptedDataBase64Short=r?ae.encryptString(a,t.encryptionKey):null,n},ae.decryptObjects=function(e,t){if(ce(),!e)return e;let n=(t=t||{}).onlyShortVersion,i=[];return(e=e instanceof Array?e:[e]).forEach(e=>{try{let a=null,r=null;if(n){let n=e.encryptedDataBase64Short||e.encryptedDataBase64;a=ae.decryptString(n,t.encryptionKey),r=JSON.parse(a),r.isShortVersion=!0}else a=ae.decryptString(e.encryptedDataBase64,t.encryptionKey),r=JSON.parse(a);r._id=e._id,r._rev=e._rev,i.push(r)}catch(t){throw ne.error("error decrypting object: "+e.modelName+", id: "+e.id),ne.error(t),t}}),i.length>1?i:i[0]},ae.encryptString=function(e,t){t||ce();let n=null;return n=(t=t||se)&&!oe?te.encrypt(t,e,{iter:1e3}):e,n},ae.decryptString=function(e,t){if(t||ce(),le.has(e))return ne.debug("using decryption cache..."),le.get(e);t=t||se;let n=null;(new Date).getTime();if(t&&!oe)n=te.decrypt(t,e);else try{n=e;let i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=te.decrypt(t,e))}catch(i){n=te.decrypt(t,e)}return le.set(e,n),n},ae.getStringHash=function(e){let t=te.hash.sha256.hash(e);return te.codec.hex.fromBits(t)},ae.getUserPasswordHash=function(e){return ae.getStringHash("STATIC_USER_PW_SALT"+e)},ae.setEncryptionProperties=function(e,t,n){e=e||"",re=t,se=ae.getStringHash(""+re+e),oe=n,le.clearAll(),ne.debug("new encryption key is: "+se)},ae.resetEncryptionProperties=function(){ne.debug("reset encryption properties..."),re=null,se=null,oe=!1};class de extends(d({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:d.Array(K),additionalFiles:[d.Array(J)],webRadios:[d.Array(X)],thumbnail:[Object]})){constructor(e,t){(e=s.setDefaults(e,t,de))&&(e.id=e.id?e.id:s.generateId(de.getIdPrefix())),super(e),this.minColumnCount=e.minColumnCount||this.getWidth()||g.getLastGridDimensions().minColumnCount||4,this.rowCount=e.rowCount||this.getHeight()||g.getLastGridDimensions().rowCount||3,this.id=this.id||s.generateId("grid-data")}hasSetPositions(){return this.gridElements.every(e=>e.hasSetPosition())}getHash(){let e="";return this.gridElements.forEach(t=>{e+=JSON.stringify(t.label)+t.x+t.y,t.image&&(e+=t.image.data.substring(t.image.data.length-30))}),ae.getStringHash(e)}hasOutdatedThumbnail(){return!this.thumbnail||!this.thumbnail.data||this.thumbnail.hash!==this.getHash()}getWidth(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map(e=>e.x+e.width))}getHeight(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map(e=>e.y+e.height))}getWidthWithBounds(){return Math.max(this.getWidth(),this.minColumnCount)}getHeightWithBounds(){return Math.max(this.getHeight(),this.rowCount)}isFull(){if(0===this.gridElements.length)return!1;return this.getWidthWithBounds()*this.getHeightWithBounds()===this.gridElements.reduce((e,t)=>e+t.width*t.height,0)}getNewXYPos(e){let t=this.gridElements.reduce((e,t)=>{let n=t.x+t.width;return 0===t.y&&n>e&&(e=n),e},0);if(e)return{x:t,y:0};let n=q.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}getNewGridElement(e){e=e||{};let t=this.getNewXYPos();return e=Object.assign(e,{x:t.x,y:t.y}),new K(e)}isEqual(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}getNextElementId(e,t){if(!this.gridElements||0===this.gridElements.length)return e;if(1===this.gridElements.length)return this.gridElements[0].id;var n=JSON.parse(JSON.stringify(this.gridElements)).sort((e,t)=>e.y!==t.y?e.y-t.y:e.x-t.x),i=(n=n.filter(e=>e.type===K.ELEMENT_TYPE_NORMAL)).map(e=>e.id),a=i.indexOf(e);if(-1===a)return i[0];var r=a+(t?-1:1);return i[r=(r=r>i.length-1?0:r)<0?i.length-1:r]}getPreviousElementId(e){return this.getNextElementId(e,!0)}getAdditionalFile(e){var t=this.additionalFiles.filter(t=>t.fileName===e);return t.length>0?t[0]:null}getAREModel(){let e=this.getAREFirstAction();if(e){return this.additionalFiles.filter(t=>t.fileName===e.areModelGridFileName)[0]}return null}hasAREModel(){return!!this.getAREModel()}getAREFirstAction(){let e=[];return this.gridElements.forEach(t=>{e=e.concat(t.actions)}),e.filter(e=>e.modelName===B.getModelName())[0]}getAREURL(){let e=this.getAREFirstAction();return e?e.areURL:null}clone(){let e=new de(this);return delete e._id,delete e._rev,e.id=s.generateId("grid-data"),Object.keys(this.label).forEach(t=>{e.label[t]=this.label[t]+" (Copy)"}),e}static getModelName(){return"GridData"}static getIdPrefix(){return"grid-data"}}de.defaults({id:"",modelName:de.getModelName(),modelVersion:r.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:C.getBrowserLang()});let ue={params:{PARAM_DEMO_MODE:"demo",PARAM_SCANNING:"scanning",PARAM_HUFFMAN:"huffman",PARAM_DIR_INPUT:"direction",PARAM_RESET_DATABASE:"reset",PARAM_DEFAULT_GRIDSET:"default"}},fe=!1,pe=!1;function he(e){return new URLSearchParams(window.location.search).has(e)}function me(e){return new URLSearchParams(window.location.search).get(e)}function ve(e){return"false"===me(e)}ue.isDemoMode=function(){return fe=fe||he(ue.params.PARAM_DEMO_MODE),function(e){if(!he(e))return;let t=new URLSearchParams(window.location.search);if(t.delete(e),history.replaceState){let e=t.toString().length>0?"?"+t.toString():"",n=window.location.protocol+"//"+window.location.host+window.location.pathname+e+window.location.hash;history.replaceState(null,"",n)}}(ue.params.PARAM_DEMO_MODE),fe},ue.isScanningEnabled=function(){return he(ue.params.PARAM_SCANNING)&&!ve(ue.params.PARAM_SCANNING)},ue.isDirectionEnabled=function(){return he(ue.params.PARAM_DIR_INPUT)&&!ve(ue.params.PARAM_DIR_INPUT)},ue.isHuffmanEnabled=function(){return he(ue.params.PARAM_HUFFMAN)&&!ve(ue.params.PARAM_HUFFMAN)},ue.shouldResetDatabase=function(){let e=!pe&&(ue.isDemoMode()||"true"===me(ue.params.PARAM_RESET_DATABASE));return pe=!0,e},ue.getDefaultGridsetName=function(){return me(ue.params.PARAM_DEFAULT_GRIDSET)};var ge=n(8),_e=n.n(ge);let be={};function Ee(e,t,n){if(!e)return e;let i=e instanceof Array;e=i?e:[e];for(let i=0;i{e[i]=n(e[i],t)})}return i?e:e[0]}function ye(e){let t=we(e);return t.push(ae.encryptObject),t}function Ce(e){let t=we(e);return e.major&&t.unshift(ae.decryptObjects),t}function we(e){if(e.major===s.getLatestModelVersion().major)return[];let t=[];switch(e.major){case 1:t.push((function(e,t){if(e.modelName===h.getModelName()){ne.info("converting model version from V1 to V2: "+e.modelName);let t=e.inputConfig;t.dirInputs=p.DEFAULT_DIR_INPUTS,t.huffInputs=p.DEFAULT_HUFF_INPUTS,t.scanInputs=p.DEFAULT_SCAN_INPUTS,t.scanKey&&(t.scanInputs=[],t.scanInputs.push(new u({label:p.SELECT,keyCode:t.scanKey,keyName:t.scanKeyName})),t.scanEnabled=t.scanAutostart,t.scanAuto=t.scanAutostart,delete t.scanKey,delete t.scanKeyName,delete t.scanAutostart,delete t.areEvents,delete t.areURL)}return e.modelVersion=s.getModelVersionString(),e}));case 2:t.push((function(e,t){if(e.modelName===de.getModelName()){if(ne.debug("converting model version from V2 to V3: "+e.modelName),e.locale=e.locale||C.getBrowserLang(),"string"==typeof e.label){let t=e.label;e.label={},e.label[e.locale]=t}else e.label={};e.gridElements.forEach(t=>{if("string"==typeof t.label){let n=t.label;t.label={},t.label[e.locale]=n}else t.label={};t.actions.forEach(t=>{if(t.modelName===V.getModelName()){let n=t.speakText;t.speakText={},t.speakText[e.locale]=n,t.speakLanguage=void 0}else t.modelName===F.getModelName()&&(t.speakLanguage=void 0)})})}return e.modelVersion=s.getModelVersionString(),e}))}return t}function Te(e,t,n,i,s){let o=this,l=null,c=null,d=null,u=!0,f=r.DB_SYNC_STATE_FAIL,p=!1,h=null,m={};function v(e,t){let n=new _e.a(e,{auto_compaction:!0});return n.info().then((function(t){return log.debug(e+" info:"),log.debug(t),Promise.resolve(n)}))}function _(){return c&&l?new Promise(t=>{let n=(new Date).getTime();function a(){g.markSyncedDatabase(e),d=l.sync(c,{live:!0,retry:!1}).on("paused",(function(e){log.debug("sync paused"),log.debug(e),b(r.DB_SYNC_STATE_SYNCED)})).on("active",(function(e){log.debug("sync active"),log.debug(e),b(r.DB_SYNC_STATE_SYNCINC)})).on("change",(function(e){y(e)})).on("error",(function(e){log.info("couchdb error"),log.info(e),E()}))}o.wasCurrentDatabaseSynced()||i?(a(),t()):(log.debug("database wasn't synced before, so temporarily use remote db until sync is done..."),u=!1,d=l.sync(c,{live:!1,retry:!1}).on("active",(function(e){b(r.DB_SYNC_STATE_SYNCINC)})).on("paused",(function(){b(r.DB_SYNC_STATE_SYNCED)})).on("error",(function(e){log.info("couchdb error"),log.error(e),E()})).on("complete",(function(e){log.debug("sync complete event"),log.debug(e);let t=e&&e.pull?e.pull.status:e&&e.push?e.push.status:null;"cancelled"===t?log.debug("sync cancelled!"):"complete"===t&&(log.info("couchdb sync complete! setting up live sync and using local db now..."),log.debug("initial sync took: "+((new Date).getTime()-n)+"ms"),u=!0,a())})),t())}):(log.error("trying to setupSync() but remoteDb or db is not specified! Aborting..."),Promise.reject())}function b(e){if(!p)try{f=e,a()(document).trigger(r.EVENT_DB_SYNC_STATE_CHANGE,e)}catch(e){log.error(e)}}function E(){p||(o.cancelSync(),c&&(c.close(),c=null),a()(document).trigger(r.EVENT_DB_CONNECTION_LOST),b(r.DB_SYNC_STATE_FAIL))}function y(e){if(s)try{log.debug(e);let t=[],n=[];C(e.change?e.change.docs:null),e.direction&&"pull"===e.direction?(e.change&&e.change.docs&&e.change.docs.length>0&&(n=e.change.docs.filter(e=>!!T(e)&&!function(e){return m[T(e)]&&w(e)T(e))),e.change.docs.length>0&&0===t.length?log.info("ignoring pull because of outdated revision"):log.info("pouchdb pulled updates...")):e.direction?log.info("pouchdb pushed updates..."):!e.direction&&e.id&&(log.info("change from remote database..."),t.push(e.id),e.doc&&n.push(e.doc)),!p&&(t.length>0||n.length>0)&&s(t,n)}catch(e){log.error(e)}}function C(e){e&&e.length>0&&e.forEach(e=>{let t=T(e),n=w(e);(!m[t]||m[t](l=e,Promise.resolve())),i.push(h)),t&&i.push(v(t,!0).then(e=>(c=e,n?(c.changes({since:"now",live:!0,include_docs:!0}).on("change",(function(e){y(e)})),Promise.resolve()):h.then(()=>_()))));let s=Promise.all(i);return s.then(()=>{a()(document).trigger(r.EVENT_DB_INITIALIZED)}),s},o.put=function(e){let t=o.getDbToUse().put(e);return t.then(e=>{C([e])}),t},o.bulkDocs=function(e){let t=o.getDbToUse().bulkDocs(e);return t.then(e=>{C([e])}),t},o.startSync=function(e){if(!c&&h)return h.then(()=>v(e,!0)).then(e=>(c=e,_()));log.warn("startSync() is not possible if remote database is already open, or local database not opened")},o.getDbToUse=function(){let e=u&&!n?l:c;if(!e||p)throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase().";return e},o.close=function(){if(p)return Promise.resolve();let e=[];p=!0,ae.resetEncryptionProperties(),o.cancelSync(),l&&e.push(l.close()),c&&e.push(c.close()),l=null,c=null;let t=Promise.all(e);return t.then(()=>{a()(document).trigger(r.EVENT_DB_CLOSED)}),t},o.destroyDb=function(e){return o.close().then(()=>new _e.a(e).destroy())},o.getOpenedDatabaseName=function(){return e},o.wasCurrentDatabaseSynced=function(){return g.isDatabaseSynced(e)},o.isUsingLocalDb=function(){return u},o.getSyncState=function(){return f},o.isSyncEnabled=function(){return!!d},o.cancelSync=function(){d&&(log.debug("canceling sync ..."),b(r.DB_SYNC_STATE_STOPPED),d.cancel(),d=null)},o.resumeSync=function(){if(!n&&!d&&c)return log.debug("resuming sync..."),_()}}be.convertLiveToDatabaseObjects=function(e,t){ne.trace("conversion to database - before filters:",e);let n=Ee(e,t,ye);return ne.trace("conversion to database - after filters:",n),n},be.convertDatabaseToLiveObjects=function(e,t){ne.trace("conversion to live - before filters:",e);let n=Ee(e,t,Ce);return ne.trace("conversion to live - after filters:",n),n},be.updateDataModel=function(e){return Ee(e,null,we)};let Ae={},Ne=null,Se=new ie,Ie=null;function ke(){return Oe().getDbToUse()}function Oe(){if(!Ne||!Ne.getDbToUse())throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase() or pouchDbService.createDatabase().";return Ne}function Le(){Ie&&(clearTimeout(Ie),Ie=null),Oe().isUsingLocalDb()&&Oe().getSyncState()!==r.DB_SYNC_STATE_SYNCINC||Oe().cancelSync()}function xe(){let e=Oe().wasCurrentDatabaseSynced()?0:2e3;Ie=setTimeout(()=>{Oe().resumeSync()},e)}function De(e,t){t.forEach(e=>{e._deleted?Se.clearAll():(Se.set(e.id,e),Se.clear(h.getIdPrefix()),Se.clear(de.getIdPrefix()))}),e=(t=t.filter(e=>!e._deleted)).map(e=>e.id);let n=t.map(e=>be.convertDatabaseToLiveObjects(e)),i=Ae.getOpenedDatabaseName(),s=g.getUserMajorModelVersion(i);n.forEach(e=>{g.setUserModelVersion(i,e.modelVersion)}),s===g.getUserMajorModelVersion(i)?a()(document).trigger(r.EVENT_DB_PULL_UPDATED,[e,n]):a()(document).trigger(r.EVENT_DB_DATAMODEL_UPDATE,[e,n])}Ae.initDatabase=function(e,t,n){return Ne&&Ne.getOpenedDatabaseName()===e&&t?Ne.startSync(t):(Se.clearAll(),Ae.closeCurrentDatabase(),Ne=new Te(e,t,n,!1,De),Ne.init())},Ae.createDatabase=function(e,t,n){return Se.clearAll(),Ae.closeCurrentDatabase(),Ne=new Te(e,t,n,!0,De),Ne.init()},Ae.all=function(e,t){if(t&&Se.has(t))return log.debug("using cache for retrieving id: "+t),Se.getAsPromise(t);if(!t&&e&&Se.has(e))return log.debug("using cache for retrieving bulk with id-prefix: "+e),Se.getAsPromise(e);let n=ke();return Le(),new Promise((i,a)=>{let r={include_docs:!0,attachments:!1};t?r.key=t:e&&(r.startkey=e,r.endkey=e+"￿"),n.allDocs(r).then((function(n){let a=function(e){let t=[];e.docs&&e.docs.length>0?e.docs.forEach(e=>{t.push(e)}):e.rows&&e.rows.length>0&&e.rows.forEach(e=>{e.doc&&e.doc.modelName&&t.push(e.doc)});return 0===t.length?null:1===t.length?t[0]:t}(n);t&&a?Se.set(t,a):!t&&e&&a&&Se.set(e,a),i(a)})).catch((function(e){log.error(e),a()})).finally(()=>{xe()})})},Ae.save=function(e,t){return log.debug("saving "+e+"..."),Le(),t.id&&(Se.clear(t.id,t),Se.clear(e)),new Promise((n,i)=>{if(!(t&&t._id&&e&&t.encryptedDataBase64))return log.error('did not specify needed parameter "idPrefix" or "_id" or data is not encrypted! aborting.'),i();Ne.put(t).then(i=>{t._rev=i.rev,Se.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()}).catch((function(e){t.id&&Se.clear(t.id),"conflict"===e.error?(log.warn("conflict with remote version updating document with id: "+t.id),n()):(log.error(e),i(e)),i()})).finally(()=>{xe()})})},Ae.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();Le(),Se.clearAll();let t=Ne.bulkDocs(e);return t.finally(()=>{xe()}),t},Ae.remove=function(e){let t=ke();return Ae.all(null,e).then(e=>(Se.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)))},Ae.resetDatabase=function(e){return Ae.isUsingLocalDb()&&Ae.getOpenedDatabaseName()===r.LOCAL_DEMO_USERNAME?(Se.clearAll(),new Promise(t=>{Ne.destroyDb(e).then((function(){Ne=null,Ae.initDatabase(e).then(()=>t())})).catch((function(e){log.error("error destroying database: "+e)}))})):Promise.reject("do not destroy!")},Ae.deleteDatabase=function(e){if(Ae.getOpenedDatabaseName()===e&&!Ae.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();Se.clearAll();let t=[];return Ae.getOpenedDatabaseName()===e&&t.push(Ae.closeCurrentDatabase()),Promise.all(t).then(()=>new _e.a(e).destroy())},Ae.closeCurrentDatabase=function(){if(!Ne)return Promise.resolve();Le();let e=Ne.close();return Ne=null,e},Ae.getOpenedDatabaseName=function(){return Ne?Ne.getOpenedDatabaseName():null},Ae.isUsingLocalDb=function(){return Ne?Ne.isUsingLocalDb():null},Ae.getSyncState=function(){return Ne?Ne.getSyncState():null},Ae.isSyncEnabled=function(){return Ne?Ne.isSyncEnabled():null};class Re extends(d({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]})){constructor(e,t){super(e=s.setDefaults(e,t,Re)),this.id=this.id||s.generateId(Re.getIdPrefix())}clone(){let e=new Re(this);return delete e._id,delete e._rev,e.id=s.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}static getModelName(){return"Dictionary"}static getIdPrefix(){return"dictionary"}}Re.defaults({id:"",modelName:Re.getModelName(),modelVersion:r.MODEL_VERSION,data:JSON.stringify({})});let Me={};Me.createItem=function(e,t){if(!e)throw'parameter "word" must be specified.';let n=parseInt(t),i={w:e,f:0,t:{}};var a;return(a=n)==parseInt(a)&&(i.r=n),i};var Pe=Me;var Ge=function(){let e=this,t={},n=null,i=null;function a(e){if(!e)return[];let n=[];return t[e]&&n.push(t[e]),t[e.toLowerCase()]&&-1===n.indexOf(t[e.toLowerCase()])&&n.push(t[e.toLowerCase()]),t[e.toUpperCase()]&&-1===n.indexOf(t[e.toUpperCase()])&&n.push(t[e.toUpperCase()]),t[s(e)]&&-1===n.indexOf(t[s(e)])&&n.push(t[s(e)]),n}function r(e){let t=a(e);return t.length>0?t[0]:null}function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}e.load=function(e){let n=JSON.parse(e);Object.keys(n).forEach(e=>{n[e].w=e}),t=n},e.toJSON=function(){let e=JSON.parse(JSON.stringify(t));return Object.keys(e).forEach(t=>{delete e[t].w}),JSON.stringify(e)},e.addWord=function(e,n){e&&(t[e]||(t[e]=Pe.createItem(e,n)))},e.addWords=function(t){if(!(t instanceof Array)||0===t.length)throw"words to add must be an array with at least one element.";t.forEach(t=>{e.addWord(t)})},e.deleteWord=function(e,n){Object.keys(t).forEach(i=>{if(n?e.toUpperCase()===i.toUpperCase():e===i)delete t[i];else{let a=t[i];Object.keys(a.t).forEach(t=>{(n?e.toUpperCase()===t.toUpperCase():e===t)&&delete a.t[t]})}})},e.contains=function(e,n){return n?!!t[e]:!!r(e)},e.predictCompleteWord=function(a,r){a=a||"",r=r||{};let s=[];if(Object.keys(t).forEach(e=>{0===e.toLowerCase().indexOf(a.toLowerCase())&&s.push(t[e])}),0===s.length&&a.length>1){let t=null;return t=n&&i&&0===a.indexOf(n)?i:e.predictCompleteWord(a.substring(0,a.length-1),r),t.forEach(e=>{e.fuzzyMatch=!0}),t}return n=a,i=s.map(e=>({word:e.w,frequency:e.f,rank:e.r})),i},e.predictNextWord=function(e,t){let n=a(e),i=[];return n.forEach(e=>{Object.keys(e.t).forEach(t=>{i.push({word:t,frequency:e.t[t]})})}),i},e.learn=function(t,n,i){if(!t||!e.contains(t)&&!i)return;i&&t&&!e.contains(t)&&e.addWord(t),i&&n&&!e.contains(n)&&e.addWord(n);let a=r(n),s=r(t);s.f++,a&&a.t&&(a.t[s.w]?a.t[s.w]++:a.t[s.w]=1)},e.getWords=function(){return Object.keys(t)}};function Ue(){this.DEFAULT_DICTIONARY_KEY="DEFAULT_DICTIONARY_KEY";let e=this,t={},n=null;function i(n,i,a){let r=[];(i=i||{}).maxPredictions=i.maxPredictions||i.maxPredicitons||10,i.applyToInput=i.applyToInput||!1,Object.keys(t).forEach(e=>{let s=t[e];if(!s.disabled){let e="PREDICT_METHOD_NEXT_WORD"===a?s.predictNextWord:"PREDICT_METHOD_COMPLETE_WORD"===a?s.predictCompleteWord:null;e=e||(Fe(n)?s.predictNextWord:s.predictCompleteWord),r=r.concat(e($e(n),i))}}),r.sort((e,t)=>e.fuzzyMatch!==t.fuzzyMatch?e.fuzzyMatch?1:-1:e.frequency!==t.frequency?e.frequency{e.loadDictionary(t.json,t.key)})},this.dictionaryToJSON=function(n){n=n||e.DEFAULT_DICTIONARY_KEY;let i=t[n];return i?i.toJSON():null},this.dictionariesToJSON=function(){let e=[];return Object.keys(t).forEach(n=>{e.push({key:n,json:t[n].toJSON()})}),JSON.stringify(e)},this.useDictionary=function(e){if(!e)throw"dictionaryKey must be specified.";Object.keys(t).forEach(n=>{t[n].disabled=e!==n})},this.useDictionaries=function(n){if(!(n instanceof Array))throw"dictionaryKeys must be specified and of type Array.";Object.keys(t).forEach(i=>{t[i].disabled=-1===n.indexOf(i)&&i!==e.DEFAULT_DICTIONARY_KEY})},this.useAllDictionaries=function(){Object.keys(t).forEach(e=>{t[e].disabled=!1})},this.addDictionary=function(n,i){if(!n)throw"dictionaryKey must be specified.";if(t[n])throw"dictionary already existing.";t[n]=new Ge,i&&i instanceof Array&&i.forEach(t=>{e.addWord(t,n)})},this.addWord=function(n,i){if(i=i||e.DEFAULT_DICTIONARY_KEY,!n)throw"element to add not specified.";t[i]||e.addDictionary(i);let a=t[i];"string"==typeof n?a.addWord(Ve(n)):n.word&&"string"==typeof n.word&&a.addWord(Ve(n.word),n.rank)},this.addWords=function(t,n){if(!(t instanceof Array))throw"elements to add must be instance of array specified.";t.forEach(t=>{e.addWord(t,n)})},this.delete=function(n,i){let a=$e(n);i=i||{},a&&(i.dictionaryKey?t[i.dictionaryKey]&&t[i.dictionaryKey].deleteWord(a,i.ignoreCase):e.getDictionaryKeys().forEach(e=>{t[e].deleteWord(a,i.ignoreCase)}))},this.parseWords=function(t,n){let i=(n=n||{}).elementSeparator||";",a=n.rankSeparator||" ",r=n.wordPosition||0,s=n.wordPosition2,o=n.rankPosition,l=n.addToDictionary||e.DEFAULT_DICTIONARY_KEY;t.split(i).forEach(t=>{let n=t.split(a),i=parseInt(n[o]);if(void 0!==r&&void 0!==s){let t=n[r],i=n[s];t&&i&&e.learn(i,t,l)}else if(n[r]){let t={word:n[r].trim()};isNaN(i)||(t.rank=i),e.addWord(t,l)}})},this.getWords=function(n){let i=[];return n?t[n]&&(i=t[n].getWords()):e.getDictionaryKeys().forEach(e=>{i=i.concat(t[e].getWords())}),i},this.hasWord=function(t,n,i){let a=" "+e.getWords(n).join(" ")+" ";return new RegExp(" "+t+" ",i?"":"i").test(a)},this.predict=function(e,t){return i(e,t)},this.predictCompleteWord=function(e,t){return i(e,t,"PREDICT_METHOD_COMPLETE_WORD")},this.predictNextWord=function(e,t){return i(e,t,"PREDICT_METHOD_NEXT_WORD")},this.applyPrediction=function(t,n,i){let a=(i=i||{}).addToDictionary||(e.isUsingOnlyDefaultDictionary()?e.DEFAULT_DICTIONARY_KEY:null),r=void 0!==i.shouldCompleteLastWord?i.shouldCompleteLastWord:!Fe(t),s=i.dontLearn,o=$e(t),l=$e(t,2),c=r?t.substring(0,t.lastIndexOf(o)):t;return c.length>0&&(!Fe(c)||new RegExp("[\\.\\?!,]").test(c[c.length-1]))&&(c+=" "),s||e.learn(n,r?l:o,a),c+n+" "},this.learn=function(n,i,a){n=Ve(n),i=Ve(i);let r=e.getDictionaryKeys(!0);if(a=1===r.length?r[0]:a,r.length>0&&(!a||!t[a])){let t=0;r.forEach(r=>{let s=0;e.hasWord(n,r)&&(s+=2),e.hasWord(i,r)&&s++,s>0&&s>=t&&(t=s,a=r)})}a=a||e.DEFAULT_DICTIONARY_KEY,t[a]||e.addDictionary(a),Object.keys(t).forEach(e=>{let r=t[e];r.disabled||r.learn(n,i,a===e)})},this.learnFromInput=function(t,i){if(Fe(t)){let a=$e(t,2),r=$e(t,3);if(a&&a!==n)return n=a,e.learn(a,r,i),!0}return!1},this.learnFromText=function(e,t){(e=e.replace(/\s\s/g," ")).split(new RegExp("[\\.\\?!]")).forEach(e=>{let n=e.split(" ");for(let e=0;e!t[e].disabled):Object.keys(t)},this.isUsingOnlyDefaultDictionary=function(){let t=e.getDictionaryKeys();return 0===t.length||1===t.length&&t[0]===e.DEFAULT_DICTIONARY_KEY}}function $e(e,t){t=t||1;let n=e.trim().split(new RegExp("[\\s\\.\\?!,]")).filter(e=>!!e);return(n[n.length-t]||"").replace(new RegExp("[\\s\\.\\?!,]","g"),"")}function Fe(e){return new RegExp("[\\s\\.\\?!,]").test(e[e.length-1])}function Ve(e){return(e=e||"").replace(/[^a-z0-9áéíóúñüäöß'`´’]/gim,"")}Ue.instance=function(){return new Ue};var Be=Ue;let Ye={},je=null,He=[],We=[],ze=!1,Ke=[],Je=null;function Xe(){ze&&(ze=!1,Ke.forEach(e=>{let t=We.filter(t=>t.dictionaryKey===e)[0]||new Re({dictionaryKey:e});t.data=je.dictionaryToJSON(e),dt.saveDictionary(t)}))}Ye.predict=function(e,t){if(void 0===e||0===He.length)return;t?(je.useDictionary(t),-1===Ke.indexOf(t)&&Ke.push(t)):(je.useAllDictionaries(),Ke=je.getDictionaryKeys());let n=je.predict(e,{maxPredicitons:He.length});for(let e=0;e{e&&e.type===K.ELEMENT_TYPE_PREDICTION&&He.push(JSON.parse(JSON.stringify(e)))}),He=He.sort((e,t)=>e.y!==t.y?e.yt.id===e)[0];if(t){let e=a()(`#${t.id} .text-container span`).text();je.learn(e),ze=!0}},Ye.getDictionaryKeys=function(){return je.getDictionaryKeys()},Ye.init=function(e){clearInterval(Je),He=e||[],ze=!1,je=Be.instance(),dt.getDictionaries().then(e=>{We=e,e.forEach(e=>{je.loadDictionary(e.data,e.dictionaryKey)}),Je=setInterval(Xe,6e5)})},a()(document).on(r.EVENT_DB_PULL_UPDATED,(e,t,n)=>{n.map(e=>e.modelName).indexOf(Re.getModelName())>-1&&Ye.init(He)});let qe={},Ze={},Qe={},et="";qe.DEFAULT_KEY="DEFAULT_KEY",qe.DEFAULT_KEY2="DEFAULT_KEY2",qe.debounce=function(e,t,n){n=n||qe.DEFAULT_KEY,e||t?(Ze[n]&&clearTimeout(Ze[n]),Ze[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},qe.clearDebounce=function(e){e=e||qe.DEFAULT_KEY,Ze[e]&&clearTimeout(Ze[e])},qe.throttle=function(e,t,n,i){if(!e||!e.apply)return;n=n||500;let a=i||e,r=Qe[a];(!r||(new Date).getTime()-r>n)&&(e.apply(null,t),Qe[a]=(new Date).getTime())},qe.copyToClipboard=function(e){let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";et=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},qe.appendToClipboard=function(e){qe.copyToClipboard(et+e)},qe.getClipboardContent=function(){return navigator.clipboard.readText().then(e=>Promise.resolve(e)).catch(e=>(log.warn("failed to read clipboard."),Promise.resolve(null)))},qe.getElement=function(e,t,n){let i=document.elementsFromPoint(t,n),a=null;return i.forEach(t=>{a=a||function(e,t){for(let n=0;e&&-1===t.indexOf(e)&&n<100;n++)e=e.parentElement;return e}(t,e)}),a},qe.splitInChunks=function(e,t){let n=[];for(let i=0,a=e.length;i"#"+t+t+n+n+i+i).substring(1).match(/.{2}/g).map(e=>parseInt(e,16));return t[0]&&t[1]&&t[2]?t:null},qe.cssRGBToRGB=function(e){if(!e)return null;let t=e.match(/[0-9.]+/gi).map(e=>parseInt(e));return t[0]&&t[1]&&t[2]?t:null};let tt={},nt=null,it=null,at=C.isBrowserLangDE()?"app/dictionaries/default_de.txt":"app/dictionaries/default_en.txt",rt=C.isBrowserLangDE()?"WoerterbuchDeutsch ":"EnglishDictionary";function st(e,t,n){let i=null;return nt=Promise.resolve().then(()=>{let e=[];return ue.shouldResetDatabase()&&e.push(Ae.resetDatabase(t)),Promise.all(e)}).then(()=>Ae.all(h.getIdPrefix())).then(t=>{let a=[];return t&&0!==t.length?(i=t instanceof Array?t[0]:t,ae.setEncryptionProperties(e,i.id,n),t.length&&t.length>1&&a.push(function(e,t){log.warn("fixing duplicated metadata...");let n=null;return Ae.all().then(i=>{let a=[];n=t.map(e=>e.id);let r=[];i.forEach(t=>{a.push(function t(n,i){let a=JSON.parse(JSON.stringify(i));try{return ae.decryptObjects(n)}catch(i){if(0===a.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return ae.setEncryptionProperties(e,a.pop()),t(n,a)}}(t,n))});let s=n.pop();return ae.setEncryptionProperties(e,s),log.warn("keeiping metadata: "+s),log.warn("decrypted docs:"),log.warn(a),log.warn("re-encrypting and saving them..."),a.forEach(e=>{let t=ot(e.modelName,e);r.push(t)}),Promise.all(r)}).then(()=>{let e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach(t=>{e.push(Ae.remove(t))}),Promise.all(e)}).then(()=>(log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()))}(e,t))):(i=new h,ae.setEncryptionProperties(e,i.id,n),a.push(ot(h.getIdPrefix(),i))),Promise.all(a)}).then(()=>Ae.all(Re.getIdPrefix()).then(e=>e?Promise.resolve():new Promise(e=>{log.info("importing dictionary: "+at),a.a.get(at).success(t=>{log.debug("success getting default dictionary."),e(t)}).fail(t=>{log.debug("error getting default dictionary."),e()})})).then(e=>{if(!e)return Promise.resolve();let t=new Re({dictionaryKey:rt,data:e,isDefault:!0});return ot(Re.getIdPrefix(),t)})),nt.then(()=>{it=null,Ye.init(),a()(document).trigger(r.EVENT_USER_CHANGED)}),nt}function ot(e,t){return new Promise((n,i)=>{let a=be.convertLiveToDatabaseObjects(t);Ae.save(e,a).then(()=>{log.debug("saved "+e+", id: "+t.id),n()}).catch((function(e){i(e)}))})}tt.getObject=function(e,t,n){return new Promise((i,a)=>{nt.then(()=>{if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),a();Ae.all(e.getIdPrefix(),t).then(t=>{let a={objectType:e,onlyShortVersion:n},r=be.convertDatabaseToLiveObjects(t,a),s=function(e){if(!e)return null;if(e.modelVersion)return e.modelVersion;if(e[0]&&e[0].modelVersion)return e[0].modelVersion;return null}(r);s&&it!==s&&(it=s,g.setUserModelVersion(Ae.getOpenedDatabaseName(),s)),i(r)}).catch(e=>{a(e)})})})},tt.getSingleObject=function(e,t,n){return tt.getObject(e,t,n).then(e=>Promise.resolve(e instanceof Array?e[0]:e))},tt.saveObject=function(e,t,n){return nt.then(()=>t&&e&&e.getModelName?t.isShortVersion?(log.warn("short versions of objects cannot be saved/updated! aborting."),Promise.reject()):(log.debug("saving "+e.getModelName()+"..."),tt.getObject(e,t.id)):(log.error('did not specify needed parameter "objectType"!'),Promise.reject())).then(i=>{if(i){log.debug(e.getModelName()+" already existing, doing update. id: "+i.id);let n=new e(t,i),a=JSON.parse(JSON.stringify(n));return a._id=i._id,a._rev=i._rev,ot(e.getIdPrefix(),a)}if(n)return log.warn("no existing "+e.getModelName()+" found to update, aborting."),Promise.reject();{let n=JSON.parse(JSON.stringify(t));return n._id=n.id,ot(e.getIdPrefix(),n)}})},tt.bulkSave=function(e){if(!e||0===e.length)return Promise.resolve();if(e[0].isShortVersion)return log.warn("not saving short version!"),Promise.resolve();let t=e.reduce((e,t)=>e+(t.gridElements?t.gridElements.length:0),0),n=Math.floor(t/e.length),i=[];if(be.convertLiveToDatabaseObjects(e).forEach(e=>{e._id=e.id}),t>1e3){let t=Math.floor(1e3/n);i=qe.splitInChunks(e,t)}else i=[e];return function e(t){let n=JSON.parse(JSON.stringify(t.shift()));return Ae.bulkDocs(n).then(()=>t.length>0?e(t):Promise.resolve())}(i)},tt.bulkDelete=function(e){return e.forEach(e=>{e._deleted=!0,e._id=e.id}),Ae.bulkDocs(JSON.parse(JSON.stringify(e)))},tt.removeObject=function(e){return Ae.remove(e)},tt.initForUser=function(e,t,n,i){let a=n&&!i||!1,r=Ae.getOpenedDatabaseName()===e,s=-1!==g.getSavedLocalUsers().indexOf(e);return r&&a===Ae.isSyncEnabled()?Promise.resolve():Ae.initDatabase(e,n,i).then(()=>r?Promise.resolve():st(t,e,s))},tt.registerForUser=function(e,t,n,i){let a=n&&!i,r=-1!==g.getSavedLocalUsers().indexOf(e);return Ae.getOpenedDatabaseName()===e&&a===Ae.isSyncEnabled()?Promise.resolve():Ae.createDatabase(e,n,i).then(()=>st(t,e,r))},tt.deleteDatabase=function(e){if(e)return Ae.deleteDatabase(e)},tt.closeCurrentDatabase=function(){return Ae.closeCurrentDatabase()},tt.getCurrentUsedDatabase=function(){return Ae.getOpenedDatabaseName()};let lt={};lt.gridDataToOBF=function(e){},lt.gridSetToOBZ=function(e){},lt.OBFToGridData=function(e,t){let n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():C.getBrowserLang(),a=new de({obfId:e.id,label:C.getTranslationObject(e.name,i),locale:i,rowCount:e.grid.rows,minColumnCount:e.grid.columns,gridElements:[]});return e.buttons.forEach(r=>{if(!r.hidden){let s=function(e,t){let n=t.grid.order,i=null;return n.forEach((t,n)=>{t.forEach((t,a)=>{t===e&&(i={x:a,y:n})})}),i}(r.id,e),o=new K({width:1,height:1,label:C.getTranslationObject(r.label,i),x:s.x,y:s.y,backgroundColor:r.background_color});o=function(e,t,n,i){t.vocalization&&(e.actions=e.actions.filter(e=>e.modelName!==F.getModelName()),e.actions.push(new V({speakText:t.vocalization,speakLanguage:n.locale})));if(t.load_board&&t.load_board.path){let n=function(e,t){if(!t)return null;let n=t["manifest.json"].paths.boards,i=null;return Object.keys(n).forEach(t=>{n[t]===e&&(i=t)}),i}(t.load_board.path,i);n&&e.actions.push(new x({toGridId:n}))}return e}(o,r,e,t),o.actions.filter(e=>e.modelName===F.getModelName()).forEach(t=>{t.speakLanguage=e.locale}),n.push(function(e,t,n){let i=t.images.filter(t=>t.id===e)[0],a=null,r=[];if(!i)return Promise.resolve(null);if(i.data)a=i.data;else if(i.path){let e=i.path.substring(i.path.lastIndexOf(".")),t=i.content_type||"image/png";t=".svg"===e?"image/svg+xml":t;let r=`data:${t};base64,`,s=n[i.path];a=r+s}else i.url&&r.push(M.urlToBase64(i.url).then(e=>(a=e,Promise.resolve())));return Promise.all(r).then(()=>a?Promise.resolve(new U({data:a})):(log.info("failed to import image: "+e),Promise.resolve(null)))}(r.image_id,e,t).then(e=>(o.image=e,Promise.resolve()))),a.gridElements.push(o)}}),Promise.all(n).then(()=>Promise.resolve(a))},lt.OBZToGridSet=function(e){let t=[],n=[];return Object.keys(e).forEach(i=>{-1!==i.indexOf(".obf")&&t.push(lt.OBFToGridData(e[i],e).then(e=>(n.push(e),Promise.resolve())))}),Promise.all(t).then(()=>(n.forEach(e=>{e.gridElements.forEach(e=>{e.actions.forEach(t=>{if(t.modelName===x.getModelName()){let i=t.toGridId,a=n.reduce((e,t)=>e||(t.obfId===i?t.id:null),null);a?t.toGridId=a:e.actions=e.actions.filter(e=>e.id!==t.id)}})})}),n.forEach(e=>{delete e.obfId}),Promise.resolve(n)))};let ct={readZip:function(e,t){let i={};return new Promise(a=>{Promise.all([n.e(3),n.e(1)]).then(n.t.bind(null,619,7)).then(n=>{n.loadAsync(e).then(e=>{let n=[];Object.keys(e.files).forEach(a=>{let r=e.files[a];n.push(r.async("base64").then(e=>{try{i[a]=t?JSON.parse(atob(e)):e}catch(t){i[a]=e}}))}),Promise.all(n).then(()=>{a(i)})})})})}},dt={},ut="app/examples/default.grd.json";ue.getDefaultGridsetName()&&(ut="app/examples/"+ue.getDefaultGridsetName()),dt.getGrid=async function(e,t){return e?tt.getSingleObject(de,e,t).then(e=>Promise.resolve(e?new de(e):null)):Promise.resolve(null)},dt.getGlobalGrid=function(e){return dt.getMetadata().then(t=>t.globalGridId&&(e||t.globalGridActive)?dt.getGrid(t.globalGridId).then(e=>Promise.resolve(e)):Promise.resolve(null))},dt.getGrids=function(e,t){return new Promise(n=>{tt.getObject(de,null,!e).then(e=>{if(!e)return void n([]);let i=e instanceof Array?e:[e];t?dt.getMetadata().then(e=>{n(i.filter(t=>t.id!==e.globalGridId))}):n(i)})})},dt.saveGrid=function(e){return e.gridElements=q.sortGridElements(e.gridElements),tt.saveObject(de,e)},dt.saveGrids=function(e){return e.forEach(e=>{e.gridElements=q.sortGridElements(e.gridElements)}),tt.bulkSave(e)},dt.updateGrid=function(e,t){return t.id=e,t.gridElements=q.sortGridElements(t.gridElements),tt.saveObject(de,t,!0)},dt.deleteGrid=function(e){return tt.removeObject(e)},dt.deleteAllGrids=function(){return dt.getGrids().then(e=>e&&0!==e.length?tt.bulkDelete(e):Promise.resolve()).then(()=>{return e="",dt.getMetadata().then(t=>(t.globalGridId=e,t.globalGridActive=!!e,dt.saveMetadata(t)));var e})},dt.importDefaultGridset=function(){return Promise.resolve().then(()=>a.a.get(ut)).then(e=>{if(!e)return Promise.resolve();log.info("importing default grid set "+ut);try{e=JSON.parse(e)}catch(e){}return dt.importData(e,!1,!0)})},dt.saveAdditionalGridFiles=function(e,t){return new Promise(n=>{t||n(),dt.getGrid(e).then(e=>{t.forEach(t=>{let n=(e=JSON.parse(JSON.stringify(e))).additionalFiles.findIndex(e=>e.fileName===t.fileName);-1!==n?e.additionalFiles[n]=t:e.additionalFiles.push(t)}),dt.saveGrid(e).then(()=>{n()})})})},dt.getGridElement=function(e,t){return new Promise(n=>{dt.getGrid(e).then(e=>{let i=e.gridElements.filter(e=>e.id===t)[0];i?n(i):dt.getGlobalGrid().then(e=>{n(e.gridElements.filter(e=>e.id===t)[0])})})})},dt.getGridsAttribute=function(e){return new Promise(t=>{dt.getGrids().then(n=>{let i={};n.forEach(t=>{i[t.id]=t[e]}),t(i)})})},dt.addGridElements=function(e,t){return new Promise(n=>{dt.getGrid(e).then(i=>{(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),dt.updateGrid(e,i).then(()=>{n()})})})},dt.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise(n=>{dt.getMetadata().then(i=>{if(i){let n=i instanceof Array?i[0].id:i.id;e.id=n,g.saveLocalMetadata(e),g.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():tt.saveObject(h,e).then(()=>{n()})})})},dt.getMetadata=function(){return new Promise(e=>{tt.getObject(h).then(t=>{let n=null;if(n=t?t instanceof Array?t[0]:t:new h,!g.shouldSyncNavigation()){let e=g.getLocalMetadata();e&&(n.locked=e.locked,n.fullscreen=e.fullscreen,n.lastOpenedGridId=e.lastOpenedGridId)}e(new h(n))})})},dt.saveImage=function(e){return function(e,t){let n=[];return new Promise((i,a)=>{dt.getMetadata().then(r=>{if(!r||!r.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void a();let o=null;r.hashCodes[e.getModelName()]?o=r.hashCodes[e.getModelName()]:(o={},r.hashCodes[e.getModelName()]=o);let l=s.hashCode(t);o[l]?(log.debug("saveHashedItemInternal: hash found, not saving new element"),t.id=o[l]):(log.debug("saveHashedItemInternal: hash not found, saving new element"),o[l]=t.id,n.push(tt.saveObject(e,t)),n.push(tt.saveObject(h,r))),Promise.all(n).then(()=>{i(t.id)})})})}(U,e)},dt.getImage=function(e){return tt.getObject(U,e)},dt.getDictionary=function(e){return e?tt.getSingleObject(Re,e).then(e=>Promise.resolve(new Re(e))):Promise.resolve(null)},dt.getDictionaries=function(){return new Promise(e=>{tt.getObject(Re).then(t=>{if(!t)return void e([]);let n=t instanceof Array?t.map(e=>new Re(e)):[new Re(t)];e(n)})})},dt.saveDictionary=function(e){return e.isDefault=!1,tt.saveObject(Re,e)},dt.deleteObject=function(e){return tt.removeObject(e)},dt.downloadSingleGrid=function(e){dt.getGrid(e).then(e=>{if(e){let t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});k.a.saveAs(t,C.getTranslation(e.label)+".grd")}})},window.backupPrepareForDefault=!1,dt.downloadBackup=function(){let e={},t=[];t.push(dt.getMetadata().then(t=>(e.metadata=t,Promise.resolve()))),t.push(dt.getDictionaries().then(t=>(t.reduce((e,t)=>e&&t.isDefault,!0)||(e.dictionaries=t),Promise.resolve()))),t.push(dt.getGrids(!0).then(t=>(e.grids=t,Promise.resolve()))),Promise.all(t).then(()=>{backupPrepareForDefault&&(delete e.dictionaries,e.metadata.inputConfig=new p,e.metadata.locked=void 0,e.metadata.fullscreen=void 0,e.metadata.hashCodes={});let t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});k.a.saveAs(t,"my-backup.grd")})},dt.downloadAllGridsSimple=function(){dt.getGrids(!0).then(e=>{e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:Q.removeLongPropertyValues(e)})))})},dt.importGridsFromFile=function(e,t,n){let i=e.name.substring(e.name.length-4),a=!1;return n=n||function(){},new Promise((r,s)=>{let o=new FileReader;o.onload=function(s){let o=s.target.result,l=[];t&&(n(10,C.translate("Deleting grids // Grids werden gelöscht")),l.push(dt.deleteAllGrids())),Promise.all(l).then(()=>{let s=null,l=[];if(n(40,C.translate("Extracting grids from file // Grids werden aus Datei extrahiert")),".grd"===i)s=JSON.parse(o);else if(".obf"===i)l.push(lt.OBFToGridData(JSON.parse(o)).then(e=>(s=e,Promise.resolve())));else if(".obz"===i){let n=ct.readZip(e,!0).then(e=>lt.OBZToGridSet(e)).then(e=>(s=e,t&&(a=!0),Promise.resolve()));l.push(n)}Promise.all(l).then(()=>{n(80,C.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),dt.importData(s,a,t).then(()=>{n(100),r()})})})},o.readAsText(e)})},dt.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();let i=null,a=null,r=null,o=[],l=null;return e instanceof Array?r=be.updateDataModel(e):(i=n?be.updateDataModel(e.dictionaries):null,a=n?be.updateDataModel(e.metadata):null,r=be.updateDataModel(e.grids),i||a||r||!e.id||(r=[be.updateDataModel(e)])),l=a?Promise.resolve(a):dt.getMetadata(),l.then(e=>(r&&o.push(dt.getGrids().then(n=>{let i=n.map(e=>C.getTranslation(e.label)),o=null,l=q.regenerateIDs(r);r=l.grids,a&&(e.lastOpenedGridId=l.idMapping[e.lastOpenedGridId],e.globalGridId=l.idMapping[e.globalGridId]),r.forEach(e=>{let t=C.getTranslation(e.label);e.label[C.getBrowserLang()]=s.getNewName(t,i)});let c=r[0]?r[0].locale:null;if(t){let t=r[0].id;o=q.generateGlobalGrid(t,c),r.unshift(o),e.globalGridId=o.id,e.globalGridActive=!!e.globalGridId}return dt.saveGrids(r).then(()=>dt.saveMetadata(e,!0))})),i&&o.push(dt.getDictionaries().then(e=>tt.bulkDelete(e)).then(()=>(i=i.map(e=>(delete e.id,delete e._id,delete e._rev,new Re(e))),tt.bulkSave(i).then(()=>(Ye.init(),Promise.resolve()))))),Promise.all(o)))},dt.getSyncState=function(){return Ae.getSyncState()},dt.getCurrentUser=function(){return tt.getCurrentUsedDatabase()};let ft={},pt="#asterics-grid-user-documentation",ht="",mt=pt,vt=ht,gt=mt;ft.setHelpLocation=function(e,t){vt=ht,gt=mt,ht=e,mt=t||""},ft.setHelpLocationIndex=function(){ft.setHelpLocation("",pt)},ft.revertToLastLocation=function(){ft.setHelpLocation(vt,gt)},ft.openHelp=function(){let e="https://www.asterics.eu/manuals/asterics-grid/"+(ht?ht+".html"+mt:mt);C.isBrowserLangDE()&&(e="https://translate.google.com/translate?sl=en&tl=de&u="+encodeURI(e)),window.open(e,"_blank")},window.onhelp=function(){return!1},window.addEventListener("keydown",(function(e){112!==(e.keyCode||e.which)&&"F1"!==e.key||(e.preventDefault(),ft.openHelp())}));var _t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"all-grids-view overflow-content box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon"),e._v(" "),e._m(0),e._v(" "),n("button",{staticClass:"spaced hide-mobile small",attrs:{tabindex:"31"},on:{click:function(t){return e.addGrid()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("New Grid // Neues Grid")])]),e._v(" "),n("div",{staticStyle:{display:"none"}},[n("input",{attrs:{type:"file",id:"inputFile",accept:".grd, .obf, .obz"},on:{change:e.importFromFile}}),e._v(" "),n("input",{attrs:{type:"file",id:"inputFileBackup",accept:".grd, .obz"},on:{change:e.importBackupFromFile}})])],1),e._v(" "),n("div",{staticClass:"row content text-content"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showLoading||null===e.grids,expression:"showLoading || grids === null"}],staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin",staticStyle:{position:"relative","margin-top":"30vh",top:"0"}})]),e._v(" "),e.selectedGraphElement?n("div",[n("h1",[e._v(e._s(e.headerDetails))]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("img",{staticStyle:{height:"150px","max-width":"100%",border:"1px solid lightgray"},attrs:{src:e.selectedGraphElement.grid.thumbnail?e.selectedGraphElement.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"five columns",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticStyle:{display:"block"},attrs:{for:"gridName","data-i18n":""}},[e._v("Name of grid // Grid-Name")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newLabel[e.currentLanguage],expression:"newLabel[currentLanguage]"}],staticStyle:{width:"77%"},attrs:{id:"gridName",type:"text",maxlength:"25"},domProps:{value:e.newLabel[e.currentLanguage]},on:{input:function(t){t.target.composing||e.$set(e.newLabel,e.currentLanguage,t.target.value)}}}),e._v(" "),n("button",{staticStyle:{width:"17%",padding:"0 1%"},attrs:{disabled:e.isLabelDuplicate(e.newLabel[e.currentLanguage]),title:e.i18nService.translate("Save name // Name speichern")},on:{click:e.saveGridLabel}},[n("i",{staticClass:"fas fa-check"})])])]),e._v(" "),e._m(1),e._v(" "),n("div",{staticClass:"action-buttons",attrs:{id:"actionGroup"}},[n("div",{staticStyle:{display:"flex"}},[n("button",{on:{click:function(t){return e.show(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Show // Öffnen")])]),e._v(" "),n("button",{on:{click:function(t){return e.edit(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(t){return e.clone(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.deleteGrid(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToFile(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"fas fa-file-export"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Export // Exportieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToPdf(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-file-pdf"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Save as PDF // Als PDF speichern")])])])])]):e._e(),e._v(" "),n("h1",{attrs:{"data-i18n":""}},[e._v("Grid list // Grid-Liste")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.graphList.length>0,expression:"graphList.length > 0"}],staticClass:"row",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticClass:"three columns",attrs:{for:"selectMode","data-i18n":""}},[e._v("Grids to show // Anzuzeigende Grids")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectValue,expression:"selectValue"}],staticClass:"four columns",attrs:{id:"selectMode"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectValue=t.target.multiple?n:n[0]},e.reinitContextMenu]}},[e.selectedGraphElement?n("option",{domProps:{value:e.selectValues.CONNECTED_GRIDS}},[e._v(e._s(e.connectedGridsOptionLabel))]):e._e(),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.NOT_REACHABLE_GRIDS}},[e._v("Not reachable grids // Nicht erreichbare Grids")]),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.ALL_GRIDS}},[e._v("All grids // Alle Grids")])]),e._v(" "),n("span",{staticClass:"three columns"},[e._v(e._s(e.graphElemsToShow.length)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("elements // Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",[e._l(e.graphElemsToShow,(function(t){return n("li",{staticStyle:{display:"inline-block","margin-right":"2em","margin-bottom":"1.5em",position:"relative"}},[n("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"javascript:;"},on:{click:function(n){return e.setSelectedGraphElement(t)}}},[n("div",{staticStyle:{width:"100%",border:"1px solid lightgray"}},[n("div",[e._v(e._s(e._f("extractTranslation")(t.grid.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px","max-width":"100%"},attrs:{src:t.grid.thumbnail?t.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("button",{staticClass:"gridOptions",staticStyle:{position:"absolute",bottom:"3px",right:"0",padding:"0 20px",margin:"0"},attrs:{"data-grid-id":t.grid.id,title:e.i18nService.translate("More // Mehr")}},[n("i",{staticClass:"fas fa-ellipsis-v"})])])})),e._v(" "),n("li",{directives:[{name:"show",rawName:"v-show",value:0===e.graphElemsToShow.length,expression:"graphElemsToShow.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("(no grids) // (keine Grids)")])])],2)]),e._v(" "),e.graphList.length>0?n("div",[n("h1",{attrs:{"data-i18n":""}},[e._v("Global grid // Globales Grid")]),e._v(" "),n("p",{attrs:{"data-i18n":""}},[e._v('A global grid is shown within each other grid and can contain elements like e.g. "back" or "home". // Ein globales Grid wird innerhalb jedes anderen Grids angezeigt und kann beispielsweise Elemente wie "Zurück" oder "Zum Start" beinhalten.')]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"globalGridActions","data-i18n":""}},[e._v("Actions for global grid // Aktionen für globales Grid")]),e._v(" "),e.metadata?n("div",{staticClass:"eight columns",attrs:{id:"globalGridActions"}},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.globalGridActive||!e.hasGlobalGrid,expression:"!metadata.globalGridActive || !hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!0)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Activate global Grid // Globales Grid aktivieren")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.globalGridActive&&e.hasGlobalGrid,expression:"metadata.globalGridActive && hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!1)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Deactivate global Grid // Globales Grid deaktivieren")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.edit(e.metadata.globalGridId)}}},[n("i",{staticClass:"fas fa-edit"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Edit global Grid // Globales Grid bearbeiten")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.resetGlobalGrid()}}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Reset global grid to default // Globales Grid zurücksetzen")])])]):e._e()])]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-bottom":"10em"}}),e._v(" "),e.linkModal.show?n("grid-link-modal",{attrs:{"grid-from-prop":e.linkModal.gridFrom,"grid-to-prop":e.linkModal.gridTo},on:{close:function(t){e.linkModal.show=!1},reload:function(t){return e.reload(e.linkModal.gridFrom.id)}}}):e._e(),e._v(" "),e.pdfModal.show?n("export-pdf-modal",{attrs:{"grids-data":e.grids},on:{close:function(t){e.pdfModal.show=!1}}}):e._e()],1)])};_t._withStripped=!0;var bt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return!e.fullHeader||e.show?n(e.tag,{tag:"component"},[n("div",{attrs:{"aria-hidden":"true"}},[e.show?n("div",[n("a",{staticStyle:{margin:"0.2em 1em 0 0.5em",color:"#266697"},attrs:{tabindex:"20",href:"javascript:void(0)"},on:{click:function(t){return e.openSidebar()}}},[n("i",{staticClass:"fas fa-2x fa-bars inline"})]),e._v(" "),n("a",{staticClass:"hide-mobile",attrs:{tabindex:"21",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{attrs:{id:"astericsIcon",src:"app/img/asterics-grid-icon-raw.svg",height:"40",width:"121",alt:"AsTeRICS Grid"}})])])]):e._e(),e._v(" "),n("a",{staticClass:"show-mobile",attrs:{tabindex:"22",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{staticStyle:{margin:"0"},attrs:{id:"astericsIcon",src:"app/img/asterics_icon.png",alt:"AsTeRICS Grid"}})])])])]):e._e()};bt._withStripped=!0;var Et=n(4),yt={},Ct={},wt=null,Tt=!1;function At(e){null!==Ct[e]&&(Ct[e].close(),Ct[e]=null,log.debug("SSE closed."))}function Nt(e){for(var t="",n=0;n{a.a.ajax({type:"PUT",beforeSend:function(e){e.setRequestHeader("Content-Type","text/plain")},url:yt.getRestURL(i)+"runtime/model/components/"+Nt(e)+"/ports/"+Nt(t)+"/data",datatype:"text",crossDomain:!0,data:n,success:function(e,t,n){r(n.responseText,t)},error:function(e,t,n){s(n,e.responseText)}})})},yt.triggerEvent=function(e,t,n){if(e&&t)return new Promise((i,r)=>{a.a.ajax({type:"PUT",url:yt.getRestURL(n)+"runtime/model/components/"+Nt(e)+"/events/"+Nt(t),datatype:"text",crossDomain:!0,success:function(e,t,n){i(n.responseText,t)},error:function(e,t,n){r(n,e.responseText)}})})},yt.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model/components/ids",datatype:"application/json",crossDomain:!0,success:function(e,n,i){t(JSON.parse(i.responseText),n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.uploadModelBase64=function(e,t){return new Promise((n,i)=>{e?a.a.ajax({type:"PUT",url:yt.getRestURL(t)+"runtime/model",contentType:"text/xml",data:window.atob(e),datatype:"text",crossDomain:!0,success:function(e,t,i){n(i.responseText,t)},error:function(e,t,n){i(n,e.responseText)}}):i()})},yt.uploadAndStartModel=function(e,t,n){return new Promise((i,a)=>{yt.getModelName(t).then(a=>{a!==n?yt.uploadModelBase64(e,t).then(()=>{yt.startModel(t).then(()=>{i()})}):yt.startModel(t).then(()=>{i()})})})},yt.downloadDeployedModelBase64=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model",datatype:"text/xml",crossDomain:!0,success:function(e,n,i){t(window.btoa(i.responseText),n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.startModel=function(e){return new Promise((t,n)=>{a.a.ajax({type:"PUT",url:yt.getRestURL(e)+"runtime/model/state/start",datatype:"text",crossDomain:!0,success:function(e,n,i){t(i.responseText,n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getModelName=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model/name",datatype:"text",crossDomain:!0,success:function(e,n,i){var a=i.responseText;-1!=(a=(a=a.substring(a.lastIndexOf("\\")+1)).substring(a.lastIndexOf("/")+1)).indexOf(".acs")&&(a=a.substring(0,a.indexOf(".acs")+4)),t(a,n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"runtime/model/components/ids",datatype:"application/json",crossDomain:!0,success:function(e,n,i){t(JSON.parse(i.responseText),n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getComponentInputPortIds=function(e,t){return new Promise((n,i)=>{e?a.a.ajax({type:"GET",url:yt.getRestURL(t)+"runtime/model/components/"+Nt(e)+"/ports/input/ids",datatype:"application/json",crossDomain:!0,success:function(e,t,i){n(JSON.parse(i.responseText),t)},error:function(e,t,n){i(n,e.responseText)}}):n([])})},yt.getComponentEventPortIds=function(e,t){return new Promise((n,i)=>{e?a.a.ajax({type:"GET",url:yt.getRestURL(t)+"runtime/model/components/"+Nt(e)+"/channels/event/ids",datatype:"application/json",crossDomain:!0,success:function(e,t,i){n(JSON.parse(i.responseText),t)},error:function(e,t,n){i(n,e.responseText)}}):n([])})},yt.getRestURL=function(e){e||(e=window.location.hostname.indexOf("grid.asterics.eu")>-1?"http://127.0.0.1:8081":"http://"+window.location.hostname+":8081"),-1===e.indexOf("http")&&(e="http://"+e);var t=document.createElement("a");return t.href=e,t.pathname="/rest/",t.port||(t.port=8081),t.href},yt.getTypeId=function(e,t){let n=window.atob(t);return a()(n).find('components component[id="'+e+'"]').attr("type_id")},yt.getComponentDescriptorsAsXml=function(e){return new Promise((t,n)=>{a.a.ajax({type:"GET",url:yt.getRestURL(e)+"storage/components/descriptors/xml",datatype:"text/xml",crossDomain:!0,success:function(e,n,i){t(e,n)},error:function(e,t,i){n(i,e.responseText)}})})},yt.getPossibleEvents=function(e,t,n){return new Promise(i=>{yt.getComponentDescriptorsAsXml(n).then(n=>{let r=yt.getTypeId(e,t),s=a()(n).find('componentType[id="'+r+'"] eventListenerPort').map((function(){return this.id})).get();i(s)})})},yt.subscribeEvents=function(e,t,n){if("undefined"==typeof EventSource)return void log.warn("SSE not supported by browser");let i=yt.getRestURL(e);Ct[i]||(Ct[i]=new EventSource(i+"runtime/model/channels/event/listener"),Ct[i].onopen=function(e){log.debug("SSE opened."),Tt=!0},Ct[i].onerror=function(a){At(i),n&&n(a),Tt&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),wt=setTimeout((function(){wt=null,yt.subscribeEvents(e,t,n)}),3e3))}),Ct[i].addEventListener("event",(function(e){t(e.data,200)}),!1)},yt.unsubscribeEvents=function(e){wt&&clearTimeout(wt),Tt=!1,e?At(e):Object.keys(Ct).forEach(e=>{At(e)})};let St={},It=[],kt={},Ot=0;function Lt(){let e={},t=null,n=null,i=[],a=[],r=[],s=[],o=[],l=[],c=[],d=[],p=[],h=[],m={},v=document.body,g=!1,_={},b=Ot++;function E(e,t){yt.subscribeEvents(e.areURL,n=>{e.eventNames.indexOf(n)>-1&&t()})}function y(t,n){if(!t||!t.keyCode||!n)return;let i=t.keyCode+"",a=m[i]?m[i]:[];return m[i]=a,a.push(function(e,t){return{handler:e,inputEvent:t,lastKeydown:null,lastAction:null,counter:0,timeoutHandler:null}}(n,t)),e}function C(e){(e.clientY<5||e.clientX<5)&&D(i)}function w(e){D(l,[e],!0),n&&t?e.touches[0].clientY>n+100?(log.debug("swipe down."),n=null,D(r)):e.touches[0].clientYt+100?(log.debug("swipe right."),t=null,D(o)):e.touches[0].clientX0&&!e.repeat&&p.forEach(n=>{n(t,e.code,e)});let n=t+"";if(m[n]){if(e.preventDefault(),e.repeat)return;let t=m[n];function i(e){e.lastAction=(new Date).getTime(),e.handler(),O(t)}t=t.sort((e,t)=>e.counter-t.counter||e.inputEvent.repeat-t.inputEvent.repeat),t.forEach(e=>{e.inputEvent.timeout=e.inputEvent.repeat>1?e.inputEvent.timeout||500:e.inputEvent.timeout,L(e.lastKeydown,e.inputEvent.timeout)&&(e.counter=0)}),t.forEach(e=>{let n=e.inputEvent;if(n.repeat&&1!==n.repeat||n.holdDuration||!L(e.lastAction,n.timeout))if(n.repeat>1){if(e.counter++,e.counter===n.repeat){let a=t.filter(t=>t!==e&&t.inputEvent.repeat>n.repeat).length>0?n.timeout:0;e.counter=0,function(e){e.forEach(e=>clearTimeout(e.timeoutHandler))}(t),e.timeoutHandler=setTimeout(()=>{i(e)},a)}}else n.holdDuration&&(e.timeoutHandler=setTimeout(()=>{i(e)},n.holdDuration));else{let n=t.filter(t=>t!==e&&t.inputEvent.holdDuration).length>0,a=t.filter(t=>t!==e&&t.inputEvent.repeat>1),r=a.length>0,s=Math.max.apply(null,a.map(e=>e.counter));if(n)e.doOnKeyup=()=>{i(e)};else if(r&&s<1){let t=Math.max(...a.map(e=>e.inputEvent.timeout));e.timeoutHandler=setTimeout(()=>{i(e)},t+10)}else r||i(e)}e.lastKeydown=(new Date).getTime()})}}function S(e){if(e.repeat)return;let t=(e.which||e.keyCode)+"";if(m[t]){let e=m[t];e.forEach(t=>{t.doOnKeyup&&(t.doOnKeyup(),O(e)),t.inputEvent.holdDuration&&k(t)})}}function I(){document.fullscreenElement||D(h)}function k(e){clearTimeout(e.timeoutHandler),e.timeoutHandler=null,e.doOnKeyup=null,e.counter=0}function O(e){e.forEach(e=>k(e))}function L(e,t){return!e||!t||(new Date).getTime()-e>t}function x(t,n){return t&&n.push(t),e}function D(e,t,n){e.forEach(e=>{e.apply?n?e.apply(null,t):qe.throttle(()=>{e.apply(null,t)}):log.warn("handler seems to be not a function!")})}return e.startListening=function(){g||(g=!0,Object.keys(_).forEach(e=>{let t=_[e];E(t.inputEvent,t.fn)}),document.addEventListener("mousemove",C),document.addEventListener("keydown",N),document.addEventListener("keyup",S),document.addEventListener("fullscreenchange",I),v.addEventListener("touchmove",w,{passive:!1}),v.addEventListener("touchstart",A),v.addEventListener("touchend",T))},e.stopListening=function(){g=!1,Object.keys(_).forEach(e=>{let t=_[e];yt.unsubscribeEvents(t.areURL)}),document.removeEventListener("mousemove",C),document.removeEventListener("keydown",N),document.removeEventListener("keyup",S),document.removeEventListener("fullscreenchange",I),v.removeEventListener("touchmove",w),v.removeEventListener("touchstart",A),v.removeEventListener("touchend",T)},e.destroy=function(){e.stopListening(),It=It.filter(t=>t.getID()!==e.getID())},e.isListening=function(){return g},e.getID=function(){return b},e.onMouseUpperOrLeftBorder=function(e){return x(e,i)},e.onSwipedDown=function(e){return x(e,r)},e.onSwipedUp=function(e){return x(e,a)},e.onSwipedRight=function(e){return x(e,o)},e.onSwipedLeft=function(e){return x(e,s)},e.onEscape=function(e){return y(new u({keyCode:27}),e)},e.onAnyKey=function(e){return x(e,p)},e.onTouchMove=function(e){return x(e,l)},e.onTouchStart=function(e){return x(e,c)},e.onTouchEnd=function(e){return x(e,d)},e.onExitFullscreen=function(e){return x(e,h)},e.off=function(e){let t=t=>t!==e;i=i.filter(t),a=a.filter(t),r=r.filter(t),s=s.filter(t),o=o.filter(t),l=l.filter(t),c=c.filter(t),d=d.filter(t),p=p.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case u.getModelName():return y(e,t);case f.getModelName():_[e.id]={inputEvent:e,fn:t},g&&E(e,t)}},e}St.instance=function(){let e=new Lt;return It.push(e),e},St.pauseAll=function(){It.forEach(e=>{kt[e.getID()]=e.isListening(),e.stopListening()})},St.resumeAll=function(){It.forEach(e=>{kt[e.getID()]&&e.startListening()})},St.global=St.instance();var xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.tooltipHTML,expression:"tooltipHTML"}],staticStyle:{display:"flex"},attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),e.tooltipOptions.faIcon?n("i",{class:e.tooltipOptions.faIcon}):e._e(),e._v(" "),n("div",{staticStyle:{"padding-left":"0.5em"}},[n("span",{domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.tooltipOptions.actionLinkFn?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e(),e._v(" "),e.tooltipOptions.actionLinkUrl?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:e.tooltipOptions.actionLinkUrl,target:"_blank"}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e()]),e._v(" "),n("button",{staticStyle:{position:"absolute",top:"0",right:"10px",padding:"0 10px"},on:{click:function(t){e.tooltipHTML=""}}},[e._v("X")])])};xt._withStripped=!0;let Dt=null,Rt={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null,faIcon:null,msgType:null};var Mt={props:["fullHeader"],data:()=>({tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:Rt,currentToolTipID:null}),methods:{setTooltip:function(e,t){let n=this;switch(n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(Rt)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout(()=>{n.clearTooltip()},n.tooltipOptions.timeout)),n.tooltipOptions.msgType){case"warn":n.tooltipOptions.faIcon="fas fa-exclamation-triangle fa-2x";break;case"info":n.tooltipOptions.faIcon="fas fa-info-circle fa-2x"}return this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink,this.currentToolTipID=(new Date).getTime(),this.currentToolTipID},clearTooltip:function(e){if(e&&e!==this.currentToolTipID)return;let t=this;t.tooltipOptions.revertOnClose&&this.tooltipHTML?t.setTooltip(t.lastTooltipHTML,t.lastTooltipOptions):(this.tooltipHTML=null,this.actionLink=null,this.tooltipImageUrl=null),t.lastTooltipOptions={},t.lastTooltipHTML=null},onActionLink(){this.tooltipOptions.actionLinkFn&&this.tooltipOptions.actionLinkFn()}},mounted(){!function(){let e=document.getElementById("notificationBar"),t=document.getElementById("notificationBarImg"),n=JSON.stringify({x:window.innerWidth,y:window.innerHeight}),i=g.get(g.get("WINDOW_SIZE_KEY"));g.save("WINDOW_SIZE_KEY",n),i&&n!==i&&o();let r=g.get("NOTIFICATION_BAR_STYLE_KEY"),s=g.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");r&&(e.setAttribute("style",r),e.style.display="none");s&&t.setAttribute("style",s);function o(){let n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),g.save("NOTIFICATION_BAR_STYLE_KEY",""),g.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}a()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){qe.debounce(()=>{g.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),a()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",g.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){qe.debounce(()=>{g.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),window.addEventListener("resize",()=>{qe.debounce((function(){o()}),300,"RESIZE_RESET_NOTIFICATIONBAR")})}(),Dt=this},beforeDestroy(){}};n(52);function Pt(e,t,n,i,a,r,s,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var Gt=Pt(Mt,xt,[],!1,null,"7bec61b8",null);Gt.options.__file="src/vue-components/components/notificationBar.vue";var Ut=Gt.exports,$t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:function(t){return t.type.indexOf("key")||27===t.keyCode?e.close():null}}},[e.options.closable?n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header","data-i18n":""}},[e._v(e._s(e.options.header))])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"biggerFont"},[e._v(e._s(e.options.text)+" ...")]),e._v(" "),n("div",{staticStyle:{border:"1px solid","border-radius":"3px",width:"100%",height:"50px",margin:"0.5em 0"},attrs:{id:"progressWrapper"}},[n("div",{style:"width: "+e.progressPercentage+"%; height: 100%; background-color: green",attrs:{id:"progressBar"}})]),e._v(" "),n("div",{staticClass:"biggerFont",staticStyle:{"text-align":"right",width:"100%"}},[e._v(e._s(e.progressPercentage)+"%")])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.options.closable?n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])])]):e._e()])])])])])};$t._withStripped=!0;n(3);let Ft={header:"",closable:!1,cancelFn:null,text:""};var Vt={props:[],data:function(){return{progressPercentage:0,options:JSON.parse(JSON.stringify(Ft))}},methods:{setProgress(e,t){this.progressPercentage=Math.min(e,100),Object.keys(this.options).forEach(e=>{t&&void 0!==t[e]&&(this.options[e]=t[e])}),100===this.progressPercentage&&setTimeout(()=>{this.options=JSON.parse(JSON.stringify(Ft)),this.$emit("close")},200)},close(){this.options.closable&&(this.$emit("close"),this.options.cancelFn&&this.options.cancelFn(),this.options=JSON.parse(JSON.stringify(Ft)))}},mounted(){C.initDomI18n()}},Bt=(n(56),Pt(Vt,$t,[],!1,null,"2fce46f7",null));Bt.options.__file="src/vue-components/modals/progressBarModal.vue";var Yt=Bt.exports;let jt={},Ht=null;jt.setViewComponent=function(e,t){Ht&&Ht.$refs.notificationBar.tooltipOptions.closeOnNavigate&&jt.clearTooltip(),Ht.setComponent(e,t)},jt.isSidebarOpen=function(){return Ht.showSidebar},jt.setTooltip=function(e,t){if(Ht)return Ht.$refs.notificationBar.setTooltip(e,t)},jt.setTooltipI18n=function(e,t){let n=C.translate(e);jt.setTooltip(n,t)},jt.clearTooltip=function(){Ht&&Ht.$refs.notificationBar.clearTooltip()},jt.showProgressBar=function(e,t){Ht&&(Ht.showProgressBar=!0,Ht.$refs.progressBar.setProgress(e,t))},jt.init=function(){Ht=new Et.a({el:"#app",components:{NotificationBar:Ut,ProgressBarModal:Yt},data:()=>({component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:tt.getCurrentUsedDatabase(),isLocalUser:g.isSavedLocalUser(tt.getCurrentUsedDatabase()),syncState:dt.getSyncState(),showProgressBar:!1,constants:r,tooltipHTML:null,actionLink:null}),methods:{setComponent(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar(){a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)},openSidebar(){a()(document).trigger(r.EVENT_SIDEBAR_OPEN)},openHelp(){ft.openHelp()},moreNavigation(){a.a.contextMenu("destroy"),a.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":as.toRegister();break;case"CONTEXT_ADD_OFFLINE":as.toAddOffline();break;case"CONTEXT_ABOUT":as.toAbout()}}(e)},items:{CONTEXT_ADD_ONLINE:{name:"Add online user // Online-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ADD_OFFLINE:{name:"Add offline user // Offline-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ABOUT:{name:"About AsTeRICS Grid // Über AsTeRICS Grid",icon:"fas fa-info-circle"}},trigger:"left",zIndex:10}),C.initDomI18n(),a()("#moreNavigation").contextMenu()}},mounted(){let e=this;function t(){!e.showSidebar&&tt.getCurrentUsedDatabase()&&(qe.closeFullscreen(),dt.getMetadata().then(t=>{t.fullscreen&&(t.fullscreen=!1,dt.saveMetadata(t).then(()=>{e.openSidebar()}))}))}C.initDomI18n(),a()(document).on(r.EVENT_SIDEBAR_OPEN,()=>{if(!e.showSidebar)return tt.getCurrentUsedDatabase()?void dt.getMetadata().then(t=>{t.locked||t.fullscreen||(e.showSidebar=!0,this.$nextTick(()=>{a()(document).trigger(r.EVENT_SIDEBAR_OPENED),a()(document).trigger(r.EVENT_GRID_RESIZE)}))}):(e.showSidebar=!0,void this.$nextTick(()=>{a()(document).trigger(r.EVENT_SIDEBAR_OPENED),a()(document).trigger(r.EVENT_GRID_RESIZE)}))}),a()(document).on(r.EVENT_SIDEBAR_CLOSE,()=>{e.showSidebar=!1,this.$nextTick(()=>{a()(document).trigger(r.EVENT_GRID_RESIZE)})}),a()(document).on(r.EVENT_DB_INITIALIZED,()=>{e.currentUser=tt.getCurrentUsedDatabase(),e.isLocalUser=g.isSavedLocalUser(e.currentUser)}),a()(document).on(r.EVENT_DB_CLOSED,()=>{e.currentUser=tt.getCurrentUsedDatabase(),e.isLocalUser=g.isSavedLocalUser(e.currentUser)}),a()(document).on(r.EVENT_DB_SYNC_STATE_CHANGE,(t,n)=>{e.syncState=n}),e.syncState=dt.getSyncState(),window.addEventListener("resize",()=>{qe.debounce((function(){a()(document).trigger(r.EVENT_GRID_RESIZE)}),300,r.EVENT_GRID_RESIZE)}),St.global.onSwipedDown(t).onEscape(t).onExitFullscreen(t),St.global.startListening(),e.openSidebar()},updated(){C.initDomI18n()}})};var Wt=Pt({props:["fullHeader"],data:()=>({show:!jt.isSidebarOpen(),tag:"div"}),methods:{openSidebar(){a()(document).trigger(r.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn(){this.show=!1},onCloseFn(){this.show=!0}},mounted(){a()(document).on(r.EVENT_SIDEBAR_CLOSE,this.onCloseFn),a()(document).on(r.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy(){a()(document).off(r.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},bt,[],!1,null,"4ff1a546",null);Wt.options.__file="src/vue-components/components/headerIcon.vue";var zt=Wt.exports,Kt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("button",{staticClass:"btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:e.toggleOpen}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.isOpen,expression:"!isOpen"}],staticClass:"fas fa-chevron-down arrow"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"fas fa-chevron-up arrow"}),e._v(" "),n(e.componentType,{tag:"component",staticStyle:{"margin-left":"2em",display:"inline-block"},attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.accLabel)))])],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"accordion-content",style:"background-color:"+e.backgroundColor},[e._t("default")],2)])};Kt._withStripped=!0;var Jt={props:["accLabel","accOpen","accLabelType","accBackgroundColor"],data(){return{isOpen:"true"===this.accOpen||!0===this.accOpen,componentType:this.accLabelType||"span",backgroundColor:this.accBackgroundColor||"whitesmoke"}},methods:{toggleOpen(){this.isOpen=!this.isOpen,this.isOpen?this.$emit("open"):this.$emit("close")},open(){this.isOpen=!0}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Xt=(n(59),Pt(Jt,Kt,[],!1,null,"66ff21d8",null));Xt.options.__file="src/vue-components/components/accordion.vue";var qt=Xt.exports,Zt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.gridFrom?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("div",[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridFrom.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridFrom.thumbnail?e.gridFrom.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-right hide-mobile two columns",staticStyle:{"margin-top":"2em"}}),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-down show-mobile two columns",staticStyle:{margin:"0.5em 20%"}}),e._v(" "),n("div",{staticClass:"four columns"},[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridTo.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridTo.thumbnail?e.gridTo.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementName","data-i18n":""}},[e._v("Connect with element // Verknüpfung über Element")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedElement,expression:"selectedElement"}],staticClass:"four columns",attrs:{id:"elementName"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedElement=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("create new Element // neues Element erstellen")]),e._v(" "),e._l(e.gridFrom.gridElements,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e.i18nService.getTranslation(t.label)||e.i18nService.translate("(empty element) // (leeres Element)")))])}))],2)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.selectedElement||!e.i18nService.getTranslation(e.selectedElement.label),expression:"!selectedElement || !i18nService.getTranslation(selectedElement.label)"}],staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementLabel","data-i18n":""}},[e._v("Label of new element // Label des neuen Elements")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newElementLabel[e.i18nService.getBrowserLang()],expression:"newElementLabel[i18nService.getBrowserLang()]"}],staticClass:"four columns",attrs:{type:"text",id:"elementLabel",maxlength:"35"},domProps:{value:e.newElementLabel[e.i18nService.getBrowserLang()]},on:{input:function(t){t.target.composing||e.$set(e.newElementLabel,e.i18nService.getBrowserLang(),t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedElement&&e.selectedElement.actions.filter((function(t){return t.modelName===e.GridActionNavigate.getModelName()})).length>0,expression:"selectedElement && selectedElement.actions.filter(e => e.modelName === GridActionNavigate.getModelName()).length > 0"}],staticClass:"row"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "),e._m(1)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Zt._withStripped=!0;var Qt={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:x,imageUtil:M,i18nService:C}},methods:{save(){this.saveInternal().then(()=>{this.$emit("reload"),this.$emit("close")})},saveInternal(){let e=this.selectedElement;if(!e){let t=new de(this.gridFrom).getNewXYPos();e=new K({label:this.newElementLabel,x:t.x,y:t.y}),this.gridFrom.gridElements.push(e)}return e.label=e.label||this.newElementLabel,e.actions=e.actions.filter(e=>e.modelName!==x.getModelName()),e.actions.push(new x({toGridId:this.gridTo.id})),dt.saveGrid(this.gridFrom)}},mounted(){this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),dt.getGrid(this.gridFromProp.id).then(e=>{this.gridFrom=JSON.parse(JSON.stringify(e)),C.initDomI18n()})},updated(){C.initDomI18n()}},en=(n(61),Pt(Qt,Zt,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Link grids // Grids verknüpfen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{attrs:{"data-i18n":""}},[t("span",[t("b",[this._v("Hint: ")]),this._v(" This element already navigates to another grid. This navigation will be overwritten.")]),this._v(" "),t("span",[t("b",[this._v("Hinweis: ")]),this._v(" Dieses Element navigiert bereits zu einem anderen Grid. Diese Navigation wird überschrieben.")])])}],!1,null,"00ff350d",null));en.options.__file="src/vue-components/modals/gridLinkModal.vue";var tn=en.exports,nn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"selectGrid","data-i18n":""}},[e._v("Select grid // Grid auswählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",attrs:{id:"selectGrid"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]},e.selectedGridChanged]}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("All grids // Alle Grids")]),e._v(" "),e._l(e.graphList,(function(t){return n("option",{domProps:{value:t.grid}},[e._v(e._s(e._f("extractTranslation")(t.grid.label)))])}))],2),e._v(" "),n("div",{staticClass:"four columns"},[e.selectedGrid&&e.selectedGrid.thumbnail?n("img",{attrs:{src:e.selectedGrid.thumbnail.data}}):e._e()])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedGrid&&e.allChildren&&e.allChildren.length>0,expression:"selectedGrid && allChildren && allChildren.length > 0"}],staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.exportConnected,expression:"options.exportConnected"}],attrs:{id:"exportConnected",type:"checkbox"},domProps:{checked:Array.isArray(e.options.exportConnected)?e._i(e.options.exportConnected,null)>-1:e.options.exportConnected},on:{change:function(t){var n=e.options.exportConnected,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"exportConnected",n.concat([null])):r>-1&&e.$set(e.options,"exportConnected",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"exportConnected",a)}}}),e._v(" "),n("label",{attrs:{for:"exportConnected"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Export all child grids // Alle untergeordneten Grids exportieren")]),e._v(" "),n("span",[e._v("("+e._s(e.allChildren?e.allChildren.length:0)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("grids // Grids")]),e._v(")")])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showLinks,expression:"options.showLinks"}],attrs:{id:"showLinks",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showLinks)?e._i(e.options.showLinks,null)>-1:e.options.showLinks},on:{change:function(t){var n=e.options.showLinks,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showLinks",n.concat([null])):r>-1&&e.$set(e.options,"showLinks",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showLinks",a)}}}),e._v(" "),n("label",{attrs:{for:"showLinks","data-i18n":""}},[e._v("Insert links between pages // Verknüpfungen zwischen Seiten anzeigen")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.printBackground,expression:"options.printBackground"}],attrs:{id:"printBackground",type:"checkbox"},domProps:{checked:Array.isArray(e.options.printBackground)?e._i(e.options.printBackground,null)>-1:e.options.printBackground},on:{change:function(t){var n=e.options.printBackground,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"printBackground",n.concat([null])):r>-1&&e.$set(e.options,"printBackground",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"printBackground",a)}}}),e._v(" "),n("label",{attrs:{for:"printBackground","data-i18n":""}},[e._v("Print background color // Hintergrundfarbe drucken")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showRegister,expression:"options.showRegister"}],attrs:{id:"showRegister",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showRegister)?e._i(e.options.showRegister,null)>-1:e.options.showRegister},on:{change:function(t){var n=e.options.showRegister,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showRegister",n.concat([null])):r>-1&&e.$set(e.options,"showRegister",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showRegister",a)}}}),e._v(" "),n("label",{attrs:{for:"showRegister","data-i18n":""}},[e._v("Print index at side edge // Griffregister am Seitenrand drucken")])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download PDF // PDF herunterladen")])])])])])])])])};nn._withStripped=!0;let an={},rn=null,sn=5,on=8,ln=3,cn=1,dn=1,un=.8;function fn(e,t,n){let i=[];t=new de(t);let a=n.showRegister&&n.pages>1?10:0,r=!1!==n.showFooter?on:0,s=(297-2*sn)/t.getWidth(),o=(210-2*sn-r-a)/t.getHeight();if(r>0){let i=210-sn-a,s=.4*r/.352778;e.setTextColor(0),e.setFontSize(s);let o=C.translate("Printed by AsTeRICS Grid, https://grid.asterics.eu // Gedruckt mit AsTeRICS Grid, https://grid.asterics.eu"),l=C.getTranslation(t.label),c=n.idParentsMap[t.id][0];if(n.showLinks&&c){l=JSON.stringify(n.idParentsMap[t.id].slice(0,5))+" => "+l;let a=e.getTextWidth(l);e.link(148.5-a/2,i-.4*r,a,.4*r,{pageNumber:c})}let d=(n.idPageMap[t.id]||1)+" / "+(Object.keys(n.idPageMap).length||1);e.text(o,sn+cn,i,{baseline:"bottom",align:"left"}),e.text(l,148.5,i,{baseline:"bottom",align:"center"}),e.text(d,297-sn-cn,i,{baseline:"bottom",align:"right"})}if(a>0){let t=30,i=1,r=n.pages;n.pages>t&&(i=Math.ceil(n.pages/t),r=Math.ceil(n.pages/i)),e.setFillColor(255,255,255),e.setDrawColor(0),e.roundedRect(0,210-a,297,a,0,0),e.setFontSize(13);let s=297/r;for(let t=0;t{let a=s*t.width-2*cn,r=o*t.height-2*cn,l=sn+s*t.x+cn,c=sn+o*t.y+cn;if(e.setDrawColor(0),n.printBackground){let n=qe.getRGB(t.backgroundColor);n=n||[173,216,230],e.setFillColor(n[0],n[1],n[2])}else e.setFillColor(255,255,255);e.roundedRect(l,c,a,r,3,3,"FD"),C.getTranslation(t.label)&&function(e,t,n,i,a,r){let s=C.getTranslation(t.label),o=t.image&&t.image.data,l=n-2*ln,c=function(e,t,n,i,a,r){let s=n,o=n/2;for(let n=0;n<10;n++){e.setFontSize(s);let n=e.getTextDimensions(t);if(r&&-1!==t.indexOf(" ")){let e=Math.floor(a/n.h),t=Math.ceil(n.w/i);n.w/e>.5*i||t>e?s-=o:s+=o}else n.w>i?s-=o:s+=o;o/=2}return Math.floor(Math.min(s,n))}(e,s,(o?i*(1-un):i/2)/.352778*.8,l,i-2*ln,!o);e.setTextColor(0,0,0),e.setFontSize(c);let d=e.getTextDimensions(s),u=Math.ceil(d.w/l),f=o?i-2*cn:(i-d.h*u)/2;e.text(s,a+n/2,r+f,{baseline:o?"bottom":"top",align:"center",maxWidth:l})}(e,t,a,r,l,c),i.push(function(e,t,n,i,a,r){if(!t||!t.image||!t.image.data||0!==t.image.data.indexOf("data:"))return Promise.resolve();return t.image.getDimensions().then(async s=>{let o=t.image.getImageType(),l=C.getTranslation(t.label)?un:1,c=n-2*dn,d=(i-2*dn)*l,u=c/d,f=c,p=d,h=0,m=0;s.ratio>=u?(isNaN(s.ratio)||(p=f/s.ratio),m=(d-p)/2):(isNaN(s.ratio)||(f=p*s.ratio),h=(c-f)/2);let v=a+dn+h,g=r+dn+m;if(o===U.IMAGE_TYPES.PNG)_("PNG");else if(o===U.IMAGE_TYPES.JPEG)_("JPEG");else if(o===U.IMAGE_TYPES.SVG){let n=f/.084666667,i=await M.base64SvgToBase64Png(t.image.data,n);e.addImage(i,o,v,g,f,p)}function _(n){e.addImage(t.image.data,n,v,g,f,p)}return Promise.resolve()})}(e,t,a,r,l,c).then(()=>{if(n.showLinks&&n.idPageMap[t.getNavigateGridId()]){let i=n.idPageMap[t.getNavigateGridId()],s=Math.max(a/10,7),o=a-s-1,d=1;if(e.setDrawColor(255),e.setFillColor(90,113,122),e.roundedRect(l+o,c+d,s,s,1,1,"FD"),e.link(l,c,a,r,{pageNumber:i}),i){let t=.6*s/.352778;e.setTextColor(255,255,255),e.setFontSize(t),e.text(i+"",l+o+s/2,c+d+s/2,{baseline:"middle",align:"center",maxWidth:s})}}return Promise.resolve()}))}),Promise.all(i)}an.initPrintHandlers=function(){window.addEventListener("beforeprint",()=>{rn&&($("#grid-container").width("27.7cm"),$("#grid-container").height("19cm"),rn.autosize())}),window.addEventListener("afterprint",()=>{rn&&($("#grid-container").width(""),$("#grid-container").height(""),rn.autosize())})},an.setGridInstance=function(e){rn=e},an.gridsToPdf=async function(e,t){n.e(5).then(n.bind(null,620)).then(async n=>{(t=t||{}).idPageMap={},t.idParentsMap={},e.forEach((e,n)=>{t.idPageMap[e.id]=n+1}),e.forEach(e=>{t.idParentsMap[e.id]=t.idParentsMap[e.id]||[],e.gridElements.forEach(n=>{let i=(n=new K(n)).getNavigateGridId();i&&(t.idParentsMap[i]=t.idParentsMap[i]||[],t.idParentsMap[i].push(t.idPageMap[e.id]))})});const i=new n.jsPDF({orientation:"landscape",compress:!0});t.pages=e.length;for(let n=0;n{t.abort=!0}),t.page=n+1,await fn(i,e[n],t),ne.grid);let t=e.map(e=>e.id);Promise.resolve().then(async()=>{if(e.length>this.gridsData.length/2)return dt.getGrids(!0,!0);{let e=[];for(let n=0;n{e=t.map(t=>e.filter(e=>e.id===t)[0]),an.gridsToPdf(e,{printBackground:this.options.printBackground,showLinks:this.options.showLinks,showRegister:this.options.showRegister,progressFn:(e,t,n)=>{jt.showProgressBar(e,{header:C.translate("Creating PDF file // Erstelle PDF Datei"),text:t,cancelFn:n,closable:!0})}}),this.$emit("close")})},selectedGridChanged(){this.selectedGrid&&(this.allChildren=q.getAllChildrenRecursive(this.graphList,this.selectedGrid.id))}},mounted(){C.initDomI18n(),dt.getGlobalGrid().then(e=>{this.globalGridId=e?e.id:null,this.graphList=q.getGraphList(this.gridsData,this.globalGridId)})}},hn=(n(63),Pt(pn,nn,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Export grids to PDF // Grids als PDF exportieren\n ")])])}],!1,null,"7e9d09ff",null));hn.options.__file="src/vue-components/modals/exportPdfModal.vue";var mn=hn.exports;let vn=null;var gn={components:{ExportPdfModal:mn,GridLinkModal:tn,Accordion:qt,HeaderIcon:zt},data:()=>({metadata:null,grids:null,graphList:[],selectedGraphElement:null,newLabel:{},showLoading:!0,selectValues:{CONNECTED_GRIDS:"CONNECTED_GRIDS",NOT_REACHABLE_GRIDS:"NOT_REACHABLE_GRIDS",ALL_GRIDS:"ALL_GRIDS"},selectValue:null,linkModal:{show:!1,gridFrom:null,gridTo:null},pdfModal:{show:!1},i18nService:C,currentLanguage:C.getBrowserLang(),imageUtil:M}),methods:{setSelectedGraphElement(e,t){e&&(this.selectedGraphElement=e,this.newLabel=JSON.parse(JSON.stringify(this.selectedGraphElement.grid.label)),this.reinitContextMenu(),this.metadata.lastOpenedGridId=e.grid.id,dt.saveMetadata(this.metadata),t||a()(".all-grids-view").animate({scrollTop:0},200))},reinitContextMenu(){var e;!function(){a.a.contextMenu("destroy");let e=vn.selectedGraphElement?C.getTranslation(vn.selectedGraphElement.grid.label):"",t={CONTEXT_CONNECT:{name:C.translate('Connect to grid "{?}" // Verknüpfen mit Grid "{?}"',e),icon:"fas fa-external-link-alt",visible:()=>vn.selectValue!==vn.selectValues.CONNECTED_GRIDS},CONTEXT_SHOW:{name:"Show // Öffnen",icon:"far fa-eye"},CONTEXT_EDIT:{name:"Edit // Bearbeiten",icon:"far fa-edit"},CONTEXT_DUPLICATE:{name:"Clone // Duplizieren",icon:"far fa-clone"},CONTEXT_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt"},CONTEXT_EXPORT:{name:"Export // Exportieren",icon:"fas fa-file-export"},CONTEXT_EXPORT_PDF:{name:"Save as PDF // Als PDF speichern",icon:"far fa-file-pdf"}};a.a.contextMenu({selector:".gridOptions",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_CONNECT":vn.linkModal.gridFrom=vn.selectedGraphElement.grid,vn.linkModal.gridTo=vn.grids.filter(e=>e.id===t)[0],vn.linkModal.show=!0;break;case"CONTEXT_SHOW":vn.show(t);break;case"CONTEXT_EDIT":vn.edit(t);break;case"CONTEXT_DUPLICATE":vn.clone(t);break;case"CONTEXT_DELETE":vn.deleteGrid(t);break;case"CONTEXT_EXPORT":vn.exportToFile(t);break;case"CONTEXT_EXPORT_PDF":vn.exportToPdf(t)}}(e,t.$trigger.attr("data-grid-id"))},trigger:"left",items:t,zIndex:10})}(),e={CONTEXT_NEW:{name:"New grid // Neues Grid",icon:"fas fa-plus"},SEP1:"---------",CONTEXT_EXPORT:{name:"Export backup to file // Backup als Datei exportieren",icon:"fas fa-file-export"},CONTEXT_IMPORT:{name:"Import grid(s) from file // Grid(s) aus Datei importieren",icon:"fas fa-file-import"},CONTEXT_IMPORT_BACKUP:{name:"Clear all and import from file // Alles löschen und aus Datei importieren",icon:"fas fa-file-import"},SEP2:"---------",CONTEXT_EXPORT_PDF_MODAL:{name:"Save grids to PDF // Grids als PDF speichern",icon:"far fa-file-pdf"},SEP3:"---------",CONTEXT_DELETE_ALL:{name:"Delete all grids // Alle Grids löschen",icon:"fas fa-trash-alt",disabled:()=>0===vn.grids.length},CONTEXT_RESET:{name:"Reset to default configuration // Auf Standardkonfiguration zurücksetzen",icon:"fas fa-minus-circle"}},a.a.contextMenu({selector:"#moreButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_NEW":vn.addGrid();break;case"CONTEXT_IMPORT":document.getElementById("inputFile").click();break;case"CONTEXT_IMPORT_BACKUP":document.getElementById("inputFileBackup").click();break;case"CONTEXT_EXPORT_PDF_MODAL":vn.pdfModal.show=!0;break;case"CONTEXT_EXPORT":vn.exportToFile();break;case"CONTEXT_DELETE_ALL":vn.deleteAll();break;case"CONTEXT_RESET":vn.reset()}}(e)},trigger:"left",items:e,zIndex:10})},deleteGrid:function(e){log.debug("delete: "+e);let t=C.getTranslation(this.grids.filter(t=>t.id===e)[0].label);confirm(C.translate("CONFIRM_DELETE_GRID",t))&&dt.deleteGrid(e).then(()=>{this.reload()})},addGrid:function(){var e=this.grids.map(e=>C.getTranslation(e.label)),t=new de({label:C.getTranslationObject(s.getNewName("newGrid",e)),gridElements:[]});dt.saveGrid(t).then(()=>this.reload(t.id)).then(()=>{a()("#gridName").focus()})},isLabelDuplicate:function(e){return!e||this.grids.map(e=>C.getTranslation(e.label)).filter(t=>t===e).length>0},saveGridLabel(){this.selectedGraphElement.grid.label=JSON.parse(JSON.stringify(this.newLabel)),dt.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show(e){as.toGrid(e)},edit(e){as.toEditGrid(e)},clone(e){var t=this;dt.getGrid(e).then(e=>{let n=e.clone();dt.saveGrid(n).then(()=>{t.reload(n.id)})})},exportToFile(e){e?dt.downloadSingleGrid(e):dt.downloadBackup()},exportToPdf(e){dt.getGrid(e).then(e=>{an.gridsToPdf([e])})},importFromFile:function(e){this.importFromFileInternal(e,!1)},importBackupFromFile:function(e){let t=e.target&&e.target.files[0]&&e.target.files[0]?e.target.files[0].name:"";confirm(C.translate("CONFIRM_IMPORT_BACKUP",t))?this.importFromFileInternal(e,!0):this.resetFileInput(e)},reload:function(e){let t=this;return dt.getMetadata().then(e=>(t.metadata=JSON.parse(JSON.stringify(e)),dt.getGrids())).then(n=>{t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=q.getGraphList(t.grids,t.metadata.globalGridId);let i=e||t.metadata.lastOpenedGridId;return t.setSelectedGraphElement(t.graphList.filter(e=>e.grid.id===i)[0]||t.graphList[0],!0),Promise.resolve()})},onPullUpdate(){let e=this.selectedGraphElement?this.selectedGraphElement.grid.id:null;this.reload(e)},reset(){confirm(C.translate("CONFIRM_RESET_DB"))&&(this.showLoading=!0,jt.showProgressBar(0,{header:C.translate("Reset to default gridset // Zurücksetzen auf Standard-Gridset"),text:C.translate("Deleting grids // Grids werden gelöscht")}),dt.deleteAllGrids().then(()=>(jt.showProgressBar(50,{text:C.translate("Importing grids // Grids werden importiert")}),dt.importDefaultGridset())).then(()=>{jt.showProgressBar(100),this.reload()}))},deleteAll(){confirm(C.translate("Do you really want to delete all grids? This operation cannot be undone! // Möchten Sie wirklich alle Grids löschen? Diese Aktion kann nicht rückgängig gemacht werden!"))&&(this.showLoading=!0,dt.deleteAllGrids().then(()=>{this.reload()}))},setGlobalGridActive(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,dt.saveMetadata(this.metadata)},resetGlobalGrid(e){(e||confirm(C.translate("Do you really want to reset the global grid to default? // Möchten Sie das globale Grid wirklich zurücksetzen?")))&&dt.getGlobalGrid(!0).then(e=>e?dt.deleteGrid(e.id):Promise.resolve()).then(()=>{let e=q.generateGlobalGrid(this.grids[0].id);return this.metadata.globalGridId=e.id,this.metadata.globalGridActive=!0,dt.saveGrid(e)}).then(()=>dt.saveMetadata(this.metadata)).then(()=>{this.reload()})},importFromFileInternal(e,t){let n=e.target.files[0];n&&n.name&&(this.showLoading=!0,jt.showProgressBar(0,{header:C.translate("Importing grids // Grids werden importiert"),text:C.translate("Reading file // Datei wird gelesen")}),dt.importGridsFromFile(n,t,(e,t)=>{jt.showProgressBar(e,{text:t})}).then(()=>{this.resetFileInput(e),this.reload()}))},resetFileInput(e){var t=a()(e.target);t.wrap("").closest("form").get(0).reset(),t.unwrap()}},computed:{headerDetails:function(){return this.selectedGraphElement?C.translate("Details for grid {?} // Details für Grid {?}",`"${C.getTranslation(this.selectedGraphElement.grid.label)}"`):""},connectedGridsOptionLabel:function(){return this.selectedGraphElement?C.translate('Grids connected with "{?}" // Grid verknüpft mit "{?}"',C.getTranslation(this.selectedGraphElement.grid.label)):""},hasGlobalGrid:function(){return!(!this.grids||!this.metadata)&&(this.metadata.globalGridId&&!!this.grids.filter(e=>e.id===this.metadata.globalGridId)[0])},graphElemsToShow:function(){if(!this.graphList||!this.selectedGraphElement)return[];switch(this.selectValue){case this.selectValues.CONNECTED_GRIDS:return this.selectedGraphElement.allRelatives;case this.selectValues.NOT_REACHABLE_GRIDS:return this.graphList.filter(e=>0===e.parents.length);case this.selectValues.ALL_GRIDS:return this.graphList}}},created(){a()(document).on(r.EVENT_DB_PULL_UPDATED,this.onPullUpdate)},mounted:function(){vn=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then(()=>{this.reinitContextMenu(),C.initDomI18n()})},updated(){C.initDomI18n()},beforeDestroy(){a()(document).off(r.EVENT_DB_PULL_UPDATED,this.onPullUpdate),a.a.contextMenu("destroy")}},_n=(n(65),Pt(gn,_t,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"small",attrs:{tabindex:"32",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("label",{attrs:{for:"actionGroup","data-i18n":""}},[this._v("Actions // Aktionen")])])}],!1,null,"dd9feaca",null));_n.options.__file="src/vue-components/views/allGridsView.vue";var bn=_n.exports,En=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.gridData?n("div",{staticClass:"box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{staticClass:"left"}),e._v(" "),n("button",{staticClass:"spaced small left",attrs:{tabindex:"30",title:"Back"},on:{click:e.back}},[n("i",{staticClass:"fas fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing off // Bearbeiten aus")])]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"spaced btn-group"},[n("button",{staticClass:"small",attrs:{tabindex:"31",title:"Undo",disabled:!e.canUndo||e.doingUndoRedo},on:{click:e.undo}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Undo // Rückgängig")])]),e._v(" "),n("button",{staticClass:"small spaced",attrs:{tabindex:"32",title:"Redo",disabled:!e.canRedo||e.doingUndoRedo},on:{click:e.redo}},[n("i",{staticClass:"fas fa-redo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Redo // Wiederherstellen")])])])],1),e._v(" "),n("div",[e.showEditModal?n("edit-grid-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-instance":e.getGridInstance(),"grid-data-id":e.gridData.id},on:{close:function(t){e.showEditModal=!1},mark:e.markElement,actions:function(t){e.editElementId=t,e.showActionsModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showMultipleModal?n("add-multiple-modal",{attrs:{"grid-data":e.gridData,"grid-instance":e.getGridInstance()},on:{close:function(t){e.showMultipleModal=!1}}}):e._e()],1),e._v(" "),n("div",[e.showActionsModal?n("edit-actions-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-id-param":e.gridData.id},on:{close:function(t){e.showActionsModal=!1},reload:e.reload,edit:function(t){e.showEditModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showDimensionsModal?n("grid-dimension-modal",{attrs:{"grid-data-param":e.gridData,"is-global-grid":e.metadata.globalGridId===e.gridData.id},on:{close:function(t){e.showDimensionsModal=!1},save:e.setDimensions}}):e._e()],1),e._v(" "),n("div",[e.showMoveModal?n("element-move-modal",{attrs:{"grid-id":e.gridData.id,"grid-element-id":e.editElementId},on:{close:function(t){e.showMoveModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",[e.showTranslateModal?n("grid-translate-modal",{attrs:{"grid-data-id":e.gridData.id},on:{close:function(t){e.showTranslateModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",{staticClass:"row content"},[e.showGrid?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}}),e._v(" "),e._m(1)])]):e._e()};En._withStripped=!0;let yn={},Cn={},wn={};yn.setState=function(e,t){Cn[e]!==t&&(Cn[e]=t,wn[e]=wn[e]||[],wn[e].forEach(e=>{e(t)}))},yn.getState=function(e){return Cn[e]},yn.onStateChanged=function(e,t){wn[e]=wn[e]||[],wn[e].push(t)},yn.clearListeners=function(e){e?wn[e]=[]:wn={}};let Tn={};Tn.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",Tn.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";let An=g.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",Nn=[],Sn=JSON.parse('[{"name":"UK English Female","lang":"en-GB"},{"name":"UK English Male","lang":"en-GB"},{"name":"US English Female","lang":"en-US"},{"name":"US English Male","lang":"en-US"},{"name":"Arabic Male","lang":"ar-SA"},{"name":"Arabic Female","lang":"ar-SA"},{"name":"Armenian Male","lang":"hy-AM"},{"name":"Australian Female","lang":"en-AU"},{"name":"Australian Male","lang":"en-AU"},{"name":"Bangla Bangladesh Female","lang":"bn-BD"},{"name":"Bangla Bangladesh Male","lang":"bn-BD"},{"name":"Bangla India Female","lang":"bn-IN"},{"name":"Bangla India Male","lang":"bn-IN"},{"name":"Brazilian Portuguese Female","lang":"pt-BR"},{"name":"Chinese Female","lang":"zh-CN"},{"name":"Chinese Male","lang":"zh-CN"},{"name":"Chinese (Hong Kong) Female","lang":"zh-HK"},{"name":"Chinese (Hong Kong) Male","lang":"zh-HK"},{"name":"Chinese Taiwan Female","lang":"zh-TW"},{"name":"Chinese Taiwan Male","lang":"zh-TW"},{"name":"Czech Female","lang":"cs-CZ"},{"name":"Danish Female","lang":"da-DK"},{"name":"Deutsch Female","lang":"de-DE"},{"name":"Deutsch Male","lang":"de-DE"},{"name":"Dutch Female","lang":"nl-NL"},{"name":"Dutch Male","lang":"nl-NL"},{"name":"Estonian Male","lang":"et-EE"},{"name":"Filipino Female","lang":"fil-PH"},{"name":"Finnish Female","lang":"fi-FI"},{"name":"French Female","lang":"fr-FR"},{"name":"French Male","lang":"fr-FR"},{"name":"French Canadian Female","lang":"fr-CA"},{"name":"French Canadian Male","lang":"fr-CA"},{"name":"Greek Female","lang":"el-GR"},{"name":"Hindi Female","lang":"hi-IN"},{"name":"Hindi Male","lang":"hi-IN"},{"name":"Hungarian Female","lang":"hu-HU"},{"name":"Indonesian Female","lang":"id-ID"},{"name":"Indonesian Male","lang":"id-ID"},{"name":"Italian Female","lang":"it-IT"},{"name":"Italian Male","lang":"it-IT"},{"name":"Japanese Female","lang":"ja-JP"},{"name":"Japanese Male","lang":"ja-JP"},{"name":"Korean Female","lang":"ko-KR"},{"name":"Korean Male","lang":"ko-KR"},{"name":"Latin Male","lang":"la"},{"name":"Nepali","lang":"ne-NP"},{"name":"Norwegian Female","lang":"nb-NO"},{"name":"Norwegian Male","lang":"nb-NO"},{"name":"Polish Female","lang":"pl-PL"},{"name":"Polish Male","lang":"pl-PL"},{"name":"Portuguese Female","lang":"pt-BR"},{"name":"Portuguese Male","lang":"pt-BR"},{"name":"Romanian Female","lang":"ro-RO"},{"name":"Russian Female","lang":"ru-RU"},{"name":"Sinhala","lang":"si-LK"},{"name":"Slovak Female","lang":"sk-SK"},{"name":"Spanish Female","lang":"es-ES"},{"name":"Spanish Latin American Female","lang":"es-MX"},{"name":"Spanish Latin American Male","lang":"es-MX"},{"name":"Swedish Female","lang":"sv-SE"},{"name":"Swedish Male","lang":"sv-SE"},{"name":"Tamil Female","lang":"hi-IN"},{"name":"Tamil Male","lang":"hi-IN"},{"name":"Thai Female","lang":"th-TH"},{"name":"Thai Male","lang":"th-TH"},{"name":"Turkish Female","lang":"tr-TR"},{"name":"Turkish Male","lang":"tr-TR"},{"name":"Ukrainian Female","lang":"uk-UA"},{"name":"Vietnamese Female","lang":"vi-VN"},{"name":"Vietnamese Male","lang":"vi-VN"},{"name":"Afrikaans Male","lang":"af-ZA"},{"name":"Albanian Male","lang":"sq-AL"},{"name":"Bosnian Male","lang":"bs"},{"name":"Catalan Male","lang":"ca-ES"},{"name":"Croatian Male","lang":"hr-HR"},{"name":"Esperanto Male","lang":"eo"},{"name":"Icelandic Male","lang":"is-IS"},{"name":"Latvian Male","lang":"lv-LV"},{"name":"Macedonian Male","lang":"mk-MK"},{"name":"Moldavian Female","lang":"md"},{"name":"Montenegrin Male","lang":"me"},{"name":"Serbian Male","lang":"sr-RS"},{"name":"Serbo-Croatian Male","lang":"hr-HR"},{"name":"Swahili Male","lang":"sw-KE"},{"name":"Welsh Male","lang":"cy"},{"name":"Fallback UK Female","lang":"en-GB"}]');function In(e){let t=Nn.filter(t=>t.name===e);return t.length>0?t:null}function kn(e,t,n,i){-1===Nn.map(e=>e.name).indexOf(e)&&Nn.push({name:e,lang:t.substring(0,2),type:n,ref:i})}function On(){Nn.sort((e,t)=>e.type===Tn.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===Tn.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name))}Tn.speak=function(e,t,n){let i=null,a="string"==typeof e;if(!e||!a&&0===Object.keys(e).length)return;if(a)i=e;else{let n=e[t=function(e){let t=In(e);return t&&t[0]?t[0].lang:null}(An)||t]||C.getTranslation(e,null,!0);i=void 0!==n.text?n.text:n,t=t||n.lang}Tn.stopSpeaking(),t=t||C.getBrowserLang();let s=In(n)||In(An)||function(e){return Nn.filter(t=>t.lang.substring(0,2)===e)}(t),o=s.filter(e=>e.type===Tn.VOICE_TYPE_NATIVE),l=s.filter(e=>e.type===Tn.VOICE_TYPE_RESPONSIVEVOICE);if(Tn.nativeSpeechSupported()&&o.length>0){var c=new SpeechSynthesisUtterance(i);c.voice=o[0].ref,log.debug("used voice: "+c.voice.name),window.speechSynthesis.speak(c)}else l.length>0&&responsiveVoice.speak(i,l[0].name);function d(){Tn.isSpeaking()&&yn.setState(r.STATE_ACTIVATED_TTS,!0)}d(),setTimeout(()=>{d()},700)},Tn.speakLabel=function(e,t){e&&t&&dt.getGridElement(e,t).then(e=>{Tn.speak(C.getTranslation(e.label))})},Tn.stopSpeaking=function(){Tn.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},Tn.isSpeaking=function(){return Tn.nativeSpeechSupported()&&window.speechSynthesis.speaking||responsiveVoice.isPlaying()},Tn.getVoicesLangs=function(){let e=Nn.map(e=>e.lang.substring(0,2));return C.getAllLanguages().filter(t=>-1!==e.indexOf(t.code))},Tn.getVoices=function(){return Nn},Tn.setPreferredVoiceName=function(e){An=e,g.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},Tn.getPreferredVoiceName=function(){return An},Tn.nativeSpeechSupported=function(){return!("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis||!window.speechSynthesis.getVoices)},Tn.nativeSpeechSupported()&&(window.speechSynthesis.getVoices(),setTimeout((function(){window.speechSynthesis.getVoices().forEach(e=>{kn(e.name,e.lang,Tn.VOICE_TYPE_NATIVE,e)}),On()}),100)),Sn.forEach(e=>{kn(e.name,e.lang,Tn.VOICE_TYPE_RESPONSIVEVOICE)}),On();let Ln={},xn=2,Dn=1,Rn={lastPlayType:z.playTypes.YT_PLAY_PLAYLIST,lastData:"https://www.youtube.com/watch?v=5ffLB4a9APc&list=PL0UXHkT03dGrIHldlEKR0ZWfNMkShuTNz",lastVideoId:null,lastTimes:{},lastPlaylistIndexes:{},dataApiCalls:{},muted:!1,volume:100},Mn=!1,Pn=null,Gn=g.getYTState()||JSON.parse(JSON.stringify(Rn)),Un=!1,$n=null,Fn=null,Vn=null;function Bn(e,t){return void 0!==e?e:Gn.lastTimes[t]}function Yn(e,t){let n=null;try{n=new URL(e)}catch(e){}return n?n.searchParams.get(t):null}function jn(){if(Pn){let e=Ln.getCurrentVideoId(),t=Pn.getPlaylistIndex();e&&(Gn.lastTimes[e]=Pn.getCurrentTime()),t>=0&&Gn.lastPlayType!==z.playTypes.YT_PLAY_VIDEO&&(Gn.lastPlaylistIndexes[Gn.lastData]=t)}JSON.stringify(Gn).length>1048576&&(Gn.lastPlaylistIndexes={},Gn.lastTimes={},Gn.dataApiCalls={}),g.saveYTState(Gn)}function Hn(){Vn=jt.setTooltip(C.translate("Error on playing YouTube video. Please check internet connection. // Fehler bei der Wiedergabe des YouTube Videos. Bitte Internet-Verbindung überprüfen."),{timeout:3e4,msgType:"warn"})}Ln.doAction=function(e){if(e.performAfterNav)Ln.setActionAfterNavigate(e);else switch(e.action){case z.actions.YT_PLAY:Ln.play(e);break;case z.actions.YT_PAUSE:Ln.pause();break;case z.actions.YT_TOGGLE:Ln.toggle(e);break;case z.actions.YT_RESTART:Ln.restart(e);break;case z.actions.YT_STOP:Ln.stop();break;case z.actions.YT_STEP_FORWARD:Ln.seekToRelative(e.stepSeconds);break;case z.actions.YT_STEP_BACKWARD:Ln.seekToRelative(-e.stepSeconds);break;case z.actions.YT_NEXT_VIDEO:Ln.nextVideo();break;case z.actions.YT_PREV_VIDEO:Ln.previousVideo();break;case z.actions.YT_ENTER_FULLSCREEN:Ln.enterFullscreen();break;case z.actions.YT_VOLUME_UP:Ln.volumeUp(e.stepVolume);break;case z.actions.YT_VOLUME_DOWN:Ln.volumeDown(e.stepVolume);break;case z.actions.YT_VOLUME_MUTE:Ln.volumeToggleMute()}},Ln.play=function(e,t){let n=Promise.resolve();jt.clearTooltip(Vn),Mn||(n=function(){if(Mn)return Promise.resolve();a()(document).on(r.EVENT_GRID_RESIZE,()=>{Pn&&setTimeout(()=>{let e=a()(".yt-container")[0].getBoundingClientRect();Pn.setSize(e.width,e.height)},400)}),a()(document).on(r.EVENT_USER_CHANGED,()=>{Gn=g.getYTState()||JSON.parse(JSON.stringify(Rn))}),window.addEventListener("beforeunload",e=>{jn()});let e=document.createElement("script"),t=document.createElement("script");document.body.appendChild(e),document.body.appendChild(t),e.onerror=function(e){log.warn("error on loading YouTube Iframe API script"),Hn()},t.onerror=function(e){log.warn("error on loading YouTube data API script")};let n=new Promise(e=>{window.onYouTubeIframeAPIReady=function(){Mn=!0,e()}}),i=new Promise(e=>{t.addEventListener("load",(function(){e()}))}).then(()=>new Promise(e=>{gapi.load("client",e)})).then(()=>(gapi.client.setApiKey("AIzaSyCDOUROr3UWS8K-WJNlAG21yBTOsveWQn8"),gapi.client.load("https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest"))).catch(e=>(log.error("Error loading GAPI client for API",e),Promise.resolve()));return e.src="https://www.youtube.com/iframe_api",t.src="https://apis.google.com/js/api.js",Promise.all([i,n])}()),n.then(()=>{function n(){switch(e.playType){case z.playTypes.YT_PLAY_VIDEO:let r=Ln.getVideoId(e.data);if(!r)return;if(r===Ln.getCurrentVideoId())return void Pn.playVideo();Gn.lastVideoId=r,Pn.loadVideoById(r,Bn(t,r));break;case z.playTypes.YT_PLAY_SEARCH:Un=!0,(n="gapi.client.youtube.search.list",i={maxResults:100,q:e.data,type:"video",videoEmbeddable:!0},new Promise(e=>{a=a||9e5;let t=n.split("."),r=window;if(t.forEach(e=>{r&&(r=r[e])}),r){Gn.dataApiCalls=Gn.dataApiCalls||{};let t=n+JSON.stringify(i),s=Gn.dataApiCalls[t];if(s&&(new Date).getTime()-s.time(Gn.dataApiCalls[t]={time:(new Date).getTime(),response:JSON.stringify(n)},jn(),e(n)),t=>(log.error("Execute Google API call error",t),e(null)))}})).then(t=>{let n=t.result.items.map(e=>e.id.videoId).filter(e=>!!e);Pn.loadPlaylist(n,Gn.lastPlaylistIndexes[e.data])});break;case z.playTypes.YT_PLAY_PLAYLIST:let s=Ln.getPlaylistId(e.data);Un=!0,Pn.loadPlaylist({list:s,listType:"playlist",index:Gn.lastPlaylistIndexes[e.data]});break;case z.playTypes.YT_PLAY_CHANNEL:let o=Ln.getChannelId(e.data),l=Ln.getChannelPlaylist(o);Un=!0,Pn.loadPlaylist({list:l,listType:"playlist",index:Gn.lastPlaylistIndexes[e.data]});break;case z.playTypes.YT_PLAY_RELATED:}var n,i,a;jn()}e.data||(e.playType=Gn.lastPlayType,e.data=Gn.lastData),Gn.lastPlayType=e.playType,Gn.lastData=e.data,Pn?n():Pn=new YT.Player("player",{height:a()(".yt-container")[0].getBoundingClientRect().height,width:a()(".yt-container")[0].getBoundingClientRect().width,playerVars:{mute:e.playMuted?1:0,cc_load_policy:e.showCC?1:0,cc_lang_pref:C.getBrowserLang(),rel:0,iv_load_policy:3},events:{onReady:function(e){Fn=a()("#player")[0],Ln.setVolume(Gn.volume,!0),Gn.muted&&Pn.mute();n()},onStateChange:e=>{(Un&&e.data===Dn||e.data===xn)&&(Un=!1,function(){Pn.setLoop(!0),Gn.lastVideoId=Ln.getCurrentVideoId();let e=Bn(t,Ln.getCurrentVideoId());e&&Pn.seekTo(e,!0)}())},onError:()=>{log.warn("error on playing YouTube video"),Hn()}}})})},Ln.pause=function(){Pn&&(Pn.pauseVideo(),jn())},Ln.stop=function(){Pn&&(Pn.seekTo(0),Ln.pause())},Ln.toggle=function(e){Ln.isPaused()?Pn.playVideo():Ln.isPlaying()?Ln.pause():Ln.play(e)},Ln.restart=function(e){Pn&&Pn.seekTo(0),jn(),Ln.isPaused()?Pn.playVideo():Ln.isPlaying()||Ln.play(e,0)},Ln.nextVideo=function(){Pn&&Pn.nextVideo()},Ln.previousVideo=function(){Pn&&Pn.previousVideo()},Ln.seekToRelative=function(e){Pn&&(Pn.seekTo(Pn.getCurrentTime()+e),jn())},Ln.enterFullscreen=function(){if(Pn&&Fn){let e=Fn.requestFullScreen||Fn.mozRequestFullScreen||Fn.webkitRequestFullScreen||Fn.msRequestFullscreen;e&&(e.bind(Fn)(),St.global.onAnyKey(Ln.exitFullscreen))}},Ln.exitFullscreen=function(){let e=document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.msExitFullscreen;e&&e.bind(document)(),St.global.off(Ln.exitFullscreen)},Ln.volumeUp=function(e){Ln.setVolume(Math.min(Pn.getVolume()+e,100))},Ln.volumeDown=function(e){Ln.setVolume(Math.max(Pn.getVolume()-e,0))},Ln.setVolume=function(e,t){Pn&&(Pn.setVolume(e),t||(Pn.isMuted&&(Pn.unMute(),Gn.muted=!1),jt.setTooltip(C.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",e),{revertOnClose:!0,timeout:5e3}),Gn.volume=e,jn()))},Ln.volumeToggleMute=function(){if(Pn){let e=Pn.isMuted();e?Pn.unMute():Pn.mute(),Gn.muted=!e,jn()}},Ln.setActionAfterNavigate=function(e){e.performAfterNav=!1,$n=e},Ln.isPlaying=function(){return Pn&&Pn.getPlayerState()===Dn},Ln.isPaused=function(){return Pn&&Pn.getPlayerState()===xn},Ln.getCurrentVideoId=function(){if(Pn){if(-1!==Pn.getVideoUrl().indexOf("v="))return Ln.getVideoId(Pn.getVideoUrl())}return""},Ln.getVideoId=function(e){if(!e)return null;let t=Yn(e,"v");if(t)return t;if(-1!==e.indexOf("youtu.be/")){let t=e.indexOf("youtu.be/")+"youtu.be/".length,n=-1!==e.indexOf("?")?e.indexOf("?"):void 0;return e.substring(t,n)}return e},Ln.getPlaylistId=function(e){if(!e)return null;let t=Yn(e,"list");return t||e},Ln.getChannelId=function(e){if(!e)return null;let t=["channel/"];for(let n=0;n{$n&&(Ln.doAction($n),$n=null)});var Wn={},zn=[],Kn="";let Jn=0,Xn=null;function qn(e){Kn=e=void 0===e?Kn:e,Ye.learnFromInput(Kn,Xn),$('.item[data-type="ELEMENT_TYPE_COLLECT"] .collect-text').text(Kn),O.adaptFontSize($('.item[data-type="ELEMENT_TYPE_COLLECT"]'))}function Zn(e,t){if(!e)return null;let n=e.actions.map(e=>e.modelName).indexOf(t);return-1===n?null:e.actions[n]}function Qn(){var e=[],t=[];this.canUndo=function(){return e.length>0},this.canRedo=function(){return t.length>0},this.updateGrid=function(n){return new Promise(i=>{dt.getGrid(n.id).then(a=>{a.isEqual(n)?(log.debug("grid not updated, do noting"),i(!1)):(e.push(JSON.parse(JSON.stringify(a))),t=[],dt.saveGrid(n).then(()=>{i(!0)}))})})},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return dt.getGrid(n.id).then(e=>{t.push(JSON.parse(JSON.stringify(e))),dt.saveGrid(n)}),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return dt.getGrid(n.id).then(t=>{e.push(JSON.parse(JSON.stringify(t))),dt.saveGrid(n)}),n}}}function ei(e,t,n){var i=this,s=(e=e,t=t,!1),o=!1,l=null,c=null,d=null,u=null,f=null,p=null,h=null,m=null,v=null,g=new Qn;let _=!1;function b(e){return _=!1,(v=new Promise(t=>{e?(E(n,e),y(p).then(()=>{t()})):dt.getGrid(n.gridId).then(e=>{E(n,e),y(p).then(()=>{t()})})})).then(()=>{_=!0}),v}function E(e,t){e&&(l=e.gridId||l,s=null!=e.enableResizing?e.enableResizing:s,o=e.dragAndDrop),h=(p=t).rowCount,m=p.minColumnCount}function y(l){let u=[];return n.dragAndDrop||(l.gridElements=l.gridElements.filter(e=>!e.hidden),u.push(dt.getGlobalGrid().then(e=>{if(e){let t=!0,i=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,a=1,r=1;1===e.getHeight()&&(r=i*p.rowCount/(1-i),a=1/(p.rowCount*i)-1/p.rowCount,r>=1?(a=1,r=Math.round(r)):(r=1,a=Math.round(a)));let s=q.getOffset(e),o=t?e.getWidth()-s.x:1,l=t?p.getWidthWithBounds():1;e.gridElements.forEach(e=>{e.width*=l,e.x*=l,0===e.y&&(e.height*=r)}),p.gridElements.forEach(e=>{e.width*=o,e.x*=o,e.x+=s.x*l,e.y+=s.y*r+e.y*(a-1),e.height*=a}),p.rowCount*=a,p.rowCount+=s.y*r,h=p.rowCount,p.gridElements=e.gridElements.concat(p.gridElements)}return Promise.resolve()}))),Promise.all(u).then(()=>(Wn.initWithElements(p.gridElements,o),Ye.initWithElements(p.gridElements),a()(e).empty(),a()(e).append(D.getGridBase(l.id)),d=a()("#"+l.id),l.gridElements.forEach((function(e){d.append(e.toHTML())})),d.gridList({lanes:h,minColumns:m,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:o},{start:w,stop:A}),c=d.data("_gridList"),l.hasSetPositions()||(d.gridList("resize",h),i.toGridData().then(e=>{p=e,dt.updateGrid(p.id,p)})),function(){let e=[];s&&e.push(a()(t).resizable(C()));return a()(document).on(r.EVENT_GRID_RESIZE,()=>{i.autosize()}),Promise.all(e)}().then(()=>{i.autosize(200)}),Promise.resolve()))}function C(){var e=c._cellHeight,t=c._cellWidth;return{autoHide:!1,handles:"se",disabled:!s,start:w,stop(e,t){var n=t.element.parent(),i=t.element.attr("id");new Promise(e=>{var t=n.attr("data-img-id");t?dt.getImage(t).then(t=>{if(t){var r=a()("#"+i)[0].getBoundingClientRect().width;M.convertBase64(t.data,r).then(t=>{n.attr("data-img",t),n.children().children()[0].style.backgroundImage='url("'+t+'")',e()})}else e()}):e()}).then(()=>{A()})},resize:function(n,i){var a=i.element.parent();a.css("z-index",1);var r=Math.max(Math.round(i.element.width()/t),1),s=Math.max(Math.round(i.element.height()/e),1);s=s<=h?s:h,O.adaptFontSize(a),d.gridList("resizeItem",i.element.parent(),{w:r,h:s}),i.element.css("height",""),i.element.css("width","")}}}function w(){a.a.isFunction(u)&&u(p)}function T(){a.a.isFunction(f)&&setTimeout((function(){f(p)}),200)}function A(){return new Promise(e=>{i.toGridData().then(t=>{g.updateGrid(t).then(n=>{n&&(p=t,i.autosize(),T()),e()})})})}i.autosize=function(e){e=e||0,O.adaptFontSizeForGridElements(),setTimeout((function(){d.gridList("autosize"),setTimeout((function(){if(a()("#grid-layout-background-vertical")[0]){var e=c._cellWidth,t=c._cellHeight;a()("#grid-layout-background-vertical").css("margin-left",e-5+"px"),a()("#grid-layout-background-vertical").css("background-size",`${e}px ${e}px`),a()("#grid-layout-background-horizontal").css("margin-top",t-5+"px"),a()("#grid-layout-background-horizontal").css("background-size",`${t}px ${t}px`),a()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){O.adaptFontSizeForGridElements()}),200),s&&a()(t).resizable(C())}),e)},i.enableElementResizing=function(){a()(t).resizable("enable")},i.disableElementResizing=function(){a()(t).resizable("disable")},i.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(h=e,m=t,d.gridList("resize",h,t)),A()},i.removeElement=function(e){return w(),p.gridElements=p.gridElements.filter(t=>t.id!==e),b(p).then(()=>A()).then(()=>Promise.resolve(p))},i.duplicateElement=function(e){w();let t=p.gridElements.filter(t=>t.id===e)[0].duplicate();p.gridElements.push(t),b(p).then(()=>{c.resolveCollisions(t.id),A()})},i.reinit=function(e){return w(),b(e).then(()=>{T()}),v},i.fillGaps=function(){w(),d.gridList("fillGaps"),A()},i.undo=function(){if(g.canUndo()){var e=g.doUndo();b(p=new de(e)).then(()=>{T()})}},i.redo=function(){if(g.canRedo()){var e=g.doRedo();b(p=new de(e)).then(()=>{T()})}},i.updateGridWithUndo=function(e){return new Promise(t=>{g.updateGrid(e).then(e=>{e?(w(),b().then(()=>{t(!0),T()})):t(!1)})})},i.canUndo=()=>g.canUndo(),i.canRedo=()=>g.canRedo(),i.setLayoutChangedStartListener=function(e){u=e},i.setLayoutChangedEndListener=function(e){f=e},i.getCurrentGridId=function(){return p.id},i.toGridData=function(){return new Promise(e=>{var t=[];p.rowCount=h,p.minColumnCount=m,c.items.forEach((function(e){var n=e.$element.attr("data-id"),i=p.gridElements.filter(e=>e.id===n)[0];i.x=e.x,i.y=e.y,i.height=e.h,i.width=e.w,t.push(i)})),p.gridElements=t,e(p)})},i.getInitPromise=function(){return v},i.isInitialized=function(){return _},i.destroy=function(){a()(document).off(r.EVENT_GRID_RESIZE),i.setLayoutChangedEndListener(null),i.setLayoutChangedStartListener(null)},b()}Wn.initWithElements=function(e,t){zn=[];let n=0,i=0;if(Xn=null,e.forEach(e=>{if(e&&e.type===K.ELEMENT_TYPE_NORMAL){i++;let t=C.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===K.ELEMENT_TYPE_COLLECT){let t=JSON.parse(JSON.stringify(e));Xn=Xn||t.actions.reduce((e,t)=>{let n=Y.getModelName()?t.dictionaryKey:null;return e||n},null),zn.push(t)}}),Jn=n/i,zn.length>0){let e=setInterval(()=>{$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(e),qn(),t||Ye.predict(Kn,Xn))},100)}},Wn.doAction=function(e){Zn(e,"GridActionPredict")&&Ye.predict(Kn,Xn);let t=e.actions.filter(e=>e.modelName===F.getModelName())[0],n=t&&t.speakLanguage?t.speakLanguage:C.getBrowserLang();Tn.speak(Kn,n)},Wn.doCollectElementActions=function(e){if(e){switch(e){case j.COLLECT_ACTION_CLEAR:qn("");break;case j.COLLECT_ACTION_REMOVE_WORD:let e=Kn.trim().split(" ");e.pop();let t=e.join(" ");qn(""===t?"":t+" ");break;case j.COLLECT_ACTION_REMOVE_CHAR:qn(Kn.substring(0,Kn.length-1));break;case j.COLLECT_ACTION_COPY_CLIPBOARD:qe.copyToClipboard(Kn);break;case j.COLLECT_ACTION_APPEND_CLIPBOARD:qe.appendToClipboard(Kn);break;case j.COLLECT_ACTION_CLEAR_CLIPBOARD:qe.copyToClipboard("");break;case j.COLLECT_ACTION_TO_YOUTUBE:Ln.setActionAfterNavigate(new z({action:z.actions.YT_PLAY,playType:z.playTypes.YT_PLAY_SEARCH,data:Kn}))}Ye.predict(Kn,Xn)}},$(window).on(r.ELEMENT_EVENT_ID,(function(e,t){if(0!==zn.length&&!Zn(t,j.getModelName())&&!Zn(t,x.getModelName())){if(!t.type||t.type===K.ELEMENT_TYPE_NORMAL){if(!C.getTranslation(t.label))return;let e=C.getTranslation(t.label),n=1===e.length&&Jn>.5?e.toLowerCase():e+" ";qn(Kn+n),zn.forEach(e=>{let t=Zn(e,"GridActionPredict");t&&t.suggestOnChange&&Ye.predict(Kn,Xn)})}if(t.type&&t.type===K.ELEMENT_TYPE_PREDICTION){let e=$(`#${t.id} .text-container span`).text();if(e){qn(Ye.applyPrediction(Kn||"",e,Xn)),zn.forEach(e=>{let t=Zn(e,"GridActionPredict");t&&t.suggestOnChange&&Ye.predict(Kn,Xn)})}}}}));var ti=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper",on:{dragenter:e.preventDefault,dragover:e.preventDefault,drop:e.imageDropped}},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.nextFromKeyboard():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[e.editElementId?n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n Edit grid item // Grid-Element bearbeiten\n ")]):e._e(),e._v(" "),e.editElementId?e._e():n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n New grid item // Neues Grid-Element\n ")])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputLabel"}},[e._v("Label")]),e._v(" "),e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.label[e.currentLang],expression:"gridElement.label[currentLang]"}],staticClass:"five columns",attrs:{type:"text",id:"inputLabel"},domProps:{value:e.gridElement.label[e.currentLang]},on:{input:function(t){t.target.composing||e.$set(e.gridElement.label,e.currentLang,t.target.value)}}}):e._e(),e._v(" "),n("button",{staticClass:"two columns",attrs:{label:e.i18nService.translate("Search for images // Suche nach Bildern")},on:{click:function(t){return e.search(e.gridElement.label[e.currentLang])}}},[n("i",{staticClass:"fas fa-search"})]),e._v(" "),n("div",{staticClass:"three columns"},[e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.hidden,expression:"gridElement.hidden"}],attrs:{type:"checkbox",id:"inputHidden"},domProps:{checked:Array.isArray(e.gridElement.hidden)?e._i(e.gridElement.hidden,null)>-1:e.gridElement.hidden},on:{change:function(t){var n=e.gridElement.hidden,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.gridElement,"hidden",n.concat([null])):r>-1&&e.$set(e.gridElement,"hidden",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.gridElement,"hidden",a)}}}):e._e(),e._v(" "),n("label",{attrs:{for:"inputHidden","data-i18n":""}},[e._v("Hide element // Element ausblenden")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputImg","data-i18n":""}},[e._v("Image // Bild")]),e._v(" "),n("button",{staticClass:"five columns file-input",attrs:{onclick:"document.getElementById('inputImg').click();"}},[n("input",{staticClass:"five columns",attrs:{type:"file",id:"inputImg",accept:"image/*"},on:{change:e.changedImg}}),e._v(" "),e._m(0)]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"five columns",on:{click:e.clearImage}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear image // Bild löschen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"img-preview offset-by-two four columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"show-mobile"},[n("i",{staticClass:"fas fa-image"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("no image chosen // kein Bild ausgewählt")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"hide-mobile"},[n("i",{staticClass:"fas fa-arrow-down"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("drop image here // Bild hierher ziehen")])]),e._v(" "),e.tempImage.data?n("img",{attrs:{id:"imgPreview",src:e.tempImage.data}}):e._e(),e._v(" "),e.tempImage.data&&e.tempImage.author?n("div",[e._v("\n by "),n("a",{attrs:{href:e.tempImage.authorURL,target:"_blank"}},[e._v(e._s(e.tempImage.author))])]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"img-preview five columns hide-mobile",staticStyle:{"margin-top":"50px"}},[e._m(1)])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputSearch","data-i18n":""}},[e._v("Image search // Bildsuche")]),e._v(" "),n("div",{staticClass:"five columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchText,expression:"searchText"}],attrs:{id:"inputSearch",type:"text",placeholder:e._f("translate")("SEARCH_IMAGE_PLACEHOLDER")},domProps:{value:e.searchText},on:{input:[function(t){t.target.composing||(e.searchText=t.target.value)},function(t){return e.searchInput(500,t)}]}}),e._v(" "),n("button",{attrs:{"aria-label":"Clear"},on:{click:e.clearSearch}},[n("i",{staticClass:"fas fa-times"})])]),e._v(" "),e._m(2)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"offset-by-two ten columns"},[e._l(e.searchResults,(function(t){return n("div",{staticClass:"inline"},[t.base64?n("img",{staticClass:"inline",attrs:{src:t.base64,title:"by "+t.author,width:"60",height:"60",role:"button"},on:{click:function(n){return e.setImage(t)}}}):e._e(),e._v(" "),t.base64||t.failed?e._e():n("span",{staticStyle:{position:"relative"}},[n("img",{staticClass:"inline",attrs:{src:"data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E",title:t.image_url,width:"60",height:"60"}}),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin",staticStyle:{position:"absolute",top:"-25px",left:"25px"}})])])})),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchResults&&e.searchResults.length>0&&e.hasNextChunk,expression:"searchResults && searchResults.length > 0 && hasNextChunk"}],staticClass:"inline"},[n("button",{staticStyle:{height:"60px",margin:"0 0 0 0.5em",padding:"0.7em",float:"left"},on:{click:e.searchMore}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("more // mehr")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.searchLoading,expression:"searchLoading"}]},[n("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("searching... // suche...")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[e._m(3),e._v(" "),e._m(4)]),n("br"),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[n("span"),e._v(" "),e._m(5)])],2)])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.gridElement?n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[e.editElementId?n("div",[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]):e._e(),e._v(" "),e.editElementId?e._e():n("div",[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.addNext()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, add another // OK, weiteres Element")])])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit actions // OK, Aktionen bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-bolt"})])])]):e._e()])])])])])};ti._withStripped=!0;let ni={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},ii=10,ai=1,ri=null,si=null,oi=!1;function li(e,t,n){n=n||ii,t=t||1;let i=[];return new Promise(r=>{if(!e)return r([]);function s(a){a&&a.length&&0!==a.length||(a=[]);let s=t*n-n,o=s+n-1;oi=a.length>o+1;for(let e=s;e<=o;e++)if(a[e]){let t=JSON.parse(JSON.stringify(a[e])),n=M.urlToBase64(t[ni.PROP_IMAGE_URL]);t.promise=n,n.then(e=>{e?t.base64=e:t.failed=!0}),i.push(t)}ri=e,r(i)}ri!==e?a.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){si=e,s(e)})):s(si)})}ni.query=function(e,t,n){return ai=t=t||1,ii=n||ii,li(e,t,n)},ni.nextChunk=function(){return ai++,li(ri,ai,ii)},ni.hasNextChunk=function(){return oi};var ci={props:["editElementIdParam","gridDataId","gridInstance"],data:function(){return{gridData:null,gridElement:null,metadata:null,originalGridElementJSON:null,elementW:null,editElementId:null,searchText:null,searchResults:null,searchLoading:!1,hasNextChunk:!0,tempImage:{},i18nService:C,currentLang:C.getBrowserLang()}},methods:{changedImg(){let e=this;e.clearImage(),M.getBase64FromInput($("#inputImg")[0]).then(t=>{e.tempImage.data=t})},imageDropped(e){if(e.preventDefault(),this.clearImage(),e.dataTransfer.files&&e.dataTransfer.files.length>0)$("#inputImg")[0].files=e.dataTransfer.files,this.changedImg();else{let t=e.dataTransfer.getData("URL");M.urlToBase64(t).then(e=>{this.tempImage.data=e})}},setImage(e){this.tempImage.data=e.base64,this.tempImage.author=e.author,this.tempImage.authorURL=e.author_url},clearImage(){this.tempImage.data=this.tempImage.author=this.tempImage.authorURL=null},save(e){this.saveInternal().then(t=>{this.$emit("close"),t&&!this.editElementId&&this.$emit("mark",this.gridElement.id),e&&this.$emit("actions",this.gridElement.id)})},addNext(){var e=this;e.saveInternal().then(()=>{e.initInternal(),$("#inputLabel").focus()})},editNext(e){var t=this;t.editElementId&&t.saveInternal().then(()=>{t.editElementId=new de(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#inputLabel").focus()})},nextFromKeyboard(){this.editElementId?this.editNext():this.addNext()},saveInternal(){var e=this;return new Promise(t=>{function n(){if(e.gridElement&&e.originalGridElementJSON!==JSON.stringify(e.gridElement)){let n=q.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then(e=>{t(e)})}else t(!1)}e.gridElement.image||(e.gridElement.image=new U),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,M.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then(e=>{let t=new U({data:e});return dt.saveImage(t)}).then(t=>(e.gridElement.image.id=t,M.convertBase64(e.tempImage.data,e.elementW))).then(t=>{e.gridElement.image.data=t,n()})):(e.tempImage.data||(e.gridElement.image=null),n())})},initInternal(){var e=this;e.resetInternal(),e.tempImage=JSON.parse(JSON.stringify(new U)),dt.getGrid(e.gridDataId).then(t=>{if(e.gridData=JSON.parse(JSON.stringify(t)),e.editElementId){let t=e.gridData.gridElements.filter(t=>t.id===e.editElementId)[0];e.gridElement=JSON.parse(JSON.stringify(t)),t.image&&t.image.data&&(e.tempImage=JSON.parse(JSON.stringify(new U(t.image)))),e.elementW=$("#"+this.gridElement.id)[0].getBoundingClientRect().width,e.originalGridElementJSON=JSON.stringify(t)}else{var n=t.getNewXYPos();log.debug("creating element: x "+n.x+" / y "+n.y),e.gridElement=JSON.parse(JSON.stringify(new K({x:n.x,y:n.y})));var i=Math.round($("#grid-container")[0].getBoundingClientRect().height/t.rowCount);e.elementW=2*i,e.originalGridElementJSON=JSON.stringify(e.gridElement)}}),dt.getMetadata().then(t=>{e.metadata=t})},resetInternal(){this.gridElement=this.metadata=this.originalGridElementJSON=this.elementW=null},preventDefault(e){e.preventDefault()},openHelp(){ft.openHelp()},search(e){this.searchText=e,this.searchInput(0)},searchInput(e,t){let n=this;n.searchText=t?t.target.value:n.searchText,e=void 0===e?500:e,n.searchResults=[],n.searchLoading=!0,qe.debounce((function(){ni.query(n.searchText).then(e=>{n.processSearchResults(e)})}),e)},searchMore(){let e=this;ni.nextChunk().then(t=>{e.processSearchResults(t)})},clearSearch(){this.searchLoading=!1,this.searchResults=null,this.searchText=""},processSearchResults(e){let t=this;t.hasNextChunk=ni.hasNextChunk(),t.searchResults=t.searchResults.concat(e),t.searchLoading=!1,t.$forceUpdate(),e.forEach(e=>{e.promise.then(()=>{t.$forceUpdate()})})}},mounted(){this.editElementId=this.editElementIdParam,this.initInternal(),ft.setHelpLocation("03_appearance_layout","#edit-modal")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation()}},di=(n(67),Pt(ci,ti,[function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-file-upload"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Choose file // Datei auswählen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-arrow-down"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("drop new image here // neues Bild hierher ziehen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("No search results.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("Keine Resultate.")]),this._v(" Versuchen Sie es ev. nochmal mit einem "),t("b",[this._v("englischen Suchbegriff")]),this._v(".")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("Für eine Symbolsuche auf Deutsch können Sie "),t("a",{attrs:{target:"_blank",href:"https://www.pictoselector.eu/de/home/download/"}},[this._v("Picto-Selector")]),this._v(" verwenden. Symbole aus diesem Programm können mit Drag & Drop direkt in AsTeRICS Grid eingefügt werden.")])}],!1,null,"2dc40afd",null));di.options.__file="src/vue-components/modals/editGridModal.vue";var ui=di.exports,fi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Element1;Element2;Element3;..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Elements // Erkannte Elemente")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.parsedElems.length))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Element(s) // Element(e)")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.parsedElems.length,expression:"parsedElems.length == 0"}],staticClass:"nine columns"},[n("span",{attrs:{"data-i18n":""}},[e._v("No elements // Keine Elemente")])])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]",disabled:0==e.parsedElems.length},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Insert elements // Elemente einfügen")])])])])])])])])};fi._withStripped=!0;var pi={props:["gridData","gridInstance"],data:function(){return{inputText:"",parsedElems:[]}},methods:{textChanged(){var e=(e=this.inputText||"").replace(/\n/gi,";").replace(/;;/gi,";");this.parsedElems=e.split(";").map(e=>e.trim()).filter(e=>e.length>0)},save(){if(0!==this.parsedElems.length){var e=new de(this.gridData);this.parsedElems.forEach(t=>{var n=new K({label:C.getTranslationObject(t),x:e.getNewXYPos().x,y:e.getNewXYPos().y});e.gridElements.push(n)}),this.gridInstance.updateGridWithUndo(e),this.$emit("close")}}},mounted(){C.initDomI18n(),ft.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy(){ft.revertToLastLocation()}},hi=(n(69),Pt(pi,fi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Add multiple grid items // Mehrere Grid-Elemente hinzufügen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("label",{staticClass:"three columns",attrs:{for:"inputText","data-i18n":""}},[this._v("Input // Eingabe")]),this._v(" "),t("span",{staticClass:"nine columns",attrs:{"data-i18n":""}},[this._v('Insert Labels for new elements, separated by ";" or [Enter] // Geben Sie Label für neue Elemente getrennt durch ";" oder [Enter] ein')])])}],!1,null,"761467a8",null));hi.options.__file="src/vue-components/modals/addMultipleModal.vue";var mi=hi.exports,vi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[e.gridElement?n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.editNext():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Edit actions // Aktionen bearbeiten")]),e._v(" "),n("span",[n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type === GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type!==e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type !== GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("translate")(e.gridElement.type))+'")')])]),e._v(" "),e.gridElement.image?n("img",{staticClass:"spaced",staticStyle:{"max-height":"1.5em","margin-bottom":"-0.3em"},attrs:{id:"imgPreview",src:e.gridElement.image.data}}):e._e()])]),e._v(" "),e.gridElement?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("New Action // Neue Aktion")]),e._v(" "),n("select",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.selectedNewAction,expression:"selectedNewAction"}],staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"},attrs:{id:"selectActionType"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedNewAction=t.target.multiple?n:n[0]}}},e._l(e.actionTypes,(function(t){return n("option",{domProps:{value:t.getModelName()}},[e._v(e._s(e._f("translate")(t.getModelName())))])})),0),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.addAction()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Add action // Aktion hinzufügen")])])]),e._v(" "),e._m(0),e._v(" "),n("ul",{attrs:{id:"actionList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.gridElement.actions.length,expression:"gridElement.actions.length == 0"}],staticClass:"row",attrs:{"data-i18n":""}},[e._m(1),e._v(" "),e._m(2)]),e._v(" "),e._l(e.gridElement.actions,(function(t){return n("li",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.editActionId!=t.id,expression:"editActionId != action.id"}]},[n("div",{staticClass:"four columns"},[e._v("\n "+e._s(e._f("translate")(t.modelName))+"\n ")]),e._v(" "),n("div",{staticClass:"eight columns actionbtns"},[n("button",{on:{click:function(n){return e.editAction(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteAction(t)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),"GridActionNavigate"!=t.modelName?n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])]):e._e()])]),e._v(" "),e.editActionId==t.id?n("div",[n("div",{},[n("b",[e._v(e._s(e._f("translate")(t.modelName)))]),e._v(" "),n("a",{staticClass:"black",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("div",["GridActionSpeak"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(3,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticStyle:{width:"55%"},attrs:{id:"selectLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2),e._v(" "),n("button",{staticClass:"inline spaced",on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionSpeakCustom"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(4,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticClass:"eight columns",attrs:{id:"selectLang2"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(5,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.speakText[e.currentLang],expression:"action.speakText[currentLang]"}],staticStyle:{width:"70%"},attrs:{id:"inCustomText",type:"text"},domProps:{value:t.speakText[e.currentLang]},on:{input:function(n){n.target.composing||e.$set(t.speakText,e.currentLang,n.target.value)}}}),e._v(" "),n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionNavigate"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.toLastGrid,expression:"action.toLastGrid"}],attrs:{id:"navigateBackChkbox",type:"checkbox"},domProps:{checked:Array.isArray(t.toLastGrid)?e._i(t.toLastGrid,null)>-1:t.toLastGrid},on:{change:function(n){var i=t.toLastGrid,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"toLastGrid",i.concat([null])):s>-1&&e.$set(t,"toLastGrid",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"toLastGrid",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"navigateBackChkbox","data-i18n":""}},[e._v("Navigate to last opened grid // Zum zuletzt geöffneten Grid navigieren")])]),e._v(" "),n("div",{staticClass:"row"},[e._m(6,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.toGridId,expression:"action.toGridId"}],staticClass:"eight columns",attrs:{id:"selectGrid",type:"text",disabled:t.toLastGrid},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"toGridId",n.target.multiple?i:i[0])}}},e._l(e.gridLabels,(function(t,i){return n("option",{domProps:{value:i}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionARE"==t.modelName?n("div",[n("edit-are-action",{attrs:{action:t,"grid-data":e.gridData,"model-file":e.additionalGridFiles[t.id],"set-grid-file-fn":e.setAdditionalGridFile,"end-edit-fn":e.endEditAction}})],1):e._e(),e._v(" "),"GridActionPredict"==t.modelName?n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElementClass.ELEMENT_TYPE_COLLECT,expression:"gridElement.type === GridElementClass.ELEMENT_TYPE_COLLECT"}],staticClass:"row"},[n("div",{staticClass:"eight columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.suggestOnChange,expression:"action.suggestOnChange"}],attrs:{id:"chkSuggestOnChange",type:"checkbox"},domProps:{checked:Array.isArray(t.suggestOnChange)?e._i(t.suggestOnChange,null)>-1:t.suggestOnChange},on:{change:function(n){var i=t.suggestOnChange,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"suggestOnChange",i.concat([null])):s>-1&&e.$set(t,"suggestOnChange",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"suggestOnChange",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"chkSuggestOnChange","data-i18n":""}},[e._v("Refresh suggestions on change // Vorschläge bei Änderung aktualisieren")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(7,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"action.dictionaryKey"}],staticClass:"eight columns",attrs:{id:"comboUseDict"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"dictionaryKey",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("all dictionaries // alle Wörterbücher")]),e._v(" "),e._l(e.dictionaryKeys,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionCollectElement"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectCollectElmAction","data-i18n":""}},[e._v("Perform action on collect element // Aktion für Sammelelement ausführen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectCollectElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.collectActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionWebradio"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadioElmAction","data-i18n":""}},[e._v("Web radio action // Web-Radio Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectRadioElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.webradioActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"WEBRADIO_ACTION_START"===t.action||"WEBRADIO_ACTION_TOGGLE"===t.action,expression:"action.action === 'WEBRADIO_ACTION_START' || action.action === 'WEBRADIO_ACTION_TOGGLE'"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadio","data-i18n":""}},[e._v("Webadio to play // Abzuspielendes Webradio")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.radioId,expression:"action.radioId"}],staticClass:"six columns",attrs:{id:"selectRadio"},on:{change:[function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"radioId",n.target.multiple?i:i[0])},function(n){return e.selectedRadioChanged(t.radioId)}]}},[n("option",{attrs:{value:"",selected:"","data-i18n":""}},[e._v("automatic (last played) // automatisch (zuletzt gespielt)")]),e._v(" "),e._l(e.gridData.webRadios,(function(t){return n("option",{domProps:{value:t.radioId}},[e._v("\n "+e._s(t.radioName)+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"twelve columns",attrs:{"acc-label":"Manage webradio list // Webradioliste verwalten","acc-open":0===e.gridData.webRadios.length?"true":"false"}},[n("radio-list-selector",{model:{value:e.gridData,callback:function(t){e.gridData=t},expression:"gridData"}})],1)],1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionYoutube"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytActions","data-i18n":""}},[e._v("YouTube video action // YouTube-Video Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"ytActions"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.GridActionYoutube.actions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytPlayType","data-i18n":""}},[e._v("Play type // Wiedergabe Typ")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.playType,expression:"action.playType"}],staticClass:"six columns",attrs:{id:"ytPlayType"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"playType",n.target.multiple?i:i[0])}}},e._l(Object.keys(e.GridActionYoutube.playTypes).filter((function(t){return t!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED})),(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("translate")(t)))])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType&&-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"action.playType && [GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED,expression:"action.playType !== GridActionYoutube.playTypes.YT_PLAY_RELATED"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_VIDEO,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_VIDEO"}],attrs:{"data-i18n":""}},[e._v("Video link // Video Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_SEARCH,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_SEARCH"}],attrs:{"data-i18n":""}},[e._v("YouTube search query // YouTube Suchanfrage")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_PLAYLIST,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_PLAYLIST"}],attrs:{"data-i18n":""}},[e._v("YouTube playlist link // YouTube Playlist Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_CHANNEL,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_CHANNEL"}],attrs:{"data-i18n":""}},[e._v("YouTube channel link // YouTube Channel-Link")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.data,expression:"action.data"}],staticClass:"six columns",attrs:{id:"ytList",type:"text"},domProps:{value:t.data},on:{input:function(n){n.target.composing||e.$set(t,"data",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.showCC,expression:"action.showCC"}],attrs:{id:"showCC",type:"checkbox"},domProps:{checked:Array.isArray(t.showCC)?e._i(t.showCC,null)>-1:t.showCC},on:{change:function(n){var i=t.showCC,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"showCC",i.concat([null])):s>-1&&e.$set(t,"showCC",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"showCC",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"showCC","data-i18n":""}},[e._v("Show video subtitles (if available) // Zeige Video-Untertitel (wenn verfügbar)")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.playMuted,expression:"action.playMuted"}],attrs:{id:"playMuted",type:"checkbox"},domProps:{checked:Array.isArray(t.playMuted)?e._i(t.playMuted,null)>-1:t.playMuted},on:{change:function(n){var i=t.playMuted,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"playMuted",i.concat([null])):s>-1&&e.$set(t,"playMuted",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"playMuted",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"playMuted","data-i18n":""}},[e._v("Start video muted // Video stummgeschaltet starten")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.performAfterNav,expression:"action.performAfterNav"}],attrs:{id:"afterNav",type:"checkbox"},domProps:{checked:Array.isArray(t.performAfterNav)?e._i(t.performAfterNav,null)>-1:t.performAfterNav},on:{change:function(n){var i=t.performAfterNav,a=n.target,r=!!a.checked;if(Array.isArray(i)){var s=e._i(i,null);a.checked?s<0&&e.$set(t,"performAfterNav",i.concat([null])):s>-1&&e.$set(t,"performAfterNav",i.slice(0,s).concat(i.slice(s+1)))}else e.$set(t,"performAfterNav",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"afterNav","data-i18n":""}},[e._v("Perform action after navigation // Aktion erst nach Navigation ausführen")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_STEP_FORWARD,e.GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_STEP_FORWARD, GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepSeconds","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(seconds) // (Sekunden)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepSeconds,expression:"action.stepSeconds"}],staticClass:"six columns",attrs:{id:"stepSeconds",type:"number",min:"0"},domProps:{value:t.stepSeconds},on:{input:function(n){n.target.composing||e.$set(t,"stepSeconds",n.target.value)}}})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_VOLUME_UP,e.GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_VOLUME_UP, GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepVolume","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(precent) // (Prozent)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepVolume,expression:"action.stepVolume"}],staticClass:"six columns",attrs:{id:"stepVolume",type:"number",min:"0",max:"100"},domProps:{value:t.stepVolume},on:{input:function(n){n.target.composing||e.$set(t,"stepVolume",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionChangeLang"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"changeLang","data-i18n":""}},[e._v("Change application language to // Sprache der Anwendung ändern zu")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.language,expression:"action.language"}],staticClass:"six columns",attrs:{id:"changeLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"language",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("System language // Systemsprache")]),e._v(" "),e._l(e.selectFromAllLanguages?e.allLanguages:e.gridLanguages,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectFromAllLanguages,expression:"selectFromAllLanguages"}],attrs:{id:"selectFromAllLangs",type:"checkbox"},domProps:{checked:Array.isArray(e.selectFromAllLanguages)?e._i(e.selectFromAllLanguages,null)>-1:e.selectFromAllLanguages},on:{change:function(t){var n=e.selectFromAllLanguages,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.selectFromAllLanguages=n.concat([null])):r>-1&&(e.selectFromAllLanguages=n.slice(0,r).concat(n.slice(r+1)))}else e.selectFromAllLanguages=a}}}),e._v(" "),n("label",{attrs:{for:"selectFromAllLangs","data-i18n":""}},[e._v("Show all Languages for selection // Zeige alle Sprachen zur Auswahl")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e()])]):e._e()])}))],2)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v('OK, to "edit element" // OK, zu "Element bearbeiten"')]),e._v(" "),n("i",{staticClass:"fas fa-pencil-alt"})])])])])]):e._e()])])])};vi._withStripped=!0;let gi="https://de1.api.radio-browser.info/json/",_i=["name","country","state","language","tag","tagList","order"],bi={},Ei=document.getElementById("audioPlayer"),yi=document.getElementById("videoPlayer"),Ci=g.get("WEBRADIO_LAST_PLAYED_ID_KEY"),wi=parseFloat(g.get("WEBRADIO_LAST_VOLUME_KEY")||1),Ti=!1,Ai=!1;function Ni(){jt.setTooltip(C.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*wi)),{revertOnClose:!0,timeout:5e3})}function Si(e,t){return new Promise((n,i)=>{if(e.radioUrl)return n(e);a.a.ajax({type:"GET",url:gi+"url/"+e.radioId,dataType:"json"}),a.a.ajax({type:"GET",url:gi+"stations/byuuid/"+e.radioId,dataType:"json"}).then(i=>{let a=i[0];e.radioUrl=a.url_resolved||a.url,e.radioUrl.lastIndexOf("/")===e.radioUrl.length-1&&(e.radioUrl=e.radioUrl+";");let r=e.radioUrl.lastIndexOf(":");if(r>-1){let t=e.radioUrl.substring(r+1);parseInt(t)+""===t&&(e.radioUrl=e.radioUrl+"/;")}t&&dt.getGrid(t).then(t=>{let n=(t.webRadios||[]).filter(t=>e.radioId===t.radioId)[0];n&&(n.radioUrl=e.radioUrl,dt.saveGrid(t))}),n(e)})})}bi.doAction=function(e,t){dt.getGrid(e).then(n=>{let i=n.webRadios||[],a=t.radioId||Ci,r=i.filter(e=>a===e.radioId)[0]||i[0],s=0;if(r)switch(t.action){case H.WEBRADIO_ACTION_START:Si(r,e).then(e=>{bi.play(e)});break;case H.WEBRADIO_ACTION_TOGGLE:Si(r,e).then(e=>{bi.toggle(e)});break;case H.WEBRADIO_ACTION_STOP:bi.stop();break;case H.WEBRADIO_ACTION_NEXT:if(s=i.map(e=>e.radioId).indexOf(r.radioId),s<0||i.length<2)return;s=s+1{bi.play(e)});break;case H.WEBRADIO_ACTION_PREV:if(s=i.map(e=>e.radioId).indexOf(r.radioId),s<0||i.length<2)return;s=s-1>=0?s-1:i.length-1,Si(i[s],e).then(e=>{bi.play(e)});break;case H.WEBRADIO_ACTION_VOLUP:bi.volumeUp();break;case H.WEBRADIO_ACTION_VOLDOWN:bi.volumeDown()}else log.info("no radio station to play found.")})},bi.play=function(e){e&&(Ei.paused||Ci!==e.radioId)&&(Ei.paused&&yi.paused||bi.stop(),Ci=e.radioId||Ci,g.save("WEBRADIO_LAST_PLAYED_ID_KEY",Ci),Si(e).then(t=>{log.debug("playing: "+t.radioUrl);let i=Promise.resolve();-1!==e.radioUrl.indexOf(".m3u8")?(Ai=!0,yi.src=t.radioUrl,n.e(4).then(n.t.bind(null,621,7)).then(e=>{if((e=e.default).isSupported()){let n=new e;n.loadSource(t.radioUrl),n.attachMedia(yi),n.on(e.Events.MANIFEST_PARSED,(function(){yi.play()}))}})):(Ai=!1,Ei.src=t.radioUrl,Ei.volume=wi,i=Ei.play());let a=C.translate("playing: {?} // Wiedergabe: {?}",t.radioName);jt.setTooltip(a,{closeOnNavigate:!1,actionLink:C.translate("Stop // Stopp"),actionLinkFn:bi.stop,imageUrl:t.faviconUrl}),i&&i.then&&i.catch(()=>{Ci===e.radioId&&function(e){jt.setTooltip(C.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName),{msgType:"warn"})}(e)})}))},bi.stop=function(e){e&&e!==Ci||(Ei.pause(),yi.pause(),jt.clearTooltip())},bi.toggle=function(e){!Ai&&Ei.paused||Ai&&yi.paused?bi.play(e):bi.stop()},bi.volumeUp=function(){wi=wi+.15<=1?wi+.15:1,wi=Math.round(100*wi)/100,g.save("WEBRADIO_LAST_VOLUME_KEY",wi),Ni(),Ei.volume=wi,yi.volume=wi},bi.volumeDown=function(){wi=wi-.15>=0?wi-.15:0,wi=Math.round(100*wi)/100,g.save("WEBRADIO_LAST_VOLUME_KEY",wi),Ni(),Ei.volume=wi,yi.volume=wi},bi.search=function(e,t,n){if(!e)return Promise.resolve([]);let i={},r=[];_i.forEach(t=>{let n=e.indexOf(t+":");n>-1&&r.push({param:t,position:n})}),r.sort((e,t)=>e.position-t.position),r.forEach((t,n,a)=>{let r=a[n+1],s=r?r.position-1:void 0,o=e.substring(t.position+t.param.length+1,s);o=o.replace(/(^")|("$)/g,""),i[t.param]=o}),0===Object.keys(i).length&&(i.name=e);let s=t||20;return s++,i.limit=s,n&&(i.offset=n),new Promise((e,t)=>{a.a.ajax({type:"POST",url:gi+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then(t=>{Ti=t.length===s;let n=t.filter(e=>"0"!==e.lastcheckok);n=n.slice(0,s-1),e(n.map(e=>({radioId:e.stationuuid,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon})))},e=>{t(e)})})},bi.hasMoreSearchResults=function(){return Ti};let Ii={};function ki(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak"),Tn.speak(e.label,t.speakLanguage);break;case"GridActionSpeakCustom":log.debug("action speak custom"),t.speakText&&Tn.speak(t.speakText,t.speakLanguage);break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?as.toLastGrid():as.isOnEditPage()?as.toEditGrid(t.toGridId):as.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?Oi(t,i):dt.getGrid(n).then(e=>{Oi(t,e)});break;case"GridActionPredict":log.debug("action predict"),Ye.predict(C.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),Wn.doCollectElementActions(t.action);break;case"GridActionWebradio":bi.doAction(n,t);break;case"GridActionYoutube":Ln.doAction(t);break;case"GridActionChangeLang":C.setLanguage(t.language),C.initDomI18n()}}function Oi(e,t){if(!e.componentId)return;let n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;yt.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then(()=>{e.dataPortId&&e.dataPortSendData&&yt.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&yt.triggerEvent(e.componentId,e.eventPortId,e.areURL)})}Ii.doAction=function(e,t){e&&t&&dt.getGridElement(e,t).then(n=>{switch(log.debug("do actions for: "+C.getTranslation(n.label)+", "+t),n.type){case K.ELEMENT_TYPE_COLLECT:Wn.doAction(n);break;case K.ELEMENT_TYPE_PREDICTION:Ye.doAction(n.id)}!function(e,t){e.actions.forEach(n=>{ki(e,n,t)})}(n,e),$(window).trigger(r.ELEMENT_EVENT_ID,[n])})},Ii.testAction=function(e,t,n){ki(e,t,n.id,n)};var Li=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[e._m(0),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.areURL,expression:"action.areURL"}],staticClass:"six columns",attrs:{id:"inputAREURI",type:"text"},domProps:{value:e.action.areURL},on:{change:function(t){return e.fixAreUrl()},input:function(t){t.target.composing||e.$set(e.action,"areURL",t.target.value)}}}),e._v(" "),n("div",{staticClass:"six columns"},[n("button",{staticStyle:{width:"70%"},on:{click:function(t){return e.testAREUrl(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test URL // URL testen")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:void 0===e.areConnected,expression:"areConnected === undefined"}],staticClass:"spaced"},[n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areConnected,expression:"areConnected"}],staticClass:"spaced",staticStyle:{color:"green"}},[n("i",{staticClass:"fas fa-check"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.areConnected,expression:"areConnected == false"}],staticClass:"spaced",staticStyle:{color:"red"}},[n("i",{staticClass:"fas fa-times"})])])])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],attrs:{"data-i18n":""}},[e._v("Loading Model from ARE... // Lade Modell von ARE...")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Could not load Model from ARE! // Konnte Modell nicht von ARE laden!")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&!e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && !areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("(no ARE model) // (kein ARE Modell)")]),e._v(" "),!e.loading&&e.areModelFile&&e.areModelFile.dataBase64?n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.downloadModelFile(e.areModelFile)}}},[e._v(e._s(e.areModelFile.fileName))])]):e._e()])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.reloadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-download"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download from ARE // Download von ARE")])]),e._v(" "),e.areModelFile&&e.areModelFile.dataBase64?n("button",{staticClass:"six columns",on:{click:function(t){return e.uploadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-upload"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Upload to ARE // Upload zu ARE")])]):e._e()])])]),e._v(" "),e.areModelSync?e._e():n("div",{staticClass:"row"},[n("div",{staticClass:"ten columns offset-by-two"},[n("i",{staticClass:"fas fa-info-circle"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&e.areModelFile.dataBase64,expression:"areModelFile && areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Upload the saved model or download current ARE model in order to define the action. // Laden Sie das gespeicherte Modell hoch oder das aktuelle ARE Modell herunter um die Aktion zu definieren.")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&!e.areModelFile.dataBase64,expression:"areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Download the current ARE model in order to define the action. // Laden Sie das aktuelle ARE Modell herunter um die Aktion zu definieren.")])])]),e._v(" "),e.areModelSync?n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.componentId,expression:"action.componentId"}],staticClass:"five columns",attrs:{id:"inputComponentId"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"componentId",t.target.multiple?n:n[0])},function(t){return e.reloadPorts(e.action)}]}},e._l(e.areComponentIds,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentPorts.length?n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputDataPortId"}},[e._v("Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortId,expression:"action.dataPortId"}],staticClass:"full-width",attrs:{id:"inputDataPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"dataPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"inputDataPortData","data-i18n":""}},[e._v("Data // Daten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortSendData,expression:"action.dataPortSendData"}],staticClass:"full-width",attrs:{id:"inputDataPortData",type:"text"},domProps:{value:e.action.dataPortSendData},on:{input:function(t){t.target.composing||e.$set(e.action,"dataPortSendData",t.target.value)}}})])]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentEventPorts.length?n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputeventPortId"}},[e._v("Event-Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.eventPortId,expression:"action.eventPortId"}],staticClass:"full-width",attrs:{id:"inputeventPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"eventPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentEventPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.testAction(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test action // Aktion Testen")])]),e._v(" "),n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])};Li._withStripped=!0;var xi={props:["action","gridData","modelFile","setGridFileFn","endEditFn"],data:function(){return{loading:!1,areConnected:null,areComponentIds:[],areComponentPorts:[],areComponentEventPorts:[],areModelFile:null,areModelSync:!1}},methods:{endEditAction(){this.endEditFn()},testAction(e){let t=this.areModelFile.dataBase64?{additionalFiles:[this.areModelFile]}:{};Ii.testAction(null,e,new de(t,this.gridData))},reloadAREModel(e){var t=this;t.loading=!0,yt.downloadDeployedModelBase64(e.areURL).then(n=>{yt.getModelName(e.areURL).then(i=>{t.areModelFile.dataBase64=n,t.areModelFile.fileName=i,e.areModelGridFileName=i,t.setGridFileFn(t.action,t.areModelFile),t.loading=!1,t.areModelSync=!0,t.reloadComponentIds(e),t.reloadPorts(e)})}).catch(()=>{t.areModelFile.dataBase64=null,t.setGridFileFn(t.action,null),t.loading=!1})},uploadAREModel(e){var t=this;yt.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then(()=>{t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0})},reloadComponentIds(e){var t=this;yt.getRuntimeComponentIds(e.areURL).then(e=>{t.areComponentIds=e})},reloadPorts(e){var t=this;yt.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then(e=>{t.areComponentEventPorts=e}),yt.getComponentInputPortIds(e.componentId,e.areURL).then(e=>{t.areComponentPorts=e})},testAREUrl(e){var t=this;e.areURL=yt.getRestURL(e.areURL),t.areConnected=void 0,yt.getModelName(e.areURL).then(()=>{t.areConnected=!0}).catch(()=>{t.areConnected=!1})},downloadModelFile(e){var t=new Blob([window.atob(e.dataBase64)],{type:"text/plain;charset=utf-8"}),n=-1!=e.fileName.indexOf(".acs")?e.fileName:e.fileName+".acs";k.a.saveAs(t,n)},fixAreUrl(){this.action.areURL=yt.getRestURL(this.action.areURL)}},mounted(){this.action.areURL=this.action.areURL||yt.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new de(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new J),ft.setHelpLocation("05_actions","#asterics-action")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation()}},Di=(n(71),Pt(xi,Li,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputAREURI"}},[this._v("ARE URL")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text"},[this._v("ARE Model")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputComponentId","data-i18n":""}},[this._v("Component // Komponente")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputDataPortId","data-i18n":""}},[t("span",[this._v("Send data "),t("span",{staticClass:"show-mobile"},[this._v("to port")])]),this._v(" "),t("span",[this._v("Sende Daten "),t("span",{staticClass:"show-mobile"},[this._v("zu Port")])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputeventPortId","data-i18n":""}},[t("span",[this._v("Trigger event "),t("span",{staticClass:"show-mobile"},[this._v("on event port")])]),this._v(" "),t("span",[this._v("Event triggern "),t("span",{staticClass:"show-mobile"},[this._v("auf Event-Port")])])])])}],!1,null,"74c379ae",null));Di.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var Ri=Di.exports,Mi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[n("h3",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),e._v(" "),n("button",{staticClass:"six columns",on:{click:e.addAllRadioElements}},[e._v("Grid-Elemente für Radios erstellen")])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.selectedRadioList,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",on:{click:function(n){return e.removeRadio(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Remove // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop")]),e._v(" "),n("i",{staticClass:"fas fa-pause"})]):e._e(),e._v(" "),n("button",{staticClass:"right",on:{click:function(n){return e.moveWebradioUp(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Up // Nach oben")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-up"})])])])])})),0),e._v(" "),0===e.selectedRadioList.length?n("div",{attrs:{"data-i18n":""}},[e._v("No selected radio stations, use search bar below to add radio stations. // Keine ausgewählten Radiosender, verwenden Sie die Suche unten um Radiosender hinzuzufügen.")]):e._e()]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"searchwebradios","data-i18n":""}},[e._v("Search term // Suchbegriff")]),e._v(" "),n("i",{staticClass:"fas fa-info-circle hide-mobile",attrs:{title:e._f("translate")("by default searches for radio station name, advanced search possible like e.g. tag:jazz, language:english or country:austria // sucht standardmäßig nach Radiosender-Name, erweiterte Suche z.B. möglich mit tag:jazz, language:english oder country:austria")}})]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.webradioSearch,expression:"webradioSearch"}],staticClass:"six columns",attrs:{id:"searchwebradios",type:"text"},domProps:{value:e.webradioSearch},on:{input:[function(t){t.target.composing||(e.webradioSearch=t.target.value)},function(t){return e.searchWebradios(t)}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.webradioSearchResults,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",attrs:{disabled:e.selectedRadioList.map((function(e){return e.radioId})).indexOf(t.radioId)>-1},on:{click:function(n){e.selectedRadioList.push(t),e.modelChanged()}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Select // Wählen")]),e._v(" "),n("i",{staticClass:"fas fa-plus"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop ")]),n("i",{staticClass:"fas fa-pause"})]):e._e()])])])})),0),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.webradioSearchResults.length&&e.webradioSearch&&!e.webradioSearching&&!e.webradioSearchError,expression:"webradioSearchResults.length === 0 && webradioSearch && !webradioSearching && !webradioSearchError"}],attrs:{"data-i18n":""}},[e._v("No radio stations found, try an other search term. // Keine Radiosender gefunden, versuchen Sie einen anderen Suchbegriff.")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchError,expression:"webradioSearchError"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Searching failed, no connection to internet. // Suche fehlgeschlagen, keine Verbindung zum Internet.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:e.searchWebradios}},[e._v("Retry // Erneut versuchen")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchResults.length>0,expression:"webradioSearchResults.length > 0"}],staticStyle:{display:"flex","margin-top":"0.5em"}},[n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:0===e.webradioStartIndex},on:{click:e.prevSearchResults}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Previous page // Vorige Seite")])]),e._v(" "),n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:!e.hasMoreWebradios},on:{click:e.nextSearchResults}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Next page // Nächste Seite")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])])])};Mi._withStripped=!0;var Pi={props:{value:Object},watch:{value:{handler:function(e){this.gridData=JSON.parse(JSON.stringify(e)),this.selectedRadioList=this.gridData.webRadios},deep:!0}},data:()=>({gridData:null,selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:bi,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}),methods:{modelChanged(){this.gridData.webRadios=this.selectedRadioList,this.$emit("input",JSON.parse(JSON.stringify(this.gridData)))},addAllRadioElements(){if(!confirm(C.translate("This action adds {?} new elements to the grid. Continue? // Diese Aktion fügt {?} neue Elemente zum Grid hinzu. Fortfahren?",this.gridData.webRadios.length)))return;let e=this,t=Promise.resolve();e.gridData.webRadios.forEach((n,i)=>{var a;t=t.then((a=n,()=>M.urlToBase64(a.faviconUrl).then(t=>{let n=t?new U({data:t}):void 0,i=new de(e.gridData).getNewGridElement({label:C.getTranslationObject(a.radioName),actions:[new H({radioId:a.radioId,action:H.WEBRADIO_ACTION_START})],image:n});return e.gridData.gridElements.push(i),Promise.resolve()})))}),t.then(()=>{this.modelChanged()})},searchWebradios(e){this.webradioSearch=e.target.value,this.webradioStartIndex=0,this.searchWebradiosInternal()},nextSearchResults(){this.webradioStartIndex+=10,this.searchWebradiosInternal()},prevSearchResults(){this.webradioStartIndex-=10,this.searchWebradiosInternal()},searchWebradiosInternal(){let e=this;e.webradioSearching=!0,e.webradioSearchError=!1,qe.debounce(()=>{bi.search(e.webradioSearch,10,e.webradioStartIndex).then(t=>{e.hasMoreWebradios=bi.hasMoreSearchResults(),e.webradioSearchResults=t,e.webradioSearching=!1}).catch(t=>{e.webradioSearchError=!0,e.webradioSearching=!1})},500)},moveWebradioUp(e){let t=this.selectedRadioList.indexOf(e);t>0&&(this.selectedRadioList.splice(t-1,0,this.selectedRadioList.splice(t,1)[0]),this.modelChanged())},removeRadio(e){bi.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter(t=>t.radioId!==e.radioId),this.modelChanged()}},mounted(){this.gridData=JSON.parse(JSON.stringify(this.value)),this.selectedRadioList=this.gridData.webRadios,C.initDomI18n()},updated(){C.initDomI18n()}},Gi=(n(73),Pt(Pi,Mi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h3",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Webradio search // Webradio Suche")]),this._v(" "),t("span",{staticClass:"six columns",attrs:{id:"poweredby","data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])])])])}],!1,null,"a1b68270",null));Gi.options.__file="src/vue-components/components/radioListSelector.vue";var Ui={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:K,editActionId:null,selectedNewAction:K.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:K.getActionTypes(),voiceLangs:Tn.getVoicesLangs(),dictionaryKeys:Ye.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:j.getActions(),webradioActions:H.getActions(),currentLang:C.getBrowserLang(),allLanguages:C.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1,GridActionYoutube:z,GridElement:K}},components:{RadioListSelector:Gi.exports,Accordion:qt,EditAreAction:Ri},methods:{selectedRadioChanged(e){let t=this.gridData.webRadios.filter(t=>t.radioId===e)[0].faviconUrl;t&&M.urlToBase64(t).then(e=>{e&&(this.gridElement.image=new U({data:e}))})},deleteAction(e){this.setAdditionalGridFile(e,null),this.gridElement.actions=this.gridElement.actions.filter(t=>t.id!=e.id)},editAction(e){this.editActionId=e.id},endEditAction(){this.editActionId=null},testAction(e){let t=this.additionalGridFiles[e.id]?{additionalFiles:[this.additionalGridFiles[e.id]]}:{};Ii.testAction(this.gridElement,e,new de(t,this.gridData))},addAction(){let e=JSON.parse(JSON.stringify(K.getActionInstance(this.selectedNewAction)));e.modelName===x.getModelName()&&(e.toGridId=Object.keys(this.gridLabels)[0]),this.gridElement.actions.push(e),this.editActionId=e.id},setAdditionalGridFile(e,t){t?this.additionalGridFiles[e.id]=t:delete this.additionalGridFiles[e.id]},save(e){var t=this;t.saveInternal().then(()=>{t.$emit("close"),e&&t.$emit("edit")})},openHelp(){ft.openHelp()},editNext(e){var t=this;t.saveInternal().then(()=>{t.editElementId=new de(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#selectActionType").focus()})},saveInternal(){let e=this;return e.gridData.gridElements.forEach((t,n)=>{t.id===e.gridElement.id&&(e.gridData.gridElements[n]=e.gridElement)}),dt.saveGrid(e.gridData).then(()=>dt.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then(()=>(e.$emit("reload"),Promise.resolve())))},initInternal(){let e=this;dt.getGrid(e.gridIdParam).then(t=>{e.gridData=JSON.parse(JSON.stringify(t));let n=Object.keys(e.gridData.label);e.gridLanguages=e.allLanguages.filter(e=>-1!==n.indexOf(e.code)),e.gridElement=e.gridData.gridElements.filter(t=>t.id===e.editElementId)[0]}),dt.getGridsAttribute("label").then(t=>{e.gridLabels=t})}},mounted(){this.editElementId=this.editElementIdParam,this.initInternal(),ft.setHelpLocation("05_actions","#edit-actions-modal")},updated(){C.initDomI18n()},beforeDestroy(){ft.setHelpLocation("02_navigation","#edit-view")}},$i=(n(75),Pt(Ui,vi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h2",{staticClass:"twelve columns",staticStyle:{"margin-top":"1em","font-size":"1.2em"},attrs:{for:"actionList","data-i18n":""}},[this._v("Current actions // Aktuelle Aktionen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("No actions defined, click on '"),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Add action")]),this._v("' to add one.")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v('Keine Aktionen definiert, klicken Sie auf "'),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Aktion hinzufügen")]),this._v('" um eine Aktion zu definieren.')])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang2","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inCustomText","data-i18n":""}},[this._v("Text to speak // Auszusprechender Text")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectGrid","data-i18n":""}},[this._v("Navigate to grid // Navigieren zu Grid")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"comboUseDict","data-i18n":""}},[this._v("Dictionary to use // Zu verwendendes Wörterbuch")])])}],!1,null,"07fb84aa",null));$i.options.__file="src/vue-components/modals/editActionsModal.vue";var Fi=$i.exports,Vi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",staticStyle:{"max-width":"500px"},on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridRows","data-i18n":""}},[e._v("Number of rows // Anzahl der Zeilen")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.rowCount,expression:"gridData.rowCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridRows",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.rowCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"rowCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridCols","data-i18n":""}},[e._v("Minimum number of columns // Minimale Anzahl der Spalten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.minColumnCount,expression:"gridData.minColumnCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridCols",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.minColumnCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"minColumnCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),e.isGlobalGrid&&e.metadata&&1===e.gridHeight?n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"metadataHeight","data-i18n":""}},[e._v("Height of first global grid row [%] // Höhe der ersten Zeile des globalen Grids [%]")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.metadata.globalGridHeightPercentage,expression:"metadata.globalGridHeightPercentage",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"metadataHeight",type:"number",min:"5",max:"50"},domProps:{value:e.metadata.globalGridHeightPercentage},on:{input:function(t){t.target.composing||e.$set(e.metadata,"globalGridHeightPercentage",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]):e._e()]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Vi._withStripped=!0;var Bi={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new de(this.gridDataParam).getHeight(),metadata:null}},methods:{save(){g.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});let e=[];this.metadata&&e.push(dt.saveMetadata(this.metadata)),Promise.all(e).then(()=>{this.$emit("save",this.gridData.rowCount,this.gridData.minColumnCount),this.$emit("close")})}},mounted(){this.isGlobalGrid&&dt.getMetadata().then(e=>{this.metadata=JSON.parse(JSON.stringify(e)),setTimeout(()=>C.initDomI18n(),10)}),C.initDomI18n()}},Yi=(n(77),Pt(Bi,Vi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Set grid size // Grid-Größe anpassen\n ")])])}],!1,null,"5f4007c6",null));Yi.options.__file="src/vue-components/modals/gridDimensionModal.vue";var ji=Yi.exports,Hi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.otherGrids&&e.gridElement&&e.selectedGrid?n("div",{staticClass:"modal-body container"},[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"moveGrid"}},[e._v(e._s(e.i18nService.translate('Move element "{?}" to grid // Verschiebe Element "{?}" nach Grid',e.i18nService.getTranslation(this.gridElement.label))))]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",staticStyle:{"margin-bottom":"1em"},attrs:{id:"moveGrid"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]}}},e._l(e.otherGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.selectedGrid.thumbnail?e.selectedGrid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"four columns"},[n("button",{staticStyle:{width:"49%"},on:{click:e.prev}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Back // Zurück")])]),e._v(" "),n("button",{staticStyle:{width:"49%"},on:{click:e.next}},[n("span",{attrs:{"data-i18n":""}},[e._v("Next // Weiter")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.moveAllElements,expression:"moveAllElements"}],attrs:{id:"moveAll",type:"checkbox"},domProps:{checked:Array.isArray(e.moveAllElements)?e._i(e.moveAllElements,null)>-1:e.moveAllElements},on:{change:function(t){var n=e.moveAllElements,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.moveAllElements=n.concat([null])):r>-1&&(e.moveAllElements=n.slice(0,r).concat(n.slice(r+1)))}else e.moveAllElements=a}}}),e._v(" "),n("label",{attrs:{for:"moveAll","data-i18n":""}},[e._v("Move all elements to this grid // Alle Elemente zu diesem Grid verschieben")])])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Hi._withStripped=!0;var Wi={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:C,imageUtil:M}},methods:{prev(){let e=null;this.otherGrids.forEach((t,n)=>{if(this.selectedGrid===t){let t=n-1<0?this.otherGrids.length-1:n-1;e=this.otherGrids[t]}}),this.selectedGrid=e},next(){let e=null;this.otherGrids.forEach((t,n)=>{if(this.selectedGrid===t){let t=n+1{this.$emit("reload"),this.$emit("close")})},saveInternal(){return dt.getGrid(this.selectedGrid.id).then(e=>{(this.moveAllElements?this.gridData.gridElements:[this.gridElement]).forEach(t=>{let n=t.width>1||t.height>1,i=e.getNewXYPos(n);t.x=i.x,t.y=i.y,e.gridElements.push(t)}),this.gridData.gridElements=this.moveAllElements?[]:this.gridData.gridElements.filter(e=>e.id!==this.gridElement.id);let t=[];return t.push(dt.saveGrid(this.gridData)),t.push(dt.saveGrid(e)),Promise.all(t)})}},mounted(){dt.getGrid(this.gridId).then(e=>{this.gridData=JSON.parse(JSON.stringify(e)),this.gridElement=this.gridData.gridElements.filter(e=>e.id===this.gridElementId)[0],C.initDomI18n()}),dt.getGrids(!1,!0).then(e=>{this.otherGrids=JSON.parse(JSON.stringify(e)).filter(e=>e.id!==this.gridId),this.selectedGrid=this.otherGrids[0]})},updated(){C.initDomI18n()}},zi=(n(79),Pt(Wi,Hi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Move grid element // Grid-Element verschieben\n ")])])}],!1,null,"0fc126e0",null));zi.options.__file="src/vue-components/modals/elementMoveModal.vue";var Ki=zi.exports,Ji=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),void 0!==e.gridData?n("div",{staticClass:"modal-body"},[n("div",[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"gridSelect","data-i18n":""}},[e._v("Grid to translate // Zu übersetzendes Grid")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.gridData,expression:"gridData"}],staticClass:"four columns",attrs:{id:"gridSelect"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.gridData=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("show all Grids // alle Grids anzeigen")]),e._v(" "),e._l(e.allGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])}))],2)]),e._v(" "),e.usedLocales.length>0?n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{"data-i18n":""}},[e._v("Select already used languages // Auswahl bereits verwendeter Sprachen")]),e._v(" "),n("span",{staticClass:"six columns"},e._l(e.usedLocales,(function(t){return t!==e.currentLocale?n("button",{staticStyle:{"margin-right":"0.5em"},on:{click:function(n){e.chosenLocale=t}}},[e._v(e._s(e.getLocaleTranslation(t)))]):e._e()})),0)]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-top":"2em"}},[n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v(" "),n("strong",[e._v(e._s(e.currentLangTranslated)+" ("+e._s(e.currentLocale)+")")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.currentLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.currentLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])]),e._v(" "),n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v("\n  "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.chosenLocale,expression:"chosenLocale"}],on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.chosenLocale=t.target.multiple?n:n[0]}}},e._l(e.allLanguages.filter((function(t){return t.code!==e.currentLocale})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.chosenLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.chosenLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])])]),e._v(" "),n("div",{attrs:{id:"translationList"}},e._l(e.gridData?[e.gridData]:e.allGrids,(function(t){return n("ul",[n("li",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.currentLocale],expression:"data.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:t.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.currentLocale,n.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.chosenLocale],expression:"data.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:t.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.chosenLocale,n.target.value)}}})])]),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",[i.label[e.currentLocale]||i.label[e.chosenLocale]?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.currentLocale],expression:"el.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.chosenLocale],expression:"el.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.chosenLocale,t.target.value)}}})]):e._e()]):e._e()})),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",e._l(i.actions,(function(i){return i.modelName===e.GridActionSpeakCustom.getModelName()&&(i.speakText[e.currentLocale]||i.speakText[e.chosenLocale])?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.currentLocale],expression:"action.speakText[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.speakText[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.chosenLocale],expression:"action.speakText[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.speakText[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.chosenLocale,t.target.value)}}})]):e._e()})),0):e._e()}))],2)})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"three columns offset-by-six",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"three columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Save // Speichern")])])])])])])])])};Ji._withStripped=!0,window.hideKeyboardTranslations=!0;var Xi={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:C.getBrowserLang(),chosenLocale:C.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:V,allLanguages:C.getAllLanguages(),usedLocales:g.getUsedLocales(),changedGrids:[]}},computed:{currentLangTranslated:function(){return this.getLocaleTranslation(this.currentLocale)},chosenLangTranslated:function(){return this.getLocaleTranslation(this.chosenLocale)}},methods:{save(){let e=this,t=e.gridData||e.allGrids[0];g.addUsedLocales(Object.keys(t.label)),dt.saveGrids(JSON.parse(JSON.stringify(e.changedGrids))).then(()=>{e.$emit("reload"),e.$emit("close")})},changedGrid(e){e?-1===this.changedGrids.indexOf(e)&&this.changedGrids.push(e):this.changedGrids=this.allGrids},getLocaleTranslation(e){return C.getTranslation(this.allLanguages.filter(t=>t.code===e)[0])},copy(e){let t=a()(`#translationList input[lang='${e}']`).toArray().reduce((e,t)=>e+t.value+"\n","");qe.copyToClipboard(t)},paste(e){qe.getClipboardContent().then(t=>{if(!t)return;this.changedGrid(this.gridData);let n=t.trim().split("\n");a()(`#translationList input[lang='${e}']`).toArray().forEach((e,t)=>{n[t]&&(a()(e).val(n[t]),a()(e)[0].dispatchEvent(new Event("input")))})})},showGridElements(e){return!window.hideKeyboardTranslations||null!==this.gridData||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))}},mounted(){dt.getGrids(!0).then(e=>{this.allGrids=JSON.parse(JSON.stringify(e)),this.allGrids.sort((e,t)=>C.getTranslation(e.label).localeCompare(C.getTranslation(t.label))),this.gridData=this.allGrids.filter(e=>e.id===this.gridDataId)[0]}),C.initDomI18n()},updated(){C.initDomI18n()}},qi=(n(81),Pt(Xi,Ji,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Translate Grids // Grids übersetzen\n ")])])}],!1,null,"7d6c5d35",null));qi.options.__file="src/vue-components/modals/gridTranslateModal.vue";var Zi=qi.exports;let Qi=null,ea=null;var ta=Pt({props:["gridId"],data:()=>({gridData:null,metadata:null,canUndo:!1,canRedo:!1,doingUndoRedo:!1,showEditModal:!1,showMultipleModal:!1,showActionsModal:!1,showDimensionsModal:!1,showMoveModal:!1,showTranslateModal:!1,editElementId:null,showGrid:!1,constants:r,markedElement:null}),components:{GridTranslateModal:Zi,ElementMoveModal:Ki,GridDimensionModal:ji,EditGridModal:ui,AddMultipleModal:mi,EditActionsModal:Fi,HeaderIcon:zt},methods:{setDimensions:function(e,t){ea.setDimensions(e,t)},fillGaps:function(){ea.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){ea.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){ea.redo()}),10)},reload(e){ea.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back(){as.toMain()},editElement(e){this.editElementId=e,this.showEditModal=!0},removeElement(e){let t=this;ea.removeElement(e).then(e=>{t.gridData=e})},newElement(e){switch(e){case K.ELEMENT_TYPE_PREDICTION:case K.ELEMENT_TYPE_COLLECT:case K.ELEMENT_TYPE_YT_PLAYER:var t=new de(this.gridData).getNewXYPos(),n=new K({type:e,x:t.x,y:t.y});if(e===K.ELEMENT_TYPE_YT_PLAYER){let e=new z({action:z.actions.YT_TOGGLE});n.actions=[e]}this.gridData.gridElements.push(n),ea.updateGridWithUndo(this.gridData);break;default:this.editElementId=null,this.showEditModal=!0}},editActions(e){this.editElementId=e,this.showActionsModal=!0},newElements(){this.showMultipleModal=!0},clearElements(){confirm(C.translate("CONFIRM_DELETE_ALL_ELEMS"))&&(this.gridData.gridElements=[],ea.updateGridWithUndo(this.gridData))},fillElements(){let e=q.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),ea.updateGridWithUndo(this.gridData)},reloadFn(e,t,n){if(Qi&&t.includes(Qi.gridData.id)&&ea&&ea.isInitialized()){let e=new de(n.filter(e=>e.id===Qi.gridData.id)[0]);e.isEqual(Qi.gridData)||(log.debug("reloading on remote update..."),Qi.reload(e))}},markElement(e){a()(".grid-item-content").removeClass("marked"),e&&setTimeout(()=>{qe.throttle(()=>{this.markedElement&&this.markedElement.id===e?this.markedElement=null:(this.markedElement=e?this.gridData.gridElements.filter(t=>t.id===e)[0]:null,a()("#"+e).addClass("marked"))},null,200)},10)},getGridInstance:()=>ea},created(){a()(document).on(r.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){let e=this;Qi=e,St.global.stopListening(),dt.getGrid(this.gridId).then(t=>t?(e.gridData=JSON.parse(JSON.stringify(t)),Promise.resolve()):(log.warn("grid not found! gridId: "+this.gridId),as.toMain(),Promise.reject())).then(()=>dt.getMetadata().then(t=>(e.metadata=JSON.parse(JSON.stringify(t)),e.metadata.globalGridId===e.gridData.id?Promise.resolve():(e.metadata.lastOpenedGridId=e.gridData.id,dt.saveMetadata(e.metadata))))).then(()=>{return t=e.gridData,ea=new ei("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:t.id}),an.setGridInstance(ea),ea.getInitPromise();var t}).then(()=>{ea.setLayoutChangedEndListener(t=>{e.canUndo=ea.canUndo(),e.canRedo=ea.canRedo(),e.doingUndoRedo=!1,e.gridData=JSON.parse(JSON.stringify(t))}),function(){var e={CONTEXT_NEW_GROUP:{name:"New // Neu",icon:"fas fa-plus-circle",items:{CONTEXT_NEW_SINGLE:{name:"New Element // Neues Element",icon:"fas fa-plus"},CONTEXT_NEW_MASS:{name:"Many new elements // Mehrere neue Elemente",icon:"fas fa-clone"},CONTEXT_NEW_COLLECT:{name:"New collect element // Neues Sammel-Element",icon:"far fa-comment-dots"},CONTEXT_NEW_PREDICT:{name:"New prediction element // Neues Vorhersage-Element",icon:"fas fa-magic"},CONTEXT_NEW_YT_PLAYER:{name:"New YouTube Player // Neuer YouTube Player",icon:"fab fa-youtube"}}}},t={CONTEXT_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit"},CONTEXT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt"},CONTEXT_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt"},CONTEXT_MORE_GROUP:{name:"More // Mehr",icon:"fas fa-bars",items:{CONTEXT_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone"},CONTEXT_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt"},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export"}}}};let n=JSON.parse(JSON.stringify(t));delete n.CONTEXT_EDIT;let i=()=>!!Qi.markedElement;var r={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:()=>Qi.markedElement&&Qi.markedElement.type===K.ELEMENT_TYPE_NORMAL},CONTEXT_ACTION_EDIT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt",visible:i},CONTEXT_ACTION_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt",visible:i},CONTEXT_ACTION_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone",visible:i},CONTEXT_ACTION_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt",visible:i},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export",visible:i},SEP0:"---------",CONTEXT_NEW_GROUP:e.CONTEXT_NEW_GROUP,CONTEXT_FILL_EMPTY:{name:"Fill with empty elements // Mit leeren Elementen füllen",icon:"fas fa-fill",visible:()=>!new de({},Qi.gridData).isFull()},CONTEXT_DELETE_ALL:{name:"Delete all elements // Alle Elemente löschen",icon:"fas fa-minus-circle"},SEP1:"---------",CONTEXT_GRID_DIMENSIONS:{name:"Change grid dimensions // Grid-Größe anpassen",icon:"fas fa-expand-arrows-alt"},CONTEXT_GRID_TRANSLATION:{name:"Translate grid // Grid übersetzen",icon:"fas fa-language"},CONTEXT_LAYOUT_FILL:{name:"Fill gaps // Lücken füllen",icon:"fas fa-angle-double-left"},CONTEXT_EDIT_GLOBAL_GRID:{name:"Edit global grid // Globales Grid bearbeiten",icon:"fas fa-globe",visible:!!Qi.metadata.globalGridId&&Qi.metadata.globalGridActive&&Qi.metadata.globalGridId!==Qi.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:Qi.metadata.globalGridId===Qi.gridData.id}};function s(e,t){switch(e){case"CONTEXT_EDIT":Qi.editElement(t);break;case"CONTEXT_DUPLICATE":ea.duplicateElement(t);break;case"CONTEXT_DO_ACTION":Ii.doAction(Qi.gridData.id,t);break;case"CONTEXT_ACTIONS":Qi.editActions(t);break;case"CONTEXT_DELETE":Qi.removeElement(t);break;case"CONTEXT_NEW_SINGLE":Qi.newElement();break;case"CONTEXT_NEW_MASS":Qi.newElements();break;case"CONTEXT_NEW_COLLECT":Qi.newElement(K.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":Qi.newElement(K.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_NEW_YT_PLAYER":Qi.newElement(K.ELEMENT_TYPE_YT_PLAYER);break;case"CONTEXT_DELETE_ALL":Qi.clearElements();break;case"CONTEXT_FILL_EMPTY":Qi.fillElements();break;case"CONTEXT_LAYOUT_FILL":Qi.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":Qi.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":Qi.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":Qi.editElement(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":Qi.editActions(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_DELETE":Qi.removeElement(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":ea.duplicateElement(Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":Ii.doAction(Qi.gridData.id,Qi.markedElement.id),Qi.markElement(null);break;case"CONTEXT_MOVE_TO":Qi.editElementId=t||Qi.markedElement.id,Qi.markElement(null),Qi.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":as.toEditGrid(Qi.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":as.toEditGrid(Qi.metadata.lastOpenedGridId)}}a()(".grid-container").on("click",(function(e){if(Qi){let t=null,n=e.target;for(;!t&&n.parentNode;)t=a()(n).attr("data-id"),n=n.parentNode;Qi.markElement(t)}})),a.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){s(e,a()(this).attr("data-id"))},items:t,zIndex:10}),a.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){s(e,a()(this).attr("data-id"))},items:n,zIndex:10}),a.a.contextMenu({selector:".grid-container",callback:function(e,t){s(e)},items:e,zIndex:10}),a.a.contextMenu({selector:"#moreButton",callback:function(e,t){s(e)},trigger:"left",items:r,zIndex:10})}(),C.initDomI18n(),e.showGrid=!0})},updated(){C.initDomI18n()},beforeDestroy(){a()(document).off(r.EVENT_DB_PULL_UPDATED,this.reloadFn),Qi=null,St.global.startListening(),ea&&(ea.destroy(),ea=null,an.setGridInstance(null)),a.a.contextMenu("destroy")}},En,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"spaced",attrs:{tabindex:"33",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"grid-container",staticStyle:{margin:"10px",display:"none"},attrs:{id:"grid-layout-background-wrapper"}},[t("div",{staticClass:"grid-container",staticStyle:{"margin-left":"204px","background-size":"209px 209px","background-image":"linear-gradient(to right, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-vertical"}}),this._v(" "),t("div",{staticClass:"grid-container",staticStyle:{"margin-top":"204px","background-size":"209px 209px","background-image":"linear-gradient(to bottom, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-horizontal"}})])}],!1,null,"6c00303f",null);ta.options.__file="src/vue-components/views/gridEditView.vue";var na=ta.exports,ia=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"box"},[e.metadata&&!e.metadata.fullscreen?n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"left"}),e._v(" "),n("div",{staticClass:"btn-group left"},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"spaced small",attrs:{tabindex:"30"},on:{click:function(t){return e.toEditGrid()}}},[n("i",{staticClass:"fas fa-pencil-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing on // Bearbeiten ein")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"31",id:"inputConfigButton"}},[n("i",{staticClass:"fas fa-cog"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Input options // Eingabeoptionen")])])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.locked,expression:"metadata.locked"}],staticClass:"small",attrs:{tabindex:"34"},on:{click:function(t){return e.unlock()}}},[n("i",{staticClass:"fas fa-unlock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Unlock // Entsperren")]),e._v(" "),e.unlockCounter!==e.unlockCount?n("span",[e._v(e._s(e.unlockCounter))]):e._e()]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"33"},on:{click:function(t){return e.lock()}}},[n("i",{staticClass:"fas fa-lock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Lock // Sperren")])]),e._v(" "),n("button",{staticClass:"spaced small",attrs:{tabindex:"32"},on:{click:function(t){return e.applyFullscreen()}}},[n("i",{staticClass:"fas fa-expand"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Fullscreen // Vollbild")])])],1):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_HUFFMAN?n("huffman-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_DIRECTION?n("direction-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_MOUSE?n("mouse-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SCANNING?n("scanning-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SEQUENTIAL?n("sequential-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_UNLOCK?n("unlock-modal",{on:{unlock:function(t){return e.unlock(!0)},close:function(t){e.showModal=null}}}):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.viewInitialized&&e.gridData.gridElements&&0===e.gridData.gridElements.length&&(!e.globalGridData||0===e.globalGridData.length),expression:"viewInitialized && gridData.gridElements && gridData.gridElements.length === 0 && (!globalGridData || globalGridData.length === 0)"}],staticClass:"row content spaced"},[n("div",{staticStyle:{"margin-top":"2em"},attrs:{"data-i18n":""}},[n("span",[e._v("No elements, click "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Edit grid")]),e._v(" to enter edit mode.")]),e._v(" "),n("span",[e._v("Keine Elemente, klicke auf "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Grid bearbeiten")]),e._v(" um das Grid zu bearbeiten.")])])]),e._v(" "),n("div",{staticClass:"row content"},[e.viewInitialized?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}})])],1)};ia._withStripped=!0;var aa=function(e){if(e instanceof Node||e instanceof NodeList||e instanceof Array)return e;var t="querySelectorAll";return 0===e.indexOf("#")&&(t="getElementById",e=e.substr(1,e.length)),document[t](e)};function ra(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},aa.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},aa.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},aa.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;nArray.isArray(t)?e.concat(aa.flattenArrayDeep(t)):e.concat(t),[])},aa.convertToKeyCode=function(e){return/^[a-zA-Z0-9]$/.test(e)?e.toUpperCase().charCodeAt(0):null},aa.getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},window.L=aa;let sa={};function oa(e,t,n){var i=this,a=(e=e,t=t,""),r=1e3,s=!1,o=3,l=3,c=!1,d=!0,f=1,p=!0,h=null,m=!1,v=null,g=null,_=null,b=!1,E=null,y=null;let C=null,w=null;function T(e){e&&(r=e.scanTimeoutMs||r,o=e.subScanRepeat||o,l=e.minBinarySplitThreshold||l,a=e.scanInactiveClass||a,s=null!=e.scanVertical?e.scanVertical:s,c=null!=e.scanBinary?e.scanBinary:c,d=null!=e.touchScanning?e.touchScanning:d,f=null!=e.scanTimeoutFirstElementFactor?e.scanTimeoutFirstElementFactor:f,p=void 0===e.autoScan||e.autoScan),d&&i.enableTouchScanning(),C=St.instance(),e.inputEventSelect?C.onInputEvent(e.inputEventSelect,i.select):C.onInputEvent(new u({keyCode:32}),i.select),e.inputEventNext&&C.onInputEvent(e.inputEventNext,i.next)}function A(e,t){for(var n=t?L:k,i=t?x:O,a=t?k:L,r=I(S(n),function(e,t){return function(n,i){var a=Math.abs(t(n)-e(n));return Math.abs(t(i)-e(i))-a}}(n,i),(function(e,t){return e.id?e.id.localeCompare(t.id):t.id?-1*t.id.localeCompare(e.id):0})),s=I(S(a),S(n)),o=(e=e.sort(r)).slice(),l=[],d=0;o.length>0&&d<1e3;){d++;var u=N(o,e,t);l.push(u),o=o.filter(e=>!u.includes(e))}return c&&(l=function(e){for(var t=[],n=0;n=0&&(a=e[n-1]),n+1!t.includes(e))}(l)),l.forEach(e=>e.sort(s)),l}function N(e,t,n){var i=n?L:k,a=n?x:O,r=e[0],s=i(r),o=a(r);return e.filter(e=>s>=i(e)&&s<=a(e)||i(e)<=o&&a(e)>=o||i(e)>=s&&a(e)<=o)}function S(e){return function(t,n){return e(t)-e(n)}}function I(){var e=arguments;return function(t,n){for(var i=0;i=o*n.length)i.restartScanning();else if(aa.removeClass(e,t),aa.addClass(e,a),m&&(aa.addClass(n[l],t),aa.removeClass(n,a),v=n[l],w=()=>{D(n,!0,l+1,c+1)},p)){let e=0===l&&s&&n.length>2?r*f:r;g=setTimeout((function(){w()}),e)}}function R(e){var t=[];e=e||[];var n=1;c&&e.length>l&&(n=Math.ceil(e.length/2));for(var i=0,a=e.length;i1?D(R(v),!0):aa.flattenArray(v).length>1?D(R(aa.flattenArray(v)),!0):(h&&h(aa.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){w&&(clearTimeout(g),w())},i.enableTouchScanning=function(){E||(E=function(){i.select()},(y=aa(".area")[0]?aa(".area")[0]:aa("#grid-container")).addEventListener("click",E))},i.disableTouchScanning=function(){E&&(y.removeEventListener("click",E),E=null)},T(n)}sa.getInstanceFromConfig=function(e,t,n,i){return new oa(t,n,{autoScan:e.scanAuto,scanVertical:e.scanVertical,subScanRepeat:3,scanBinary:e.scanBinary,scanInactiveClass:i,minBinarySplitThreshold:3,scanTimeoutMs:e.scanTimeoutMs,scanTimeoutFirstElementFactor:e.scanTimeoutFirstElementFactor,touchScanning:!e.mouseclickEnabled,inputEventSelect:e.scanInputs.filter(e=>e.label===p.SELECT)[0],inputEventNext:e.scanInputs.filter(e=>e.label===p.NEXT)[0]})};let la={};function ca(e,t){var n=e,i=void 0!==t.timeoutMs?t.timeoutMs:1e3;let s=t.demoMode,o=t.selectionListener,l=t.activeListener;var c={};let d=[],u=null,f=null,p=!1,h=null;function m(e,t){var n=t||this;e.preventDefault(),T(n),u=n,f=e}function v(e,t){if(p){var n=t||this;e.preventDefault(),A(n)}}function g(e){p||S(!1),qe.debounce(()=>{S(!0)},i+300,"hovering-mouseMove")}function _(){A(u)}function b(e){let t=N(e);T(t),u=t}function E(e){A(u)}function y(e){s||e.preventDefault(),qe.throttle(()=>{let t=N(e);T(t),u=t,f=e},[],50,"hovering-touchmove")}function w(e){Tn.speak(C.translate("speech output activated // Sprachausgabe aktiviert")),jt.clearTooltip(),yn.setState(r.STATE_ACTIVATED_TTS,!0),S(!0),d.forEach((function(e){e.removeEventListener("click",w)}))}function T(e){u&&u!==e&&A(u),e&&!c[e]&&(aa.addClass(e,"mouseentered"),l&&e!==u&&l(e),0!==i&&(c[e]=setTimeout((function(){o&&o(e)}),i)))}function A(e){e&&(aa.removeClass(e,"mouseentered"),clearTimeout(c[e]),c[e]=null,u=null)}function N(e){if(e.touches&&0===e.touches.length&&(e=f),!e)return void log.warn("no event");let t=e.touches?e.touches[0].pageX:e.pageX||e.clientX,n=e.touches?e.touches[0].pageY:e.pageY||e.clientY;return qe.getElement(d,t,n)}function S(e){p=!e,s||(e?a()("#touchElement").show():a()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(a()(n).css("cursor","none"),a()("#touchElement").css("cursor","none"),t.containerClass&&a()(t.containerClass).css("cursor","none")),d=aa.selectAsList(n);let e=yn.getState(r.STATE_ACTIVATED_TTS);!Tn.nativeSpeechSupported()||e||s?S(!0):(jt.setTooltip(C.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),yn.onStateChanged(r.STATE_ACTIVATED_TTS,e=>{e&&jt.clearTooltip()}),d.forEach((function(e){e.addEventListener("click",w)}))),d.forEach((function(e){e.addEventListener("mouseenter",m),e.addEventListener("mouseleave",v),e.addEventListener("mouseup",_)})),h=St.instance(),h.onTouchStart(b),h.onTouchEnd(E),h.onTouchMove(y),h.startListening(),document.addEventListener("mousemove",g)},this.destroy=function(){t.hideCursor&&(a()(n).css("cursor","default"),a()("#touchElement").css("cursor","default"),t.containerClass&&a()(t.containerClass).css("cursor","default")),qe.clearDebounce("hovering-mouseMove"),d.forEach((function(e){e.removeEventListener("mouseenter",m),e.removeEventListener("mouseleave",v),e.removeEventListener("mouseup",_),e.removeEventListener("click",w)})),h.destroy(),document.removeEventListener("mousemove",g),Object.keys(c).forEach(e=>{clearTimeout(c[e])}),yn.clearListeners(r.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){i=e},this.setSelectionListener=function(e){o=e}}function da(e){let t=e,n=null,i=[];function a(e){n&&n(e.currentTarget)}function r(e){let t=e.which||e.keyCode;13!==t&&32!==t||n&&n(e.currentTarget)}this.startClickcontrol=function(){i=aa.selectAsList(t),i.forEach((function(e){e.addEventListener("click",a),e.addEventListener("keydown",r)}))},this.destroy=function(){i.forEach((function(e){e.removeEventListener("click",a),e.removeEventListener("keydown",r)}))},this.setSelectionListener=function(e){n=e}}la.getInstanceFromConfig=function(e,t,n){return new ca(t,{selectionListener:(n=n||{}).selectionListener,activeListener:n.activeListener,containerClass:n.containerClass,inputEventSelect:e.seqInputs.filter(e=>e.label===p.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===p.NEXT)[0],timeoutMs:e.hoverTimeoutMs,demoMode:n.demoMode||e.hoverDisableHoverpane,hideCursor:e.hoverHideCursor})};var ua=n(48),fa=n.n(ua);let pa={};function ha(e,t,n,i){let r=this,s=e,o=t,l=n,c=!1,d=!0,u=!1,f=0,p=1e3,h=!0,m=[],v=null,g=null,_=null,b=null,E="",y=null,C="",w=!1,T=null;function A(){if(y=St.instance(),C="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");a.a.isFunction(e.selectionListener)&&(v=e.selectionListener);c=void 0!==e.printCodes&&e.printCodes,d=void 0===e.printColors||e.printColors,u=void 0!==e.colorWholeElement&&e.colorWholeElement,h=void 0===e.markInactive||e.markInactive,m=e.colors||m,f=e.elementCount||0,p=e.timeout||1e3,e.inputEvents.forEach((e,t)=>{C+=t+1,y.onInputEvent(e,()=>{r.input(t+1)})})}(i),g=a()(s),0===g.length)return;let e=g.toArray().map(e=>e.id);if(e.lengthn?t.length:n})),t.assignCodeWords(C,(function(e,t){if(e.name&&(e.codeWord=t,e.element=document.getElementById(e.name),d||c)){let t="";e.codeWord.split("").forEach(e=>{let i=d?I(e):"",a=function(e){if(!e)return"";let t=(n=e,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null);var n,i;return.299*t.r+.587*t.g+.114*t.b>149?"#000000":"#ffffff"}(i);t+=`${c?e:" "}`});let i=c?"10px":"3px",r=a()(e.element).width()+"px";a()(e.element).append(`
    ${t}
    `)}})),b=b.filter(e=>e.name),N()}function N(){u&&b.forEach(e=>{if(0===e.codeWord.indexOf(E)){let t=e.codeWord.substring(E.length)[0];e.element.style.background=I(t)}})}function S(e){g.removeClass(l);let t=e.map(e=>e.id),n=g.toArray().filter(e=>-1===t.indexOf(e.id));a()(n).addClass(l)}function I(e){let t=parseInt(e)-1;return m[t]}r.start=function(){w=!0,u&&a()(g).addClass("noanimation"),y.startListening()},r.stop=function(){w=!1,a()(g).find(".huffman-code-visualization").remove(),u&&(a()(g).removeClass("noanimation"),a()(g).css("background","")),y.stopListening()},r.destroy=function(){r.stop(),y.destroy()},r.reinit=function(){w&&(r.stop(),A(),r.start())},r.input=function(e){if(e+="",clearTimeout(T),1!==e.length)return;E+=e,N();let t=b.filter(e=>e.codeWord===E).map(e=>e.element),n=b.filter(e=>0===e.codeWord.indexOf(E)).map(e=>e.element);var i;g.removeClass(o),t[0]?(i=t[0],_=i||_,g.removeClass(o),a()(_).addClass(o),S(g.toArray()),v&&v(t[0])):h&&S(n),(t[0]||0===n.length)&&(S(g.toArray()),E="",N()),p>0&&(T=setTimeout(()=>{S(g.toArray()),E="",N()},p))},r.getCurrentInput=function(){return E},A()}pa.getInstanceFromConfig=function(e,t,n,i,a){return new ha(t,n,i,{printCodes:e.huffShowNumbers,printColors:e.huffShowColors,colorWholeElement:e.huffColorWholeElement,colors:e.huffColors,inputEvents:e.huffInputs,elementCount:e.huffElementCount,timeout:e.huffTimeout,markInactive:e.huffMarkInactive,selectionListener:a})};let ma={};function va(e,t,n){let i=this,r=e,s=t,o=!0,l=!1,c=null,d=null,u=null,f={},p=St.instance();function h(e){f[u.id]&&m(f[u.id][e])}function m(e){u=e||u,d.removeClass(s),a()(u).addClass(s)}i.start=function(){m(d[0]),p.startListening()},i.destroy=function(){d.removeClass(s),p.destroy()},i.left=function(){h("left")},i.right=function(){h("right")},i.up=function(){h("up")},i.down=function(){h("down")},i.select=function(){c&&c(u),l&&m(d[0])},d=a()(r),0!==d.length&&(setTimeout(()=>{d.toArray().forEach(e=>{let t=d.toArray().filter(t=>t.id!==e.id),n=e.getBoundingClientRect(),i=(e,t,n,i)=>e>0&&t>0&&n>0&&i>0,a=(e,t,n,i)=>e<0&&t<0&&n<0&&i<0,r=t.map(e=>{let t=e.getBoundingClientRect(),r=n.left-t.right,s=n.right-t.left,o=n.right-t.right,l=n.left-t.left,c=n.top-t.bottom,d=n.bottom-t.top,u=n.top-t.top,f=n.bottom-t.bottom,p=Math.min(Math.abs(r),Math.abs(s),Math.abs(o),Math.abs(l)),h=Math.min(Math.abs(c),Math.abs(d),Math.abs(u),Math.abs(f));return{element:e,left:i(r,s,o,l),right:a(r,s,o,l),up:i(c,d,u,f),down:a(c,d,u,f),absDiffX:p,absDiffY:h,absDiff:p+h}});function s(e,t,n,i,a){let r=e.filter(e=>e[t]);if(r.length>0)return r[0].element;if(o){let t=Math.min(...e.map(e=>e[a])),r=e.filter(e=>e[a]===t&&e[n]),s=Math.max(...r.map(e=>e[i])),o=r.filter(e=>e[i]===s)[0];return o?o.element:null}return null}r=r.sort((e,t)=>e.absDiff-t.absDiff);let l=s(r,"left","right","absDiffX","absDiffY"),c=s(r,"right","left","absDiffX","absDiffY"),u=s(r,"up","down","absDiffY","absDiffX"),p=s(r,"down","up","absDiffY","absDiffX");f[e.id]={element:e,left:l,right:c,up:u,down:p}})},200),function(e){e&&(a.a.isFunction(e.selectionListener)&&(c=e.selectionListener),o=void 0!==e.wrapAround&&e.wrapAround,l=void 0!==e.resetToStart&&e.resetToStart,p.onInputEvent(e.inputEventLeft,i.left),p.onInputEvent(e.inputEventRight,i.right),p.onInputEvent(e.inputEventUp,i.up),p.onInputEvent(e.inputEventDown,i.down),p.onInputEvent(e.inputEventSelect,i.select))}(n))}ma.getInstanceFromConfig=function(e,t,n,i){return new va(t,n,{inputEventLeft:e.dirInputs.filter(e=>e.label===p.LEFT)[0],inputEventRight:e.dirInputs.filter(e=>e.label===p.RIGHT)[0],inputEventUp:e.dirInputs.filter(e=>e.label===p.UP)[0],inputEventDown:e.dirInputs.filter(e=>e.label===p.DOWN)[0],inputEventSelect:e.dirInputs.filter(e=>e.label===p.SELECT)[0],wrapAround:e.dirWrapAround,resetToStart:e.dirResetToStart,selectionListener:i})};let ga={};function _a(e,t){let n=this,i=e,r=null,s=null,o=null,l=null,c=null,d=0;function u(e){l.removeClass(r),a()(e).addClass(r),o&&o(e)}n.start=function(){c.startListening(),u(l[0]),d=0},n.destroy=function(){c.destroy(),l.removeClass(r)},n.next=function(){d++,d>l.length-1&&(d=0),u(l[d])},n.prev=function(){d--,d<0&&(d=l.length-1),u(l[d])},n.select=function(){s&&s(l[d])},c=St.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(a.a.isFunction(e.selectionListener)&&(s=e.selectionListener),a.a.isFunction(e.activeListener)&&(o=e.activeListener),r=e.activeClass||"scanFocus",c.onInputEvent(e.inputEventSelect,()=>{n.select()}),c.onInputEvent(e.inputEventNext,()=>{n.next()}),c.onInputEvent(e.inputEventPrev,()=>{n.prev()}))}(t),l=a()(i)}ga.getInstanceFromConfig=function(e,t,n){return new _a(t,{selectionListener:n.selectionListener,activeListener:n.activeListener,inputEventSelect:e.seqInputs.filter(e=>e.label===p.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===p.NEXT_ELEMENT)[0],inputEventPrev:e.seqInputs.filter(e=>e.label===p.PREVIOUS_ELEMENT)[0]})};var ba=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Scanning input method: 1-2 input events // Eingabemethode Scanning: 1-2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}],attrs:{type:"checkbox",id:"enableScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanEnabled)?e._i(e.inputConfig.scanEnabled,null)>-1:e.inputConfig.scanEnabled},on:{change:function(t){var n=e.inputConfig.scanEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableScanning","data-i18n":""}},[e._v("Enable Scanning // Scanning aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.NEXT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.scanInputs,callback:function(t){e.$set(e.inputConfig,"scanInputs",t)},expression:"inputConfig.scanInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanVertical,expression:"inputConfig.scanVertical"}],attrs:{type:"checkbox",id:"chkVerticalScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanVertical)?e._i(e.inputConfig.scanVertical,null)>-1:e.inputConfig.scanVertical},on:{change:function(t){var n=e.inputConfig.scanVertical,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanVertical",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanVertical",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanVertical",a)}}}),e._v(" "),n("label",{attrs:{for:"chkVerticalScanning","data-i18n":""}},[e._v("Vertical scanning // Scanning vertikal")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanBinary,expression:"inputConfig.scanBinary"}],attrs:{type:"checkbox",id:"chkBinaryScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanBinary)?e._i(e.inputConfig.scanBinary,null)>-1:e.inputConfig.scanBinary},on:{change:function(t){var n=e.inputConfig.scanBinary,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanBinary",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanBinary",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanBinary",a)}}}),e._v(" "),n("label",{attrs:{for:"chkBinaryScanning","data-i18n":""}},[e._v("Binary scanning // Scanning binär")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.touchScanning,expression:"touchScanning"}],attrs:{type:"checkbox",id:"chkTouchScanning"},domProps:{checked:Array.isArray(e.touchScanning)?e._i(e.touchScanning,null)>-1:e.touchScanning},on:{change:[function(t){var n=e.touchScanning,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.touchScanning=n.concat([null])):r>-1&&(e.touchScanning=n.slice(0,r).concat(n.slice(r+1)))}else e.touchScanning=a},e.changeTouchScanning]}}),e._v(" "),n("label",{attrs:{for:"chkTouchScanning","data-i18n":""}},[e._v("Scanning-selection by mouse click or tap // Scanning-Auswahl durch Mausklick oder tippen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],attrs:{type:"checkbox",id:"chkAutoScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanAuto)?e._i(e.inputConfig.scanAuto,null)>-1:e.inputConfig.scanAuto},on:{change:function(t){var n=e.inputConfig.scanAuto,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanAuto",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanAuto",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanAuto",a)}}}),e._v(" "),n("label",{attrs:{for:"chkAutoScanning","data-i18n":""}},[e._v("Automatic (timed) scanning // Automatisches (zeitgesteuertes) Scanning")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inScanTime","data-i18n":""}},[e._v("Scanning Time (ms) // Scanning Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inScanTime",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inFirstElement","data-i18n":""}},[e._v("Time factor first element // Zeit-Faktor erstes Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"range",id:"inFirstElement",min:"1",max:"5",step:"0.1"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"number",min:"1",max:"5",step:"0.5"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};ba._withStripped=!0;var Ea=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("ul",e._l(e.inputs,(function(t,i){return n("li",[n("div",{staticClass:"row nomargin"},[n("label",{staticClass:"three columns input-label",attrs:{for:t.label+i}},[n("span",[e._v(e._s(e._f("translate")(t.label)))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.label===e.InputConfig.GENERAL_INPUT,expression:"input.label === InputConfig.GENERAL_INPUT"}]},[e._v(e._s(i+1))])]),e._v(" "),n("select",{staticClass:"five columns",attrs:{id:t.label+i},on:{change:function(t){return e.typeChange(i,t.target.value)}}},[e._m(0,!0),e._v(" "),e._l(e.inputEventTypes,(function(i){return n("option",{domProps:{value:i.getModelName(),selected:i.getModelName()===t.modelName}},[e._v("\n "+e._s(e._f("translate")(i.getModelName()))+"\n ")])}))],2),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.errorInputs.indexOf(t.label)>-1,expression:"errorInputs.indexOf(input.label) > -1"}],staticClass:"two columns"},[n("i",{staticClass:"warn fas fa-exclamation-triangle"})])]),e._v(" "),t.modelName===e.InputEventKey.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordKey(t,i)}}},[n("i",{staticClass:"fas fa-keyboard"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("Record key // Taste aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("press key ... // Taste drücken ...")))])]),e._v(" "),n("span",{staticClass:"four columns"},[n("b",{attrs:{"data-i18n":""}},[e._v("Current key: // Aktuelle Taste:")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.keyCode,expression:"!input.keyCode"}],attrs:{"data-i18n":""}},[e._v("(no key) // (keine Taste)")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.keyCode,expression:"input.keyCode"}]},[e._v(e._s(t.keyName+" ("+t.keyCode+")"))])])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"nine columns offset-by-three",attrs:{"acc-label":"more // mehr"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inTimeout"+i}},[e._v("Timeout (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:t.timeout,expression:"input.timeout",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inTimeout"+i,type:"number",min:"0",max:"5000",step:"100"},domProps:{value:t.timeout},on:{input:[function(n){n.target.composing||e.$set(t,"timeout",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Repetitions // Wiederholungen")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:0===t.holdDuration,expression:"input.holdDuration === 0"},{name:"model",rawName:"v-model.number",value:t.repeat,expression:"input.repeat",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"1",max:"9"},domProps:{value:t.repeat},on:{input:[function(n){n.target.composing||e.$set(t,"repeat",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.holdDuration>0,expression:"input.holdDuration > 0"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if hold duration is set. // deaktiviert bei gesetzter Haltedauer.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.holdDuration=0,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Hold duration (ms) // Haltedauer (ms)")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:1===t.repeat,expression:"input.repeat === 1"},{name:"model",rawName:"v-model.number",value:t.holdDuration,expression:"input.holdDuration",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"0",max:"5000",step:"100",disabled:t.repeat>1},domProps:{value:t.holdDuration},on:{input:[function(n){n.target.composing||e.$set(t,"holdDuration",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.repeat>1,expression:"input.repeat > 1"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if repetitions are set. // deaktiviert bei gesetzten Wiederholungen.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.repeat=1,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])])])],1)]):e._e(),e._v(" "),t.modelName===e.InputEventARE.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordAREEvent(t,i)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("Record ARE event // ARE Event aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("waiting for event ... // warte auf Event ...")))])]),e._v(" "),n("label",{staticClass:"four columns",attrs:{for:"inputAreUrl"}},[e._v("ARE URL")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.areURL,expression:"input.areURL"}],staticClass:"four columns",attrs:{id:"inputAreUrl",type:"text",placeholder:e._f("translate")("empty = automatic // leer = automatisch")},domProps:{value:t.areURL},on:{change:function(n){return e.changedAreURL(t)},input:[function(n){n.target.composing||e.$set(t,"areURL",n.target.value)},function(n){e.areError[t.label+i]=!1}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.areError[t.label+i],expression:"areError[input.label+index]"}],staticClass:"nine columns offset-by-three"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v("\n "+e._s(e._f("translate")("Error connecting to ARE! // Verbindung zu ARE konnte nicht hergestellt werden!"))+" "+e._s("("+e.areService.getRestURL(t.areURL)+")")+"\n ")])]),e._v(" "),n("div",{staticClass:"row"},e._l(t.eventNames,(function(i,a){return n("span",{staticClass:"nine columns offset-by-three"},[n("b",[e._v("Event:")]),e._v(" "+e._s(e.formatAreEvent(i))+" "),n("button",{staticStyle:{"margin-left":"1em",padding:"0 0.5em"},attrs:{title:e._f("translate")("Delete // Löschen")},on:{click:function(n){return e.removeAREEvent(t,a)}}},[n("i",{staticClass:"fas fa-trash"})])])})),0)]):e._e()])})),0)])};Ea._withStripped=!0;var ya={components:{Accordion:qt},props:{value:Array,inputLabels:Array,canAdd:Boolean,maxElements:Number,errorInputs:Array,minInputs:Number,maxInputs:Number},watch:{value:{handler:function(e){this.initWithValue(e)},deep:!0}},data:()=>({inputs:[],inputEventTypes:p.getInputEventTypes(),InputEventKey:u,InputEventARE:f,InputConfig:p,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:St.instance(),lastInitTime:null,areService:yt}),methods:{typeChange(e,t){let n=this.inputs[e],i=this.inputs.filter(e=>!e.modelName);if(!t)return n.modelName="",this.minInputs&&this.inputs.length>this.minInputs&&i.length>=1&&this.inputs.splice(e,1),void this.modelChanged();let a=p.getInputEventInstance(t,{label:n.label});Et.a.set(this.inputs,e,JSON.parse(JSON.stringify(a))),this.maxInputs&&this.inputs.length{r.preventDefault(),n.localEventHandler.destroy(),e.keyCode=t,e.keyName=a,Object.assign(e,{repeat:1,timeout:0,holdDuration:0}),Et.a.set(n.keyRecording,i,!1),n.modelChanged()}),n.localEventHandler.startListening()},recordAREEvent(e,t){let n=this,i=e.label+t;if(n.areError[i]=!1,n.keyRecording[i])return void r();Et.a.set(n.keyRecording,i,!0),yt.unsubscribeEvents();let a=null;function r(){Et.a.set(n.keyRecording,i,!1),yt.unsubscribeEvents()}yt.subscribeEvents(e.areURL,t=>{a||(a=setTimeout(()=>{Et.a.set(n.keyRecording,i,!1),yt.unsubscribeEvents(),n.modelChanged()},1e3)),e.eventNames.push(t)},()=>{n.areError[i]=!0,r()})},removeAREEvent(e,t){e.eventNames.splice(t,1),this.modelChanged()},formatAreEvent(e){let t=JSON.parse(e);return t.channelId+" -> "+t.targetComponentId},changedAreURL(e){e.areURL&&(e.areURL=yt.getRestURL(e.areURL))},modelChanged(){let e=this.inputs.filter(e=>{if(!e.modelName)return!1;return p.getInputEventInstance(e.modelName,e).isValid()}),t=JSON.parse(JSON.stringify(e));JSON.stringify(t)!==JSON.stringify(this.lastEmitValue)&&(this.lastInitTime=(new Date).getTime(),this.$emit("input",t),this.lastEmitValue=t)},addInput(e){e=e||1;for(let t=0;te.label);this.inputLabels.filter(t=>-1===e.indexOf(t)).forEach(e=>{let n=new f({label:e});n.modelName="",t.push(n)}),t.sort((e,t)=>this.inputLabels.indexOf(e.label)-this.inputLabels.indexOf(t.label))}this.inputs=JSON.parse(JSON.stringify(t));let n=this.inputs.filter(e=>!e.modelName);this.maxInputs&&this.inputs.length({rows:10,columns:10,width:0,height:0}),methods:{calcWidthHeight(){this.width=100/this.columns,this.height=100/this.rows}},mounted(){this.calcWidthHeight()},updated(){}},Na=(n(85),Pt(Aa,Ta,[],!1,null,"2f9b4098",null));Na.options.__file="src/vue-components/modals/input/testArea.vue";var Sa=Na.exports,Ia={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,touchScanning:null,metadata:null,InputConfig:p,error:"",errorInputs:[],scanner:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.scanEnabled||(0===this.inputConfig.scanInputs.filter(e=>e.label===p.SELECT).length&&this.errorInputs.push(p.SELECT),0!==this.inputConfig.scanInputs.filter(e=>e.label===p.NEXT).length||this.inputConfig.scanAuto||this.errorInputs.push(p.NEXT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"scanInputs",JSON.parse(JSON.stringify(p.DEFAULT_SCAN_INPUTS))),this.inputChanged()},changeTouchScanning(){this.inputConfig.mouseclickEnabled=!this.touchScanning},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.scanEnabled&&(this.scanner=sa.getInstanceFromConfig(this.inputConfig,".area-element-inner","active","inactive"),this.scanner.setSelectionListener(e=>{this.selectedTestElement=e}),this.scanner.startScanning())},100)},stopTest(){this.scanner&&this.scanner.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled}),ft.setHelpLocation("04_input_options","#scanning")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},ka=(n(87),Pt(Ia,ba,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header"}},[this._v("\n Scanning\n ")])])}],!1,null,"3cc44ad7",null));ka.options.__file="src/vue-components/modals/input/scanningModal.vue";var Oa=ka.exports,La=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.mouseclickEnabled,expression:"inputConfig.mouseclickEnabled"}],attrs:{type:"checkbox",id:"enableClick"},domProps:{checked:Array.isArray(e.inputConfig.mouseclickEnabled)?e._i(e.inputConfig.mouseclickEnabled,null)>-1:e.inputConfig.mouseclickEnabled},on:{change:function(t){var n=e.inputConfig.mouseclickEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"mouseclickEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"mouseclickEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"mouseclickEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableClick","data-i18n":""}},[e._v("Select with mouse click (or tap) // Auswahl mit Mausklick (oder Antippen)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],attrs:{type:"checkbox",id:"enableHover"},domProps:{checked:Array.isArray(e.inputConfig.hoverEnabled)?e._i(e.inputConfig.hoverEnabled,null)>-1:e.inputConfig.hoverEnabled},on:{change:function(t){var n=e.inputConfig.hoverEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHover","data-i18n":""}},[e._v("Enable hovering // Hovering aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inHoverTime","data-i18n":""}},[e._v("Hover Time (ms) // Hovering Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inHoverTime",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverHideCursor,expression:"inputConfig.hoverHideCursor"}],attrs:{type:"checkbox",id:"hoverHideCursor"},domProps:{checked:Array.isArray(e.inputConfig.hoverHideCursor)?e._i(e.inputConfig.hoverHideCursor,null)>-1:e.inputConfig.hoverHideCursor},on:{change:function(t){var n=e.inputConfig.hoverHideCursor,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverHideCursor",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverHideCursor",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverHideCursor",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"hoverHideCursor","data-i18n":""}},[e._v("Hide Cursor // Cursor verstecken")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.hoverDisableHoverpane,expression:"inputConfig.hoverDisableHoverpane"}],attrs:{type:"checkbox",id:"chkDisableHoverpane"},domProps:{checked:Array.isArray(e.inputConfig.hoverDisableHoverpane)?e._i(e.inputConfig.hoverDisableHoverpane,null)>-1:e.inputConfig.hoverDisableHoverpane},on:{change:function(t){var n=e.inputConfig.hoverDisableHoverpane,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverDisableHoverpane",a)}}}),e._v(" "),n("label",{attrs:{for:"chkDisableHoverpane","data-i18n":""}},[e._v("Disable hover pane // Hover-Fläche deaktivieren")])])]),e._v(" "),n("accordion",{staticClass:"row",attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1)],1):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};La._withStripped=!0;var xa=Pt({props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,clicker:null,hover:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")})},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},initTest(){setTimeout(()=>{let e=this;this.stopTest(),e.inputConfig.hoverEnabled&&(e.hover=la.getInstanceFromConfig(e.inputConfig,".area-element-inner",{demoMode:!0,containerClass:".area .area-row"}),e.hover.setSelectionListener((function(t){e.selectedTestElement=t})),e.hover.startHovering()),e.inputConfig.mouseclickEnabled&&(e.clicker=new da(".area-element-inner"),e.clicker.setSelectionListener((function(t){e.selectedTestElement=t})),e.clicker.startClickcontrol())},100)},stopTest(){this.clicker&&this.clicker.destroy(),this.hover&&this.hover.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#mousetouch-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},La,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Mouse/Touch input // Maus-/Toucheingabe")])])}],!1,null,"33ee2cbd",null);xa.options.__file="src/vue-components/modals/input/mouseModal.vue";var Da=xa.exports,Ra=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Direction input method: 2-5 input events // Richtungs-Eingabe: 2-5 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}],attrs:{type:"checkbox",id:"enableDirinput"},domProps:{checked:Array.isArray(e.inputConfig.dirEnabled)?e._i(e.inputConfig.dirEnabled,null)>-1:e.inputConfig.dirEnabled},on:{change:function(t){var n=e.inputConfig.dirEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableDirinput","data-i18n":""}},[e._v("Enable direction input // Richtungs-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.RIGHT,e.InputConfig.DOWN,e.InputConfig.LEFT,e.InputConfig.UP],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.dirInputs,callback:function(t){e.$set(e.inputConfig,"dirInputs",t)},expression:"inputConfig.dirInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirWrapAround,expression:"inputConfig.dirWrapAround"}],attrs:{type:"checkbox",id:"chkWrapAround"},domProps:{checked:Array.isArray(e.inputConfig.dirWrapAround)?e._i(e.inputConfig.dirWrapAround,null)>-1:e.inputConfig.dirWrapAround},on:{change:function(t){var n=e.inputConfig.dirWrapAround,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirWrapAround",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirWrapAround",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirWrapAround",a)}}}),e._v(" "),n("label",{attrs:{for:"chkWrapAround","data-i18n":""}},[e._v("Wrap around (jump to first element after last element) // Enden verbinden (springe zu erstem Element nach letztem Element)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirResetToStart,expression:"inputConfig.dirResetToStart"}],attrs:{type:"checkbox",id:"chkReset"},domProps:{checked:Array.isArray(e.inputConfig.dirResetToStart)?e._i(e.inputConfig.dirResetToStart,null)>-1:e.inputConfig.dirResetToStart},on:{change:function(t){var n=e.inputConfig.dirResetToStart,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirResetToStart",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirResetToStart",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirResetToStart",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReset","data-i18n":""}},[e._v("Go to start position after select // Zu Startposition nach Auswahl")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ra._withStripped=!0;var Ma={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,error:"",errorInputs:[],dirInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.dirEnabled||(0===this.inputConfig.dirInputs.filter(e=>e.label===p.SELECT).length&&this.errorInputs.push(p.SELECT),this.inputConfig.dirInputs.length<2&&this.errorInputs.push(p.RIGHT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"dirInputs",JSON.parse(JSON.stringify(p.DEFAULT_DIR_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.dirEnabled&&(e.dirInput=ma.getInstanceFromConfig(e.inputConfig,".area-element-inner","active",t=>{e.selectedTestElement=t}),e.dirInput.start())},100)},stopTest(){this.dirInput&&this.dirInput.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#direction-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},Pa=(n(89),Pt(Ma,Ra,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Direction Input // Richtungs-Eingabe")])])}],!1,null,"4c9162fd",null));Pa.options.__file="src/vue-components/modals/input/directionInputModal.vue";var Ga=Pa.exports,Ua=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Huffman input method: 2 or more input events // Huffman-Eingabe: 2 oder mehr Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}],attrs:{type:"checkbox",id:"enableHuffinput"},domProps:{checked:Array.isArray(e.inputConfig.huffEnabled)?e._i(e.inputConfig.huffEnabled,null)>-1:e.inputConfig.huffEnabled},on:{change:function(t){var n=e.inputConfig.huffEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHuffinput","data-i18n":""}},[e._v("Enable huffman input // Huffman-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"min-inputs":2,"max-inputs":9,"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.huffInputs,callback:function(t){e.$set(e.inputConfig,"huffInputs",t)},expression:"inputConfig.huffInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowNumbers,expression:"inputConfig.huffShowNumbers"}],attrs:{type:"checkbox",id:"chkNumbers"},domProps:{checked:Array.isArray(e.inputConfig.huffShowNumbers)?e._i(e.inputConfig.huffShowNumbers,null)>-1:e.inputConfig.huffShowNumbers},on:{change:function(t){var n=e.inputConfig.huffShowNumbers,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowNumbers",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowNumbers",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowNumbers",a)}}}),e._v(" "),n("label",{attrs:{for:"chkNumbers","data-i18n":""}},[e._v("Show numbers // Zeige Nummern")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowColors,expression:"inputConfig.huffShowColors"}],attrs:{type:"checkbox",id:"chkColors"},domProps:{checked:Array.isArray(e.inputConfig.huffShowColors)?e._i(e.inputConfig.huffShowColors,null)>-1:e.inputConfig.huffShowColors},on:{change:function(t){var n=e.inputConfig.huffShowColors,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowColors",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowColors",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowColors",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColors","data-i18n":""}},[e._v("Show colors // Zeige Farben")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColorWholeElement,expression:"inputConfig.huffColorWholeElement"}],attrs:{type:"checkbox",id:"chkColorWholeElement"},domProps:{checked:Array.isArray(e.inputConfig.huffColorWholeElement)?e._i(e.inputConfig.huffColorWholeElement,null)>-1:e.inputConfig.huffColorWholeElement},on:{change:function(t){var n=e.inputConfig.huffColorWholeElement,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffColorWholeElement",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffColorWholeElement",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffColorWholeElement",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColorWholeElement","data-i18n":""}},[e._v("Color whole element // Färbe ganzes Element")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffMarkInactive,expression:"inputConfig.huffMarkInactive"}],attrs:{type:"checkbox",id:"chkMarkInactive"},domProps:{checked:Array.isArray(e.inputConfig.huffMarkInactive)?e._i(e.inputConfig.huffMarkInactive,null)>-1:e.inputConfig.huffMarkInactive},on:{change:function(t){var n=e.inputConfig.huffMarkInactive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffMarkInactive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffMarkInactive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffMarkInactive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkMarkInactive","data-i18n":""}},[e._v("Mark inactive elements // Markiere inaktive Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inTimeout","data-i18n":""}},[e._v("Timeout in ms (0 means disabled) // Timeout in ms (0 ist deaktiviert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"range",id:"inTimeout",min:"0",max:"10000",step:"100"},domProps:{value:e.inputConfig.huffTimeout},on:{__r:function(t){e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"10000",step:"200"},domProps:{value:e.inputConfig.huffTimeout},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inElementCount","data-i18n":""}},[e._v("Number of elements (0 means automatic) // Anzahl der Elemente (0 ist automatisch)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"range",min:"0",max:"300",id:"inElementCount"},domProps:{value:e.inputConfig.huffElementCount},on:{__r:function(t){e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"300",id:"inElementCount2"},domProps:{value:e.inputConfig.huffElementCount},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},e._l(e.inputConfig.huffInputs.length,(function(t){return n("div",[n("label",{staticStyle:{"margin-right":"1em"},attrs:{for:"colorInput"+t}},[n("span",{attrs:{"data-i18n":""}},[e._v("Color // Farbe")]),e._v(" "+e._s(t))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColors[t-1],expression:"inputConfig.huffColors[i-1]"}],attrs:{id:"colorInput"+t,type:"color"},domProps:{value:e.inputConfig.huffColors[t-1]},on:{input:function(n){n.target.composing||e.$set(e.inputConfig.huffColors,t-1,n.target.value)}}})])})),0),e._v(" "),n("button",{staticClass:"four columns",staticStyle:{"margin-top":"1em"},attrs:{"data-i18n":""},on:{click:function(t){e.inputConfig.huffColors=JSON.parse(JSON.stringify(e.InputConfig.DEFAULT_HUFF_COLORS))}}},[e._v("Reset colors // Farben zurücksetzen")])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ua._withStripped=!0;var $a={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,error:"",errorInputs:[],huffInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.inputConfig.huffElementCount=this.inputConfig.huffElementCount||0,this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.huffEnabled||(this.inputConfig.huffInputs.length<2&&this.errorInputs.push(p.GENERAL_INPUT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"huffInputs",JSON.parse(JSON.stringify(p.DEFAULT_HUFF_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.huffEnabled&&(this.huffInput=pa.getInstanceFromConfig(this.inputConfig,".area-element-inner","active","inactive",e=>{this.selectedTestElement=e}),this.huffInput.start())},100)},stopTest(){this.huffInput&&this.huffInput.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#huffman-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},Fa=(n(91),Pt($a,Ua,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Huffman Input // Huffman-Eingabe")])])}],!1,null,"fff4292a",null));Fa.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var Va=Fa.exports,Ba=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Sequential input method: 2 input events // Sequentielle Eingabe: 2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}],attrs:{type:"checkbox",id:"enableSeqinput"},domProps:{checked:Array.isArray(e.inputConfig.seqEnabled)?e._i(e.inputConfig.seqEnabled,null)>-1:e.inputConfig.seqEnabled},on:{change:function(t){var n=e.inputConfig.seqEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"seqEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"seqEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"seqEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableSeqinput","data-i18n":""}},[e._v("Enable sequential input // Sequentielle Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.NEXT_ELEMENT,e.InputConfig.PREVIOUS_ELEMENT,e.InputConfig.SELECT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.seqInputs,callback:function(t){e.$set(e.inputConfig,"seqInputs",t)},expression:"inputConfig.seqInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ba._withStripped=!0;var Ya={props:[],components:{Accordion:qt,InputEventList:wa,TestArea:Sa},data:function(){return{inputConfig:null,metadata:null,InputConfig:p,error:"",errorInputs:[],seqInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save(){this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,dt.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ft.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.seqEnabled||(0===this.inputConfig.seqInputs.filter(e=>e.label===p.NEXT_ELEMENT).length&&this.errorInputs.push(p.NEXT_ELEMENT),0===this.inputConfig.seqInputs.filter(e=>e.label===p.SELECT).length&&this.errorInputs.push(p.SELECT),!(this.errorInputs.length>0)||(this.error=C.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged(){this.error&&this.validateInputs()},resetInput(){this.$set(this.inputConfig,"seqInputs",JSON.parse(JSON.stringify(p.DEFAULT_SEQ_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.seqEnabled&&(e.seqInput=ga.getInstanceFromConfig(e.inputConfig,".area-element-inner",{selectionListener:t=>{e.selectedTestElement=t}}),e.seqInput.start())},100)},stopTest(){this.seqInput&&this.seqInput.destroy()}},mounted(){let e=this;St.pauseAll(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ft.setHelpLocation("04_input_options","#sequential-input")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation(),this.stopTest(),St.resumeAll()}},ja=(n(93),Pt(Ya,Ba,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Sequential Input // Sequentielle Eingabe")])])}],!1,null,"071e6452",null));ja.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var Ha=ja.exports,Wa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"number-row",staticStyle:{"text-align":"center","margin-bottom":"1em"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Input passcode // PIN eingeben")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("(use buttons or keyboard) // (verwenden Sie Buttons oder Tastatur)")]),n("br"),e._v(" "),n("span",{staticStyle:{"font-size":"3em"},attrs:{"aria-hidden":"true"}},[e._l(e.inputPasscode.length,(function(t){return n("span",[e._v("●")])})),e._v(" "),e._l(Math.max(0,e.passcode.length-e.inputPasscode.length),(function(t){return n("span",[e._v("_")])}))],2)]),e._v(" "),n("div",{staticClass:"number-row"},e._l([1,2,3],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([4,5,6],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([7,8,9],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},[n("button",{staticStyle:{"margin-left":"33%"},on:{click:function(t){return e.inputDigit(0)}}},[e._v("0")])])]),e._v(" "),n("div",{staticClass:"modal-footer"})])])])])};Wa._withStripped=!0;var za={props:[],data:function(){return{passcode:g.getUnlockPasscode(),inputPasscode:"",timeoutHandler:null,masterkeyPossible:!0,timeoutMasterkeyHandler:null,keyHandler:null}},methods:{inputDigit(e){this.resetTimeout(),this.inputPasscode=this.inputPasscode+e,this.inputPasscode===this.passcode?(this.$emit("unlock"),this.$emit("close")):!this.masterkeyPossible&&this.inputPasscode.length>=this.passcode.length?this.$emit("close"):this.masterkeyPossible&&10===this.inputPasscode.length&&(this.$emit("unlock"),this.$emit("close"))},resetTimeout(){clearTimeout(this.timeoutHandler),clearTimeout(this.timeoutMasterkeyHandler),this.timeoutHandler=setTimeout(()=>{this.$emit("close")},5e3),this.timeoutMasterkeyHandler=setTimeout(()=>{this.masterkeyPossible=!1},500)}},mounted(){this.keyHandler=St.instance(),this.keyHandler.onAnyKey(e=>{let t=e-48;t>=0&&t<=9&&this.inputDigit(t)}),this.keyHandler.startListening(),C.initDomI18n(),this.resetTimeout()},beforeDestroy(){this.keyHandler.destroy()}},Ka=(n(95),Pt(za,Wa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Unlock application // Anwendung entsperren\n ")])])}],!1,null,"1e4b04a9",null));Ka.options.__file="src/vue-components/modals/unlockModal.vue";var Ja=Ka.exports;let Xa=null,qa=null,Za={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL",MODAL_UNLOCK:"MODAL_UNLOCK"};function Qa(){Xa&&window.removeEventListener("resize",Xa.resizeListener,!0),Xa&&a()(document).off(r.EVENT_GRID_RESIZE,Xa.resizeListener),Xa&&Xa.scanner&&Xa.scanner.destroy(),Xa&&Xa.hover&&Xa.hover.destroy(),Xa&&Xa.clicker&&Xa.clicker.destroy(),Xa&&Xa.directionInput&&Xa.directionInput.destroy(),Xa&&Xa.huffmanInput&&Xa.huffmanInput.destroy(),Xa&&Xa.seqInput&&Xa.seqInput.destroy()}function er(){a.a.contextMenu("destroy");function e(e,t){return e?t?" (aktiv)":" (active)":""}function t(t,n,i){return`${t}${e(i)} // ${n}${e(i,!0)}`}let n=Xa.metadata.inputConfig,i=n.mouseclickEnabled||n.hoverEnabled,r={CONTEXT_MOUSE:{name:t("Mouse/Touch input","Maus-/Toucheingabe",i),icon:"fas fa-mouse-pointer",className:i?"boldFont":""},CONTEXT_SCANNING:{name:t("Scanning","Scanning",n.scanEnabled),icon:"fas fa-sort-amount-down",className:n.scanEnabled?"boldFont":""},CONTEXT_DIRECTION:{name:t("Direction input","Richtungs-Eingabe",n.dirEnabled),icon:"fas fa-arrows-alt",className:n.dirEnabled?"boldFont":""},CONTEXT_HUFFMAN:{name:t("Huffman input","Huffman-Eingabe",n.huffEnabled),icon:"fas fa-ellipsis-h",className:n.huffEnabled?"boldFont":""},CONTEXT_SEQUENTIAL:{name:t("Sequential input","Sequentielle Eingabe",n.seqEnabled),icon:"fas fa-arrow-right",className:n.seqEnabled?"boldFont":""}};a.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":Xa.openModal(Za.MODAL_MOUSE);break;case"CONTEXT_SCANNING":Xa.openModal(Za.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":Xa.openModal(Za.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":Xa.openModal(Za.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":Xa.openModal(Za.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:r,zIndex:10})}var tr=Pt({props:["gridId"],data:()=>({gridData:{},globalGridData:null,metadata:null,updatedMetadataDoc:null,scanner:null,hover:null,clicker:null,directionInput:null,seqInput:null,huffmanInput:null,showModal:null,modalTypes:Za,viewInitialized:!1,unlockCount:8,unlockCounter:8}),components:{UnlockModal:Ja,SequentialInputModal:Ha,HuffmanInputModal:Va,DirectionInputModal:Ga,MouseModal:Da,ScanningModal:Oa,HeaderIcon:zt},methods:{openModal(e){this.showModal=e,Qa()},lock(){this.metadata.locked=!0,this.unlockCounter=8,dt.saveMetadata(this.metadata).then(()=>{a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)})},unlock(e){let t=this;e||!g.getUnlockPasscode()?(t.unlockCounter--,qe.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,dt.saveMetadata(t.metadata).then(()=>{a()(document).trigger(r.EVENT_SIDEBAR_OPEN)}))):t.showModal=Za.MODAL_UNLOCK},applyFullscreen(e){qe.openFullscreen(),this.metadata.fullscreen=!0;let t=Promise.resolve();e||(t=dt.saveMetadata(this.metadata)),t.then(()=>{a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)})},initInputMethods(){let e=this;if(!qa)return;let t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),a()(document).on(r.EVENT_GRID_RESIZE,e.resizeListener);let n=t=>{aa.removeAddClass(t,"selected"),Ii.doAction(e.gridData.id,t.id)},i=n=>{t.globalReadActive&&Tn.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=ga.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',{selectionListener:n,activeListener:i}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=ma.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=pa.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=sa.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus","scanInactive"),e.scanner.setSelectionListener(n),qa.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),qa.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=la.getInstanceFromConfig(t,".grid-item-content",{activeListener:i,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):a()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new da(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())},reinitInputMethods(){let e=this;Qa(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),er(),e.initInputMethods()})},reload(e){qa.reinit(e).then(()=>{e&&(this.gridData=JSON.parse(JSON.stringify(e))),this.reinitInputMethods()})},reloadOnLangChange(){this.reload()},toEditGrid(){as.toEditGrid(this.gridData.id)},toManageGrids(){as.toManageGrids()},toLogin(){as.toLogin()},reloadFn(e,t,n){let i=this;if(!Xa||!qa||!qa.isInitialized())return void setTimeout(()=>{i.reloadFn(e,t,n)},500);log.debug("got update event, ids updated:"+t);let s=n.filter(e=>Xa.gridData&&e.id===Xa.gridData.id)[0];this.updatedMetadataDoc=n.filter(e=>Xa.metadata&&e.id===Xa.metadata.id)[0]||this.updatedMetadataDoc,s&&Xa.reload(new de(s)),g.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==Xa.gridData.id?dt.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then(e=>{e.hasOutdatedThumbnail()||as.toLastOpenedGrid()}):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==Xa.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?Xa.applyFullscreen(!0):a()(document).trigger(r.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==Xa.metadata.locked&&(this.updatedMetadataDoc.locked?Xa.lock():Xa.unlock(!0))))},onSidebarOpen(){Xa&&Xa.metadata&&(Xa.metadata.fullscreen=!1,a()(document).trigger(r.EVENT_GRID_RESIZE))},resizeListener(){let e=this;qe.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created(){a()(document).on(r.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).on(r.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).on(r.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){let e=this;Xa=e,dt.getGlobalGrid().then(t=>(e.globalGridData=t,dt.getGrid(e.gridId))).then(t=>{if(!t)return log.warn("grid not found! gridId: "+this.gridId),dt.getGrids(!1,!0).then(e=>(e[0]?as.toGrid(e[0].id):as.toManageGrids(),Promise.reject()));if(t.hasAREModel()){let e=t.getAREModel();yt.uploadAndStartModel(e.dataBase64,t.getAREURL(),e.fileName)}return e.gridData=JSON.parse(JSON.stringify(t)),as.addToGridHistory(e.gridData.id),Promise.resolve()}).then(()=>dt.getMetadata()).then(t=>{let n=JSON.parse(JSON.stringify(t||new h));return n.lastOpenedGridId=this.gridId,n.locked=void 0===n.locked?ue.isDemoMode()&&dt.getCurrentUser()===r.LOCAL_DEMO_USERNAME:n.locked,n.fullscreen=void 0===n.fullscreen?ue.isDemoMode()&&dt.getCurrentUser()===r.LOCAL_DEMO_USERNAME:n.fullscreen,n.inputConfig.scanEnabled=!!ue.isScanningEnabled()||n.inputConfig.scanEnabled,n.inputConfig.dirEnabled=!!ue.isDirectionEnabled()||n.inputConfig.dirEnabled,n.inputConfig.huffEnabled=!!ue.isHuffmanEnabled()||n.inputConfig.huffEnabled,dt.saveMetadata(n).then(()=>{n.locked&&a()(document).trigger(r.EVENT_SIDEBAR_CLOSE)}),e.metadata=n,Promise.resolve()}).then(()=>{return t=e.gridData.id,qa=new ei("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:t,globalGridHeightPercentage:Xa.metadata.globalGridHeightPercentage}),an.setGridInstance(qa),qa.getInitPromise();var t}).then(()=>{er(),e.viewInitialized=!0,a()(document).trigger(r.EVENT_GRID_LOADED);let t=new de(e.gridData);t.hasOutdatedThumbnail()&&M.getScreenshot("#grid-container").then(n=>{let i={data:n,hash:t.getHash()};e.gridData.thumbnail=i,dt.saveGrid(e.gridData)}),e.initInputMethods()}).catch(e=>{e&&log.warn(e)})},updated(){C.initDomI18n()},beforeDestroy(){a()(document).off(r.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).off(r.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).off(r.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),Qa(),a.a.contextMenu("destroy"),Xa=null,qa&&(qa.destroy(),qa=null,an.setGridInstance(null))}},ia,[],!1,null,"cc4f17d6",null);tr.options.__file="src/vue-components/views/gridView.vue";var nr=tr.exports,ir=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced",on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginPlain(e.user,e.password)}}},[e._m(0),e._v(" "),n("div",{staticClass:"eleven columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"eleven columns"},e._l(e.allUsersList,(function(t){return n("div",{staticClass:"row saved-user",staticStyle:{"margin-bottom":"0"}},[n("div",{class:t===e.activeUser?"loggedIn":""},[n("div",{staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"}},[n("span",{staticStyle:{"margin-right":"0.6em"}},[e.savedLocalUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_LOCAL")}},[n("i",{staticClass:"fas fa-user fa-2x"})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_CLOUD")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-cloud fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)||e.savedLocalUsers.includes(t)?e._e():n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_ONLINE")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-globe fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})])]),e._v(" "),n("strong",[e._v(e._s(t))]),e._v(" "),n("em",{directives:[{name:"show",rawName:"v-show",value:t===e.activeUser,expression:"username === activeUser"}],attrs:{"data-i18n":""}},[e._v("(active) // (aktiv)")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.loginStored(t)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.loginTryUser!==t,expression:"loginTryUser !== username"}],staticClass:"fas fa-sign-in-alt"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:null==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == undefined && loginTryUser === username"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == false && loginTryUser === username"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == true && loginTryUser === username"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.removeStoredUser(t)}}},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.savedLocalUsers.includes(t),expression:"!savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logout // Ausloggen")]),e._v(" "),n("i",{staticClass:"fas fa-user-times"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.savedLocalUsers.includes(t),expression:"savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Delete // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hasValidMajorModelVersion(t),expression:"!hasValidMajorModelVersion(username)"}],staticClass:"eight columns"},[e._m(1,!0),e._v(" "),e._m(2,!0)])])])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("form",{staticClass:"eleven columns saved-user",attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[e._m(3),e._v(" "),n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),e.savedUsers.includes(e.user)&&e.hasValidMajorModelVersion(e.user)?n("button",{staticClass:"four columns",attrs:{type:"button"},on:{click:function(t){return e.loginStored(e.user)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{staticClass:"fas fa-sign-in-alt"})]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[e._m(5),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[n("div",{staticClass:"four columns offset-by-two",staticStyle:{"margin-bottom":"1.0em"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(6)]),e._v(" "),n("button",{staticClass:"five columns offset-by-one",attrs:{type:"button",disabled:!e.user||!e.password},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Login // Einloggen")]),e._v(" "),n("span",[n("i",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess === undefined && loginTryUser === user"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == false && loginTryUser === user"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == true && loginTryUser === user"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.allUsersList.length,expression:"allUsersList.length == 0"}]},[n("form",{attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(7),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser2",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(8),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword2",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember2"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(9),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check for a one-time login on a foreign device. // Für einmaliges Einloggen auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-one",attrs:{disabled:!e.user||!e.password,"data-i18n":""},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[e._v("Login // Einloggen")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess,expression:"loginSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logging in // Einloggen")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!1===e.loginSuccess,expression:"loginSuccess === false"}]},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.loginErrorCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.loginSuccess,expression:"loginSuccess === true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Login successful // Login erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}],attrs:{"data-i18n":""}},[e._v("No account? // Kein Account?")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}],attrs:{"data-i18n":""}},[e._v("Add new account? // Weiteren Account hinzufügen?")]),e._v(" "),n("a",{attrs:{href:"#register","data-i18n":""}},[e._v("Register now // Jetzt registrieren")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("AsTeRICS Grid is free and all you need is to register is a username and a password. // AsTeRICS Grid ist kostenlos und Sie benötigen nur einen Usernamen und ein Passwort.")])])])]),e._v(" "),e._m(10)])])],1)};ir._withStripped=!0;var ar=n(6),rr=n.n(ar);let sr,or={},lr=null,cr=null,dr=null,ur=null,fr=!1,pr=null,hr=null,mr=r.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function vr(e,t,n){return dr!==e?Promise.reject():(ur=e,pr=t,hr=n,e=e.trim(),rr.a.login({username:e,password:t}).then(i=>(log.info("login success!"),or.stopAutoRetryLogin(),lr=i,cr=e,g.setLastActiveUser(e),g.setAutologinUser(n?e:""),n&&g.saveUserPassword(e,t),Promise.resolve())))}function gr(e,t,n){return vr(e,t,n).then(()=>tt.initForUser(e,t,or.getLoggedInUserDatabase(),!n).then(()=>Promise.resolve(!0)),i=>dr!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),g.isDatabaseSynced(e)?(log.info("using offline local database..."),g.setLastActiveUser(e),g.setAutologinUser(n?e:""),_r(i)!==or.ERROR_CODE_UNAUTHORIZED&&br(e,t,n),tt.initForUser(e,t).then(()=>Promise.resolve(!1))):Promise.reject(_r(i))))}function _r(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?or.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?or.ERROR_CODE_NETWORK_ERROR:void 0}function br(e,t,n){or.stopAutoRetryLogin(),sr=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),gr(e,t,n)}),1e4)}or.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",or.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",or.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",rr.a.configure({serverUrl:mr,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),or.getLoggedInUsername=function(){return cr},or.getLoggedInUserDatabase=function(){if(!lr||!lr.userDBs)return null;let e=Object.keys(lr.userDBs);return lr.userDBs[e[0]]},or.loginPlainPassword=function(e,t,n){dr=e;let i=ae.getUserPasswordHash(t);return or.loginHashedPassword(e,i,n)},or.loginHashedPassword=function(e,t,n){return dr=e,gr(e,t,n)},or.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if(fr)return log.warn("login currently in progress - aborting..."),Promise.reject();dr=e,fr=!0;let n=g.getSavedOnlineUsers(),i=g.getSavedLocalUsers(),a=new Promise((t,a)=>{if(or.getLoggedInUsername()===e)return t();if(or.logout(),n.includes(e)&&g.isDatabaseSynced(e)){let n=g.getUserPassword(e);tt.initForUser(e,n).then(()=>{or.loginHashedPassword(e,n,!0),t()})}else if(n.includes(e)){log.info("waiting for successful login because user wasn't completely synced before...");let n=g.getUserPassword(e);or.loginHashedPassword(e,n,!0).then(()=>{t()}).catch(e=>{a(e)})}else i.includes(e)&&(g.setAutologinUser(e),tt.initForUser(e,e).then(()=>{t()}))});return a.then(()=>{t||as.toMain()}),a.finally(()=>{fr=!1}),a},or.logout=function(){or.stopAutoRetryLogin(),cr&&(log.debug("logging out user: "+cr),tt.closeCurrentDatabase(),rr.a.logout(cr),cr=null,lr=null)},or.register=function(e,t,n){dr=e,or.stopAutoRetryLogin(),e=e.trim();let i=ae.getUserPasswordHash(t);return log.debug("password hash: "+i),rr.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then(t=>vr(e,i,n)).then(()=>(log.info("registration successful!"),tt.registerForUser(cr,i,or.getLoggedInUserDatabase(),!n))).then(()=>dt.importDefaultGridset()).catch(e=>(log.info("registration failed!"),log.info(e),Promise.reject(e)))},or.registerOffline=function(e,t){return or.logout(),g.saveLocalUser(e),g.setAutologinUser(e),tt.registerForUser(e,t).then(()=>dt.importDefaultGridset())},or.validateUsername=function(e){return new Promise((t,n)=>{e&&r.USERNAME_REGEX.test(e)?g.isSavedLocalUser(e)||e===r.LOCAL_DEMO_USERNAME?t(r.VALIDATION_ERROR_EXISTING):rr.a.validateUsername(e).then(()=>{t(r.VALIDATION_VALID)},e=>{log.debug(e),t(r.VALIDATION_ERROR_EXISTING)}):t(r.VALIDATION_ERROR_REGEX)})},or.stopAutoRetryLogin=function(){sr&&(window.clearInterval(sr),sr=null)},or.ping=function(){a.a.get(mr+"/ping")},a()(document).on(r.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),ur&&pr&&br(ur,pr,hr)})),a()(document).on(r.EVENT_DB_DATAMODEL_UPDATE,(function(){or.logout(),g.setAutologinUser(""),as.toLogin()}));var Er={components:{HeaderIcon:zt},props:[],data:()=>({user:null,password:null,remember:!0,loginTryUser:null,loginSuccess:null,loginErrorCode:null,savedUsers:[],savedOnlineUsers:[],savedLocalUsers:[],allUsersList:[],activeUser:null}),methods:{toMain(){as.toMain()},loginPlain(e,t){let n=this;this.savedUsers.includes(e)?n.loginStored(e):e&&t&&(n.loginTryUser=e,n.loginSuccess=void 0,n.loginErrorCode="",or.loginPlainPassword(e,t,this.remember).then(()=>{n.loginSuccess=!0,as.toMain()}).catch(e=>{n.loginSuccess=!1,n.loginErrorCode=e}))},loginStored(e){let t=this;e&&(t.savedUsers.includes(e)||or.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",or.loginStoredUser(e).then(()=>{t.loginSuccess=!0}).catch(e=>{t.loginSuccess=!1,t.loginErrorCode=e}))},removeStoredUser(e){if(this.savedOnlineUsers.includes(e)||this.savedLocalUsers.includes(e)){let t=this.savedOnlineUsers.includes(e)?"CONFIRM_REMOVE_USER":"CONFIRM_REMOVE_USER_LOCAL";if(!confirm(C.translate(t,e)))return;g.unmarkSyncedDatabase(e),g.removeUserPassword(e),or.getLoggedInUsername()===e&&or.logout(),tt.deleteDatabase(e)}else or.logout();this.allUsersList=g.getSavedUsers(this.activeUser),this.savedUsers=g.getSavedUsers(this.activeUser),this.savedOnlineUsers=g.getSavedOnlineUsers(),this.savedLocalUsers=g.getSavedLocalUsers()},hasValidMajorModelVersion:e=>g.getUserMajorModelVersion(e)<=s.getLatestModelVersion().major},mounted(){let e=or.getLoggedInUsername();this.activeUser=g.getAutologinUser()||e,this.savedUsers=g.getSavedUsers(this.activeUser),this.allUsersList=g.getSavedUsers(this.activeUser),this.savedOnlineUsers=g.getSavedOnlineUsers(),this.savedLocalUsers=g.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:g.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),C.initDomI18n()},updated(){C.initDomI18n()}},yr=(n(123),Pt(Er,ir,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Login // Einloggen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("i",{staticClass:"fas fa-exclamation-triangle"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Incompatible data model version! // Inkompatible Version des Datenmodells!")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{"data-i18n":""}},[t("span",[this._v("Change to "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" to open this user.")]),this._v(" "),t("span",[this._v("Wechseln sie zu "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" um diesen User zu verwenden.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("strong",{attrs:{"data-i18n":""}},[this._v("Login with other user // Login mit anderem User")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputPassword"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputUser2"}},[t("span",{staticClass:"desktop-right"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputPassword2"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember2"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"twelve columns"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to create an offline-only user? // Möchten Sie einen Offline-User erstellen?")]),this._v(" "),t("a",{attrs:{href:"#add","data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])])}],!1,null,"906058d8",null));yr.options.__file="src/vue-components/views/loginView.vue";var Cr=yr.exports,wr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("form",{attrs:{autocomplete:"off",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"},{name:"debounce",rawName:"v-debounce",value:300,expression:"300"},{name:"focus",rawName:"v-focus"}],staticClass:"six columns",attrs:{type:"text",name:"username",id:"inputUser"},domProps:{value:e.user},on:{change:e.validateUsername,input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&0==e.usernameValid,expression:"user != null && usernameValid == false"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",[e._v(e._s(e._f("translate")(e.usernameValidationCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&1==e.usernameValid,expression:"user != null && usernameValid == true"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Valid username // Username OK")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"six columns",attrs:{type:"password",id:"inputPassword"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password2,expression:"password2"}],staticClass:"six columns",attrs:{type:"password",id:"inputConfirmPassword"},domProps:{value:e.password2},on:{input:function(t){t.target.composing||(e.password2=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password!==e.password2,expression:"!!password && password2 !== null && password !== password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords do not match // Passwörter stimmen nicht überein")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords match // Passwörter stimmen überein")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("i",{staticClass:"fas fa-2x fa-info-circle",staticStyle:{color:"blue"}}),e._v(" "),e._m(4)])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(5),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check if you are using a foreign device. // Auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns offset-by-two",attrs:{disabled:!(e.user&&e.password&&e.password2&&e.password===e.password2&&e.usernameValid),"data-i18n":""},on:{click:e.register}},[e._v("Register // Registrieren")])]),e._v(" "),e._m(6),e._v(" "),e._m(7),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"six columns offset-by-two"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.registerSuccess,expression:"registerSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering // Registriere")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.registerSuccess,expression:"registerSuccess == false"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering failed // Registrierung fehlgeschlagen")]),e._v(" "),n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("ul",e._l(e.validationErrors,(function(t){return n("li",[e._v(e._s(t))])})),0)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:1==e.registerSuccess,expression:"registerSuccess == true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Successfully registered // Registrierung erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])]),e._v(" "),n("comparison-component")],1)],1)};wr._withStripped=!0;var Tr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("accordion",{staticClass:"six columns offset-by-two",attrs:{"acc-label":"HEADER_COMPARE_ONLINE_OFFLINE"}},[n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Offline user // Offline-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline // alle Grids werden offline gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all functions available // voller Funktionsumfang")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("ideal for using on a single device // optimal für Nutzung auf einem einzelnen Gerät")])])])]),e._v(" "),n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Online user // Online-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline and online // alle Grids werden offline und online gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("automatic synchronization across multiple devices (e.g. PC, tablet, smartphone) // automatische Synchronisierung zwischen verschiedenen Geräten (z.B. PC, Tablet, Smartphone)")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all data is end-to-end encrypted and only you are able to access it // alle Daten werden verschlüsselt und es kann niemand außer Sie darauf zugreifen")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("for registration only a username and a password is needed // für die Registrierung wird nur ein Username und ein Passwort benötigt")])])])])])],1)};Tr._withStripped=!0;var Ar={props:[],components:{Accordion:qt},data:()=>({showInfo:!1}),methods:{},mounted(){C.initDomI18n()}},Nr=(n(125),Pt(Ar,Tr,[],!1,null,"2a375b84",null));Nr.options.__file="src/vue-components/components/comparisonComponent.vue";var Sr=Nr.exports,Ir={components:{ComparisonComponent:Sr,HeaderIcon:zt},props:[],data:()=>({user:null,usernameValid:null,usernameValidationCode:null,password:null,password2:null,remember:!0,registerSuccess:null,creationTime:(new Date).getTime(),spamTime:1e4,validationErrors:[]}),methods:{toMain(){as.toMain()},register(){let e=this,t=(new Date).getTime()-e.creationTime;if(t{log.info("successfully registered!"),e.registerSuccess=!0,as.toMain()}).catch(t=>{e.registerSuccess=!1,log.warn(t),t.validationErrors&&(e.validationErrors=[],Object.keys(t.validationErrors).forEach(n=>{e.validationErrors=e.validationErrors.concat(t.validationErrors[n])}))})},validateUsername(){var e=this;or.validateUsername(e.user).then(t=>{e.usernameValid=t===r.VALIDATION_VALID,e.usernameValidationCode=t})}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},kr=(n(127),Pt(Ir,wr,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Register online user // Online-User registrieren")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",{staticClass:"desktop-right inputlabel"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns inputlabel",attrs:{for:"inputPassword"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns inputlabel",attrs:{for:"inputConfirmPassword"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Confirm password // Passwort wiederholen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{attrs:{"data-i18n":""}},[t("span",[this._v("Your password will be used in order to encrypt your private data, before being synchronized with the cloud. A stronger password means better encryption.")]),this._v(" "),t("span",[this._v("Das Passwort wird verwendet um Ihre privaten Konfigurationsdaten zu verschlüsseln, bevor sie mit der Cloud synchronisiert werden. Ein stärkeres Passwort bedeutet bessere Verschlüsselung.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Already have an account? // Sie haben bereits einen Account?")]),this._v(" "),t("a",{attrs:{href:"#login","data-i18n":""}},[this._v("Login // Zum Login")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to create an offline-only user? // Möchten Sie einen Offline-User erstellen?")]),this._v(" "),t("a",{attrs:{href:"#add","data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])])}],!1,null,"287c2172",null));kr.options.__file="src/vue-components/views/registerView.vue";var Or=kr.exports,Lr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("form",{attrs:{autocomplete:"off",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"},{name:"debounce",rawName:"v-debounce",value:300,expression:"300"},{name:"focus",rawName:"v-focus"}],staticClass:"six columns",attrs:{type:"text",name:"username",id:"inputUser"},domProps:{value:e.user},on:{input:[function(t){t.target.composing||(e.user=t.target.value)},function(t){e.validationError=void 0}],change:e.validateUsername}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:""!=e.user&&e.validationError,expression:"user != '' && validationError"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.validationError)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.user&&void 0!==e.validationError&&!e.validationError,expression:"user && validationError !== undefined && !validationError"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Valid username // Username OK")])])])]),e._v(" "),e._m(2),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns offset-by-two",attrs:{disabled:!e.user||void 0===e.validationError||e.validationError},on:{click:e.addUser}},[n("span",{attrs:{"data-i18n":""}},[e._v("Add user // User hinzufügen")]),e._v("  "),e.loading?n("i",{staticClass:"fas fa-spinner fa-spin"}):e._e()])]),e._v(" "),e._m(3),e._v(" "),e._m(4),e._v(" "),n("comparison-component")],1)],1)};Lr._withStripped=!0;var xr={components:{ComparisonComponent:Sr,HeaderIcon:zt},props:[],data:()=>({user:null,validationError:void 0,showInfo:!1,savedUsers:g.getSavedUsers(),loading:!1}),methods:{toMain(){as.toMain()},addUser(){this.loading=!0,null==this.validationError&&or.registerOffline(this.user,this.user).then(()=>{as.toMain()})},validateUsername(){this.validationError=void 0,r.USERNAME_REGEX.test(this.user)?this.savedUsers.includes(this.user)||or.getLoggedInUsername()===this.user?this.validationError=r.VALIDATION_ERROR_EXISTING:this.validationError=null:this.validationError=r.VALIDATION_ERROR_REGEX}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Dr=(n(129),Pt(xr,Lr,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",{staticClass:"desktop-right"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("i",{staticClass:"fas fa-2x fa-info-circle",staticStyle:{color:"blue"}}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[t("span",[this._v("A local user is stored only on this device, in this browser. If you want to set up a user which is synchronized across several devices using the cloud, you can register an online user.")]),this._v(" "),t("span",[this._v("Ein lokaler User ist nur auf diesem Gerät, in diesem Browser gespeichert. Wenn Sie einen User erstellen möchen, der auf verschiedenen Geräten synchronisiert wird, registrieren Sie einen Online-User.")])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to register an online user devices? // Möchten Sie einen Online-User registrieren?")]),this._v(" "),t("a",{attrs:{href:"#register","data-i18n":""}},[this._v("Register // Zur Registrierung")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"six columns offset-by-two"},[t("span",{attrs:{"data-i18n":""}},[this._v("Already have an account? // Sie haben bereits einen Account?")]),this._v(" "),t("a",{attrs:{href:"#login","data-i18n":""}},[this._v("Login // Zum Login")])])])}],!1,null,"45d59551",null));Dr.options.__file="src/vue-components/views/addOfflineView.vue";var Rr=Dr.exports,Mr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("div",{staticClass:"eight columns offset-by-one"},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),e._m(2),e._v(" "),n("button",{on:{click:function(t){return e.useDefaultUser()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Use AsTeRICS Grid without registration // AsTeRICS Grid ohne Registrierung verwenden")]),e._v("  "),e.loading?n("i",{staticClass:"fas fa-spinner fa-spin"}):e._e()]),e._v(" "),e._m(3)]),e._v(" "),n("div",{staticClass:"row"},[e._m(4),e._v(" "),e._m(5),e._v(" "),n("button",{attrs:{"data-i18n":""},on:{click:function(t){return e.toRegister()}}},[e._v("Register now // Zur Registrierung")])]),e._v(" "),e._m(6),e._v(" "),n("div",{staticClass:"row"},[n("b",{attrs:{"data-i18n":""}},[e._v("Hint: // Hinweis:")]),e._v(" "),n("span",[n("span",{attrs:{"data-i18n":""}},[e._v("If you need help within AsTeRICS Grid, just click the help icon ( // Wenn Sie Hilfe bei der Verwendung von AsTeRICS Grid benötigen, klicken Sie einfach auf das Hilfe-Icon (")]),e._v(" "),n("a",{attrs:{href:"javascript:;"},on:{click:e.openHelp}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(") or press [F1] on the keyboard in order to open the user documentation at the relevant part. // ) oder drücken Sie [F1] auf der Tastatur um die Benutzerdokumentation an der entsprechenden Stelle zu öffnen.")])])])])])],1)};Mr._withStripped=!0;var Pr={components:{HeaderIcon:zt},props:[],data:()=>({loading:!1}),methods:{toMain(){as.toMain()},toRegister(){as.toRegister()},useDefaultUser(){this.loading=!0,or.registerOffline(r.LOCAL_NOLOGIN_USERNAME,r.LOCAL_NOLOGIN_USERNAME).then(()=>{as.toMain()})},openHelp(){ft.openHelp()}},mounted(){C.initDomI18n()}},Gr=(n(131),Pt(Pr,Mr,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Welcome // Willkommen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("h3",{attrs:{"data-i18n":""}},[t("span",[this._v("Use AsTeRICS Grid "),t("strong",[this._v("without registration")])]),this._v(" "),t("span",[this._v("AsTeRICS Grid "),t("strong",[this._v("ohne Registrierung")]),this._v(" verwenden")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("ul",{staticClass:"fa-ul"},[t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all grids are saved offline // alle Grids werden offline gespeichert")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all functions available // voller Funktionsumfang")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("ideal for using on a single device // optimal für Nutzung auf einem einzelnen Gerät")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("span",{staticClass:"fa fa-info-circle"}),t("span",{staticClass:"break-word",attrs:{"data-i18n":""}},[this._v("it's always possible to register later. // eine spätere Registrierung ist jederzeit möglich.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("h3",{attrs:{"data-i18n":""}},[t("span",[this._v("Use AsTeRICS Grid "),t("strong",[this._v("with registration")])]),this._v(" "),t("span",[this._v("AsTeRICS Grid "),t("strong",[this._v("mit Registrierung")]),this._v(" verwenden")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("ul",{staticClass:"fa-ul"},[t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all grids are saved offline and online // alle Grids werden offline und online gespeichert")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("automatic synchronization across multiple devices (e.g. PC, tablet, smartphone) // automatische Synchronisierung zwischen verschiedenen Geräten (z.B. PC, Tablet, Smartphone)")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("all data is end-to-end encrypted and only you are able to access it // alle Daten werden verschlüsselt und es kann niemand außer Sie darauf zugreifen")])]),this._v(" "),t("li",[t("span",{staticClass:"fa-li"},[t("i",{staticClass:"fas fa-check"})]),t("span",{attrs:{"data-i18n":""}},[this._v("for registration only a username and a password is needed // für die Registrierung wird nur ein Username und ein Passwort benötigt")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("span",{attrs:{"data-i18n":""}},[this._v("Already have an account? // Sie haben bereits einen Account?")]),this._v(" "),t("a",{attrs:{href:"#login","data-i18n":""}},[this._v("Login // Zum Login")])])}],!1,null,"20be1b0d",null));Gr.options.__file="src/vue-components/views/welcomeView.vue";var Ur=Gr.exports,$r=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"overflow-content"},[t("header-icon",{attrs:{"full-header":"true"}}),this._v(" "),this._m(0)],1)};$r._withStripped=!0;var Fr={components:{HeaderIcon:zt},props:[],data:()=>({}),methods:{toMain(){as.toMain()},toRegister(){as.toRegister()}},mounted(){C.initDomI18n()}},Vr=(n(133),Pt(Fr,$r,[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row content spaced"},[n("h2",{attrs:{"data-i18n":""}},[e._v("About AsTeRICS Grid // Über das AsTeRICS Grid")]),e._v(" "),n("div",{staticClass:"eight columns offset-by-one"},[n("div",{staticClass:"row"},[n("h3",{attrs:{"data-i18n":""}},[e._v("General information // Allgemeine Informationen")]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n The initial development of AsTeRICS Grid was done at the UAS Technikum Wien within the project ToRaDes, funded by the city of Vienna (project number 18-04)."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/torades/index.php"}},[e._v("More information about project ToRaDes")]),e._v(" "),n("br"),n("br"),e._v('\n\n Current development of AsTeRICS Grid is done in the project "Knowledge Hub for Accessible Technologies" (WBT), funded by the city of Vienna (project number 26-02).'),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/khat/index.php"}},[e._v("More information about project WBT")]),e._v(" "),n("br"),n("br"),e._v("\n\n AsTeRICS Grid is free and open source and hosted on github.com."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid"}},[e._v("AsTeRICS Grid on github")])]),e._v(" "),n("span",[e._v("\n Die erste Version von AsTeRICS Grid wurde an der FH Technikum Wien im Projekt ToRaDes entwickelt, das von von der Stadt Wien gefördert wurde (Projektnummer 18-04)."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/torades/index.php"}},[e._v("Mehr Informationen zum Projekt ToRaDes")]),e._v(" "),n("br"),n("br"),e._v('\n\n Die Weiterentwicklung von AsTeRICS Grid erfolgt derzeit im Projekt "Wissensdrehscheibe für Barrierefreie Technologien" (WBT), gefördert von der Stadt Wien (Projektnummer 26-02).'),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://embsys.technikum-wien.at/projects/khat/index.php"}},[e._v("Mehr Informationen zum Projekt WBT")]),e._v(" "),n("br"),n("br"),e._v("\n\n AsTeRICS Grid ist kostenlos und OpenSource und als Projekt auf github.com verfügbar."),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid"}},[e._v("AsTeRICS Grid auf github")])])]),n("br"),e._v(" "),n("img",{attrs:{src:"app/img/ma23-gefoerdertvon.jpg",width:"80px",alt:"Logo MA23 Stadt Wien"}})]),e._v(" "),n("div",{staticClass:"row"},[n("h3",[e._v("Feedback")]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n If you encounter an error, have suggestions for improvement or any general feedback please don't hesitate to contact us on:"),n("br"),e._v(" "),n("a",{attrs:{href:"mailto:office@asterics-foundation.org"}},[e._v("office@asterics-foundation.org")]),e._v(" "),n("br"),n("br"),e._v("\n\n If you are a github user, you are also welcome to file an issue directly on github:"),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/issues/"}},[e._v("AsTeRICS Grid issues on github")]),e._v(" "),n("br")]),e._v(" "),n("span",[e._v("\n Wenn Sie einen Fehler finden, Verbesserungsvorschläge haben oder allgemeines Feedback rückmelden möchten, kontaktieren Sie uns bitte unter:"),n("br"),e._v(" "),n("a",{attrs:{href:"mailto:office@asterics-foundation.org"}},[e._v("office@asterics-foundation.org")]),e._v(" "),n("br"),n("br"),e._v("\n Wenn Sie auf github aktiv sind, können Sie dort ein Issue eintragen:"),n("br"),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/issues/"}},[e._v("AsTeRICS Grid Issues auf github")]),e._v(" "),n("br")])])]),e._v(" "),n("div",{staticClass:"row"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Terms of Service and Privacy Policy // Nutzungsbedingungen und Datenschutzerklärung")]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("div",[n("p",[e._v("\n AsTeRICS Grid is free and open source software. It's licensed under the "),n("a",{attrs:{href:"https://github.com/asterics/AsTeRICS-Grid/blob/master/LICENSE",target:"_blank"}},[e._v("AGPLv3")]),e._v(",\n which in ensures it will stay open source forever.\n ")]),e._v(" "),n("p",[e._v("\n If you want to use the integrated YouTube player, you have to agree to the\n "),n("a",{attrs:{href:"https://www.youtube.com/t/terms",target:"_blank"}},[e._v("YouTube Terms of Service")]),e._v(" and the\n "),n("a",{attrs:{href:"https://policies.google.com/privacy",target:"_blank"}},[e._v("Google Privacy Policy")]),e._v(".\n All entered search queries for YouTube videos are sent to the "),n("a",{attrs:{href:"https://developers.google.com/youtube/v3",target:"_blank"}},[e._v("YouTube Data API")]),e._v("\n in order to retrieve and play video results.\n ")])]),e._v(" "),n("div",[n("p",[e._v("\n AsTeRICS Grid ist kostenlos und OpenSource. Es unterliegt den Lizenzbedingungen der "),n("a",{attrs:{href:"https://github.com/asterics/AsTeRICS-Grid/blob/master/LICENSE",target:"_blank"}},[e._v("AGPLv3")]),e._v(",\n welche sicherstellen, dass es für immer OpenSource bleibt.\n ")]),e._v(" "),n("p",[e._v("\n Wenn Sie den eigebauten YouTube-Player verwenden möchten, müssen Sie den\n "),n("a",{attrs:{href:"https://www.youtube.com/t/terms",target:"_blank"}},[e._v("YouTube Nutzungsbedingungen")]),e._v(" und der\n "),n("a",{attrs:{href:"https://policies.google.com/privacy",target:"_blank"}},[e._v("Google Datenschutzerklärung")]),e._v(" zustimmen.\n Alle eingegebenen Suchanfragen für YouTube-Videos werden an die "),n("a",{attrs:{href:"https://developers.google.com/youtube/v3",target:"_blank"}},[e._v("YouTube Data API")]),e._v("\n gesendet um Suchergebnisse zu erhalten und passende Videos abspielen zu können.\n ")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Acknowledgements // Dank")]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n We thank "),n("a",{attrs:{target:"_blank",href:"https://crossbrowsertesting.com/"}},[e._v("crossbrowsertesting.com")]),e._v(" for providing us a free open source license."),n("br")]),e._v(" "),n("span",[e._v("\n Wir danken "),n("a",{attrs:{target:"_blank",href:"https://crossbrowsertesting.com/"}},[e._v("crossbrowsertesting.com")]),e._v(" für eine kostenlose OpenSource Lizenz."),n("br")])]),e._v(" "),n("a",{attrs:{target:"_blank",href:"https://crossbrowsertesting.com/"}},[n("img",{attrs:{src:"app/img/CBT_OS-logo_2Color-H.png",width:"300px"}})]),e._v(" "),n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n We thank "),n("a",{attrs:{target:"_blank",href:"https://responsivevoice.org"}},[e._v("ResponsiveVoice.org")]),e._v(" for free non-commercial usage."),n("br")]),e._v(" "),n("span",[e._v("\n Wir danken "),n("a",{attrs:{target:"_blank",href:"https://responsivevoice.org"}},[e._v("ResponsiveVoice.org")]),e._v(" für die kostenlose nicht-kommerzielle Verwendung."),n("br")])]),e._v(" "),n("div",[n("a",{attrs:{href:"https://responsivevoice.org"}},[e._v("ResponsiveVoice-NonCommercial")]),e._v(" licensed under "),n("a",{attrs:{href:"https://creativecommons.org/licenses/by-nc-nd/4.0/"}},[n("img",{attrs:{title:"ResponsiveVoice Text To Speech",src:"https://responsivevoice.org/wp-content/uploads/2014/08/95x15.png",alt:"95x15",width:"95",height:"15"}})])])]),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-top":"3em"}},[n("div",{attrs:{"data-i18n":""}},[n("span",[e._v("\n You are using version "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/releases/tag/release-2021-02-05-14.44/+0100"}},[e._v("release-2021-02-05-14.44/+0100")]),e._v(" of AsTeRICS Grid.\n ")]),e._v(" "),n("span",[e._v("\n Sie verwenden AsTeRICS Grid Version "),n("a",{attrs:{target:"_blank",href:"https://github.com/asterics/AsTeRICS-Grid/releases/tag/release-2021-02-05-14.44/+0100"}},[e._v("release-2021-02-05-14.44/+0100")]),e._v(".\n ")])])])])])}],!1,null,"af4ab890",null));Vr.options.__file="src/vue-components/views/aboutView.vue";var Br=Vr.exports,Yr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content box"},[n("div",{staticClass:"all-dicts-view"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon"),e._v(" "),n("button",{on:{click:function(t){return e.addDictionary()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("New Dictionary // Neues Wörterbuch")])])],1),e._v(" "),n("div",{staticClass:"row content text-content"},[e.dicts?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("h2",{attrs:{"data-i18n":""}},[e._v("Saved Dictionaries // Gespeicherte Wörterbücher")]),e._v(" "),n("ul",{directives:[{name:"show",rawName:"v-show",value:e.dicts&&e.dicts.length>0,expression:"dicts && dicts.length > 0"}],attrs:{id:"dictList"}},[e._m(0),e._v(" "),e._l(e.dicts,(function(t){return n("li",{staticClass:"dict-table-elem"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[e.editModeId!==t.id?n("div",[e._v("\n "+e._s(t.dictionaryKey)+"\n "),n("button",{staticClass:"small-button",on:{click:function(n){return e.enableEditName(t)}}},[n("i",{staticClass:"far fa-edit"})])]):e._e(),e._v(" "),e.editModeId===t.id?n("div",[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"dict.dictionaryKey"}],attrs:{type:"text"},domProps:{value:t.dictionaryKey},on:{input:function(n){n.target.composing||e.$set(t,"dictionaryKey",n.target.value)}}}),e._v(" "),n("div",{staticClass:"inline"},[e.originalLabel?n("button",{staticClass:"small-button",on:{click:function(t){return e.cancelEditName()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("button",{staticClass:"small-button",attrs:{disabled:e.isLabelDuplicate(t.dictionaryKey)},on:{click:function(n){return e.finishEditName(t)}}},[n("i",{staticClass:"fas fa-check"})])])]):e._e()]),e._v(" "),n("div",{staticClass:"eight columns actionbuttons",staticStyle:{display:"flex"}},[n("div",{staticClass:"four columns show-mobile",staticStyle:{margin:"0.5em 0 0 0.2em"},attrs:{"data-i18n":""}},[e._v("Actions\n // Aktionen\n ")]),e._v(" "),n("button",{on:{click:function(n){return e.edit(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.clone(t.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteDict(t.id,t.dictionaryKey)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])])])]),e._v(" "),e.editId===t.id?n("div",{staticClass:"edit-container"},[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchWord,expression:"searchWord"}],staticClass:"four columns",attrs:{type:"text",placeholder:"Search word"},domProps:{value:e.searchWord},on:{input:[function(t){t.target.composing||(e.searchWord=t.target.value)},function(t){return e.inputSearchWord()}]}}),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){e.showImportModal=!0}}},[n("i",{staticClass:"fas fa-file-import"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Import words // Wörter importieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Words: // Wörter:")]),e._v(" "),n("ul",{staticStyle:{"margin-left":"0"}},e._l(e.wordlist,(function(i){return n("li",[n("button",{staticClass:"small-button",staticStyle:{"margin-right":"0.5em"},on:{click:function(n){return e.deleteWord(i,t)}}},[n("i",{staticClass:"far fa-trash-alt"})]),e._v(e._s(i)+"\n ")])})),0),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.totalWords>e.wordlist.length&&""===e.searchWord,expression:"totalWords > wordlist.length && searchWord === ''"}]},[e._v("\n "+e._s(e.totalWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) available. Type in search field to filter. // mehr Wörter verfügbar. Tippe in Suchfeld um zu filtern.")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.filterWords>e.wordlist.length&&""!==e.searchWord,expression:"filterWords > wordlist.length && searchWord !== ''"}]},[e._v("\n "+e._s(e.filterWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) for this filter. Refine search to show more. // mehr Wörter für diese Suche. Verfeinere die Suche um mehr anzuzeigen.")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchWord&&e.totalWords>0&&0===e.wordlist.length,expression:"searchWord && totalWords > 0 && wordlist.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("No words for this filter. Clear search field to show elements. // Keine Wörter für diese Suche. Lösche Suchfeld um Elemente anzuzeigen.")]),e._v(" "),n("button",{on:{click:function(t){return e.inputSearchWord("")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear // Löschen")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.totalWords,expression:"totalWords === 0"}],attrs:{"data-i18n":""}},[e._v("This dictionary contains no words. // Dieses Wörterbuch enthält keine Wörter.")])])]):e._e(),e._v(" "),n("div",[e.showImportModal?n("import-dictionary-modal",{attrs:{"dict-data":t},on:{close:function(t){e.showImportModal=!1},reload:e.reload}}):e._e()],1)])}))],2),e._v(" "),e.dicts&&0!==e.dicts.length?e._e():n("p",{attrs:{"data-i18n":""}},[e._v("\n No dictionaries found! // Keine Ergebnisse gefunden!\n ")])])])])};Yr._withStripped=!0;var jr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body container"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"nine columns offset-by-three btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:function(){e.showAdvanced=!e.showAdvanced}}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.showAdvanced,expression:"!showAdvanced"}],staticClass:"fas fa-chevron-down"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.showAdvanced,expression:"showAdvanced"}],staticClass:"fas fa-chevron-up"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Advanced options // Erweiterte Einstellungen")])])]),e._v(" "),e.showAdvanced?n("div",{staticClass:"row"},[n("div",{staticClass:"nine columns offset-by-three",staticStyle:{"background-color":"whitesmoke"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElementSeparator","data-i18n":""}},[e._v("Element separator // Trennzeichen Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.elementSeparator,expression:"elementSeparator"}],attrs:{id:"inputElementSeparator",type:"text"},domProps:{value:e.elementSeparator},on:{input:[function(t){t.target.composing||(e.elementSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankSeparator","data-i18n":""}},[e._v("In-element separator // Trennzeichen innerhalb Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankSeparator,expression:"rankSeparator"}],attrs:{id:"inputRankSeparator",type:"text"},domProps:{value:e.rankSeparator},on:{input:[function(t){t.target.composing||(e.rankSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElIndex","data-i18n":""}},[e._v("Word index (0-based) // Index Wort (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.wordPosition,expression:"wordPosition"}],attrs:{id:"inputElIndex",type:"number"},domProps:{value:e.wordPosition},on:{input:[function(t){t.target.composing||(e.wordPosition=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankIndex","data-i18n":""}},[e._v("Rank index (0-based) // Index Rank (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankPosition,expression:"rankPosition"}],attrs:{id:"inputRankIndex",type:"number"},domProps:{value:e.rankPosition},on:{input:[function(t){t.target.composing||(e.rankPosition=t.target.value)},e.textChanged]}})])])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Word1 Word2 Word3..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Words // Erkannte Wörter")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.elementCount))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Word(s) // Wörter")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))]),e._v(" "),e.parsedElems.length{e.$emit("reload",e.dictData),e.$emit("close")})},parseInternal(e){try{e.parseWords(this.inputText,{elementSeparator:new RegExp(this.elementSeparator),rankSeparator:new RegExp(this.rankSeparator),wordPosition:this.wordPosition,rankPosition:this.rankPosition,addToDictionary:this.dictData.dictionaryKey})}catch(e){log.warn("error parsing words: "+e)}},openHelp(){ft.openHelp()}},mounted(){C.initDomI18n(),this.originalPredictionary=Be.instance(),this.originalPredictionary.loadDictionary(this.dictData.data,this.dictData.dictionaryKey),ft.setHelpLocation("07_dictionaries","#add-words")},updated(){C.initDomI18n()},beforeDestroy(){ft.revertToLastLocation()}},zr=(n(135),Pt(Wr,jr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Import words to dictionary // Wörter zu Wörterbuch hinzufügen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("label",{staticClass:"three columns",attrs:{for:"inputText","data-i18n":""}},[this._v("Input // Eingabe")]),this._v(" "),t("span",{staticClass:"nine columns",attrs:{"data-i18n":""}},[this._v('Insert Words, separated by space. ";" or [Enter] // Geben Sie Wörter ein, getrennt durch Leertaste, ";" oder [Enter]')])])}],!1,null,"ebf1d49c",null));zr.options.__file="src/vue-components/modals/importDictionaryModal.vue";var Kr=zr.exports;let Jr=null;var Xr={data:()=>({dicts:null,editModeId:"",editId:null,originalLabel:"",showLoading:!0,predictionary:null,wordlist:[],searchWord:"",showImportModal:!1,totalWords:0,filterWords:0}),components:{ImportDictionaryModal:Kr,HeaderIcon:zt},methods:{deleteDict:function(e,t){let n=this;confirm(C.translate("CONFIRM_DELETE_DICT",t))&&dt.deleteObject(e).then(()=>{n.reload()})},addDictionary:function(){log.debug("add dictionary!");let e=this.dicts.map(e=>e.dictionaryKey),t=new Re({dictionaryKey:s.getNewName("newDictionary",e)});dt.saveDictionary(t).then(()=>{this.editModeId=t.id,this.reload()})},finishEditName:function(e){dt.saveDictionary(e),this.editModeId="",this.originalLabel=""},enableEditName:function(e){this.cancelEditName(),this.editModeId=e.id,this.originalLabel=e.dictionaryKey},cancelEditName:function(){if(this.editModeId){let e=this.dicts.filter(e=>e.id===this.editModeId)[0];e.dictionaryKey=this.originalLabel||e.dictionaryKey}this.editModeId="",this.originalLabel=""},isLabelDuplicate:function(e){return this.dicts.map(e=>e.dictionaryKey).filter(t=>t===e).length>1},show(e){},edit(e){this.cancelEditName(),this.editId!==e.id?(this.editId=e.id,this.predictionary=Be.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),ft.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished(){this.editId=null,this.searchWord="",ft.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord(e){let t=this,n=void 0===e?200:0;qe.debounce((function(){t.searchWord=void 0===e?t.searchWord:e;let n=t.predictionary.predict(t.searchWord,{maxPredicitons:1e4});t.filterWords=n.length,t.wordlist=n.slice(0,9)}),n,qe.DEFAULT_KEY2)},clone(e){let t=this;dt.getDictionary(e).then(e=>{dt.saveDictionary(e.clone()).then(()=>{t.reload()})})},deleteWord(e,t){let n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,qe.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),dt.saveDictionary(t)}),2e3,qe.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){let t=this;dt.getDictionaries().then(n=>{this.dicts=JSON.parse(JSON.stringify(n)),t.editId&&e&&e.data&&(t.editFinished(),t.edit(e))})},updatedHandler(e,t,n){n[0].modelName===Re.getModelName()&&this.reload(n[0])}},created(){let e=this;a()(document).on(r.EVENT_DB_PULL_UPDATED,e.updatedHandler),dt.getDictionaries().then(t=>{log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1})},mounted:function(){Jr=this,C.initDomI18n()},updated(){C.initDomI18n()},beforeDestroy(){Ye.init(),a()(document).off(r.EVENT_DB_PULL_UPDATED,this.updatedHandler),a.a.contextMenu("destroy")}},qr=(n(137),Pt(Xr,Yr,[function(){var e=this.$createElement,t=this._self._c||e;return t("li",{staticClass:"hide-mobile table-headers"},[t("span",{staticClass:"four columns"},[this._v("Dictionary Name")]),this._v(" "),t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Actions // Aktionen")]),t("br")])}],!1,null,"594606fa",null));qr.options.__file="src/vue-components/views/dictionariesView.vue";var Zr=qr.exports,Qr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),e.show?n("div",{staticClass:"row content spaced"},[n("div",{staticClass:"row"},[n("h2",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("General settings // Allgemeine Einstellungen")]),e._v(" "),e.saveSuccess?n("div",{staticStyle:{"padding-top":"1.7em"}},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("All changes saved! // Alle Änderungen gespeichert!")])]):e._e()]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Application Language // Anwendungs-Sprache")]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"inLanguage","data-i18n":""}},[e._v("Select language // Sprache wählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.langCode,expression:"langCode"}],staticClass:"five columns",attrs:{id:"inLanguage"},on:{input:function(t){return e.saveLangCode()},change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.langCode=t.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.allLanguages.filter((function(t){return-1!==["de","en"].indexOf(t.code)||-1!==e.gridLanguages.indexOf(t.code)})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])}))],2)]),e._v(" "),e._m(0),e._v(" "),e._m(1)]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Voice // Stimme")]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedVoiceName,expression:"selectedVoiceName"}],staticClass:"five columns",attrs:{id:"inVoice"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedVoiceName=t.target.multiple?n:n[0]},function(t){return e.saveVoice()}]}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.voices,(function(t){return n("option",{domProps:{value:t.name}},[e._v(e._s(t.name))])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.testText,expression:"testText"}],staticClass:"five columns",attrs:{type:"text"},domProps:{value:e.testText},on:{input:function(t){t.target.composing||(e.testText=t.target.value)}}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{id:"testVoice","data-i18n":""},on:{click:e.testSpeak}},[e._v("Test // Testen")])])]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Miscellaneous // Diverses")]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.syncNavigation,expression:"syncNavigation"}],attrs:{id:"chkSyncNavigation",type:"checkbox"},domProps:{checked:Array.isArray(e.syncNavigation)?e._i(e.syncNavigation,null)>-1:e.syncNavigation},on:{change:[function(t){var n=e.syncNavigation,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.syncNavigation=n.concat([null])):r>-1&&(e.syncNavigation=n.slice(0,r).concat(n.slice(r+1)))}else e.syncNavigation=a},function(t){return e.saveSyncNavigation()}]}}),e._v(" "),n("label",{attrs:{for:"chkSyncNavigation","data-i18n":""}},[e._v("Synchronize navigation and locked/fullscreen state for online users // Navigation und Sperr- bzw. Vollbildstatus für online User synchronisieren")])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"unlockPass","data-i18n":""}},[e._v("Passcode for unlocking user interface (only numbers) // PIN um Oberfläche zu entsperren (nur Ziffern)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.unlockPasscode,expression:"unlockPasscode"}],staticClass:"five columns",attrs:{id:"unlockPass",type:"number",placeholder:e.i18nService.translate("(no passcode) // (kein PIN)")},domProps:{value:e.unlockPasscode},on:{input:[function(t){t.target.composing||(e.unlockPasscode=t.target.value)},function(t){e.unlockPasscode=e.unlockPasscode.substring(0,6),e.savePasscode()}]}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{"data-i18n":""},on:{click:function(t){e.unlockPasscode=null,e.savePasscode()}}},[e._v("Reset // Löschen")])])])]):e._e()],1)};Qr._withStripped=!0;var es={components:{HeaderIcon:zt},props:[],data:()=>({metadata:null,show:!1,langCode:"",gridLanguages:[],allLanguages:C.getAllLanguages(),currentLang:C.getBrowserLang(),saveSuccess:null,speechService:Tn,syncNavigation:g.shouldSyncNavigation(),unlockPasscode:g.getUnlockPasscode(),voices:Tn.getVoices(),selectedVoiceName:Tn.getPreferredVoiceName(),testText:C.translate("This is an english sentence. // Das ist ein deutscher Satz."),i18nService:C}),methods:{saveLangCode(){this.saveSuccess=void 0,qe.debounce(()=>{C.setLanguage(this.langCode),C.initDomI18n(),this.saveSuccess=!0},300,"SAVE_LANG")},saveVoice(){this.saveSuccess=void 0,qe.debounce(()=>{Tn.setPreferredVoiceName(this.selectedVoiceName),this.saveSuccess=!0},300,"SAVE_VOICE")},saveSyncNavigation(){this.saveSuccess=void 0,qe.debounce(()=>{g.setShouldSyncNavigation(this.syncNavigation),this.saveSuccess=!0},300,"SAVE_NAV")},savePasscode(){this.saveSuccess=void 0,qe.debounce(()=>{g.setUnlockPasscode(this.unlockPasscode),this.saveSuccess=!0},500,"SAVE_UNLOCK")},testSpeak(){Tn.speak(this.testText,null,this.selectedVoiceName)}},mounted(){let e=this;C.initDomI18n(),dt.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0}),dt.getGrids(!1,!0).then(t=>{e.gridLanguages=t[0]?Object.keys(t[0].label):[]}),e.langCode=C.getCustomLanguage()},updated(){C.initDomI18n()}},ts=(n(139),Pt(es,Qr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word"},[t("span",{attrs:{"data-i18n":""}},[t("span",[this._v('Grids can be translated to every language. To add or edit a translation use "Edit grid -> More -> Translate Grid".')]),this._v(" "),t("span",[this._v('Grids können in alle Sprachen übersetzt werden. Um eine Übersetzung zu bearbeiten oder hinzuzufügen, verwenden Sie "Grid bearbeiten -> Mehr -> Grid übersetzen".')])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word",attrs:{"data-i18n":""}},[t("span",[this._v("For user interface only English (en) and German (de) are available. For all other languages English will be used.")]),this._v(" "),t("span",[this._v("Das User-Interface ist nur in Englisch (en) and Deutsch (de) verfügbar. Für andere Sprachen wird Englisch verwendet.")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Preferred voice // Bevorzugte Stimme")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Test text // Test-Text")])])}],!1,null,"747d2ef2",null));ts.options.__file="src/vue-components/views/settingsView.vue";var ns=ts.exports;let is=["#login","#register","#welcome","#add","#about"],as={},rs=null,ss=null,os=null,ls=!1,cs=null,ds=[];function us(){let e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function fs(e,t){os=t?null:location.hash,location.hash=e}function ps(e,t,n){var i;cs=e,e!==nr&&a()("#touchElement").hide(),i=n||us(),a()("nav button").removeClass("selected"),a()(`nav a[href='${i}'] button`).addClass("selected"),log.debug("loading view: "+e.__file),jt.setViewComponent(e,t)}function hs(){dt.getMetadata().then(e=>{let t=e?e.lastOpenedGridId:null;ps(nr,{gridId:t})})}as.init=function(e,t){ls=!0,ss=e,rs=new y.a(null,!0),rs.on({main:function(){ft.setHelpLocation("02_navigation","#main-view"),hs()},"grids/":function(){ft.setHelpLocation("02_navigation","#manage-grids-view"),ps(bn)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),ft.setHelpLocation("02_navigation","#main-view"),ps(nr,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),ft.setHelpLocation("02_navigation","#main-view"),dt.getGrids().then(t=>{let n=t.filter(t=>C.getTranslation(t.label)===e.gridName),i=n[0]?n[0].id:null;i?ps(nr,{gridId:i},"#main"):(log.warn(`no grid with name ${e.gridName} found!`),hs())})},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),ft.setHelpLocation("02_navigation","#edit-view"),ps(na,{gridId:e.gridId})},login:function(){ft.setHelpLocation("02_navigation","#change-user-view"),ps(Cr)},register:function(){ft.setHelpLocation("06_users","#online-users"),ps(Or)},add:function(){ft.setHelpLocation("06_users","#offline-users"),ps(Rr)},welcome:function(){ft.setHelpLocationIndex(),ps(Ur)},about:function(){ft.setHelpLocationIndex(),ps(Br)},dictionaries:function(){ft.setHelpLocation("02_navigation","#manage-dictionaries-view"),ps(Zr)},settings:function(){ps(ns)},"*":function(){ft.setHelpLocation("02_navigation","#main-view"),as.toMain()}}),rs.hooks({before:function(e,t){cs&&cs.destroy&&(cs.destroy(),cs=null);let n=function(){let e=location.hash;if(!tt.getCurrentUsedDatabase()){let t=g.getLastActiveUser()||g.getSavedUsers().length>0;e=is.includes(e)?e:null,e=e||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),fs(n)):e(),Ln.destroy()},after:function(e){},leave:function(e){}}),t&&fs(t),rs.resolve()},as.isInitialized=function(){return ls},as.toMain=function(){0===us().indexOf("#main")?fs("#main?date="+(new Date).getTime()):fs("#main")},as.toRegister=function(){fs("#register")},as.toAddOffline=function(){fs("#add")},as.toAbout=function(){fs("#about")},as.toLogin=function(){fs("#login")},as.toLastOpenedGrid=function(){dt.getMetadata().then(e=>{as.toGrid(e.lastOpenedGridId)})},as.toGrid=function(e){e&&fs("#grid/"+e+"?date="+(new Date).getTime())},as.toEditGrid=function(e){e&&fs("#grid/edit/"+e)},as.toManageGrids=function(){fs("#grids")},as.back=function(){os&&os!==location.hash?fs(os,!0):this.toMain()},as.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},as.getCurrentView=function(){return cs},as.addToGridHistory=function(e){ds.length>0&&ds[ds.length-1]===e||(-1===ds.indexOf(e)?ds.push(e):ds=[e])},as.toLastGrid=function(){if(1===ds.length)return;ds.pop();let e=ds.pop();as.toGrid(e)};let ms={},vs=null;ms.init=function(){Et.a.directive("focus",{inserted:function(e,t){(t.value||void 0===t.value)&&(e.focus&&e.focus(),e.select&&e.select())},updated:function(e,t){t.value&&(e.focus&&e.focus(),e.select&&e.select())}}),Et.a.directive("debounce",{inserted:function(e,t){e.oninput=function(n){clearTimeout(vs),vs=setTimeout((function(){e.dispatchEvent(new Event("change"))}),parseInt(t.value)||500)}}}),Et.a.filter("translate",(function(e){return C.translate(e)})),Et.a.filter("extractTranslation",(function(e){return C.getTranslation(e)}))};n(141),n(143),n(145);let gs={init:function(){St.global.onAnyKey((e,t,n)=>{if(n.ctrlKey&&n.shiftKey&&39===e){let e=g.getSavedUsers(),t=dt.getCurrentUser(),n=e.indexOf(t);n=n+1{let t=C.translate("You're now using new Version '{?}'. // Sie verwenden nun die neue Version '{?}'.",r.CURRENT_VERSION);jt.setTooltip(t,{closeOnNavigate:!0,timeout:3e4,actionLink:"More information // Mehr Informationen",actionLinkUrl:"https://github.com/asterics/AsTeRICS-Grid/releases/tag/"+r.CURRENT_VERSION,msgType:"info"}),a()(document).off(r.EVENT_GRID_LOADED,e)};a()(document).on(r.EVENT_GRID_LOADED,e)}g.setCurrentAppVersion(r.CURRENT_VERSION)}(),function(){if(!r.IS_ENVIRONMENT_PROD)return void log.warn("Not installing Service Worker because on development environment.");"serviceWorker"in navigator&&(window.loaded?e():window.addEventListener("load",()=>{e()}));function e(){navigator.serviceWorker.register("./serviceWorker.js").then(e=>{let t=!1;setInterval(()=>{log.debug("Check for serviceworker update..."),e.update()},9e5),e.addEventListener("updatefound",(function(){navigator.serviceWorker.controller&&(t=!0)})),navigator.serviceWorker.addEventListener("message",e=>{t&&e.data&&e.data.activated&&jt.setTooltipI18n("New version available! The next time you re-open AsTeRICS Grid you'll automatically use the updated version. // Neue Version verfügbar! Beim nächsten Start von AsTeRICS Grid verwenden Sie automatisch die neue Version.",{closeOnNavigate:!1,actionLink:"Update now // Jetzt aktualisieren",actionLinkFn:()=>{window.location.reload()},msgType:"info"})})})}}(),an.initPrintHandlers(),or.ping(),ms.init(),gs.init();let t=g.getLastActiveUser(),n=g.getAutologinUser();g.getUserMajorModelVersion(n)>s.getLatestModelVersion().major&&(log.info(`data model version of user "${n}" is newer than version of running AsTeRICS Grid -> prevent autologin.`),n=null,g.setAutologinUser("")),log.info("autologin user: "+n),ue.isDemoMode()?(e.push(or.registerOffline(r.LOCAL_DEMO_USERNAME,r.LOCAL_DEMO_USERNAME)),g.setAutologinUser("")):e.push(or.loginStoredUser(n,!0)),Promise.all(e).finally(()=>{jt.init();let e=n||ue.isDemoMode(),i=t||g.getSavedUsers().length>0;g.setLastActiveUser(n||t||"");let a=location.hash||(e?"#main":i?"#login":"#welcome");as.isInitialized()||as.init("#injectView",a)})}()}]); \ No newline at end of file diff --git a/app/build_legacy/asterics-grid.bundle.js b/app/build_legacy/asterics-grid.bundle.js index 416a9a779..0b3bc09c5 100644 --- a/app/build_legacy/asterics-grid.bundle.js +++ b/app/build_legacy/asterics-grid.bundle.js @@ -18,4 +18,4 @@ e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeo * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. - */!function(o){var s=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};function l(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=void 0!==e.maxListeners?e.maxListeners:10,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=10}function u(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==i&&i.emitWarning){var a=new Error(n);a.name="MaxListenersExceededWarning",a.emitter=this,a.count=e,i.emitWarning(a)}else console.error(n),console.trace&&console.trace()}function d(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}function f(e,t,n,i){if(!n)return[];var a,r,o,s,l,c,u,d=[],p=t.length,h=t[i],v=t[i+1];if(i===p&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(a=0,r=n._listeners.length;a0&&a._listeners.length>this._maxListeners&&(a._listeners.warned=!0,u.call(this,a._listeners.length,r))):a._listeners=t,!0;r=e.shift()}return!0}d.EventEmitter2=d,d.prototype.delimiter=".",d.prototype.setMaxListeners=function(e){void 0!==e&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},d.prototype.event="",d.prototype.once=function(e,t){return this._once(e,t,!1)},d.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},d.prototype._once=function(e,t,n){return this._many(e,1,t,n),this},d.prototype.many=function(e,t,n){return this._many(e,t,n,!1)},d.prototype.prependMany=function(e,t,n){return this._many(e,t,n,!0)},d.prototype._many=function(e,t,n,i){var a=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function r(){return 0==--t&&a.off(e,r),n.apply(this,arguments)}return r._origin=n,this._on(e,r,i),a},d.prototype.emit=function(){this._events||l.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,n,i,a,r,o=arguments.length;if(this._all&&this._all.length){if(r=this._all.slice(),o>3)for(t=new Array(o),a=0;a3)for(t=new Array(o-1),a=1;a3)for(t=new Array(s),a=1;a3)for(t=new Array(s-1),a=1;a0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,u.call(this,this._events[e].length,e))):this._events[e]=t,this)},d.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var a="string"==typeof e?e.split(this.delimiter):e.slice();i=f.call(this,null,a,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var o=0;o0&&e(t[a]),0===Object.keys(o).length&&delete t[a])}}}(this.listenerTree),this},d.prototype.offAny=function(e){var t,n=0,i=0;if(e&&this._all&&this._all.length>0){for(n=0,i=(t=this._all).length;ni,.context-menu-icon.context-menu-icon--fa5.context-menu-hover svg{color:#fff}.context-menu-icon.context-menu-icon--fa5.context-menu-disabled i,.context-menu-icon.context-menu-icon--fa5.context-menu-disabled svg{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.5);box-shadow:0 2px 5px rgba(0,0,0,0.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:\'\';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type="checkbox"],.context-menu-input>label>input[type="radio"]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type="text"],.context-menu-input>label>textarea,.context-menu-input>label>select{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}\n',""])},function(e,t,n){var i=n(164);"string"==typeof i&&(i=[[e.i,i,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(7)(i,a);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(6)(!1)).push([e.i,".holy-grail{min-height:100vh}.holy-grail,.holy-grail-body{display:flex;flex:1 1 auto;flex-direction:row}.holy-grail-content{flex:1 1 auto}.holy-grail-sidebar-1{order:-1;border-right:2px solid lightgray;max-height:98vh;overflow-x:hidden;padding-top:2vh;display:flex;flex-flow:column}.hg-sidebar{flex:0 0 250px;z-index:3}nav li:focus{outline:none}@media (max-width: 850px){.hg-sidebar{flex:0 0 50px}#astericsIcon{margin-bottom:1em}nav li button{padding-left:0.5em}.hg-sidebar button{padding-left:0;padding-right:0;text-align:center}}@media (max-width: 850px) and (max-height: 500px){.hg-sidebar{flex:0 0 12vh}.hg-sidebar button,#syncVisualization{font-size:3vh;line-height:0}#astericsIcon{height:10vh}header button,header a,header input{height:10vh !important;max-height:40px;font-size:4vh;line-height:0}}\n",""])},function(e,t,n){"use strict";n.r(t);var i=n(0),a=n.n(i),r=n(13),o=n.n(r),s={ELEMENT_EVENT_ID:"ELEMENT_EVENT_ID",MODEL_VERSION:'{"major": 3, "minor": 0, "patch": 0}',LOCAL_NOLOGIN_USERNAME:"default-user",LOCAL_DEMO_USERNAME:"local-demo-user",USERNAME_REGEX:/^[a-z][a-z0-9_-]{2,50}$/,VALIDATION_ERROR_REGEX:"VALIDATION_ERROR_REGEX",VALIDATION_ERROR_EXISTING:"VALIDATION_ERROR_EXISTING",VALIDATION_VALID:"VALIDATION_VALID",EVENT_DB_CONNECTION_LOST:"EVENT_DB_CONNECTION_LOST",EVENT_DB_PULL_UPDATED:"EVENT_DB_PULL_UPDATED",EVENT_DB_SYNC_STATE_CHANGE:"EVENT_DB_SYNC_STATE_CHANGE",EVENT_DB_INITIALIZED:"EVENT_DB_INITIALIZED",EVENT_DB_CLOSED:"EVENT_DB_CLOSED",EVENT_DB_DATAMODEL_UPDATE:"EVENT_DB_DATAMODEL_UPDATE",EVENT_SIDEBAR_OPEN:"event-sidebar-open",EVENT_SIDEBAR_OPENED:"event-sidebar-opened",EVENT_SIDEBAR_CLOSE:"event-sidebar-close",EVENT_GRID_RESIZE:"EVENT_GRID_RESIZE",EVENT_GRID_LOADED:"EVENT_GRID_LOADED",EVENT_USER_CHANGED:"EVENT_USER_CHANGED",EVENT_LANGUAGE_CHANGE:"EVENT_LANGUAGE_CHANGE",DB_SYNC_STATE_SYNCINC:"DB_SYNC_STATE_SYNCINC",DB_SYNC_STATE_SYNCED:"DB_SYNC_STATE_SYNCED",DB_SYNC_STATE_STOPPED:"DB_SYNC_STATE_STOPPED",DB_SYNC_STATE_FAIL:"DB_SYNC_STATE_FAIL",DB_SYNC_STATE_ONLINEONLY:"DB_SYNC_STATE_ONLINEONLY",ENVIRONMENT:"PROD"};s.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===s.ENVIRONMENT,s.IS_ENVIRONMENT_PROD=!s.IS_ENVIRONMENT_DEV,s.CURRENT_VERSION="release-2021-02-04-10.37/+0100",s.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),s.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var l=n(2),c=n.n(l),u=n(3),d=n.n(u),f=n(4),p=n.n(f),h=n(5),v=n.n(h),m=n(1),g=n.n(m),_={},y=100,b=JSON.parse(s.MODEL_VERSION),E={major:null,minor:null,patch:null};_.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+y++},_.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},_.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},_.setDefaults=function(e,t,n){if(t&&e&&n&&n.definition){var i=Object.keys(n.definition);Object.keys(t).forEach((function(n){i.includes(n)&&null==e[n]&&(e[n]=t[n])}))}return e},_.hashCode=function(e){e=e||{};var t=JSON.parse(JSON.stringify(e));return delete t._rev,delete t._id,delete t.id,JSON.stringify(t).split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0)},_.getModelVersionString=function(){return s.MODEL_VERSION},_.getModelVersionObject=function(e){if(!e)return E;var t=JSON.parse(e);return t.major&&(t.major=parseInt(t.major),t.minor=parseInt(t.minor),t.patch=parseInt(t.patch)),t.major?t:E},_.getLatestModelVersion=function(){return b};var C=window.Model;function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}var T=function(e){p()(n,e);var t=w(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId("input-event-key"),a}return d()(n,[{key:"isValid",value:function(){return this.modelName&&this.label&&this.keyCode}}],[{key:"getModelName",value:function(){return"InputEventKey"}}]),n}(C({id:String,modelName:String,modelVersion:String,label:[String],keyCode:[Number],keyName:[String],repeat:[Number],timeout:[Number],holdDuration:[Number]}));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}T.defaults({id:"",modelName:T.getModelName(),modelVersion:s.MODEL_VERSION,repeat:1,timeout:0,holdDuration:0});var S=function(e){p()(n,e);var t=A(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId("input-event-are"),a}return d()(n,[{key:"isValid",value:function(){return this.modelName&&this.label&&this.eventNames.length>0}}],[{key:"getModelName",value:function(){return"InputEventARE"}}]),n}(C({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[C.Array(String)],areURL:[String]}));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}S.defaults({id:"",modelName:S.getModelName(),modelVersion:s.MODEL_VERSION,eventNames:[]});var I=function(e){p()(n,e);var t=N(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId("input-config"),a}return d()(n,null,[{key:"getModelName",value:function(){return"InputConfig"}},{key:"getInputEventTypes",value:function(){return[T,S]}},{key:"getInputEventInstance",value:function(e,t){var n=this.getInputEventTypes().filter((function(t){return t.getModelName()===e}))[0];if(n)return new n(t);log.warn("input event type not found: "+e)}}]),n}(C({id:String,modelName:String,modelVersion:String,globalReadActive:[Boolean],scanEnabled:[Boolean],scanAuto:[Boolean],scanTimeoutMs:[Number],scanTimeoutFirstElementFactor:[Number],scanVertical:[Boolean],scanBinary:[Boolean],scanInputs:[C.Array(Object)],hoverEnabled:[Boolean],hoverTimeoutMs:Number,hoverHideCursor:[Boolean],hoverDisableHoverpane:[Boolean],mouseclickEnabled:[Boolean],dirEnabled:[Boolean],dirInputs:[C.Array(Object)],dirWrapAround:[Boolean],dirResetToStart:[Boolean],seqEnabled:[Boolean],seqInputs:[C.Array(Object)],huffEnabled:[Boolean],huffElementCount:[Number],huffInputs:[C.Array(Object)],huffColors:[C.Array(String)],huffShowColors:[Boolean],huffShowNumbers:[Boolean],huffColorWholeElement:[Boolean],huffTimeout:[Number],huffMarkInactive:[Boolean]}));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}I.UP="UP",I.DOWN="DOWN",I.LEFT="LEFT",I.RIGHT="RIGHT",I.SELECT="SELECT",I.NEXT="NEXT",I.NEXT_ELEMENT="NEXT_ELEMENT",I.PREVIOUS_ELEMENT="PREVIOUS_ELEMENT",I.GENERAL_INPUT="GENERAL_INPUT",I.getNumConst=function(e){return"NUM"+e},I.DEFAULT_SCAN_INPUTS=[new T({label:I.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new T({label:I.NEXT,keyCode:32,keyName:"Space"})],I.DEFAULT_SEQ_INPUTS=[new T({label:I.SELECT,keyCode:32,keyName:"Space"}),new T({label:I.NEXT_ELEMENT,keyCode:39,keyName:"ArrowRight"}),new T({label:I.PREVIOUS_ELEMENT,keyCode:37,keyName:"ArrowLeft"})],I.DEFAULT_DIR_INPUTS=[new T({label:I.SELECT,keyCode:32,keyName:"Space"}),new T({label:I.LEFT,keyCode:37,keyName:"ArrowLeft"}),new T({label:I.RIGHT,keyCode:39,keyName:"ArrowRight"}),new T({label:I.UP,keyCode:38,keyName:"ArrowUp"}),new T({label:I.DOWN,keyCode:40,keyName:"ArrowDown"})],I.DEFAULT_HUFF_INPUTS=[new T({label:I.GENERAL_INPUT,keyCode:49,keyName:"Digit1"}),new T({label:I.GENERAL_INPUT,keyCode:50,keyName:"Digit2"}),new T({label:I.GENERAL_INPUT,keyCode:51,keyName:"Digit3"}),new T({label:I.GENERAL_INPUT,keyCode:52,keyName:"Digit4"})],I.DEFAULT_HUFF_COLORS=["#D55E00","#F0E442","#009E73","#0072B2","#CC79A7","#E69F00","#56B4E9","#000000","#016619"],I.defaults({id:"",modelName:I.getModelName(),modelVersion:s.MODEL_VERSION,scanAuto:!1,scanTimeoutMs:1e3,scanTimeoutFirstElementFactor:1,scanBinary:!0,hoverTimeoutMs:1e3,mouseclickEnabled:!0,scanInputs:I.DEFAULT_SCAN_INPUTS,dirInputs:I.DEFAULT_DIR_INPUTS,seqInputs:I.DEFAULT_SEQ_INPUTS,dirWrapAround:!0,huffInputs:I.DEFAULT_HUFF_INPUTS,huffColors:I.DEFAULT_HUFF_COLORS,huffShowColors:!0,huffShowNumbers:!0,huffElementCount:0,huffTimeout:4e3,huffMarkInactive:!0});var O=function(e){p()(n,e);var t=k(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n)||{},(a=t.call(this,e)).id=a.id||_.generateId(n.getIdPrefix()),a}return d()(n,[{key:"isEqual",value:function(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}}],[{key:"getModelName",value:function(){return"MetaData"}},{key:"getIdPrefix",value:function(){return"meta-data"}}]),n}(C({id:String,modelName:String,modelVersion:String,lastOpenedGridId:[String],globalGridId:[String],globalGridActive:[Boolean],globalGridHeightPercentage:[Number],locked:[Boolean],fullscreen:[Boolean],hashCodes:[Object],inputConfig:I}));O.defaults({id:"",modelName:O.getModelName(),modelVersion:s.MODEL_VERSION,locked:void 0,fullscreen:void 0,hashCodes:{},inputConfig:new I,globalGridActive:!1,globalGridHeightPercentage:15});var L="could not access local storage, maybe disabled by user? Error: ",x=null;if("undefined"!=typeof Storage)try{x=window.localStorage}catch(e){log.error(L+e)}var D={save:function(e,t){if(x)try{return x.setItem(e,t)}catch(e){log.error(L+e)}},get:function(e){if(x)try{return x.getItem(e)}catch(e){log.error(L+e)}},remove:function(e){if(x)try{return x.removeItem(e)}catch(e){log.error(L+e)}},getUserPassword:function(e){return e?R("USER_PASSWORDS_KEY")[e]:null},saveLocalUser:function(e){var t=R("USER_PASSWORDS_KEY");t[e]="",D.save("USER_PASSWORDS_KEY",JSON.stringify(t))},isSavedLocalUser:function(e){return""===R("USER_PASSWORDS_KEY")[e]},isLastActiveUserLocal:function(){return""===R("USER_PASSWORDS_KEY")[D.getLastActiveUser()]},saveUserPassword:function(e,t){var n=R("USER_PASSWORDS_KEY");n[e]=t,D.save("USER_PASSWORDS_KEY",JSON.stringify(n))},removeUserPassword:function(e){var t=R("USER_PASSWORDS_KEY");delete t[e],D.save("USER_PASSWORDS_KEY",JSON.stringify(t)),D.getAutologinUser()===e&&D.setAutologinUser("")},getSavedUsers:function(e){var t=D.getSavedLocalUsers(),n=D.getSavedOnlineUsers().concat(t);return e&&n.includes(e)&&(n=n.filter((function(t){return t!==e}))).unshift(e),n},getSavedLocalUsers:function(){var e=R("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter((function(t){return""===e[t]})).sort((function(e,t){return e===s.LOCAL_DEMO_USERNAME?1:t===s.LOCAL_DEMO_USERNAME?-1:e.localeCompare(t)}))},getSavedOnlineUsers:function(){var e=R("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter((function(t){return""!==e[t]})).sort()},setLastActiveUser:function(e){D.save("LAST_ACTIVEUSER_KEY",e)},getLastActiveUser:function(){return D.get("LAST_ACTIVEUSER_KEY")},setAutologinUser:function(e){e!==s.LOCAL_DEMO_USERNAME&&D.save("AUTOLOGIN_USER_KEY",e)},getAutologinUser:function(){return D.get("AUTOLOGIN_USER_KEY")},markSyncedDatabase:function(e){var t=M();t.includes(e)||t.push(e),D.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},isDatabaseSynced:function(e){return M().includes(e)},unmarkSyncedDatabase:function(e){var t=M();t=t.filter((function(t){return t!==e})),D.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},getUserMajorModelVersion:function(e){var t=R("USER_MODELVERSION_KEY");return t[e]?parseInt(JSON.parse(t[e]).major):1},setUserModelVersion:function(e,t){if(D.getUserMajorModelVersion(e)n[e].toLowerCase()?1:-1})),Y=e),B},U.translate=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i-1){var a=e.split(" // "),r="en"===n[0]||"de"===n[0]?n[0]:U.getBrowserLang(),o=j.indexOf(r);return o=o>0?o:0,n.forEach((function(e){a[o]=a[o].replace("{?}",e)})),a[o]}var s=this.translations[this.getBrowserLang()]?this.getBrowserLang():"en",l=this.translations[s][e]?this.translations[s][e]:e;return n.forEach((function(e){l=l.replace("{?}",e)})),l},U.getTranslation=function(e,t,n){if(!e)return"";if(t=t||"en","string"==typeof e)return e;var i=U.getBrowserLang();if(e[i])return n?{lang:i,text:e[i]}:e[i];if(e[t])return n?{lang:t,text:e[t]}:e[t];var a=Object.keys(e);return e[a[0]]?n?{lang:a[0],text:e[a[0]]}:e[a[0]]:n?{lang:void 0,text:""}:""},U.getTranslationObject=function(e,t){t=t||U.getBrowserLang(),e=U.translate(e,t);var n={};return n[t]=e,n},U.setLanguage=function(e){F=e,V&&V.changeLanguage(e),D.save("CUSTOM_LANGUAGE_KEY",F),a()(document).trigger(s.EVENT_LANGUAGE_CHANGE)},U.getCustomLanguage=function(){return F},U.translations={},U.translations.en={GridActionSpeak:"Speak label",GridActionSpeakCustom:"Speak custom text",GridActionNavigate:"Navigate to other grid",GridActionARE:"AsTeRICS action",GridActionPredict:"Fill prediction elements",GridActionCollectElement:"Collect element action",GridActionWebradio:"Web radio action",GridActionYoutube:"YouTube action",GridActionChangeLang:"Change app language",COLLECT_ACTION_CLEAR:"Clear collect element",COLLECT_ACTION_REMOVE_WORD:"Delete last word",COLLECT_ACTION_REMOVE_CHAR:"Delete last character",COLLECT_ACTION_COPY_CLIPBOARD:"Copy text to clipboard",COLLECT_ACTION_APPEND_CLIPBOARD:"Append text to clipboard",COLLECT_ACTION_CLEAR_CLIPBOARD:"Clear clipboard",COLLECT_ACTION_TO_YOUTUBE:"Search text on YouTube",WEBRADIO_ACTION_START:"Turn radio on",WEBRADIO_ACTION_TOGGLE:"Turn radio on/off",WEBRADIO_ACTION_STOP:"Turn radio off",WEBRADIO_ACTION_NEXT:"Next radio channel",WEBRADIO_ACTION_PREV:"Previous radio channel",WEBRADIO_ACTION_VOLUP:"Radio volume up",WEBRADIO_ACTION_VOLDOWN:"Radio volume down",CONFIRM_IMPORT_BACKUP:'Caution: This action will delete the existing configuration and replace it with the data from file "{?}". Continue?',CONFIRM_DELETE_GRID:'Do you really want to delete the grid "{?}"?',CONFIRM_DELETE_DICT:'Do you really want to delete the dictionary "{?}"?',CONFIRM_RESET_DB:"Do you really want to reset to default configuration? All current grids will be deleted!",CONFIRM_DELETE_ALL_ELEMS:"Do you really want to delete all elements of the current grid?",CONFIRM_REMOVE_USER:'Do you really want to unlink user "{?}"? This will not delete the user itself, but all data of the user stored on this device.',CONFIRM_REMOVE_USER_LOCAL:'Do you really want to delete user "{?}"? Since the user is not synchronized this action will permanently delete the user.',PLACEHOLDER_SEARCH_GRID:"Search grid",LABEL_USER_LOCAL:"offline-only user",LABEL_USER_CLOUD:"user synced with the cloud",LABEL_USER_ONLINE:"only online, no offline synchronization",ERROR_CODE_UNAUTHORIZED:"Login failed, wrong username or password.",ERROR_CODE_NETWORK_ERROR:"Login failed (network error), please try again later.",DB_SYNC_STATE_SYNCINC:"synchronizing with cloud...",DB_SYNC_STATE_SYNCED:"synchronized with cloud",DB_SYNC_STATE_STOPPED:"synchronization with cloud paused",DB_SYNC_STATE_FAIL:"not synchronizing with cloud",DB_SYNC_STATE_ONLINEONLY:"online-only, no offline synchronization",VALIDATION_ERROR_REGEX:'Username must contain only lowercase letters, digits or the characters ["-", "_"], valid length is 3-50 characters.',VALIDATION_ERROR_EXISTING:"Username is already existing.",SEARCH_IMAGE_PLACEHOLDER:"input search term",HEADER_COMPARE_ONLINE_OFFLINE:"Information about online/offline users",ADVANCED_SETTINGS:"Advanced Settings",TEST_CONFIGURATION:"Test configuration",SELECT:"Select element",NEXT:"Next scanning group",NEXT_ELEMENT:"Next element",PREVIOUS_ELEMENT:"Previous Element",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event",ELEMENT_TYPE_COLLECT:"Collect element",ELEMENT_TYPE_PREDICTION:"Prediction element",ELEMENT_TYPE_YT_PLAYER:"YouTube player",YT_PLAY:"Play video",YT_PAUSE:"Pause video",YT_TOGGLE:"Play/pause video",YT_RESTART:"Restart video",YT_STOP:"Stop Video",YT_STEP_FORWARD:"Step forward within video",YT_STEP_BACKWARD:"Step backward within video",YT_NEXT_VIDEO:"Next video",YT_PREV_VIDEO:"Previous video",YT_PLAY_VIDEO:"Play single video",YT_PLAY_PLAYLIST:"Play playlist",YT_PLAY_SEARCH:"Play videos from search query",YT_PLAY_CHANNEL:"Play videos from channel",YT_ENTER_FULLSCREEN:"Show video in fullscreen",YT_VOLUME_UP:"Video volume up",YT_VOLUME_DOWN:"Video volume down",YT_VOLUME_MUTE:"Mute/unmute video"},U.translations.de={GridActionSpeak:"Label aussprechen",GridActionSpeakCustom:"Benutzerdefinierten Text aussprechen",GridActionNavigate:"Zu anderem Grid navigieren",GridActionARE:"AsTeRICS Aktion",GridActionPredict:"Vorhersage-Elemente füllen",GridActionCollectElement:"Sammelelement Aktion",GridActionWebradio:"Web-Radio Aktion",GridActionYoutube:"YouTube Aktion",GridActionChangeLang:"Anwendungssprache ändern",COLLECT_ACTION_CLEAR:"Sammelelement leeren",COLLECT_ACTION_REMOVE_WORD:"Letztes Word löschen",COLLECT_ACTION_REMOVE_CHAR:"Letzten Buchstaben löschen",COLLECT_ACTION_COPY_CLIPBOARD:"Text in die Zwischenablage kopieren",COLLECT_ACTION_APPEND_CLIPBOARD:"Text zu Zwischenablage hinzufügen",COLLECT_ACTION_CLEAR_CLIPBOARD:"Zwischenablage leeren",COLLECT_ACTION_TO_YOUTUBE:"Text auf YouTube suchen",WEBRADIO_ACTION_START:"Radio einschalten",WEBRADIO_ACTION_TOGGLE:"Radio ein-/ausschalten",WEBRADIO_ACTION_STOP:"Radio ausschalten",WEBRADIO_ACTION_NEXT:"Nächster Radiosender",WEBRADIO_ACTION_PREV:"Voriger Radiosender",WEBRADIO_ACTION_VOLUP:"Radio-Lautstärke erhöhen",WEBRADIO_ACTION_VOLDOWN:"Radio-Lautstärke vermindern",CONFIRM_IMPORT_BACKUP:'Achtung: Diese Aktion wird die aktuelle Konfiguration löschen und sie mit den Daten der Datei "{?}" ersetzen. Fortfahren?',CONFIRM_DELETE_GRID:'Möchten Sie das Grid "{?}" wirklich löschen?',CONFIRM_DELETE_DICT:'Möchten Sie das Wörterbuch "{?}" wirklich löschen?',CONFIRM_RESET_DB:"Möchten Sie wirklich die Standardkonfiguration wiederherstellen? Alle aktuellen Grids werden dadurch gelöscht!",CONFIRM_DELETE_ALL_ELEMS:"Möchten Sie wirklich alle Elemente des aktuellen Grids löschen?",CONFIRM_REMOVE_USER:'Möchten Sie den Account "{?}" wirklich von diesem Gerät abmelden? Diese Aktion löscht nicht den User selbst, aber alle Daten des Users auf diesem Gerät.',PLACEHOLDER_SEARCH_GRID:"Grid suchen",LABEL_USER_LOCAL:"nur offline gespeicherter User",CONFIRM_REMOVE_USER_LOCAL:'Möchten Sie den User "{?}" wirklich permanent löschen? Diese Aktion kann nicht rückgängig gemacht werden.',LABEL_USER_CLOUD:"mit Cloud synchronisierter User",LABEL_USER_ONLINE:"nur online, keine offline Synchronisation",ERROR_CODE_UNAUTHORIZED:"Login fehlgeschlagen, falscher Benutzername oder Passwort.",ERROR_CODE_NETWORK_ERROR:"Login fehlgeschlagen (Netzwerkproblem), bitte versuchen Sie es später nochmal.",DB_SYNC_STATE_SYNCINC:"synchronisiere mit Cloud...",DB_SYNC_STATE_SYNCED:"Mit Cloud synchronisiert",DB_SYNC_STATE_STOPPED:"Synchronisation mit Cloud pausiert",DB_SYNC_STATE_FAIL:"Keine Synchronisierung mit Cloud",DB_SYNC_STATE_ONLINEONLY:"nur online, keine Offline-Synchronisierung",VALIDATION_ERROR_REGEX:'Username darf nur Kleinbuchstaben, Ziffern und die Zeichen ["-", "_"] enthalten, erlaubte Länge ist 3-50 Zeichen.',VALIDATION_ERROR_EXISTING:"Username existiert bereits.",SEARCH_IMAGE_PLACEHOLDER:"Suchbegriff eingeben",HEADER_COMPARE_ONLINE_OFFLINE:"Informationen über Online-/Offline-User",ADVANCED_SETTINGS:"Erweiterte Einstellungen",TEST_CONFIGURATION:"Konfiguration testen",SELECT:"Element auswählen",NEXT:"Nächste Gruppe",NEXT_ELEMENT:"Nächstes Element",PREVIOUS_ELEMENT:"Vorheriges Element",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event",ELEMENT_TYPE_COLLECT:"Sammel-Element",ELEMENT_TYPE_PREDICTION:"Vorhersage-Element",ELEMENT_TYPE_YT_PLAYER:"YouTube Player",YT_PLAY:"Video abspielen",YT_PAUSE:"Video pausieren",YT_TOGGLE:"Video abspielen/pausieren",YT_RESTART:"Video neu starten",YT_STOP:"Video stoppen",YT_STEP_FORWARD:"Im Video weiterspringen",YT_STEP_BACKWARD:"Im Video zurückspringen",YT_NEXT_VIDEO:"Nächstes Video",YT_PREV_VIDEO:"Vorheriges Video",YT_PLAY_VIDEO:"Einzelnes Video abspielen",YT_PLAY_PLAYLIST:"Playlist abspielen",YT_PLAY_SEARCH:"Videos aus Suchanfrage abspielen",YT_PLAY_CHANNEL:"Videos aus Kanal abspielen",YT_ENTER_FULLSCREEN:"Zeige Video in Vollbild",YT_VOLUME_UP:"Videolautstärke erhöhen",YT_VOLUME_DOWN:"Videolautstärke vermindern",YT_VOLUME_MUTE:"Video stummschalten / Ton einschalten"};var H=n(10),W=n.n(H),z=n(12),K=n.n(z),J=n(15),X=n.n(J),q={},Z="20px";function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}q.getFontSizePx=function(e,t){var n=function(e){if(e.attr("data-label"))return e.attr("data-label");if($(e).find(".text-container span").text())return $(e).find(".text-container span").text();return""}(e),i=e.attr("data-type"),a=e.attr("data-img-id");if(!n)return"10px";var r=e[0].getBoundingClientRect(),o=r.height*r.width/(a?2:1),s=Math.floor(Math.sqrt(.5*o/Math.max(15,n.length))),l=t?n.length:Math.max.apply(null,n.split(" ").map((function(e){return e.length}))),c=1.4*r.width/l;return c=t?Math.min(c,30):c,(Z=Math.min(s,c))>r.height/3&&(Z=.3*r.height),1===n.length&&"ELEMENT_TYPE_NORMAL"===i&&(Z*=2),Z+"px"},q.adaptFontSize=function(e){for(var t=0;t\n \n ')},te.getGridItem=function(e,t){switch(e.type){case Ae.ELEMENT_TYPE_COLLECT:return function(e){e=ne(e);var t=U.getTranslation(e.label);return'\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • ')}(e);case Ae.ELEMENT_TYPE_PREDICTION:return function(e){e=ne(e);var t=U.getTranslation(e.label);return'\n
  • \n
    \n
    ').concat(t,"
    \n
    \n
  • ")}(e);case Ae.ELEMENT_TYPE_YT_PLAYER:return function(e){e=ne(e);var t=U.getTranslation(e.label);return'\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • ')}(e);default:return function(e,t){e=ne(e);var n="",i="",a="font-size:"+q.getLastFontSize()+";",r="1%",o=U.getTranslation(e.label,t),s=o?"80%":"100%",l=e.backgroundColor?"background: ".concat(e.backgroundColor,";"):"";e.image?(n=e.image.data,i=e.image.id):(a+="flex: 1 1 auto;",r="0");return'\n
  • \n
    \n
    \n
    ').concat(o,"
    \n ").concat(function(e){var t=e.hidden?'':"",n=e.actions.filter((function(e){return e.modelName===ee.getModelName()})).length>0?'':"";return''.concat(t+" "+n,"")}(e),"\n
    \n
  • ")}(e,t)}};var ie={};function ae(e){try{var t=parseInt(e.documentElement.width.baseVal.value)||500,n=parseInt(e.documentElement.height.baseVal.value)||500;return e.documentElement.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,t),e.documentElement.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,n),e}catch(t){return e}}function re(e){try{return"data:image/svg+xml;base64,"+btoa((new XMLSerializer).serializeToString(e))}catch(e){return null}}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}ie.getBase64FromImg=function(e,t,n){t=t||150;var i=0===e.src.indexOf("data:")?e.src.substring(5,e.src.indexOf(";")):null;i=(i=(i=i||(e.src.indexOf(".png")>-1?"image/png":null))||(e.src.indexOf(".svg")>-1?"image/svg+xml":null))||"image/jpeg";var a=document.createElement("canvas"),r=1;e.width>t&&(r=t/e.width),a.width=e.width*r,a.height=e.height*r,a.getContext("2d").drawImage(e,0,0,a.width,a.height);try{return a.toDataURL(i,n)}catch(e){throw"image converting failed!"}},ie.getBase64FromInput=function(e){return new Promise((function(t){if(e.files&&e.files[0]){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.readAsDataURL(e.files[0])}}))},ie.convertBase64=function(e,t,n){return new Promise((function(i,a){if(!e)return i(null);if("image/svg+xml"===e.substring(5,e.indexOf(";")))return i(e);t=t||150;var r=document.createElement("img");r.onload=function(){try{i(ie.getBase64FromImg(r,t,n))}catch(e){i(null)}},r.src=e}))},ie.base64SvgToBase64Png=function(e,t,n){return new Promise((function(i){var a=document.createElement("img");a.onload=function(){if(!n&&(0===a.naturalWidth||0===a.naturalHeight)){var r=ae((o=e,s=(s=atob(o.substring(o.indexOf("base64,")+7))).substring(s.indexOf("=i)return"break";var r=t.reduce((function(t,n){return t&&(a>=n.y+n.height||e>=n.x+n.width)}),!0);r&&(i=e+a),n.push({x:e,y:a,sum:e+a,valid:r})},r=0;r<10;r++){if("break"===a(r))break}},r=0;r<10;r++)a(r);var o=n.filter((function(e){return i===e.sum&&e.valid}))[0];return o?{x:o.x,y:o.y}:{x:e.getWidth(),y:e.getHeight()}},Oe.getFreeCoordinates=function(e){for(var t=new He({},e),n={},i=0;i0}))}(n,i).length>0;var n,i})),r=e.filter((function(e){return-1!==function(e){return e.gridElements.reduce((function(e,t){return e.concat(t.actions.filter((function(e){return e.modelName===ee.getModelName()})))}),[]).map((function(e){return e.toGridId}))}(t).indexOf(e.id)})),o={grid:t,parents:a,children:r,navCount:a.length+r.length};n.push(o),i[t.id]=o})),n.sort((function(e,t){return t.navCount-e.navCount})),n.forEach((function(e){e.parents=e.parents.map((function(e){return i[e.id]})),e.children=e.children.map((function(e){return i[e.id]})),e.allRelatives=e.children.concat(e.parents.filter((function(t){return-1===e.children.indexOf(t)})))})),n},Oe.getAllChildrenRecursive=function(e,t,n){return function e(t,n,i){var a=t.filter((function(e){return e.grid.id===n}))[0];i=i||[];var r=[];return a.children.forEach((function(e){-1===i.indexOf(e.grid)&&(i.push(e.grid),r.push(e.grid.id))})),r.forEach((function(n){i=e(t,n,i)})),i}(e,t,n).filter((function(e){return e.id!==t}))};var xe=function(e){p()(n,e);var t=Le(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId(n.getModelName().toLowerCase()),a}return d()(n,null,[{key:"getModelName",value:function(){return"EncryptedObject"}}]),n}(C({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]}));xe.defaults({modelVersion:s.MODEL_VERSION});var De={},Re=["thumbnail"];De.removeLongPropertyValues=function(e,t,n){if(!e)return e;n=void 0===n?"_removed_":n,t=t||500;var i=JSON.parse(JSON.stringify(e));return Object.keys(i).forEach((function(e){-1===Re.indexOf(e)&&(i[e]=function e(t,n,i){if(!t)return t;if("string"==typeof t||t instanceof String){if(t.length>n)return i}else if(t instanceof Array)for(var a=0;a1?i[0]:i;"string"==typeof e?i?a&&"function"!=typeof a?Pe.warn("object type has to be a constructor function or empty, aborting."):r&&r.isShortVersion?Pe.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],a&&(n[e]=a)):Pe.warn("cache-values has to be set, aborting."):Pe.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"==typeof e){if(!t[e])return null;var a=JSON.parse(t[e]),r=n[e];return a instanceof Array?a.map((function(e){return i(r,e)})):i(r,a)}Pe.warn("cache-key has to be a string, aborting.")},e.getAsPromise=function(t){var n=e.get(t);return new Promise((function(e){setTimeout((function(){e(n)}),1)}))},e.has=function(e){return"string"!=typeof e?(Pe.warn("cache-key has to be a string, aborting."),!1):!!t[e]},e.clear=function(e){e&&(delete t[e],delete n[e])},e.clearAll=function(){t={},n={}}}var Ue={},Fe=null,$e=null,Ve=!1,je=new Ge;function Be(){if(!$e||!Fe){var e="using encryptionService uninitialized is not possible, aborting...";throw Pe.error(e),e}}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}Ue.encryptObject=function(e,t){if(Be(),!e)return e;t=t||{};var n=new xe({id:e.id,modelName:e.modelName});n._id=e.id,e._rev&&(n._rev=e._rev);var i=JSON.stringify(e),a=JSON.stringify(De.removeLongPropertyValues(e)),r=i!==a;return n.encryptedDataBase64=Ue.encryptString(i,t.encryptionKey),n.encryptedDataBase64Short=r?Ue.encryptString(a,t.encryptionKey):null,n},Ue.decryptObjects=function(e,t){if(Be(),!e)return e;var n=(t=t||{}).onlyShortVersion,i=[];return(e=e instanceof Array?e:[e]).forEach((function(e){try{var a=null,r=null;if(n){var o=e.encryptedDataBase64Short||e.encryptedDataBase64;a=Ue.decryptString(o,t.encryptionKey),(r=JSON.parse(a)).isShortVersion=!0}else a=Ue.decryptString(e.encryptedDataBase64,t.encryptionKey),r=JSON.parse(a);r._id=e._id,r._rev=e._rev,i.push(r)}catch(t){throw Pe.error("error decrypting object: "+e.modelName+", id: "+e.id),Pe.error(t),t}})),i.length>1?i:i[0]},Ue.encryptString=function(e,t){t||Be();return(t=t||$e)&&!Ve?Me.encrypt(t,e,{iter:1e3}):e},Ue.decryptString=function(e,t){if(t||Be(),je.has(e))return Pe.debug("using decryption cache..."),je.get(e);t=t||$e;var n=null;(new Date).getTime();if(t&&!Ve)n=Me.decrypt(t,e);else try{n=e;var i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=Me.decrypt(t,e))}catch(i){n=Me.decrypt(t,e)}return je.set(e,n),n},Ue.getStringHash=function(e){var t=Me.hash.sha256.hash(e);return Me.codec.hex.fromBits(t)},Ue.getUserPasswordHash=function(e){return Ue.getStringHash("STATIC_USER_PW_SALT"+e)},Ue.setEncryptionProperties=function(e,t,n){e=e||"",Fe=t,$e=Ue.getStringHash(""+Fe+e),Ve=n,je.clearAll(),Pe.debug("new encryption key is: "+$e)},Ue.resetEncryptionProperties=function(){Pe.debug("reset encryption properties..."),Fe=null,$e=null,Ve=!1};var He=function(e){p()(n,e);var t=Ye(n);function n(e,i){var a;return c()(this,n),(e=_.setDefaults(e,i,n))&&(e.id=e.id?e.id:_.generateId(n.getIdPrefix())),(a=t.call(this,e)).minColumnCount=e.minColumnCount||a.getWidth()||D.getLastGridDimensions().minColumnCount||4,a.rowCount=e.rowCount||a.getHeight()||D.getLastGridDimensions().rowCount||3,a.id=a.id||_.generateId("grid-data"),a}return d()(n,[{key:"hasSetPositions",value:function(){return this.gridElements.every((function(e){return e.hasSetPosition()}))}},{key:"getHash",value:function(){var e="";return this.gridElements.forEach((function(t){e+=JSON.stringify(t.label)+t.x+t.y,t.image&&(e+=t.image.data.substring(t.image.data.length-30))})),Ue.getStringHash(e)}},{key:"hasOutdatedThumbnail",value:function(){return!this.thumbnail||!this.thumbnail.data||this.thumbnail.hash!==this.getHash()}},{key:"getWidth",value:function(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map((function(e){return e.x+e.width})))}},{key:"getHeight",value:function(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map((function(e){return e.y+e.height})))}},{key:"getWidthWithBounds",value:function(){return Math.max(this.getWidth(),this.minColumnCount)}},{key:"getHeightWithBounds",value:function(){return Math.max(this.getHeight(),this.rowCount)}},{key:"isFull",value:function(){return 0!==this.gridElements.length&&this.getWidthWithBounds()*this.getHeightWithBounds()===this.gridElements.reduce((function(e,t){return e+t.width*t.height}),0)}},{key:"getNewXYPos",value:function(e){var t=this.gridElements.reduce((function(e,t){var n=t.x+t.width;return 0===t.y&&n>e&&(e=n),e}),0);if(e)return{x:t,y:0};var n=Oe.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}},{key:"getNewGridElement",value:function(e){e=e||{};var t=this.getNewXYPos();return e=Object.assign(e,{x:t.x,y:t.y}),new Ae(e)}},{key:"isEqual",value:function(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}},{key:"getNextElementId",value:function(e,t){if(!this.gridElements||0===this.gridElements.length)return e;if(1===this.gridElements.length)return this.gridElements[0].id;var n=JSON.parse(JSON.stringify(this.gridElements)).sort((function(e,t){return e.y!==t.y?e.y-t.y:e.x-t.x})),i=(n=n.filter((function(e){return e.type===Ae.ELEMENT_TYPE_NORMAL}))).map((function(e){return e.id})),a=i.indexOf(e);if(-1===a)return i[0];var r=a+(t?-1:1);return i[r=(r=r>i.length-1?0:r)<0?i.length-1:r]}},{key:"getPreviousElementId",value:function(e){return this.getNextElementId(e,!0)}},{key:"getAdditionalFile",value:function(e){var t=this.additionalFiles.filter((function(t){return t.fileName===e}));return t.length>0?t[0]:null}},{key:"getAREModel",value:function(){var e=this.getAREFirstAction();return e?this.additionalFiles.filter((function(t){return t.fileName===e.areModelGridFileName}))[0]:null}},{key:"hasAREModel",value:function(){return!!this.getAREModel()}},{key:"getAREFirstAction",value:function(){var e=[];return this.gridElements.forEach((function(t){e=e.concat(t.actions)})),e.filter((function(e){return e.modelName===pe.getModelName()}))[0]}},{key:"getAREURL",value:function(){var e=this.getAREFirstAction();return e?e.areURL:null}},{key:"clone",value:function(){var e=this,t=new n(this);return delete t._id,delete t._rev,t.id=_.generateId("grid-data"),Object.keys(this.label).forEach((function(n){t.label[n]=e.label[n]+" (Copy)"})),t}}],[{key:"getModelName",value:function(){return"GridData"}},{key:"getIdPrefix",value:function(){return"grid-data"}}]),n}(C({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:C.Array(Ae),additionalFiles:[C.Array(Ne)],webRadios:[C.Array(ke)],thumbnail:[Object]}));He.defaults({id:"",modelName:He.getModelName(),modelVersion:s.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:U.getBrowserLang()});var We={params:{PARAM_DEMO_MODE:"demo",PARAM_SCANNING:"scanning",PARAM_HUFFMAN:"huffman",PARAM_DIR_INPUT:"direction",PARAM_RESET_DATABASE:"reset",PARAM_DEFAULT_GRIDSET:"default"}},ze=!1,Ke=!1;function Je(e){return new URLSearchParams(window.location.search).has(e)}function Xe(e){return new URLSearchParams(window.location.search).get(e)}function qe(e){return"false"===Xe(e)}We.isDemoMode=function(){return ze=ze||Je(We.params.PARAM_DEMO_MODE),function(e){if(!Je(e))return;var t=new URLSearchParams(window.location.search);if(t.delete(e),history.replaceState){var n=t.toString().length>0?"?"+t.toString():"",i=window.location.protocol+"//"+window.location.host+window.location.pathname+n+window.location.hash;history.replaceState(null,"",i)}}(We.params.PARAM_DEMO_MODE),ze},We.isScanningEnabled=function(){return Je(We.params.PARAM_SCANNING)&&!qe(We.params.PARAM_SCANNING)},We.isDirectionEnabled=function(){return Je(We.params.PARAM_DIR_INPUT)&&!qe(We.params.PARAM_DIR_INPUT)},We.isHuffmanEnabled=function(){return Je(We.params.PARAM_HUFFMAN)&&!qe(We.params.PARAM_HUFFMAN)},We.shouldResetDatabase=function(){var e=!Ke&&(We.isDemoMode()||"true"===Xe(We.params.PARAM_RESET_DATABASE));return Ke=!0,e},We.getDefaultGridsetName=function(){return Xe(We.params.PARAM_DEFAULT_GRIDSET)};var Ze=n(16),Qe=n.n(Ze),et={};function tt(e,t,n){if(!e)return e;var i=e instanceof Array;e=i?e:[e];for(var a=function(i){n(_.getModelVersionObject(e[i].modelVersion)).forEach((function(n){e[i]=n(e[i],t)}))},r=0;r0&&(t=(n=e.change.docs.filter((function(e){return!!w(e)&&!function(e){return v[w(e)]&&C(e)0&&0===t.length?log.info("ignoring pull because of outdated revision"):log.info("pouchdb pulled updates...")):e.direction?log.info("pouchdb pushed updates..."):!e.direction&&e.id&&(log.info("change from remote database..."),t.push(e.id),e.doc&&n.push(e.doc)),!p&&(t.length>0||n.length>0)&&r(t,n)}catch(e){log.error(e)}}function E(e){e&&e.length>0&&e.forEach((function(e){var t=w(e),n=C(e);(!v[t]||v[t]0?e.docs.forEach((function(e){t.push(e)})):e.rows&&e.rows.length>0&&e.rows.forEach((function(e){e.doc&&e.doc.modelName&&t.push(e.doc)}));return 0===t.length?null:1===t.length?t[0]:t}(n);t&&a?lt.set(t,a):!t&&e&&a&<.set(e,a),i(a)})).catch((function(e){log.error(e),a()})).finally((function(){pt()}))}))},ot.save=function(e,t){return log.debug("saving "+e+"..."),ft(),t.id&&(lt.clear(t.id,t),lt.clear(e)),new Promise((function(n,i){if(!(t&&t._id&&e&&t.encryptedDataBase64))return log.error('did not specify needed parameter "idPrefix" or "_id" or data is not encrypted! aborting.'),i();st.put(t).then((function(i){t._rev=i.rev,lt.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()})).catch((function(e){t.id&<.clear(t.id),"conflict"===e.error?(log.warn("conflict with remote version updating document with id: "+t.id),n()):(log.error(e),i(e)),i()})).finally((function(){pt()}))}))},ot.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();ft(),lt.clearAll();var t=st.bulkDocs(e);return t.finally((function(){pt()})),t},ot.remove=function(e){var t=ut();return ot.all(null,e).then((function(e){return lt.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)}))},ot.resetDatabase=function(e){return ot.isUsingLocalDb()&&ot.getOpenedDatabaseName()===s.LOCAL_DEMO_USERNAME?(lt.clearAll(),new Promise((function(t){st.destroyDb(e).then((function(){st=null,ot.initDatabase(e).then((function(){return t()}))})).catch((function(e){log.error("error destroying database: "+e)}))}))):Promise.reject("do not destroy!")},ot.deleteDatabase=function(e){if(ot.getOpenedDatabaseName()===e&&!ot.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();lt.clearAll();var t=[];return ot.getOpenedDatabaseName()===e&&t.push(ot.closeCurrentDatabase()),Promise.all(t).then((function(){return new Qe.a(e).destroy()}))},ot.closeCurrentDatabase=function(){if(!st)return Promise.resolve();ft();var e=st.close();return st=null,e},ot.getOpenedDatabaseName=function(){return st?st.getOpenedDatabaseName():null},ot.isUsingLocalDb=function(){return st?st.isUsingLocalDb():null},ot.getSyncState=function(){return st?st.getSyncState():null},ot.isSyncEnabled=function(){return st?st.isSyncEnabled():null};var mt=function(e){p()(n,e);var t=vt(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId(n.getIdPrefix()),a}return d()(n,[{key:"clone",value:function(){var e=new n(this);return delete e._id,delete e._rev,e.id=_.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}}],[{key:"getModelName",value:function(){return"Dictionary"}},{key:"getIdPrefix",value:function(){return"dictionary"}}]),n}(C({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]}));mt.defaults({id:"",modelName:mt.getModelName(),modelVersion:s.MODEL_VERSION,data:JSON.stringify({})});var gt={};gt.createItem=function(e,t){if(!e)throw'parameter "word" must be specified.';var n,i=parseInt(t),a={w:e,f:0,t:{}};return(n=i)==parseInt(n)&&(a.r=i),a};var _t=gt;var yt=function(){var e=this,t={},n=null,i=null;function a(e){if(!e)return[];var n=[];return t[e]&&n.push(t[e]),t[e.toLowerCase()]&&-1===n.indexOf(t[e.toLowerCase()])&&n.push(t[e.toLowerCase()]),t[e.toUpperCase()]&&-1===n.indexOf(t[e.toUpperCase()])&&n.push(t[e.toUpperCase()]),t[o(e)]&&-1===n.indexOf(t[o(e)])&&n.push(t[o(e)]),n}function r(e){var t=a(e);return t.length>0?t[0]:null}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}e.load=function(e){var n=JSON.parse(e);Object.keys(n).forEach((function(e){n[e].w=e})),t=n},e.toJSON=function(){var e=JSON.parse(JSON.stringify(t));return Object.keys(e).forEach((function(t){delete e[t].w})),JSON.stringify(e)},e.addWord=function(e,n){e&&(t[e]||(t[e]=_t.createItem(e,n)))},e.addWords=function(t){if(!(t instanceof Array)||0===t.length)throw"words to add must be an array with at least one element.";t.forEach((function(t){e.addWord(t)}))},e.deleteWord=function(e,n){Object.keys(t).forEach((function(i){if(n?e.toUpperCase()===i.toUpperCase():e===i)delete t[i];else{var a=t[i];Object.keys(a.t).forEach((function(t){(n?e.toUpperCase()===t.toUpperCase():e===t)&&delete a.t[t]}))}}))},e.contains=function(e,n){return n?!!t[e]:!!r(e)},e.predictCompleteWord=function(a,r){a=a||"",r=r||{};var o=[];if(Object.keys(t).forEach((function(e){0===e.toLowerCase().indexOf(a.toLowerCase())&&o.push(t[e])})),0===o.length&&a.length>1){var s=null;return(s=n&&i&&0===a.indexOf(n)?i:e.predictCompleteWord(a.substring(0,a.length-1),r)).forEach((function(e){e.fuzzyMatch=!0})),s}return n=a,i=o.map((function(e){return{word:e.w,frequency:e.f,rank:e.r}}))},e.predictNextWord=function(e,t){var n=a(e),i=[];return n.forEach((function(e){Object.keys(e.t).forEach((function(t){i.push({word:t,frequency:e.t[t]})}))})),i},e.learn=function(t,n,i){if(t&&(e.contains(t)||i)){i&&t&&!e.contains(t)&&e.addWord(t),i&&n&&!e.contains(n)&&e.addWord(n);var a=r(n),o=r(t);o.f++,a&&a.t&&(a.t[o.w]?a.t[o.w]++:a.t[o.w]=1)}},e.getWords=function(){return Object.keys(t)}};function bt(){this.DEFAULT_DICTIONARY_KEY="DEFAULT_DICTIONARY_KEY";var e=this,t={},n=null;function i(n,i,a){var r=[];(i=i||{}).maxPredictions=i.maxPredictions||i.maxPredicitons||10,i.applyToInput=i.applyToInput||!1,Object.keys(t).forEach((function(e){var o=t[e];if(!o.disabled){var s="PREDICT_METHOD_NEXT_WORD"===a?o.predictNextWord:"PREDICT_METHOD_COMPLETE_WORD"===a?o.predictCompleteWord:null;s=s||(Ct(n)?o.predictNextWord:o.predictCompleteWord),r=r.concat(s(Et(n),i))}})),r.sort((function(e,t){return e.fuzzyMatch!==t.fuzzyMatch?e.fuzzyMatch?1:-1:e.frequency!==t.frequency?e.frequency0&&(!Ct(c)||new RegExp("[\\.\\?!,]").test(c[c.length-1]))&&(c+=" "),o||e.learn(n,r?l:s,a),c+n+" "},this.learn=function(n,i,a){n=wt(n),i=wt(i);var r=e.getDictionaryKeys(!0);if(a=1===r.length?r[0]:a,r.length>0&&(!a||!t[a])){var o=0;r.forEach((function(t){var r=0;e.hasWord(n,t)&&(r+=2),e.hasWord(i,t)&&r++,r>0&&r>=o&&(o=r,a=t)}))}a=a||e.DEFAULT_DICTIONARY_KEY,t[a]||e.addDictionary(a),Object.keys(t).forEach((function(e){var r=t[e];r.disabled||r.learn(n,i,a===e)}))},this.learnFromInput=function(t,i){if(Ct(t)){var a=Et(t,2),r=Et(t,3);if(a&&a!==n)return n=a,e.learn(a,r,i),!0}return!1},this.learnFromText=function(e,t){var n=this;(e=e.replace(/\s\s/g," ")).split(new RegExp("[\\.\\?!]")).forEach((function(e){for(var i=e.split(" "),a=0;a-1&&At.init(Nt)}));var Dt={},Rt={},Mt={},Pt="";Dt.DEFAULT_KEY="DEFAULT_KEY",Dt.DEFAULT_KEY2="DEFAULT_KEY2",Dt.debounce=function(e,t,n){n=n||Dt.DEFAULT_KEY,e||t?(Rt[n]&&clearTimeout(Rt[n]),Rt[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},Dt.clearDebounce=function(e){e=e||Dt.DEFAULT_KEY,Rt[e]&&clearTimeout(Rt[e])},Dt.throttle=function(e,t,n,i){if(e&&e.apply){n=n||500;var a=i||e,r=Mt[a];(!r||(new Date).getTime()-r>n)&&(e.apply(null,t),Mt[a]=(new Date).getTime())}},Dt.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";Pt=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},Dt.appendToClipboard=function(e){Dt.copyToClipboard(Pt+e)},Dt.getClipboardContent=function(){return navigator.clipboard.readText().then((function(e){return Promise.resolve(e)})).catch((function(e){return log.warn("failed to read clipboard."),Promise.resolve(null)}))},Dt.getElement=function(e,t,n){var i=document.elementsFromPoint(t,n),a=null;return i.forEach((function(t){a=a||function(e,t){for(var n=0;e&&-1===t.indexOf(e)&&n<100;n++)e=e.parentElement;return e}(t,e)})),a},Dt.splitInChunks=function(e,t){for(var n=[],i=0,a=e.length;i1&&a.push(function(e,t){log.warn("fixing duplicated metadata...");var n=null;return ot.all().then((function(i){var a=[];n=t.map((function(e){return e.id}));var r=[];i.forEach((function(t){a.push(function t(n,i){var a=JSON.parse(JSON.stringify(i));try{return Ue.decryptObjects(n)}catch(i){if(0===a.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return Ue.setEncryptionProperties(e,a.pop()),t(n,a)}}(t,n))}));var o=n.pop();return Ue.setEncryptionProperties(e,o),log.warn("keeiping metadata: "+o),log.warn("decrypted docs:"),log.warn(a),log.warn("re-encrypting and saving them..."),a.forEach((function(e){var t=Bt(e.modelName,e);r.push(t)})),Promise.all(r)})).then((function(){var e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach((function(t){e.push(ot.remove(t))})),Promise.all(e)})).then((function(){return log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()}))}(e,t))):(i=new O,Ue.setEncryptionProperties(e,i.id,n),a.push(Bt(O.getIdPrefix(),i))),Promise.all(a)})).then((function(){return ot.all(mt.getIdPrefix()).then((function(e){return e?Promise.resolve():new Promise((function(e){log.info("importing dictionary: "+$t),a.a.get($t).success((function(t){log.debug("success getting default dictionary."),e(t)})).fail((function(t){log.debug("error getting default dictionary."),e()}))}))})).then((function(e){if(!e)return Promise.resolve();var t=new mt({dictionaryKey:Vt,data:e,isDefault:!0});return Bt(mt.getIdPrefix(),t)}))}))).then((function(){Ft=null,At.init(),a()(document).trigger(s.EVENT_USER_CHANGED)})),Ut}function Bt(e,t){return new Promise((function(n,i){var a=et.convertLiveToDatabaseObjects(t);ot.save(e,a).then((function(){log.debug("saved "+e+", id: "+t.id),n()})).catch((function(e){i(e)}))}))}Gt.getObject=function(e,t,n){return new Promise((function(i,a){Ut.then((function(){if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),a();ot.all(e.getIdPrefix(),t).then((function(t){var a={objectType:e,onlyShortVersion:n},r=et.convertDatabaseToLiveObjects(t,a),o=function(e){if(!e)return null;if(e.modelVersion)return e.modelVersion;if(e[0]&&e[0].modelVersion)return e[0].modelVersion;return null}(r);o&&Ft!==o&&(Ft=o,D.setUserModelVersion(ot.getOpenedDatabaseName(),o)),i(r)})).catch((function(e){a(e)}))}))}))},Gt.getSingleObject=function(e,t,n){return Gt.getObject(e,t,n).then((function(e){return Promise.resolve(e instanceof Array?e[0]:e)}))},Gt.saveObject=function(e,t,n){return Ut.then((function(){return t&&e&&e.getModelName?t.isShortVersion?(log.warn("short versions of objects cannot be saved/updated! aborting."),Promise.reject()):(log.debug("saving "+e.getModelName()+"..."),Gt.getObject(e,t.id)):(log.error('did not specify needed parameter "objectType"!'),Promise.reject())})).then((function(i){if(i){log.debug(e.getModelName()+" already existing, doing update. id: "+i.id);var a=new e(t,i),r=JSON.parse(JSON.stringify(a));return r._id=i._id,r._rev=i._rev,Bt(e.getIdPrefix(),r)}if(n)return log.warn("no existing "+e.getModelName()+" found to update, aborting."),Promise.reject();var o=JSON.parse(JSON.stringify(t));return o._id=o.id,Bt(e.getIdPrefix(),o)}))},Gt.bulkSave=function(e){if(!e||0===e.length)return Promise.resolve();if(e[0].isShortVersion)return log.warn("not saving short version!"),Promise.resolve();var t=e.reduce((function(e,t){return e+(t.gridElements?t.gridElements.length:0)}),0),n=Math.floor(t/e.length),i=[];if(et.convertLiveToDatabaseObjects(e).forEach((function(e){e._id=e.id})),t>1e3){var a=Math.floor(1e3/n);i=Dt.splitInChunks(e,a)}else i=[e];return function e(t){var n=JSON.parse(JSON.stringify(t.shift()));return ot.bulkDocs(n).then((function(){return t.length>0?e(t):Promise.resolve()}))}(i)},Gt.bulkDelete=function(e){return e.forEach((function(e){e._deleted=!0,e._id=e.id})),ot.bulkDocs(JSON.parse(JSON.stringify(e)))},Gt.removeObject=function(e){return ot.remove(e)},Gt.initForUser=function(e,t,n,i){var a=n&&!i||!1,r=ot.getOpenedDatabaseName()===e,o=-1!==D.getSavedLocalUsers().indexOf(e);return r&&a===ot.isSyncEnabled()?Promise.resolve():ot.initDatabase(e,n,i).then((function(){return r?Promise.resolve():jt(t,e,o)}))},Gt.registerForUser=function(e,t,n,i){var a=n&&!i,r=-1!==D.getSavedLocalUsers().indexOf(e);return ot.getOpenedDatabaseName()===e&&a===ot.isSyncEnabled()?Promise.resolve():ot.createDatabase(e,n,i).then((function(){return jt(t,e,r)}))},Gt.deleteDatabase=function(e){if(e)return ot.deleteDatabase(e)},Gt.closeCurrentDatabase=function(){return ot.closeCurrentDatabase()},Gt.getCurrentUsedDatabase=function(){return ot.getOpenedDatabaseName()};var Yt={};Yt.gridDataToOBF=function(e){},Yt.gridSetToOBZ=function(e){},Yt.OBFToGridData=function(e,t){var n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():U.getBrowserLang(),a=new He({obfId:e.id,label:U.getTranslationObject(e.name,i),locale:i,rowCount:e.grid.rows,minColumnCount:e.grid.columns,gridElements:[]});return e.buttons.forEach((function(r){if(!r.hidden){var o=function(e,t){var n=t.grid.order,i=null;return n.forEach((function(t,n){t.forEach((function(t,a){t===e&&(i={x:a,y:n})}))})),i}(r.id,e),s=new Ae({width:1,height:1,label:U.getTranslationObject(r.label,i),x:o.x,y:o.y,backgroundColor:r.background_color});(s=function(e,t,n,i){t.vocalization&&(e.actions=e.actions.filter((function(e){return e.modelName!==ce.getModelName()})),e.actions.push(new de({speakText:t.vocalization,speakLanguage:n.locale})));if(t.load_board&&t.load_board.path){var a=function(e,t){if(!t)return null;var n=t["manifest.json"].paths.boards,i=null;return Object.keys(n).forEach((function(t){n[t]===e&&(i=t)})),i}(t.load_board.path,i);a&&e.actions.push(new ee({toGridId:a}))}return e}(s,r,e,t)).actions.filter((function(e){return e.modelName===ce.getModelName()})).forEach((function(t){t.speakLanguage=e.locale})),n.push(function(e,t,n){var i=t.images.filter((function(t){return t.id===e}))[0],a=null,r=[];if(!i)return Promise.resolve(null);if(i.data)a=i.data;else if(i.path){var o=i.path.substring(i.path.lastIndexOf(".")),s=i.content_type||"image/png",l="data:".concat(s=".svg"===o?"image/svg+xml":s,";base64,"),c=n[i.path];a=l+c}else i.url&&r.push(ie.urlToBase64(i.url).then((function(e){return a=e,Promise.resolve()})));return Promise.all(r).then((function(){return a?Promise.resolve(new se({data:a})):(log.info("failed to import image: "+e),Promise.resolve(null))}))}(r.image_id,e,t).then((function(e){return s.image=e,Promise.resolve()}))),a.gridElements.push(s)}})),Promise.all(n).then((function(){return Promise.resolve(a)}))},Yt.OBZToGridSet=function(e){var t=[],n=[];return Object.keys(e).forEach((function(i){-1!==i.indexOf(".obf")&&t.push(Yt.OBFToGridData(e[i],e).then((function(e){return n.push(e),Promise.resolve()})))})),Promise.all(t).then((function(){return n.forEach((function(e){e.gridElements.forEach((function(e){e.actions.forEach((function(t){if(t.modelName===ee.getModelName()){var i=t.toGridId,a=n.reduce((function(e,t){return e||(t.obfId===i?t.id:null)}),null);a?t.toGridId=a:e.actions=e.actions.filter((function(e){return e.id!==t.id}))}}))}))})),n.forEach((function(e){delete e.obfId})),Promise.resolve(n)}))};var Ht={readZip:function(e,t){var i={};return new Promise((function(a){Promise.all([n.e(3),n.e(1)]).then(n.t.bind(null,636,7)).then((function(n){n.loadAsync(e).then((function(e){var n=[];Object.keys(e.files).forEach((function(a){var r=e.files[a];n.push(r.async("base64").then((function(e){try{i[a]=t?JSON.parse(atob(e)):e}catch(t){i[a]=e}})))})),Promise.all(n).then((function(){a(i)}))}))}))}))}},Wt={},zt="app/examples/default.grd.json";We.getDefaultGridsetName()&&(zt="app/examples/"+We.getDefaultGridsetName()),Wt.getGrid=function(){var e=K()(W.a.mark((function e(t,n){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",Promise.resolve(null));case 2:return e.abrupt("return",Gt.getSingleObject(He,t,n).then((function(e){return Promise.resolve(e?new He(e):null)})));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Wt.getGlobalGrid=function(e){return Wt.getMetadata().then((function(t){return t.globalGridId&&(e||t.globalGridActive)?Wt.getGrid(t.globalGridId).then((function(e){return Promise.resolve(e)})):Promise.resolve(null)}))},Wt.getGrids=function(e,t){return new Promise((function(n){Gt.getObject(He,null,!e).then((function(e){if(e){var i=e instanceof Array?e:[e];t?Wt.getMetadata().then((function(e){n(i.filter((function(t){return t.id!==e.globalGridId})))})):n(i)}else n([])}))}))},Wt.saveGrid=function(e){return e.gridElements=Oe.sortGridElements(e.gridElements),Gt.saveObject(He,e)},Wt.saveGrids=function(e){return e.forEach((function(e){e.gridElements=Oe.sortGridElements(e.gridElements)})),Gt.bulkSave(e)},Wt.updateGrid=function(e,t){return t.id=e,t.gridElements=Oe.sortGridElements(t.gridElements),Gt.saveObject(He,t,!0)},Wt.deleteGrid=function(e){return Gt.removeObject(e)},Wt.deleteAllGrids=function(){return Wt.getGrids().then((function(e){return e&&0!==e.length?Gt.bulkDelete(e):Promise.resolve()})).then((function(){return e="",Wt.getMetadata().then((function(t){return t.globalGridId=e,t.globalGridActive=!!e,Wt.saveMetadata(t)}));var e}))},Wt.importDefaultGridset=function(){return Promise.resolve().then((function(){return a.a.get(zt)})).then((function(e){if(!e)return Promise.resolve();log.info("importing default grid set "+zt);try{e=JSON.parse(e)}catch(e){}return Wt.importData(e,!1,!0)}))},Wt.saveAdditionalGridFiles=function(e,t){return new Promise((function(n){t||n(),Wt.getGrid(e).then((function(e){t.forEach((function(t){var n=(e=JSON.parse(JSON.stringify(e))).additionalFiles.findIndex((function(e){return e.fileName===t.fileName}));-1!==n?e.additionalFiles[n]=t:e.additionalFiles.push(t)})),Wt.saveGrid(e).then((function(){n()}))}))}))},Wt.getGridElement=function(e,t){return new Promise((function(n){Wt.getGrid(e).then((function(e){var i=e.gridElements.filter((function(e){return e.id===t}))[0];i?n(i):Wt.getGlobalGrid().then((function(e){n(e.gridElements.filter((function(e){return e.id===t}))[0])}))}))}))},Wt.getGridsAttribute=function(e){return new Promise((function(t){Wt.getGrids().then((function(n){var i={};n.forEach((function(t){i[t.id]=t[e]})),t(i)}))}))},Wt.addGridElements=function(e,t){return new Promise((function(n){Wt.getGrid(e).then((function(i){(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),Wt.updateGrid(e,i).then((function(){n()}))}))}))},Wt.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise((function(n){Wt.getMetadata().then((function(i){if(i){var a=i instanceof Array?i[0].id:i.id;e.id=a,D.saveLocalMetadata(e),D.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():Gt.saveObject(O,e).then((function(){n()}))}))}))},Wt.getMetadata=function(){return new Promise((function(e){Gt.getObject(O).then((function(t){var n=null;if(n=t?t instanceof Array?t[0]:t:new O,!D.shouldSyncNavigation()){var i=D.getLocalMetadata();i&&(n.locked=i.locked,n.fullscreen=i.fullscreen,n.lastOpenedGridId=i.lastOpenedGridId)}e(new O(n))}))}))},Wt.saveImage=function(e){return t=se,n=e,i=[],new Promise((function(e,a){Wt.getMetadata().then((function(r){if(!r||!r.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void a();var o=null;r.hashCodes[t.getModelName()]?o=r.hashCodes[t.getModelName()]:(o={},r.hashCodes[t.getModelName()]=o);var s=_.hashCode(n);o[s]?(log.debug("saveHashedItemInternal: hash found, not saving new element"),n.id=o[s]):(log.debug("saveHashedItemInternal: hash not found, saving new element"),o[s]=n.id,i.push(Gt.saveObject(t,n)),i.push(Gt.saveObject(O,r))),Promise.all(i).then((function(){e(n.id)}))}))}));var t,n,i},Wt.getImage=function(e){return Gt.getObject(se,e)},Wt.getDictionary=function(e){return e?Gt.getSingleObject(mt,e).then((function(e){return Promise.resolve(new mt(e))})):Promise.resolve(null)},Wt.getDictionaries=function(){return new Promise((function(e){Gt.getObject(mt).then((function(t){if(t){var n=t instanceof Array?t.map((function(e){return new mt(e)})):[new mt(t)];e(n)}else e([])}))}))},Wt.saveDictionary=function(e){return e.isDefault=!1,Gt.saveObject(mt,e)},Wt.deleteObject=function(e){return Gt.removeObject(e)},Wt.downloadSingleGrid=function(e){Wt.getGrid(e).then((function(e){if(e){var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});X.a.saveAs(t,U.getTranslation(e.label)+".grd")}}))},window.backupPrepareForDefault=!1,Wt.downloadBackup=function(){var e={},t=[];t.push(Wt.getMetadata().then((function(t){return e.metadata=t,Promise.resolve()}))),t.push(Wt.getDictionaries().then((function(t){return t.reduce((function(e,t){return e&&t.isDefault}),!0)||(e.dictionaries=t),Promise.resolve()}))),t.push(Wt.getGrids(!0).then((function(t){return e.grids=t,Promise.resolve()}))),Promise.all(t).then((function(){backupPrepareForDefault&&(delete e.dictionaries,e.metadata.inputConfig=new I,e.metadata.locked=void 0,e.metadata.fullscreen=void 0,e.metadata.hashCodes={});var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});X.a.saveAs(t,"my-backup.grd")}))},Wt.downloadAllGridsSimple=function(){Wt.getGrids(!0).then((function(e){e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:De.removeLongPropertyValues(e)})))}))},Wt.importGridsFromFile=function(e,t,n){var i=e.name.substring(e.name.length-4),a=!1;return n=n||function(){},new Promise((function(r,o){var s=new FileReader;s.onload=function(o){var s=o.target.result,l=[];t&&(n(10,U.translate("Deleting grids // Grids werden gelöscht")),l.push(Wt.deleteAllGrids())),Promise.all(l).then((function(){var o=null,l=[];if(n(40,U.translate("Extracting grids from file // Grids werden aus Datei extrahiert")),".grd"===i)o=JSON.parse(s);else if(".obf"===i)l.push(Yt.OBFToGridData(JSON.parse(s)).then((function(e){return o=e,Promise.resolve()})));else if(".obz"===i){var c=Ht.readZip(e,!0).then((function(e){return Yt.OBZToGridSet(e)})).then((function(e){return o=e,t&&(a=!0),Promise.resolve()}));l.push(c)}Promise.all(l).then((function(){n(80,U.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),Wt.importData(o,a,t).then((function(){n(100),r()}))}))}))},s.readAsText(e)}))},Wt.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();var i=null,a=null,r=null,o=[];return e instanceof Array?r=et.updateDataModel(e):(i=n?et.updateDataModel(e.dictionaries):null,a=n?et.updateDataModel(e.metadata):null,r=et.updateDataModel(e.grids),i||a||r||!e.id||(r=[et.updateDataModel(e)])),(a?Promise.resolve(a):Wt.getMetadata()).then((function(e){return r&&o.push(Wt.getGrids().then((function(n){var i=n.map((function(e){return U.getTranslation(e.label)})),o=null,s=Oe.regenerateIDs(r);r=s.grids,a&&(e.lastOpenedGridId=s.idMapping[e.lastOpenedGridId],e.globalGridId=s.idMapping[e.globalGridId]),r.forEach((function(e){var t=U.getTranslation(e.label);e.label[U.getBrowserLang()]=_.getNewName(t,i)}));var l=r[0]?r[0].locale:null;if(t){var c=r[0].id;o=Oe.generateGlobalGrid(c,l),r.unshift(o),e.globalGridId=o.id,e.globalGridActive=!!e.globalGridId}return Wt.saveGrids(r).then((function(){return Wt.saveMetadata(e,!0)}))}))),i&&o.push(Wt.getDictionaries().then((function(e){return Gt.bulkDelete(e)})).then((function(){return i=i.map((function(e){return delete e.id,delete e._id,delete e._rev,new mt(e)})),Gt.bulkSave(i).then((function(){return At.init(),Promise.resolve()}))}))),Promise.all(o)}))},Wt.getSyncState=function(){return ot.getSyncState()},Wt.getCurrentUser=function(){return Gt.getCurrentUsedDatabase()};var Kt={},Jt="#asterics-grid-user-documentation",Xt="",qt=Jt,Zt=Xt,Qt=qt;Kt.setHelpLocation=function(e,t){Zt=Xt,Qt=qt,Xt=e,qt=t||""},Kt.setHelpLocationIndex=function(){Kt.setHelpLocation("",Jt)},Kt.revertToLastLocation=function(){Kt.setHelpLocation(Zt,Qt)},Kt.openHelp=function(){var e="https://www.asterics.eu/manuals/asterics-grid/"+(Xt?Xt+".html"+qt:qt);U.isBrowserLangDE()&&(e="https://translate.google.com/translate?sl=en&tl=de&u="+encodeURI(e)),window.open(e,"_blank")},window.onhelp=function(){return!1},window.addEventListener("keydown",(function(e){112!==(e.keyCode||e.which)&&"F1"!==e.key||(e.preventDefault(),Kt.openHelp())}));var en=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"all-grids-view overflow-content box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon"),e._v(" "),e._m(0),e._v(" "),n("button",{staticClass:"spaced hide-mobile small",attrs:{tabindex:"31"},on:{click:function(t){return e.addGrid()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("New Grid // Neues Grid")])]),e._v(" "),n("div",{staticStyle:{display:"none"}},[n("input",{attrs:{type:"file",id:"inputFile",accept:".grd, .obf, .obz"},on:{change:e.importFromFile}}),e._v(" "),n("input",{attrs:{type:"file",id:"inputFileBackup",accept:".grd, .obz"},on:{change:e.importBackupFromFile}})])],1),e._v(" "),n("div",{staticClass:"row content text-content"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showLoading||null===e.grids,expression:"showLoading || grids === null"}],staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin",staticStyle:{position:"relative","margin-top":"30vh",top:"0"}})]),e._v(" "),e.selectedGraphElement?n("div",[n("h1",[e._v(e._s(e.headerDetails))]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("img",{staticStyle:{height:"150px","max-width":"100%",border:"1px solid lightgray"},attrs:{src:e.selectedGraphElement.grid.thumbnail?e.selectedGraphElement.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"five columns",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticStyle:{display:"block"},attrs:{for:"gridName","data-i18n":""}},[e._v("Name of grid // Grid-Name")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newLabel[e.currentLanguage],expression:"newLabel[currentLanguage]"}],staticStyle:{width:"77%"},attrs:{id:"gridName",type:"text",maxlength:"25"},domProps:{value:e.newLabel[e.currentLanguage]},on:{input:function(t){t.target.composing||e.$set(e.newLabel,e.currentLanguage,t.target.value)}}}),e._v(" "),n("button",{staticStyle:{width:"17%",padding:"0 1%"},attrs:{disabled:e.isLabelDuplicate(e.newLabel[e.currentLanguage]),title:e.i18nService.translate("Save name // Name speichern")},on:{click:e.saveGridLabel}},[n("i",{staticClass:"fas fa-check"})])])]),e._v(" "),e._m(1),e._v(" "),n("div",{staticClass:"action-buttons",attrs:{id:"actionGroup"}},[n("div",{staticStyle:{display:"flex"}},[n("button",{on:{click:function(t){return e.show(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Show // Öffnen")])]),e._v(" "),n("button",{on:{click:function(t){return e.edit(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(t){return e.clone(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.deleteGrid(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToFile(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"fas fa-file-export"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Export // Exportieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToPdf(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-file-pdf"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Save as PDF // Als PDF speichern")])])])])]):e._e(),e._v(" "),n("h1",{attrs:{"data-i18n":""}},[e._v("Grid list // Grid-Liste")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.graphList.length>0,expression:"graphList.length > 0"}],staticClass:"row",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticClass:"three columns",attrs:{for:"selectMode","data-i18n":""}},[e._v("Grids to show // Anzuzeigende Grids")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectValue,expression:"selectValue"}],staticClass:"four columns",attrs:{id:"selectMode"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectValue=t.target.multiple?n:n[0]},e.reinitContextMenu]}},[e.selectedGraphElement?n("option",{domProps:{value:e.selectValues.CONNECTED_GRIDS}},[e._v(e._s(e.connectedGridsOptionLabel))]):e._e(),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.NOT_REACHABLE_GRIDS}},[e._v("Not reachable grids // Nicht erreichbare Grids")]),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.ALL_GRIDS}},[e._v("All grids // Alle Grids")])]),e._v(" "),n("span",{staticClass:"three columns"},[e._v(e._s(e.graphElemsToShow.length)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("elements // Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",[e._l(e.graphElemsToShow,(function(t){return n("li",{staticStyle:{display:"inline-block","margin-right":"2em","margin-bottom":"1.5em",position:"relative"}},[n("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"javascript:;"},on:{click:function(n){return e.setSelectedGraphElement(t)}}},[n("div",{staticStyle:{width:"100%",border:"1px solid lightgray"}},[n("div",[e._v(e._s(e._f("extractTranslation")(t.grid.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px","max-width":"100%"},attrs:{src:t.grid.thumbnail?t.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("button",{staticClass:"gridOptions",staticStyle:{position:"absolute",bottom:"3px",right:"0",padding:"0 20px",margin:"0"},attrs:{"data-grid-id":t.grid.id,title:e.i18nService.translate("More // Mehr")}},[n("i",{staticClass:"fas fa-ellipsis-v"})])])})),e._v(" "),n("li",{directives:[{name:"show",rawName:"v-show",value:0===e.graphElemsToShow.length,expression:"graphElemsToShow.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("(no grids) // (keine Grids)")])])],2)]),e._v(" "),e.graphList.length>0?n("div",[n("h1",{attrs:{"data-i18n":""}},[e._v("Global grid // Globales Grid")]),e._v(" "),n("p",{attrs:{"data-i18n":""}},[e._v('A global grid is shown within each other grid and can contain elements like e.g. "back" or "home". // Ein globales Grid wird innerhalb jedes anderen Grids angezeigt und kann beispielsweise Elemente wie "Zurück" oder "Zum Start" beinhalten.')]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"globalGridActions","data-i18n":""}},[e._v("Actions for global grid // Aktionen für globales Grid")]),e._v(" "),e.metadata?n("div",{staticClass:"eight columns",attrs:{id:"globalGridActions"}},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.globalGridActive||!e.hasGlobalGrid,expression:"!metadata.globalGridActive || !hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!0)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Activate global Grid // Globales Grid aktivieren")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.globalGridActive&&e.hasGlobalGrid,expression:"metadata.globalGridActive && hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!1)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Deactivate global Grid // Globales Grid deaktivieren")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.edit(e.metadata.globalGridId)}}},[n("i",{staticClass:"fas fa-edit"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Edit global Grid // Globales Grid bearbeiten")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.resetGlobalGrid()}}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Reset global grid to default // Globales Grid zurücksetzen")])])]):e._e()])]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-bottom":"10em"}}),e._v(" "),e.linkModal.show?n("grid-link-modal",{attrs:{"grid-from-prop":e.linkModal.gridFrom,"grid-to-prop":e.linkModal.gridTo},on:{close:function(t){e.linkModal.show=!1},reload:function(t){return e.reload(e.linkModal.gridFrom.id)}}}):e._e(),e._v(" "),e.pdfModal.show?n("export-pdf-modal",{attrs:{"grids-data":e.grids},on:{close:function(t){e.pdfModal.show=!1}}}):e._e()],1)])};en._withStripped=!0;var tn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return!e.fullHeader||e.show?n(e.tag,{tag:"component"},[n("div",{attrs:{"aria-hidden":"true"}},[e.show?n("div",[n("a",{staticStyle:{margin:"0.2em 1em 0 0.5em",color:"#266697"},attrs:{tabindex:"20",href:"javascript:void(0)"},on:{click:function(t){return e.openSidebar()}}},[n("i",{staticClass:"fas fa-2x fa-bars inline"})]),e._v(" "),n("a",{staticClass:"hide-mobile",attrs:{tabindex:"21",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{attrs:{id:"astericsIcon",src:"app/img/asterics-grid-icon-raw.svg",height:"40",width:"121",alt:"AsTeRICS Grid"}})])])]):e._e(),e._v(" "),n("a",{staticClass:"show-mobile",attrs:{tabindex:"22",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{staticStyle:{margin:"0"},attrs:{id:"astericsIcon",src:"app/img/asterics_icon.png",alt:"AsTeRICS Grid"}})])])])]):e._e()};tn._withStripped=!0;var nn=n(9),an={},rn={},on=null,sn=!1;function ln(e){null!==rn[e]&&(rn[e].close(),rn[e]=null,log.debug("SSE closed."))}function cn(e){for(var t="",n=0;n-1?"http://127.0.0.1:8081":"http://"+window.location.hostname+":8081"),-1===e.indexOf("http")&&(e="http://"+e);var t=document.createElement("a");return t.href=e,t.pathname="/rest/",t.port||(t.port=8081),t.href},an.getTypeId=function(e,t){var n=window.atob(t);return a()(n).find('components component[id="'+e+'"]').attr("type_id")},an.getComponentDescriptorsAsXml=function(e){return new Promise((function(t,n){a.a.ajax({type:"GET",url:an.getRestURL(e)+"storage/components/descriptors/xml",datatype:"text/xml",crossDomain:!0,success:function(e,n,i){t(e,n)},error:function(e,t,i){n(i,e.responseText)}})}))},an.getPossibleEvents=function(e,t,n){return new Promise((function(i){an.getComponentDescriptorsAsXml(n).then((function(n){var r=an.getTypeId(e,t),o=a()(n).find('componentType[id="'+r+'"] eventListenerPort').map((function(){return this.id})).get();i(o)}))}))},an.subscribeEvents=function(e,t,n){if("undefined"!=typeof EventSource){var i=an.getRestURL(e);rn[i]||(rn[i]=new EventSource(i+"runtime/model/channels/event/listener"),rn[i].onopen=function(e){log.debug("SSE opened."),sn=!0},rn[i].onerror=function(a){ln(i),n&&n(a),sn&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),on=setTimeout((function(){on=null,an.subscribeEvents(e,t,n)}),3e3))}),rn[i].addEventListener("event",(function(e){t(e.data,200)}),!1)}else log.warn("SSE not supported by browser")},an.unsubscribeEvents=function(e){on&&clearTimeout(on),sn=!1,e?ln(e):Object.keys(rn).forEach((function(e){ln(e)}))};var un={},dn=[],fn={},pn=0;function hn(){var e={},t=null,n=null,i=[],a=[],r=[],s=[],l=[],c=[],u=[],d=[],f=[],p=[],h={},v=document.body,m=!1,g={},_=pn++;function y(e,t){an.subscribeEvents(e.areURL,(function(n){e.eventNames.indexOf(n)>-1&&t()}))}function b(t,n){if(t&&t.keyCode&&n){var i=t.keyCode+"",a=h[i]?h[i]:[];return h[i]=a,a.push(function(e,t){return{handler:e,inputEvent:t,lastKeydown:null,lastAction:null,counter:0,timeoutHandler:null}}(n,t)),e}}function E(e){(e.clientY<5||e.clientX<5)&&R(i)}function C(e){R(c,[e],!0),n&&t?e.touches[0].clientY>n+100?(log.debug("swipe down."),n=null,R(r)):e.touches[0].clientYt+100?(log.debug("swipe right."),t=null,R(l)):e.touches[0].clientX0&&!e.repeat&&f.forEach((function(n){n(t,e.code,e)}));var n=t+"";if(h[n]){var i=function(e){e.lastAction=(new Date).getTime(),e.handler(),L(a)};if(e.preventDefault(),e.repeat)return;var a=h[n];(a=a.sort((function(e,t){return e.counter-t.counter||e.inputEvent.repeat-t.inputEvent.repeat}))).forEach((function(e){e.inputEvent.timeout=e.inputEvent.repeat>1?e.inputEvent.timeout||500:e.inputEvent.timeout,x(e.lastKeydown,e.inputEvent.timeout)&&(e.counter=0)})),a.forEach((function(e){var t=e.inputEvent;if(t.repeat&&1!==t.repeat||t.holdDuration||!x(e.lastAction,t.timeout))if(t.repeat>1){if(e.counter++,e.counter===t.repeat){var n=a.filter((function(n){return n!==e&&n.inputEvent.repeat>t.repeat})).length>0?t.timeout:0;e.counter=0,function(e){e.forEach((function(e){return clearTimeout(e.timeoutHandler)}))}(a),e.timeoutHandler=setTimeout((function(){i(e)}),n)}}else t.holdDuration&&(e.timeoutHandler=setTimeout((function(){i(e)}),t.holdDuration));else{var r=a.filter((function(t){return t!==e&&t.inputEvent.holdDuration})).length>0,s=a.filter((function(t){return t!==e&&t.inputEvent.repeat>1})),l=s.length>0,c=Math.max.apply(null,s.map((function(e){return e.counter})));if(r)e.doOnKeyup=function(){i(e)};else if(l&&c<1){var u=Math.max.apply(Math,o()(s.map((function(e){return e.inputEvent.timeout}))));e.timeoutHandler=setTimeout((function(){i(e)}),u+10)}else l||i(e)}e.lastKeydown=(new Date).getTime()}))}}function I(e){if(!e.repeat){var t=(e.which||e.keyCode)+"";if(h[t]){var n=h[t];n.forEach((function(e){e.doOnKeyup&&(e.doOnKeyup(),L(n)),e.inputEvent.holdDuration&&O(e)}))}}}function k(){document.fullscreenElement||R(p)}function O(e){clearTimeout(e.timeoutHandler),e.timeoutHandler=null,e.doOnKeyup=null,e.counter=0}function L(e){e.forEach((function(e){return O(e)}))}function x(e,t){return!e||!t||(new Date).getTime()-e>t}function D(t,n){return t&&n.push(t),e}function R(e,t,n){e.forEach((function(e){e.apply?n?e.apply(null,t):Dt.throttle((function(){e.apply(null,t)})):log.warn("handler seems to be not a function!")}))}return e.startListening=function(){m||(m=!0,Object.keys(g).forEach((function(e){var t=g[e];y(t.inputEvent,t.fn)})),document.addEventListener("mousemove",E),document.addEventListener("keydown",N),document.addEventListener("keyup",I),document.addEventListener("fullscreenchange",k),v.addEventListener("touchmove",C,{passive:!1}),v.addEventListener("touchstart",A),v.addEventListener("touchend",w))},e.stopListening=function(){m=!1,Object.keys(g).forEach((function(e){var t=g[e];an.unsubscribeEvents(t.areURL)})),document.removeEventListener("mousemove",E),document.removeEventListener("keydown",N),document.removeEventListener("keyup",I),document.removeEventListener("fullscreenchange",k),v.removeEventListener("touchmove",C),v.removeEventListener("touchstart",A),v.removeEventListener("touchend",w)},e.destroy=function(){e.stopListening(),dn=dn.filter((function(t){return t.getID()!==e.getID()}))},e.isListening=function(){return m},e.getID=function(){return _},e.onMouseUpperOrLeftBorder=function(e){return D(e,i)},e.onSwipedDown=function(e){return D(e,r)},e.onSwipedUp=function(e){return D(e,a)},e.onSwipedRight=function(e){return D(e,l)},e.onSwipedLeft=function(e){return D(e,s)},e.onEscape=function(e){return b(new T({keyCode:27}),e)},e.onAnyKey=function(e){return D(e,f)},e.onTouchMove=function(e){return D(e,c)},e.onTouchStart=function(e){return D(e,u)},e.onTouchEnd=function(e){return D(e,d)},e.onExitFullscreen=function(e){return D(e,p)},e.off=function(e){var t=function(t){return t!==e};i=i.filter(t),a=a.filter(t),r=r.filter(t),s=s.filter(t),l=l.filter(t),c=c.filter(t),u=u.filter(t),d=d.filter(t),f=f.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case T.getModelName():return b(e,t);case S.getModelName():g[e.id]={inputEvent:e,fn:t},m&&y(e,t)}},e}un.instance=function(){var e=new hn;return dn.push(e),e},un.pauseAll=function(){dn.forEach((function(e){fn[e.getID()]=e.isListening(),e.stopListening()}))},un.resumeAll=function(){dn.forEach((function(e){fn[e.getID()]&&e.startListening()}))},un.global=un.instance();var vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.tooltipHTML,expression:"tooltipHTML"}],staticStyle:{display:"flex"},attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),e.tooltipOptions.faIcon?n("i",{class:e.tooltipOptions.faIcon}):e._e(),e._v(" "),n("div",{staticStyle:{"padding-left":"0.5em"}},[n("span",{domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.tooltipOptions.actionLinkFn?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e(),e._v(" "),e.tooltipOptions.actionLinkUrl?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:e.tooltipOptions.actionLinkUrl,target:"_blank"}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e()]),e._v(" "),n("button",{staticStyle:{position:"absolute",top:"0",right:"10px",padding:"0 10px"},on:{click:function(t){e.tooltipHTML=""}}},[e._v("X")])])};vn._withStripped=!0;var mn={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null,faIcon:null,msgType:null};var gn={props:["fullHeader"],data:function(){return{tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:mn,currentToolTipID:null}},methods:{setTooltip:function(e,t){var n=this;switch(n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(mn)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout((function(){n.clearTooltip()}),n.tooltipOptions.timeout)),n.tooltipOptions.msgType){case"warn":n.tooltipOptions.faIcon="fas fa-exclamation-triangle fa-2x";break;case"info":n.tooltipOptions.faIcon="fas fa-info-circle fa-2x"}return this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink,this.currentToolTipID=(new Date).getTime(),this.currentToolTipID},clearTooltip:function(e){if(!e||e===this.currentToolTipID){this.tooltipOptions.revertOnClose&&this.tooltipHTML?this.setTooltip(this.lastTooltipHTML,this.lastTooltipOptions):(this.tooltipHTML=null,this.actionLink=null,this.tooltipImageUrl=null),this.lastTooltipOptions={},this.lastTooltipHTML=null}},onActionLink:function(){this.tooltipOptions.actionLinkFn&&this.tooltipOptions.actionLinkFn()}},mounted:function(){!function(){var e=document.getElementById("notificationBar"),t=document.getElementById("notificationBarImg"),n=JSON.stringify({x:window.innerWidth,y:window.innerHeight}),i=D.get(D.get("WINDOW_SIZE_KEY"));D.save("WINDOW_SIZE_KEY",n),i&&n!==i&&s();var r=D.get("NOTIFICATION_BAR_STYLE_KEY"),o=D.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");r&&(e.setAttribute("style",r),e.style.display="none");o&&t.setAttribute("style",o);function s(){var n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),D.save("NOTIFICATION_BAR_STYLE_KEY",""),D.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}a()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){Dt.debounce((function(){D.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),a()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",D.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){Dt.debounce((function(){D.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),window.addEventListener("resize",(function(){Dt.debounce((function(){s()}),300,"RESIZE_RESET_NOTIFICATIONBAR")}))}(),this},beforeDestroy:function(){}};n(70);function _n(e,t,n,i,a,r,o,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=l):a&&(l=s?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}var yn=_n(gn,vn,[],!1,null,"7bec61b8",null);yn.options.__file="src/vue-components/components/notificationBar.vue";var bn=yn.exports,En=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:function(t){return t.type.indexOf("key")||27===t.keyCode?e.close():null}}},[e.options.closable?n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header","data-i18n":""}},[e._v(e._s(e.options.header))])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"biggerFont"},[e._v(e._s(e.options.text)+" ...")]),e._v(" "),n("div",{staticStyle:{border:"1px solid","border-radius":"3px",width:"100%",height:"50px",margin:"0.5em 0"},attrs:{id:"progressWrapper"}},[n("div",{style:"width: "+e.progressPercentage+"%; height: 100%; background-color: green",attrs:{id:"progressBar"}})]),e._v(" "),n("div",{staticClass:"biggerFont",staticStyle:{"text-align":"right",width:"100%"}},[e._v(e._s(e.progressPercentage)+"%")])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.options.closable?n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])])]):e._e()])])])])])};En._withStripped=!0;n(8);var Cn={header:"",closable:!1,cancelFn:null,text:""},wn={props:[],data:function(){return{progressPercentage:0,options:JSON.parse(JSON.stringify(Cn))}},methods:{setProgress:function(e,t){var n=this;this.progressPercentage=Math.min(e,100),Object.keys(this.options).forEach((function(e){t&&void 0!==t[e]&&(n.options[e]=t[e])})),100===this.progressPercentage&&setTimeout((function(){n.options=JSON.parse(JSON.stringify(Cn)),n.$emit("close")}),200)},close:function(){this.options.closable&&(this.$emit("close"),this.options.cancelFn&&this.options.cancelFn(),this.options=JSON.parse(JSON.stringify(Cn)))}},mounted:function(){U.initDomI18n()}},Tn=(n(74),_n(wn,En,[],!1,null,"2fce46f7",null));Tn.options.__file="src/vue-components/modals/progressBarModal.vue";var An=Tn.exports,Sn={},Nn=null;Sn.setViewComponent=function(e,t){Nn&&Nn.$refs.notificationBar.tooltipOptions.closeOnNavigate&&Sn.clearTooltip(),Nn.setComponent(e,t)},Sn.isSidebarOpen=function(){return Nn.showSidebar},Sn.setTooltip=function(e,t){if(Nn)return Nn.$refs.notificationBar.setTooltip(e,t)},Sn.setTooltipI18n=function(e,t){var n=U.translate(e);Sn.setTooltip(n,t)},Sn.clearTooltip=function(){Nn&&Nn.$refs.notificationBar.clearTooltip()},Sn.showProgressBar=function(e,t){Nn&&(Nn.showProgressBar=!0,Nn.$refs.progressBar.setProgress(e,t))},Sn.init=function(){Nn=new nn.a({el:"#app",components:{NotificationBar:bn,ProgressBarModal:An},data:function(){return{component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:Gt.getCurrentUsedDatabase(),isLocalUser:D.isSavedLocalUser(Gt.getCurrentUsedDatabase()),syncState:Wt.getSyncState(),showProgressBar:!1,constants:s,tooltipHTML:null,actionLink:null}},methods:{setComponent:function(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar:function(){a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)},openSidebar:function(){a()(document).trigger(s.EVENT_SIDEBAR_OPEN)},openHelp:function(){Kt.openHelp()},moreNavigation:function(){a.a.contextMenu("destroy"),a.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":Fo.toRegister();break;case"CONTEXT_ADD_OFFLINE":Fo.toAddOffline();break;case"CONTEXT_ABOUT":Fo.toAbout()}}(e)},items:{CONTEXT_ADD_ONLINE:{name:"Add online user // Online-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ADD_OFFLINE:{name:"Add offline user // Offline-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ABOUT:{name:"About AsTeRICS Grid // Über AsTeRICS Grid",icon:"fas fa-info-circle"}},trigger:"left",zIndex:10}),U.initDomI18n(),a()("#moreNavigation").contextMenu()}},mounted:function(){var e=this,t=this;function n(){!t.showSidebar&&Gt.getCurrentUsedDatabase()&&(Dt.closeFullscreen(),Wt.getMetadata().then((function(e){e.fullscreen&&(e.fullscreen=!1,Wt.saveMetadata(e).then((function(){t.openSidebar()})))})))}U.initDomI18n(),a()(document).on(s.EVENT_SIDEBAR_OPEN,(function(){if(!t.showSidebar)return Gt.getCurrentUsedDatabase()?void Wt.getMetadata().then((function(n){n.locked||n.fullscreen||(t.showSidebar=!0,e.$nextTick((function(){a()(document).trigger(s.EVENT_SIDEBAR_OPENED),a()(document).trigger(s.EVENT_GRID_RESIZE)})))})):(t.showSidebar=!0,void e.$nextTick((function(){a()(document).trigger(s.EVENT_SIDEBAR_OPENED),a()(document).trigger(s.EVENT_GRID_RESIZE)})))})),a()(document).on(s.EVENT_SIDEBAR_CLOSE,(function(){t.showSidebar=!1,e.$nextTick((function(){a()(document).trigger(s.EVENT_GRID_RESIZE)}))})),a()(document).on(s.EVENT_DB_INITIALIZED,(function(){t.currentUser=Gt.getCurrentUsedDatabase(),t.isLocalUser=D.isSavedLocalUser(t.currentUser)})),a()(document).on(s.EVENT_DB_CLOSED,(function(){t.currentUser=Gt.getCurrentUsedDatabase(),t.isLocalUser=D.isSavedLocalUser(t.currentUser)})),a()(document).on(s.EVENT_DB_SYNC_STATE_CHANGE,(function(e,n){t.syncState=n})),t.syncState=Wt.getSyncState(),window.addEventListener("resize",(function(){Dt.debounce((function(){a()(document).trigger(s.EVENT_GRID_RESIZE)}),300,s.EVENT_GRID_RESIZE)})),un.global.onSwipedDown(n).onEscape(n).onExitFullscreen(n),un.global.startListening(),t.openSidebar()},updated:function(){U.initDomI18n()}})};var In=_n({props:["fullHeader"],data:function(){return{show:!Sn.isSidebarOpen(),tag:"div"}},methods:{openSidebar:function(){a()(document).trigger(s.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn:function(){this.show=!1},onCloseFn:function(){this.show=!0}},mounted:function(){a()(document).on(s.EVENT_SIDEBAR_CLOSE,this.onCloseFn),a()(document).on(s.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy:function(){a()(document).off(s.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},tn,[],!1,null,"4ff1a546",null);In.options.__file="src/vue-components/components/headerIcon.vue";var kn=In.exports,On=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("button",{staticClass:"btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:e.toggleOpen}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.isOpen,expression:"!isOpen"}],staticClass:"fas fa-chevron-down arrow"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"fas fa-chevron-up arrow"}),e._v(" "),n(e.componentType,{tag:"component",staticStyle:{"margin-left":"2em",display:"inline-block"},attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.accLabel)))])],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"accordion-content",style:"background-color:"+e.backgroundColor},[e._t("default")],2)])};On._withStripped=!0;var Ln={props:["accLabel","accOpen","accLabelType","accBackgroundColor"],data:function(){return{isOpen:"true"===this.accOpen||!0===this.accOpen,componentType:this.accLabelType||"span",backgroundColor:this.accBackgroundColor||"whitesmoke"}},methods:{toggleOpen:function(){this.isOpen=!this.isOpen,this.isOpen?this.$emit("open"):this.$emit("close")},open:function(){this.isOpen=!0}},mounted:function(){U.initDomI18n()},updated:function(){U.initDomI18n()}},xn=(n(77),_n(Ln,On,[],!1,null,"66ff21d8",null));xn.options.__file="src/vue-components/components/accordion.vue";var Dn=xn.exports,Rn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.gridFrom?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("div",[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridFrom.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridFrom.thumbnail?e.gridFrom.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-right hide-mobile two columns",staticStyle:{"margin-top":"2em"}}),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-down show-mobile two columns",staticStyle:{margin:"0.5em 20%"}}),e._v(" "),n("div",{staticClass:"four columns"},[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridTo.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridTo.thumbnail?e.gridTo.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementName","data-i18n":""}},[e._v("Connect with element // Verknüpfung über Element")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedElement,expression:"selectedElement"}],staticClass:"four columns",attrs:{id:"elementName"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedElement=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("create new Element // neues Element erstellen")]),e._v(" "),e._l(e.gridFrom.gridElements,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e.i18nService.getTranslation(t.label)||e.i18nService.translate("(empty element) // (leeres Element)")))])}))],2)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.selectedElement||!e.i18nService.getTranslation(e.selectedElement.label),expression:"!selectedElement || !i18nService.getTranslation(selectedElement.label)"}],staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementLabel","data-i18n":""}},[e._v("Label of new element // Label des neuen Elements")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newElementLabel[e.i18nService.getBrowserLang()],expression:"newElementLabel[i18nService.getBrowserLang()]"}],staticClass:"four columns",attrs:{type:"text",id:"elementLabel",maxlength:"35"},domProps:{value:e.newElementLabel[e.i18nService.getBrowserLang()]},on:{input:function(t){t.target.composing||e.$set(e.newElementLabel,e.i18nService.getBrowserLang(),t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedElement&&e.selectedElement.actions.filter((function(t){return t.modelName===e.GridActionNavigate.getModelName()})).length>0,expression:"selectedElement && selectedElement.actions.filter(e => e.modelName === GridActionNavigate.getModelName()).length > 0"}],staticClass:"row"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "),e._m(1)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Rn._withStripped=!0;var Mn={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:ee,imageUtil:ie,i18nService:U}},methods:{save:function(){var e=this;this.saveInternal().then((function(){e.$emit("reload"),e.$emit("close")}))},saveInternal:function(){var e=this.selectedElement;if(!e){var t=new He(this.gridFrom).getNewXYPos();e=new Ae({label:this.newElementLabel,x:t.x,y:t.y}),this.gridFrom.gridElements.push(e)}return e.label=e.label||this.newElementLabel,e.actions=e.actions.filter((function(e){return e.modelName!==ee.getModelName()})),e.actions.push(new ee({toGridId:this.gridTo.id})),Wt.saveGrid(this.gridFrom)}},mounted:function(){var e=this;this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),Wt.getGrid(this.gridFromProp.id).then((function(t){e.gridFrom=JSON.parse(JSON.stringify(t)),U.initDomI18n()}))},updated:function(){U.initDomI18n()}},Pn=(n(79),_n(Mn,Rn,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Link grids // Grids verknüpfen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{attrs:{"data-i18n":""}},[t("span",[t("b",[this._v("Hint: ")]),this._v(" This element already navigates to another grid. This navigation will be overwritten.")]),this._v(" "),t("span",[t("b",[this._v("Hinweis: ")]),this._v(" Dieses Element navigiert bereits zu einem anderen Grid. Diese Navigation wird überschrieben.")])])}],!1,null,"00ff350d",null));Pn.options.__file="src/vue-components/modals/gridLinkModal.vue";var Gn=Pn.exports,Un=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"selectGrid","data-i18n":""}},[e._v("Select grid // Grid auswählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",attrs:{id:"selectGrid"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]},e.selectedGridChanged]}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("All grids // Alle Grids")]),e._v(" "),e._l(e.graphList,(function(t){return n("option",{domProps:{value:t.grid}},[e._v(e._s(e._f("extractTranslation")(t.grid.label)))])}))],2),e._v(" "),n("div",{staticClass:"four columns"},[e.selectedGrid&&e.selectedGrid.thumbnail?n("img",{attrs:{src:e.selectedGrid.thumbnail.data}}):e._e()])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedGrid&&e.allChildren&&e.allChildren.length>0,expression:"selectedGrid && allChildren && allChildren.length > 0"}],staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.exportConnected,expression:"options.exportConnected"}],attrs:{id:"exportConnected",type:"checkbox"},domProps:{checked:Array.isArray(e.options.exportConnected)?e._i(e.options.exportConnected,null)>-1:e.options.exportConnected},on:{change:function(t){var n=e.options.exportConnected,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"exportConnected",n.concat([null])):r>-1&&e.$set(e.options,"exportConnected",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"exportConnected",a)}}}),e._v(" "),n("label",{attrs:{for:"exportConnected"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Export all child grids // Alle untergeordneten Grids exportieren")]),e._v(" "),n("span",[e._v("("+e._s(e.allChildren?e.allChildren.length:0)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("grids // Grids")]),e._v(")")])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showLinks,expression:"options.showLinks"}],attrs:{id:"showLinks",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showLinks)?e._i(e.options.showLinks,null)>-1:e.options.showLinks},on:{change:function(t){var n=e.options.showLinks,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showLinks",n.concat([null])):r>-1&&e.$set(e.options,"showLinks",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showLinks",a)}}}),e._v(" "),n("label",{attrs:{for:"showLinks","data-i18n":""}},[e._v("Insert links between pages // Verknüpfungen zwischen Seiten anzeigen")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.printBackground,expression:"options.printBackground"}],attrs:{id:"printBackground",type:"checkbox"},domProps:{checked:Array.isArray(e.options.printBackground)?e._i(e.options.printBackground,null)>-1:e.options.printBackground},on:{change:function(t){var n=e.options.printBackground,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"printBackground",n.concat([null])):r>-1&&e.$set(e.options,"printBackground",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"printBackground",a)}}}),e._v(" "),n("label",{attrs:{for:"printBackground","data-i18n":""}},[e._v("Print background color // Hintergrundfarbe drucken")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showRegister,expression:"options.showRegister"}],attrs:{id:"showRegister",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showRegister)?e._i(e.options.showRegister,null)>-1:e.options.showRegister},on:{change:function(t){var n=e.options.showRegister,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showRegister",n.concat([null])):r>-1&&e.$set(e.options,"showRegister",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showRegister",a)}}}),e._v(" "),n("label",{attrs:{for:"showRegister","data-i18n":""}},[e._v("Print index at side edge // Griffregister am Seitenrand drucken")])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download PDF // PDF herunterladen")])])])])])])])])};Un._withStripped=!0;var Fn={},$n=null,Vn=5,jn=8,Bn=3,Yn=1,Hn=1,Wn=.8;function zn(e,t,n){var i=[];t=new He(t);var a=n.showRegister&&n.pages>1?10:0,r=!1!==n.showFooter?jn:0,o=(297-2*Vn)/t.getWidth(),s=(210-2*Vn-r-a)/t.getHeight();if(r>0){var l=210-Vn-a,c=.4*r/.352778;e.setTextColor(0),e.setFontSize(c);var u=U.translate("Printed by AsTeRICS Grid, https://grid.asterics.eu // Gedruckt mit AsTeRICS Grid, https://grid.asterics.eu"),d=U.getTranslation(t.label),f=n.idParentsMap[t.id][0];if(n.showLinks&&f){d=JSON.stringify(n.idParentsMap[t.id].slice(0,5))+" => "+d;var p=e.getTextWidth(d);e.link(148.5-p/2,l-.4*r,p,.4*r,{pageNumber:f})}var h=(n.idPageMap[t.id]||1)+" / "+(Object.keys(n.idPageMap).length||1);e.text(u,Vn+Yn,l,{baseline:"bottom",align:"left"}),e.text(d,148.5,l,{baseline:"bottom",align:"center"}),e.text(h,297-Vn-Yn,l,{baseline:"bottom",align:"right"})}if(a>0){var v=1,m=n.pages;n.pages>30&&(v=Math.ceil(n.pages/30),m=Math.ceil(n.pages/v)),e.setFillColor(255,255,255),e.setDrawColor(0),e.roundedRect(0,210-a,297,a,0,0),e.setFontSize(13);for(var g=297/m,_=0;_.5*i||d>u?o-=s:o+=s}else c.w>i?o-=s:o+=s;s/=2}return Math.floor(Math.min(o,n))}(e,o,(s?i*(1-Wn):i/2)/.352778*.8,l,i-2*Bn,!s);e.setTextColor(0,0,0),e.setFontSize(c);var u=e.getTextDimensions(o),d=Math.ceil(u.w/l),f=s?i-2*Yn:(i-u.h*d)/2;e.text(o,a+n/2,r+f,{baseline:s?"bottom":"top",align:"center",maxWidth:l})}(e,t,a,r,l,c),i.push(function(e,t,n,i,a,r){if(!t||!t.image||!t.image.data||0!==t.image.data.indexOf("data:"))return Promise.resolve();return t.image.getDimensions().then(function(){var o=K()(W.a.mark((function o(s){var l,c,u,d,f,p,h,v,m,g,_,y,b,E;return W.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(E=function(n){e.addImage(t.image.data,n,g,_,p,h)},l=t.image.getImageType(),c=U.getTranslation(t.label)?Wn:1,f=(u=n-2*Hn)/(d=(i-2*Hn)*c),p=u,h=d,v=0,m=0,s.ratio>=f?(isNaN(s.ratio)||(h=p/s.ratio),m=(d-h)/2):(isNaN(s.ratio)||(p=h*s.ratio),v=(u-p)/2),g=a+Hn+v,_=r+Hn+m,l!==se.IMAGE_TYPES.PNG){o.next=15;break}E("PNG"),o.next=25;break;case 15:if(l!==se.IMAGE_TYPES.JPEG){o.next=19;break}E("JPEG"),o.next=25;break;case 19:if(l!==se.IMAGE_TYPES.SVG){o.next=25;break}return y=p/.084666667,o.next=23,ie.base64SvgToBase64Png(t.image.data,y);case 23:b=o.sent,e.addImage(b,l,g,_,p,h);case 25:return o.abrupt("return",Promise.resolve());case 26:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}())}(e,t,a,r,l,c).then((function(){if(n.showLinks&&n.idPageMap[t.getNavigateGridId()]){var i=n.idPageMap[t.getNavigateGridId()],o=Math.max(a/10,7),s=a-o-1;if(e.setDrawColor(255),e.setFillColor(90,113,122),e.roundedRect(l+s,c+1,o,o,1,1,"FD"),e.link(l,c,a,r,{pageNumber:i}),i){var u=.6*o/.352778;e.setTextColor(255,255,255),e.setFontSize(u),e.text(i+"",l+s+o/2,c+1+o/2,{baseline:"middle",align:"center",maxWidth:o})}}return Promise.resolve()})))})),Promise.all(i)}Fn.initPrintHandlers=function(){window.addEventListener("beforeprint",(function(){$n&&($("#grid-container").width("27.7cm"),$("#grid-container").height("19cm"),$n.autosize())})),window.addEventListener("afterprint",(function(){$n&&($("#grid-container").width(""),$("#grid-container").height(""),$n.autosize())}))},Fn.setGridInstance=function(e){$n=e},Fn.gridsToPdf=function(){var e=K()(W.a.mark((function e(t,i){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.e(5).then(n.bind(null,637)).then(function(){var e=K()(W.a.mark((function e(n){var a,r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(i=i||{}).idPageMap={},i.idParentsMap={},t.forEach((function(e,t){i.idPageMap[e.id]=t+1})),t.forEach((function(e){i.idParentsMap[e.id]=i.idParentsMap[e.id]||[],e.gridElements.forEach((function(t){var n=(t=new Ae(t)).getNavigateGridId();n&&(i.idParentsMap[n]=i.idParentsMap[n]||[],i.idParentsMap[n].push(i.idPageMap[e.id]))}))})),a=new n.jsPDF({orientation:"landscape",compress:!0}),i.pages=t.length,r=0;case 8:if(!(re.gridsData.length/2)){i.next=4;break}return i.abrupt("return",Wt.getGrids(!0,!0));case 4:a=[],r=0;case 6:if(!(r0},saveGridLabel:function(){this.selectedGraphElement.grid.label=JSON.parse(JSON.stringify(this.newLabel)),Wt.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show:function(e){Fo.toGrid(e)},edit:function(e){Fo.toEditGrid(e)},clone:function(e){var t=this;Wt.getGrid(e).then((function(e){var n=e.clone();Wt.saveGrid(n).then((function(){t.reload(n.id)}))}))},exportToFile:function(e){e?Wt.downloadSingleGrid(e):Wt.downloadBackup()},exportToPdf:function(e){Wt.getGrid(e).then((function(e){Fn.gridsToPdf([e])}))},importFromFile:function(e){this.importFromFileInternal(e,!1)},importBackupFromFile:function(e){var t=e.target&&e.target.files[0]&&e.target.files[0]?e.target.files[0].name:"";confirm(U.translate("CONFIRM_IMPORT_BACKUP",t))?this.importFromFileInternal(e,!0):this.resetFileInput(e)},reload:function(e){var t=this;return Wt.getMetadata().then((function(e){return t.metadata=JSON.parse(JSON.stringify(e)),Wt.getGrids()})).then((function(n){t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=Oe.getGraphList(t.grids,t.metadata.globalGridId);var i=e||t.metadata.lastOpenedGridId;return t.setSelectedGraphElement(t.graphList.filter((function(e){return e.grid.id===i}))[0]||t.graphList[0],!0),Promise.resolve()}))},onPullUpdate:function(){var e=this.selectedGraphElement?this.selectedGraphElement.grid.id:null;this.reload(e)},reset:function(){var e=this;confirm(U.translate("CONFIRM_RESET_DB"))&&(this.showLoading=!0,Sn.showProgressBar(0,{header:U.translate("Reset to default gridset // Zurücksetzen auf Standard-Gridset"),text:U.translate("Deleting grids // Grids werden gelöscht")}),Wt.deleteAllGrids().then((function(){return Sn.showProgressBar(50,{text:U.translate("Importing grids // Grids werden importiert")}),Wt.importDefaultGridset()})).then((function(){Sn.showProgressBar(100),e.reload()})))},deleteAll:function(){var e=this;confirm(U.translate("Do you really want to delete all grids? This operation cannot be undone! // Möchten Sie wirklich alle Grids löschen? Diese Aktion kann nicht rückgängig gemacht werden!"))&&(this.showLoading=!0,Wt.deleteAllGrids().then((function(){e.reload()})))},setGlobalGridActive:function(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,Wt.saveMetadata(this.metadata)},resetGlobalGrid:function(e){var t=this;(e||confirm(U.translate("Do you really want to reset the global grid to default? // Möchten Sie das globale Grid wirklich zurücksetzen?")))&&Wt.getGlobalGrid(!0).then((function(e){return e?Wt.deleteGrid(e.id):Promise.resolve()})).then((function(){var e=Oe.generateGlobalGrid(t.grids[0].id);return t.metadata.globalGridId=e.id,t.metadata.globalGridActive=!0,Wt.saveGrid(e)})).then((function(){return Wt.saveMetadata(t.metadata)})).then((function(){t.reload()}))},importFromFileInternal:function(e,t){var n=this,i=e.target.files[0];i&&i.name&&(this.showLoading=!0,Sn.showProgressBar(0,{header:U.translate("Importing grids // Grids werden importiert"),text:U.translate("Reading file // Datei wird gelesen")}),Wt.importGridsFromFile(i,t,(function(e,t){Sn.showProgressBar(e,{text:t})})).then((function(){n.resetFileInput(e),n.reload()})))},resetFileInput:function(e){var t=a()(e.target);t.wrap("").closest("form").get(0).reset(),t.unwrap()}},computed:{headerDetails:function(){return this.selectedGraphElement?U.translate("Details for grid {?} // Details für Grid {?}",'"'.concat(U.getTranslation(this.selectedGraphElement.grid.label),'"')):""},connectedGridsOptionLabel:function(){return this.selectedGraphElement?U.translate('Grids connected with "{?}" // Grid verknüpft mit "{?}"',U.getTranslation(this.selectedGraphElement.grid.label)):""},hasGlobalGrid:function(){var e=this;return!(!this.grids||!this.metadata)&&(this.metadata.globalGridId&&!!this.grids.filter((function(t){return t.id===e.metadata.globalGridId}))[0])},graphElemsToShow:function(){if(!this.graphList||!this.selectedGraphElement)return[];switch(this.selectValue){case this.selectValues.CONNECTED_GRIDS:return this.selectedGraphElement.allRelatives;case this.selectValues.NOT_REACHABLE_GRIDS:return this.graphList.filter((function(e){return 0===e.parents.length}));case this.selectValues.ALL_GRIDS:return this.graphList}}},created:function(){a()(document).on(s.EVENT_DB_PULL_UPDATED,this.onPullUpdate)},mounted:function(){var e=this;qn=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then((function(){e.reinitContextMenu(),U.initDomI18n()}))},updated:function(){U.initDomI18n()},beforeDestroy:function(){a()(document).off(s.EVENT_DB_PULL_UPDATED,this.onPullUpdate),a.a.contextMenu("destroy")}},Qn=(n(83),_n(Zn,en,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"small",attrs:{tabindex:"32",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("label",{attrs:{for:"actionGroup","data-i18n":""}},[this._v("Actions // Aktionen")])])}],!1,null,"dd9feaca",null));Qn.options.__file="src/vue-components/views/allGridsView.vue";var ei=Qn.exports,ti=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.gridData?n("div",{staticClass:"box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{staticClass:"left"}),e._v(" "),n("button",{staticClass:"spaced small left",attrs:{tabindex:"30",title:"Back"},on:{click:e.back}},[n("i",{staticClass:"fas fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing off // Bearbeiten aus")])]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"spaced btn-group"},[n("button",{staticClass:"small",attrs:{tabindex:"31",title:"Undo",disabled:!e.canUndo||e.doingUndoRedo},on:{click:e.undo}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Undo // Rückgängig")])]),e._v(" "),n("button",{staticClass:"small spaced",attrs:{tabindex:"32",title:"Redo",disabled:!e.canRedo||e.doingUndoRedo},on:{click:e.redo}},[n("i",{staticClass:"fas fa-redo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Redo // Wiederherstellen")])])])],1),e._v(" "),n("div",[e.showEditModal?n("edit-grid-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-instance":e.getGridInstance(),"grid-data-id":e.gridData.id},on:{close:function(t){e.showEditModal=!1},mark:e.markElement,actions:function(t){e.editElementId=t,e.showActionsModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showMultipleModal?n("add-multiple-modal",{attrs:{"grid-data":e.gridData,"grid-instance":e.getGridInstance()},on:{close:function(t){e.showMultipleModal=!1}}}):e._e()],1),e._v(" "),n("div",[e.showActionsModal?n("edit-actions-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-id-param":e.gridData.id},on:{close:function(t){e.showActionsModal=!1},reload:e.reload,edit:function(t){e.showEditModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showDimensionsModal?n("grid-dimension-modal",{attrs:{"grid-data-param":e.gridData,"is-global-grid":e.metadata.globalGridId===e.gridData.id},on:{close:function(t){e.showDimensionsModal=!1},save:e.setDimensions}}):e._e()],1),e._v(" "),n("div",[e.showMoveModal?n("element-move-modal",{attrs:{"grid-id":e.gridData.id,"grid-element-id":e.editElementId},on:{close:function(t){e.showMoveModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",[e.showTranslateModal?n("grid-translate-modal",{attrs:{"grid-data-id":e.gridData.id},on:{close:function(t){e.showTranslateModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",{staticClass:"row content"},[e.showGrid?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}}),e._v(" "),e._m(1)])]):e._e()};ti._withStripped=!0;var ni={},ii={},ai={};ni.setState=function(e,t){ii[e]!==t&&(ii[e]=t,ai[e]=ai[e]||[],ai[e].forEach((function(e){e(t)})))},ni.getState=function(e){return ii[e]},ni.onStateChanged=function(e,t){ai[e]=ai[e]||[],ai[e].push(t)},ni.clearListeners=function(e){e?ai[e]=[]:ai={}};var ri={};ri.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",ri.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";var oi=D.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",si=[],li=JSON.parse('[{"name":"UK English Female","lang":"en-GB"},{"name":"UK English Male","lang":"en-GB"},{"name":"US English Female","lang":"en-US"},{"name":"US English Male","lang":"en-US"},{"name":"Arabic Male","lang":"ar-SA"},{"name":"Arabic Female","lang":"ar-SA"},{"name":"Armenian Male","lang":"hy-AM"},{"name":"Australian Female","lang":"en-AU"},{"name":"Australian Male","lang":"en-AU"},{"name":"Bangla Bangladesh Female","lang":"bn-BD"},{"name":"Bangla Bangladesh Male","lang":"bn-BD"},{"name":"Bangla India Female","lang":"bn-IN"},{"name":"Bangla India Male","lang":"bn-IN"},{"name":"Brazilian Portuguese Female","lang":"pt-BR"},{"name":"Chinese Female","lang":"zh-CN"},{"name":"Chinese Male","lang":"zh-CN"},{"name":"Chinese (Hong Kong) Female","lang":"zh-HK"},{"name":"Chinese (Hong Kong) Male","lang":"zh-HK"},{"name":"Chinese Taiwan Female","lang":"zh-TW"},{"name":"Chinese Taiwan Male","lang":"zh-TW"},{"name":"Czech Female","lang":"cs-CZ"},{"name":"Danish Female","lang":"da-DK"},{"name":"Deutsch Female","lang":"de-DE"},{"name":"Deutsch Male","lang":"de-DE"},{"name":"Dutch Female","lang":"nl-NL"},{"name":"Dutch Male","lang":"nl-NL"},{"name":"Estonian Male","lang":"et-EE"},{"name":"Filipino Female","lang":"fil-PH"},{"name":"Finnish Female","lang":"fi-FI"},{"name":"French Female","lang":"fr-FR"},{"name":"French Male","lang":"fr-FR"},{"name":"French Canadian Female","lang":"fr-CA"},{"name":"French Canadian Male","lang":"fr-CA"},{"name":"Greek Female","lang":"el-GR"},{"name":"Hindi Female","lang":"hi-IN"},{"name":"Hindi Male","lang":"hi-IN"},{"name":"Hungarian Female","lang":"hu-HU"},{"name":"Indonesian Female","lang":"id-ID"},{"name":"Indonesian Male","lang":"id-ID"},{"name":"Italian Female","lang":"it-IT"},{"name":"Italian Male","lang":"it-IT"},{"name":"Japanese Female","lang":"ja-JP"},{"name":"Japanese Male","lang":"ja-JP"},{"name":"Korean Female","lang":"ko-KR"},{"name":"Korean Male","lang":"ko-KR"},{"name":"Latin Male","lang":"la"},{"name":"Nepali","lang":"ne-NP"},{"name":"Norwegian Female","lang":"nb-NO"},{"name":"Norwegian Male","lang":"nb-NO"},{"name":"Polish Female","lang":"pl-PL"},{"name":"Polish Male","lang":"pl-PL"},{"name":"Portuguese Female","lang":"pt-BR"},{"name":"Portuguese Male","lang":"pt-BR"},{"name":"Romanian Female","lang":"ro-RO"},{"name":"Russian Female","lang":"ru-RU"},{"name":"Sinhala","lang":"si-LK"},{"name":"Slovak Female","lang":"sk-SK"},{"name":"Spanish Female","lang":"es-ES"},{"name":"Spanish Latin American Female","lang":"es-MX"},{"name":"Spanish Latin American Male","lang":"es-MX"},{"name":"Swedish Female","lang":"sv-SE"},{"name":"Swedish Male","lang":"sv-SE"},{"name":"Tamil Female","lang":"hi-IN"},{"name":"Tamil Male","lang":"hi-IN"},{"name":"Thai Female","lang":"th-TH"},{"name":"Thai Male","lang":"th-TH"},{"name":"Turkish Female","lang":"tr-TR"},{"name":"Turkish Male","lang":"tr-TR"},{"name":"Ukrainian Female","lang":"uk-UA"},{"name":"Vietnamese Female","lang":"vi-VN"},{"name":"Vietnamese Male","lang":"vi-VN"},{"name":"Afrikaans Male","lang":"af-ZA"},{"name":"Albanian Male","lang":"sq-AL"},{"name":"Bosnian Male","lang":"bs"},{"name":"Catalan Male","lang":"ca-ES"},{"name":"Croatian Male","lang":"hr-HR"},{"name":"Esperanto Male","lang":"eo"},{"name":"Icelandic Male","lang":"is-IS"},{"name":"Latvian Male","lang":"lv-LV"},{"name":"Macedonian Male","lang":"mk-MK"},{"name":"Moldavian Female","lang":"md"},{"name":"Montenegrin Male","lang":"me"},{"name":"Serbian Male","lang":"sr-RS"},{"name":"Serbo-Croatian Male","lang":"hr-HR"},{"name":"Swahili Male","lang":"sw-KE"},{"name":"Welsh Male","lang":"cy"},{"name":"Fallback UK Female","lang":"en-GB"}]');function ci(e){var t=si.filter((function(t){return t.name===e}));return t.length>0?t:null}function ui(e,t,n,i){-1===si.map((function(e){return e.name})).indexOf(e)&&si.push({name:e,lang:t.substring(0,2),type:n,ref:i})}function di(){si.sort((function(e,t){return e.type===ri.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===ri.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name)}))}ri.speak=function(e,t,n){var i=null,a="string"==typeof e;if(e&&(a||0!==Object.keys(e).length)){if(a)i=e;else{var r=e[t=function(e){var t=ci(e);return t&&t[0]?t[0].lang:null}(oi)||t]||U.getTranslation(e,null,!0);i=r.text?r.text:r,t=t||r.lang}ri.stopSpeaking(),t=t||U.getBrowserLang();var o=ci(n)||ci(oi)||function(e){return si.filter((function(t){return t.lang.substring(0,2)===e}))}(t),l=o.filter((function(e){return e.type===ri.VOICE_TYPE_NATIVE})),c=o.filter((function(e){return e.type===ri.VOICE_TYPE_RESPONSIVEVOICE}));if(ri.nativeSpeechSupported()&&l.length>0){var u=new SpeechSynthesisUtterance(i);u.voice=l[0].ref,log.debug("used voice: "+u.voice.name),window.speechSynthesis.speak(u)}else c.length>0&&responsiveVoice.speak(i,c[0].name);d(),setTimeout((function(){d()}),700)}function d(){ri.isSpeaking()&&ni.setState(s.STATE_ACTIVATED_TTS,!0)}},ri.speakLabel=function(e,t){e&&t&&Wt.getGridElement(e,t).then((function(e){ri.speak(U.getTranslation(e.label))}))},ri.stopSpeaking=function(){ri.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},ri.isSpeaking=function(){return ri.nativeSpeechSupported()&&window.speechSynthesis.speaking||responsiveVoice.isPlaying()},ri.getVoicesLangs=function(){var e=si.map((function(e){return e.lang.substring(0,2)}));return U.getAllLanguages().filter((function(t){return-1!==e.indexOf(t.code)}))},ri.getVoices=function(){return si},ri.setPreferredVoiceName=function(e){oi=e,D.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},ri.getPreferredVoiceName=function(){return oi},ri.nativeSpeechSupported=function(){return!("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis||!window.speechSynthesis.getVoices)},ri.nativeSpeechSupported()&&(window.speechSynthesis.getVoices(),setTimeout((function(){window.speechSynthesis.getVoices().forEach((function(e){ui(e.name,e.lang,ri.VOICE_TYPE_NATIVE,e)})),di()}),100)),li.forEach((function(e){ui(e.name,e.lang,ri.VOICE_TYPE_RESPONSIVEVOICE)})),di();var fi={},pi=2,hi=1,vi={lastPlayType:we.playTypes.YT_PLAY_PLAYLIST,lastData:"https://www.youtube.com/watch?v=5ffLB4a9APc&list=PL0UXHkT03dGrIHldlEKR0ZWfNMkShuTNz",lastVideoId:null,lastTimes:{},lastPlaylistIndexes:{},dataApiCalls:{},muted:!1,volume:100},mi=!1,gi=null,_i=D.getYTState()||JSON.parse(JSON.stringify(vi)),yi=!1,bi=null,Ei=null,Ci=null;function wi(e,t){return void 0!==e?e:_i.lastTimes[t]}function Ti(e,t){var n=null;try{n=new URL(e)}catch(e){}return n?n.searchParams.get(t):null}function Ai(){if(gi){var e=fi.getCurrentVideoId(),t=gi.getPlaylistIndex();e&&(_i.lastTimes[e]=gi.getCurrentTime()),t>=0&&_i.lastPlayType!==we.playTypes.YT_PLAY_VIDEO&&(_i.lastPlaylistIndexes[_i.lastData]=t)}JSON.stringify(_i).length>1048576&&(_i.lastPlaylistIndexes={},_i.lastTimes={},_i.dataApiCalls={}),D.saveYTState(_i)}function Si(){Ci=Sn.setTooltip(U.translate("Error on playing YouTube video. Please check internet connection. // Fehler bei der Wiedergabe des YouTube Videos. Bitte Internet-Verbindung überprüfen."),{timeout:3e4,msgType:"warn"})}fi.doAction=function(e){if(e.performAfterNav)fi.setActionAfterNavigate(e);else switch(e.action){case we.actions.YT_PLAY:fi.play(e);break;case we.actions.YT_PAUSE:fi.pause();break;case we.actions.YT_TOGGLE:fi.toggle(e);break;case we.actions.YT_RESTART:fi.restart(e);break;case we.actions.YT_STOP:fi.stop();break;case we.actions.YT_STEP_FORWARD:fi.seekToRelative(e.stepSeconds);break;case we.actions.YT_STEP_BACKWARD:fi.seekToRelative(-e.stepSeconds);break;case we.actions.YT_NEXT_VIDEO:fi.nextVideo();break;case we.actions.YT_PREV_VIDEO:fi.previousVideo();break;case we.actions.YT_ENTER_FULLSCREEN:fi.enterFullscreen();break;case we.actions.YT_VOLUME_UP:fi.volumeUp(e.stepVolume);break;case we.actions.YT_VOLUME_DOWN:fi.volumeDown(e.stepVolume);break;case we.actions.YT_VOLUME_MUTE:fi.volumeToggleMute()}},fi.play=function(e,t){var n=Promise.resolve();Sn.clearTooltip(Ci),mi||(n=function(){if(mi)return Promise.resolve();a()(document).on(s.EVENT_GRID_RESIZE,(function(){gi&&setTimeout((function(){var e=a()(".yt-container")[0].getBoundingClientRect();gi.setSize(e.width,e.height)}),400)})),a()(document).on(s.EVENT_USER_CHANGED,(function(){_i=D.getYTState()||JSON.parse(JSON.stringify(vi))})),window.addEventListener("beforeunload",(function(e){Ai()}));var e=document.createElement("script"),t=document.createElement("script");document.body.appendChild(e),document.body.appendChild(t),e.onerror=function(e){log.warn("error on loading YouTube Iframe API script"),Si()},t.onerror=function(e){log.warn("error on loading YouTube data API script")};var n=new Promise((function(e){window.onYouTubeIframeAPIReady=function(){mi=!0,e()}})),i=new Promise((function(e){t.addEventListener("load",(function(){e()}))})).then((function(){return new Promise((function(e){gapi.load("client",e)}))})).then((function(){return gapi.client.setApiKey("AIzaSyCDOUROr3UWS8K-WJNlAG21yBTOsveWQn8"),gapi.client.load("https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest")})).catch((function(e){return log.error("Error loading GAPI client for API",e),Promise.resolve()}));return e.src="https://www.youtube.com/iframe_api",t.src="https://apis.google.com/js/api.js",Promise.all([i,n])}()),n.then((function(){function n(){switch(e.playType){case we.playTypes.YT_PLAY_VIDEO:var n=fi.getVideoId(e.data);if(!n)return;if(n===fi.getCurrentVideoId())return void gi.playVideo();_i.lastVideoId=n,gi.loadVideoById(n,wi(t,n));break;case we.playTypes.YT_PLAY_SEARCH:yi=!0,(o="gapi.client.youtube.search.list",s={maxResults:100,q:e.data,type:"video",videoEmbeddable:!0},new Promise((function(e){l=l||9e5;var t=o.split("."),n=window;if(t.forEach((function(e){n&&(n=n[e])})),n){_i.dataApiCalls=_i.dataApiCalls||{};var i=o+JSON.stringify(s),a=_i.dataApiCalls[i];if(a&&(new Date).getTime()-a.time0},this.canRedo=function(){return t.length>0},this.updateGrid=function(n){return new Promise((function(i){Wt.getGrid(n.id).then((function(a){a.isEqual(n)?(log.debug("grid not updated, do noting"),i(!1)):(e.push(JSON.parse(JSON.stringify(a))),t=[],Wt.saveGrid(n).then((function(){i(!0)})))}))}))},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return Wt.getGrid(n.id).then((function(e){t.push(JSON.parse(JSON.stringify(e))),Wt.saveGrid(n)})),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return Wt.getGrid(n.id).then((function(t){e.push(JSON.parse(JSON.stringify(t))),Wt.saveGrid(n)})),n}}}function Mi(e,t,n){var i=this,r=(e=e,t=t,!1),o=!1,l=null,c=null,u=null,d=null,f=null,p=null,h=null,v=null,m=null,g=new Ri,_=!1;function y(e){return _=!1,(m=new Promise((function(t){e?(b(n,e),E(p).then((function(){t()}))):Wt.getGrid(n.gridId).then((function(e){b(n,e),E(p).then((function(){t()}))}))}))).then((function(){_=!0})),m}function b(e,t){e&&(l=e.gridId||l,r=null!=e.enableResizing?e.enableResizing:r,o=e.dragAndDrop),h=(p=t).rowCount,v=p.minColumnCount}function E(l){var d=[];return n.dragAndDrop||(l.gridElements=l.gridElements.filter((function(e){return!e.hidden})),d.push(Wt.getGlobalGrid().then((function(e){if(e){var t=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,i=1,a=1;1===e.getHeight()&&(a=t*p.rowCount/(1-t),i=1/(p.rowCount*t)-1/p.rowCount,a>=1?(i=1,a=Math.round(a)):(a=1,i=Math.round(i)));var r=Oe.getOffset(e),o=e.getWidth()-r.x,s=p.getWidthWithBounds();e.gridElements.forEach((function(e){e.width*=s,e.x*=s,0===e.y&&(e.height*=a)})),p.gridElements.forEach((function(e){e.width*=o,e.x*=o,e.x+=r.x*s,e.y+=r.y*a+e.y*(i-1),e.height*=i})),p.rowCount*=i,p.rowCount+=r.y*a,h=p.rowCount,p.gridElements=e.gridElements.concat(p.gridElements)}return Promise.resolve()})))),Promise.all(d).then((function(){return Ni.initWithElements(p.gridElements,o),At.initWithElements(p.gridElements),a()(e).empty(),a()(e).append(te.getGridBase(l.id)),u=a()("#"+l.id),l.gridElements.forEach((function(e){u.append(e.toHTML())})),u.gridList({lanes:h,minColumns:v,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:o},{start:w,stop:A}),c=u.data("_gridList"),l.hasSetPositions()||(u.gridList("resize",h),i.toGridData().then((function(e){p=e,Wt.updateGrid(p.id,p)}))),function(){var e=[];r&&e.push(a()(t).resizable(C()));return a()(document).on(s.EVENT_GRID_RESIZE,(function(){i.autosize()})),Promise.all(e)}().then((function(){i.autosize(200)})),Promise.resolve()}))}function C(){var e=c._cellHeight,t=c._cellWidth;return{autoHide:!1,handles:"se",disabled:!r,start:w,stop:function(e,t){var n=t.element.parent(),i=t.element.attr("id");new Promise((function(e){var t=n.attr("data-img-id");t?Wt.getImage(t).then((function(t){if(t){var r=a()("#"+i)[0].getBoundingClientRect().width;ie.convertBase64(t.data,r).then((function(t){n.attr("data-img",t),n.children().children()[0].style.backgroundImage='url("'+t+'")',e()}))}else e()})):e()})).then((function(){A()}))},resize:function(n,i){var a=i.element.parent();a.css("z-index",1);var r=Math.max(Math.round(i.element.width()/t),1),o=Math.max(Math.round(i.element.height()/e),1);o=o<=h?o:h,q.adaptFontSize(a),u.gridList("resizeItem",i.element.parent(),{w:r,h:o}),i.element.css("height",""),i.element.css("width","")}}}function w(){a.a.isFunction(d)&&d(p)}function T(){a.a.isFunction(f)&&setTimeout((function(){f(p)}),200)}function A(){return new Promise((function(e){i.toGridData().then((function(t){g.updateGrid(t).then((function(n){n&&(p=t,i.autosize(),T()),e()}))}))}))}i.autosize=function(e){e=e||0,q.adaptFontSizeForGridElements(),setTimeout((function(){u.gridList("autosize"),setTimeout((function(){if(a()("#grid-layout-background-vertical")[0]){var e=c._cellWidth,t=c._cellHeight;a()("#grid-layout-background-vertical").css("margin-left","".concat(e-5,"px")),a()("#grid-layout-background-vertical").css("background-size","".concat(e,"px ").concat(e,"px")),a()("#grid-layout-background-horizontal").css("margin-top","".concat(t-5,"px")),a()("#grid-layout-background-horizontal").css("background-size","".concat(t,"px ").concat(t,"px")),a()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){q.adaptFontSizeForGridElements()}),200),r&&a()(t).resizable(C())}),e)},i.enableElementResizing=function(){a()(t).resizable("enable")},i.disableElementResizing=function(){a()(t).resizable("disable")},i.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(h=e,v=t,u.gridList("resize",h,t)),A()},i.removeElement=function(e){return w(),p.gridElements=p.gridElements.filter((function(t){return t.id!==e})),y(p).then((function(){return A()})).then((function(){return Promise.resolve(p)}))},i.duplicateElement=function(e){w();var t=p.gridElements.filter((function(t){return t.id===e}))[0].duplicate();p.gridElements.push(t),y(p).then((function(){c.resolveCollisions(t.id),A()}))},i.reinit=function(e){return w(),y(e).then((function(){T()})),m},i.fillGaps=function(){w(),u.gridList("fillGaps"),A()},i.undo=function(){if(g.canUndo()){var e=g.doUndo();y(p=new He(e)).then((function(){T()}))}},i.redo=function(){if(g.canRedo()){var e=g.doRedo();y(p=new He(e)).then((function(){T()}))}},i.updateGridWithUndo=function(e){return new Promise((function(t){g.updateGrid(e).then((function(e){e?(w(),y().then((function(){t(!0),T()}))):t(!1)}))}))},i.canUndo=function(){return g.canUndo()},i.canRedo=function(){return g.canRedo()},i.setLayoutChangedStartListener=function(e){d=e},i.setLayoutChangedEndListener=function(e){f=e},i.getCurrentGridId=function(){return p.id},i.toGridData=function(){return new Promise((function(e){var t=[];p.rowCount=h,p.minColumnCount=v,c.items.forEach((function(e){var n=e.$element.attr("data-id"),i=p.gridElements.filter((function(e){return e.id===n}))[0];i.x=e.x,i.y=e.y,i.height=e.h,i.width=e.w,t.push(i)})),p.gridElements=t,e(p)}))},i.getInitPromise=function(){return m},i.isInitialized=function(){return _},i.destroy=function(){a()(document).off(s.EVENT_GRID_RESIZE),i.setLayoutChangedEndListener(null),i.setLayoutChangedStartListener(null)},y()}Ni.initWithElements=function(e,t){Ii=[];var n=0,i=0;if(Li=null,e.forEach((function(e){if(e&&e.type===Ae.ELEMENT_TYPE_NORMAL){i++;var t=U.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===Ae.ELEMENT_TYPE_COLLECT){var a=JSON.parse(JSON.stringify(e));Li=Li||a.actions.reduce((function(e,t){var n=ve.getModelName()?t.dictionaryKey:null;return e||n}),null),Ii.push(a)}})),Oi=n/i,Ii.length>0)var a=setInterval((function(){$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(a),xi(),t||At.predict(ki,Li))}),100)},Ni.doAction=function(e){Di(e,"GridActionPredict")&&At.predict(ki,Li);var t=e.actions.filter((function(e){return e.modelName===ce.getModelName()}))[0],n=t&&t.speakLanguage?t.speakLanguage:U.getBrowserLang();ri.speak(ki,n)},Ni.doCollectElementActions=function(e){if(e){switch(e){case ge.COLLECT_ACTION_CLEAR:xi("");break;case ge.COLLECT_ACTION_REMOVE_WORD:var t=ki.trim().split(" ");t.pop();var n=t.join(" ");xi(""===n?"":n+" ");break;case ge.COLLECT_ACTION_REMOVE_CHAR:xi(ki.substring(0,ki.length-1));break;case ge.COLLECT_ACTION_COPY_CLIPBOARD:Dt.copyToClipboard(ki);break;case ge.COLLECT_ACTION_APPEND_CLIPBOARD:Dt.appendToClipboard(ki);break;case ge.COLLECT_ACTION_CLEAR_CLIPBOARD:Dt.copyToClipboard("");break;case ge.COLLECT_ACTION_TO_YOUTUBE:fi.setActionAfterNavigate(new we({action:we.actions.YT_PLAY,playType:we.playTypes.YT_PLAY_SEARCH,data:ki}))}At.predict(ki,Li)}},$(window).on(s.ELEMENT_EVENT_ID,(function(e,t){if(0!==Ii.length&&!Di(t,ge.getModelName())&&!Di(t,ee.getModelName())){if(!t.type||t.type===Ae.ELEMENT_TYPE_NORMAL){if(!U.getTranslation(t.label))return;var n=U.getTranslation(t.label),i=1===n.length&&Oi>.5?n.toLowerCase():n+" ";xi(ki+i),Ii.forEach((function(e){var t=Di(e,"GridActionPredict");t&&t.suggestOnChange&&At.predict(ki,Li)}))}if(t.type&&t.type===Ae.ELEMENT_TYPE_PREDICTION){var a=$("#".concat(t.id," .text-container span")).text();if(a)xi(At.applyPrediction(ki||"",a,Li)),Ii.forEach((function(e){var t=Di(e,"GridActionPredict");t&&t.suggestOnChange&&At.predict(ki,Li)}))}}}));var Pi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper",on:{dragenter:e.preventDefault,dragover:e.preventDefault,drop:e.imageDropped}},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.nextFromKeyboard():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[e.editElementId?n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n Edit grid item // Grid-Element bearbeiten\n ")]):e._e(),e._v(" "),e.editElementId?e._e():n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n New grid item // Neues Grid-Element\n ")])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputLabel"}},[e._v("Label")]),e._v(" "),e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.label[e.currentLang],expression:"gridElement.label[currentLang]"}],staticClass:"five columns",attrs:{type:"text",id:"inputLabel"},domProps:{value:e.gridElement.label[e.currentLang]},on:{input:function(t){t.target.composing||e.$set(e.gridElement.label,e.currentLang,t.target.value)}}}):e._e(),e._v(" "),n("button",{staticClass:"two columns",attrs:{label:e.i18nService.translate("Search for images // Suche nach Bildern")},on:{click:function(t){return e.search(e.gridElement.label[e.currentLang])}}},[n("i",{staticClass:"fas fa-search"})]),e._v(" "),n("div",{staticClass:"three columns"},[e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.hidden,expression:"gridElement.hidden"}],attrs:{type:"checkbox",id:"inputHidden"},domProps:{checked:Array.isArray(e.gridElement.hidden)?e._i(e.gridElement.hidden,null)>-1:e.gridElement.hidden},on:{change:function(t){var n=e.gridElement.hidden,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.gridElement,"hidden",n.concat([null])):r>-1&&e.$set(e.gridElement,"hidden",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.gridElement,"hidden",a)}}}):e._e(),e._v(" "),n("label",{attrs:{for:"inputHidden","data-i18n":""}},[e._v("Hide element // Element ausblenden")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputImg","data-i18n":""}},[e._v("Image // Bild")]),e._v(" "),n("button",{staticClass:"five columns file-input",attrs:{onclick:"document.getElementById('inputImg').click();"}},[n("input",{staticClass:"five columns",attrs:{type:"file",id:"inputImg",accept:"image/*"},on:{change:e.changedImg}}),e._v(" "),e._m(0)]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"five columns",on:{click:e.clearImage}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear image // Bild löschen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"img-preview offset-by-two four columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"show-mobile"},[n("i",{staticClass:"fas fa-image"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("no image chosen // kein Bild ausgewählt")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"hide-mobile"},[n("i",{staticClass:"fas fa-arrow-down"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("drop image here // Bild hierher ziehen")])]),e._v(" "),e.tempImage.data?n("img",{attrs:{id:"imgPreview",src:e.tempImage.data}}):e._e(),e._v(" "),e.tempImage.data&&e.tempImage.author?n("div",[e._v("\n by "),n("a",{attrs:{href:e.tempImage.authorURL,target:"_blank"}},[e._v(e._s(e.tempImage.author))])]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"img-preview five columns hide-mobile",staticStyle:{"margin-top":"50px"}},[e._m(1)])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputSearch","data-i18n":""}},[e._v("Image search // Bildsuche")]),e._v(" "),n("div",{staticClass:"five columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchText,expression:"searchText"}],attrs:{id:"inputSearch",type:"text",placeholder:e._f("translate")("SEARCH_IMAGE_PLACEHOLDER")},domProps:{value:e.searchText},on:{input:[function(t){t.target.composing||(e.searchText=t.target.value)},function(t){return e.searchInput(500,t)}]}}),e._v(" "),n("button",{attrs:{"aria-label":"Clear"},on:{click:e.clearSearch}},[n("i",{staticClass:"fas fa-times"})])]),e._v(" "),e._m(2)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"offset-by-two ten columns"},[e._l(e.searchResults,(function(t){return n("div",{staticClass:"inline"},[t.base64?n("img",{staticClass:"inline",attrs:{src:t.base64,title:"by "+t.author,width:"60",height:"60",role:"button"},on:{click:function(n){return e.setImage(t)}}}):e._e(),e._v(" "),t.base64||t.failed?e._e():n("span",{staticStyle:{position:"relative"}},[n("img",{staticClass:"inline",attrs:{src:"data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E",title:t.image_url,width:"60",height:"60"}}),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin",staticStyle:{position:"absolute",top:"-25px",left:"25px"}})])])})),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchResults&&e.searchResults.length>0&&e.hasNextChunk,expression:"searchResults && searchResults.length > 0 && hasNextChunk"}],staticClass:"inline"},[n("button",{staticStyle:{height:"60px",margin:"0 0 0 0.5em",padding:"0.7em",float:"left"},on:{click:e.searchMore}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("more // mehr")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.searchLoading,expression:"searchLoading"}]},[n("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("searching... // suche...")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[e._m(3),e._v(" "),e._m(4)]),n("br"),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[n("span"),e._v(" "),e._m(5)])],2)])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.gridElement?n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[e.editElementId?n("div",[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]):e._e(),e._v(" "),e.editElementId?e._e():n("div",[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.addNext()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, add another // OK, weiteres Element")])])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit actions // OK, Aktionen bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-bolt"})])])]):e._e()])])])])])};Pi._withStripped=!0;var Gi={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},Ui=10,Fi=1,$i=null,Vi=null,ji=!1;function Bi(e,t,n){n=n||Ui,t=t||1;var i=[];return new Promise((function(r){if(!e)return r([]);function o(a){a&&a.length&&0!==a.length||(a=[]);var o=t*n-n,s=o+n-1;ji=a.length>s+1;for(var l=o;l<=s;l++)a[l]&&function(){var e=JSON.parse(JSON.stringify(a[l])),t=ie.urlToBase64(e[Gi.PROP_IMAGE_URL]);e.promise=t,t.then((function(t){t?e.base64=t:e.failed=!0})),i.push(e)}();$i=e,r(i)}$i!==e?a.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){Vi=e,o(e)})):o(Vi)}))}Gi.query=function(e,t,n){return Fi=t=t||1,Ui=n||Ui,Bi(e,t,n)},Gi.nextChunk=function(){return Fi++,Bi($i,Fi,Ui)},Gi.hasNextChunk=function(){return ji};var Yi={props:["editElementIdParam","gridDataId","gridInstance"],data:function(){return{gridData:null,gridElement:null,metadata:null,originalGridElementJSON:null,elementW:null,editElementId:null,searchText:null,searchResults:null,searchLoading:!1,hasNextChunk:!0,tempImage:{},i18nService:U,currentLang:U.getBrowserLang()}},methods:{changedImg:function(){var e=this;e.clearImage(),ie.getBase64FromInput($("#inputImg")[0]).then((function(t){e.tempImage.data=t}))},imageDropped:function(e){var t=this;if(e.preventDefault(),this.clearImage(),e.dataTransfer.files&&e.dataTransfer.files.length>0)$("#inputImg")[0].files=e.dataTransfer.files,this.changedImg();else{var n=e.dataTransfer.getData("URL");ie.urlToBase64(n).then((function(e){t.tempImage.data=e}))}},setImage:function(e){this.tempImage.data=e.base64,this.tempImage.author=e.author,this.tempImage.authorURL=e.author_url},clearImage:function(){this.tempImage.data=this.tempImage.author=this.tempImage.authorURL=null},save:function(e){var t=this;this.saveInternal().then((function(n){t.$emit("close"),n&&!t.editElementId&&t.$emit("mark",t.gridElement.id),e&&t.$emit("actions",t.gridElement.id)}))},addNext:function(){var e=this;e.saveInternal().then((function(){e.initInternal(),$("#inputLabel").focus()}))},editNext:function(e){var t=this;t.editElementId&&t.saveInternal().then((function(){t.editElementId=new He(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#inputLabel").focus()}))},nextFromKeyboard:function(){this.editElementId?this.editNext():this.addNext()},saveInternal:function(){var e=this;return new Promise((function(t){function n(){if(e.gridElement&&e.originalGridElementJSON!==JSON.stringify(e.gridElement)){var n=Oe.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then((function(e){t(e)}))}else t(!1)}e.gridElement.image||(e.gridElement.image=new se),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,ie.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then((function(e){var t=new se({data:e});return Wt.saveImage(t)})).then((function(t){return e.gridElement.image.id=t,ie.convertBase64(e.tempImage.data,e.elementW)})).then((function(t){e.gridElement.image.data=t,n()}))):(e.tempImage.data||(e.gridElement.image=null),n())}))},initInternal:function(){var e=this,t=this;t.resetInternal(),t.tempImage=JSON.parse(JSON.stringify(new se)),Wt.getGrid(t.gridDataId).then((function(n){if(t.gridData=JSON.parse(JSON.stringify(n)),t.editElementId){var i=t.gridData.gridElements.filter((function(e){return e.id===t.editElementId}))[0];t.gridElement=JSON.parse(JSON.stringify(i)),i.image&&i.image.data&&(t.tempImage=JSON.parse(JSON.stringify(new se(i.image)))),t.elementW=$("#"+e.gridElement.id)[0].getBoundingClientRect().width,t.originalGridElementJSON=JSON.stringify(i)}else{var a=n.getNewXYPos();log.debug("creating element: x "+a.x+" / y "+a.y),t.gridElement=JSON.parse(JSON.stringify(new Ae({x:a.x,y:a.y})));var r=Math.round($("#grid-container")[0].getBoundingClientRect().height/n.rowCount);t.elementW=2*r,t.originalGridElementJSON=JSON.stringify(t.gridElement)}})),Wt.getMetadata().then((function(e){t.metadata=e}))},resetInternal:function(){this.gridElement=this.metadata=this.originalGridElementJSON=this.elementW=null},preventDefault:function(e){e.preventDefault()},openHelp:function(){Kt.openHelp()},search:function(e){this.searchText=e,this.searchInput(0)},searchInput:function(e,t){var n=this;n.searchText=t?t.target.value:n.searchText,e=void 0===e?500:e,n.searchResults=[],n.searchLoading=!0,Dt.debounce((function(){Gi.query(n.searchText).then((function(e){n.processSearchResults(e)}))}),e)},searchMore:function(){var e=this;Gi.nextChunk().then((function(t){e.processSearchResults(t)}))},clearSearch:function(){this.searchLoading=!1,this.searchResults=null,this.searchText=""},processSearchResults:function(e){var t=this;t.hasNextChunk=Gi.hasNextChunk(),t.searchResults=t.searchResults.concat(e),t.searchLoading=!1,t.$forceUpdate(),e.forEach((function(e){e.promise.then((function(){t.$forceUpdate()}))}))}},mounted:function(){this.editElementId=this.editElementIdParam,this.initInternal(),Kt.setHelpLocation("03_appearance_layout","#edit-modal")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation()}},Hi=(n(85),_n(Yi,Pi,[function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-file-upload"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Choose file // Datei auswählen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-arrow-down"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("drop new image here // neues Bild hierher ziehen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("No search results.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("Keine Resultate.")]),this._v(" Versuchen Sie es ev. nochmal mit einem "),t("b",[this._v("englischen Suchbegriff")]),this._v(".")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("Für eine Symbolsuche auf Deutsch können Sie "),t("a",{attrs:{target:"_blank",href:"https://www.pictoselector.eu/de/home/download/"}},[this._v("Picto-Selector")]),this._v(" verwenden. Symbole aus diesem Programm können mit Drag & Drop direkt in AsTeRICS Grid eingefügt werden.")])}],!1,null,"2dc40afd",null));Hi.options.__file="src/vue-components/modals/editGridModal.vue";var Wi=Hi.exports,zi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Element1;Element2;Element3;..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Elements // Erkannte Elemente")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.parsedElems.length))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Element(s) // Element(e)")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.parsedElems.length,expression:"parsedElems.length == 0"}],staticClass:"nine columns"},[n("span",{attrs:{"data-i18n":""}},[e._v("No elements // Keine Elemente")])])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]",disabled:0==e.parsedElems.length},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Insert elements // Elemente einfügen")])])])])])])])])};zi._withStripped=!0;var Ki={props:["gridData","gridInstance"],data:function(){return{inputText:"",parsedElems:[]}},methods:{textChanged:function(){var e=(e=this.inputText||"").replace(/\n/gi,";").replace(/;;/gi,";");this.parsedElems=e.split(";").map((function(e){return e.trim()})).filter((function(e){return e.length>0}))},save:function(){if(0!==this.parsedElems.length){var e=new He(this.gridData);this.parsedElems.forEach((function(t){var n=new Ae({label:U.getTranslationObject(t),x:e.getNewXYPos().x,y:e.getNewXYPos().y});e.gridElements.push(n)})),this.gridInstance.updateGridWithUndo(e),this.$emit("close")}}},mounted:function(){U.initDomI18n(),Kt.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy:function(){Kt.revertToLastLocation()}},Ji=(n(87),_n(Ki,zi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Add multiple grid items // Mehrere Grid-Elemente hinzufügen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("label",{staticClass:"three columns",attrs:{for:"inputText","data-i18n":""}},[this._v("Input // Eingabe")]),this._v(" "),t("span",{staticClass:"nine columns",attrs:{"data-i18n":""}},[this._v('Insert Labels for new elements, separated by ";" or [Enter] // Geben Sie Label für neue Elemente getrennt durch ";" oder [Enter] ein')])])}],!1,null,"761467a8",null));Ji.options.__file="src/vue-components/modals/addMultipleModal.vue";var Xi=Ji.exports,qi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[e.gridElement?n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.editNext():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Edit actions // Aktionen bearbeiten")]),e._v(" "),n("span",[n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type === GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type!==e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type !== GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("translate")(e.gridElement.type))+'")')])]),e._v(" "),e.gridElement.image?n("img",{staticClass:"spaced",staticStyle:{"max-height":"1.5em","margin-bottom":"-0.3em"},attrs:{id:"imgPreview",src:e.gridElement.image.data}}):e._e()])]),e._v(" "),e.gridElement?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("New Action // Neue Aktion")]),e._v(" "),n("select",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.selectedNewAction,expression:"selectedNewAction"}],staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"},attrs:{id:"selectActionType"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedNewAction=t.target.multiple?n:n[0]}}},e._l(e.actionTypes,(function(t){return n("option",{domProps:{value:t.getModelName()}},[e._v(e._s(e._f("translate")(t.getModelName())))])})),0),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.addAction()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Add action // Aktion hinzufügen")])])]),e._v(" "),e._m(0),e._v(" "),n("ul",{attrs:{id:"actionList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.gridElement.actions.length,expression:"gridElement.actions.length == 0"}],staticClass:"row",attrs:{"data-i18n":""}},[e._m(1),e._v(" "),e._m(2)]),e._v(" "),e._l(e.gridElement.actions,(function(t){return n("li",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.editActionId!=t.id,expression:"editActionId != action.id"}]},[n("div",{staticClass:"four columns"},[e._v("\n "+e._s(e._f("translate")(t.modelName))+"\n ")]),e._v(" "),n("div",{staticClass:"eight columns actionbtns"},[n("button",{on:{click:function(n){return e.editAction(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteAction(t)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),"GridActionNavigate"!=t.modelName?n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])]):e._e()])]),e._v(" "),e.editActionId==t.id?n("div",[n("div",{},[n("b",[e._v(e._s(e._f("translate")(t.modelName)))]),e._v(" "),n("a",{staticClass:"black",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("div",["GridActionSpeak"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(3,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticStyle:{width:"55%"},attrs:{id:"selectLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2),e._v(" "),n("button",{staticClass:"inline spaced",on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionSpeakCustom"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(4,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticClass:"eight columns",attrs:{id:"selectLang2"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(5,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.speakText[e.currentLang],expression:"action.speakText[currentLang]"}],staticStyle:{width:"70%"},attrs:{id:"inCustomText",type:"text"},domProps:{value:t.speakText[e.currentLang]},on:{input:function(n){n.target.composing||e.$set(t.speakText,e.currentLang,n.target.value)}}}),e._v(" "),n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionNavigate"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.toLastGrid,expression:"action.toLastGrid"}],attrs:{id:"navigateBackChkbox",type:"checkbox"},domProps:{checked:Array.isArray(t.toLastGrid)?e._i(t.toLastGrid,null)>-1:t.toLastGrid},on:{change:function(n){var i=t.toLastGrid,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"toLastGrid",i.concat([null])):o>-1&&e.$set(t,"toLastGrid",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"toLastGrid",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"navigateBackChkbox","data-i18n":""}},[e._v("Navigate to last opened grid // Zum zuletzt geöffneten Grid navigieren")])]),e._v(" "),n("div",{staticClass:"row"},[e._m(6,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.toGridId,expression:"action.toGridId"}],staticClass:"eight columns",attrs:{id:"selectGrid",type:"text",disabled:t.toLastGrid},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"toGridId",n.target.multiple?i:i[0])}}},e._l(e.gridLabels,(function(t,i){return n("option",{domProps:{value:i}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionARE"==t.modelName?n("div",[n("edit-are-action",{attrs:{action:t,"grid-data":e.gridData,"model-file":e.additionalGridFiles[t.id],"set-grid-file-fn":e.setAdditionalGridFile,"end-edit-fn":e.endEditAction}})],1):e._e(),e._v(" "),"GridActionPredict"==t.modelName?n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElementClass.ELEMENT_TYPE_COLLECT,expression:"gridElement.type === GridElementClass.ELEMENT_TYPE_COLLECT"}],staticClass:"row"},[n("div",{staticClass:"eight columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.suggestOnChange,expression:"action.suggestOnChange"}],attrs:{id:"chkSuggestOnChange",type:"checkbox"},domProps:{checked:Array.isArray(t.suggestOnChange)?e._i(t.suggestOnChange,null)>-1:t.suggestOnChange},on:{change:function(n){var i=t.suggestOnChange,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"suggestOnChange",i.concat([null])):o>-1&&e.$set(t,"suggestOnChange",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"suggestOnChange",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"chkSuggestOnChange","data-i18n":""}},[e._v("Refresh suggestions on change // Vorschläge bei Änderung aktualisieren")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(7,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"action.dictionaryKey"}],staticClass:"eight columns",attrs:{id:"comboUseDict"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"dictionaryKey",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("all dictionaries // alle Wörterbücher")]),e._v(" "),e._l(e.dictionaryKeys,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionCollectElement"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectCollectElmAction","data-i18n":""}},[e._v("Perform action on collect element // Aktion für Sammelelement ausführen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectCollectElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.collectActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionWebradio"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadioElmAction","data-i18n":""}},[e._v("Web radio action // Web-Radio Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectRadioElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.webradioActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"WEBRADIO_ACTION_START"===t.action||"WEBRADIO_ACTION_TOGGLE"===t.action,expression:"action.action === 'WEBRADIO_ACTION_START' || action.action === 'WEBRADIO_ACTION_TOGGLE'"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadio","data-i18n":""}},[e._v("Webadio to play // Abzuspielendes Webradio")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.radioId,expression:"action.radioId"}],staticClass:"six columns",attrs:{id:"selectRadio"},on:{change:[function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"radioId",n.target.multiple?i:i[0])},function(n){return e.selectedRadioChanged(t.radioId)}]}},[n("option",{attrs:{value:"",selected:"","data-i18n":""}},[e._v("automatic (last played) // automatisch (zuletzt gespielt)")]),e._v(" "),e._l(e.gridData.webRadios,(function(t){return n("option",{domProps:{value:t.radioId}},[e._v("\n "+e._s(t.radioName)+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"twelve columns",attrs:{"acc-label":"Manage webradio list // Webradioliste verwalten","acc-open":0===e.gridData.webRadios.length?"true":"false"}},[n("radio-list-selector",{model:{value:e.gridData,callback:function(t){e.gridData=t},expression:"gridData"}})],1)],1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionYoutube"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytActions","data-i18n":""}},[e._v("YouTube video action // YouTube-Video Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"ytActions"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.GridActionYoutube.actions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytPlayType","data-i18n":""}},[e._v("Play type // Wiedergabe Typ")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.playType,expression:"action.playType"}],staticClass:"six columns",attrs:{id:"ytPlayType"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"playType",n.target.multiple?i:i[0])}}},e._l(Object.keys(e.GridActionYoutube.playTypes).filter((function(t){return t!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED})),(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("translate")(t)))])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType&&-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"action.playType && [GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED,expression:"action.playType !== GridActionYoutube.playTypes.YT_PLAY_RELATED"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_VIDEO,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_VIDEO"}],attrs:{"data-i18n":""}},[e._v("Video link // Video Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_SEARCH,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_SEARCH"}],attrs:{"data-i18n":""}},[e._v("YouTube search query // YouTube Suchanfrage")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_PLAYLIST,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_PLAYLIST"}],attrs:{"data-i18n":""}},[e._v("YouTube playlist link // YouTube Playlist Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_CHANNEL,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_CHANNEL"}],attrs:{"data-i18n":""}},[e._v("YouTube channel link // YouTube Channel-Link")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.data,expression:"action.data"}],staticClass:"six columns",attrs:{id:"ytList",type:"text"},domProps:{value:t.data},on:{input:function(n){n.target.composing||e.$set(t,"data",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.showCC,expression:"action.showCC"}],attrs:{id:"showCC",type:"checkbox"},domProps:{checked:Array.isArray(t.showCC)?e._i(t.showCC,null)>-1:t.showCC},on:{change:function(n){var i=t.showCC,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"showCC",i.concat([null])):o>-1&&e.$set(t,"showCC",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"showCC",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"showCC","data-i18n":""}},[e._v("Show video subtitles (if available) // Zeige Video-Untertitel (wenn verfügbar)")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.playMuted,expression:"action.playMuted"}],attrs:{id:"playMuted",type:"checkbox"},domProps:{checked:Array.isArray(t.playMuted)?e._i(t.playMuted,null)>-1:t.playMuted},on:{change:function(n){var i=t.playMuted,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"playMuted",i.concat([null])):o>-1&&e.$set(t,"playMuted",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"playMuted",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"playMuted","data-i18n":""}},[e._v("Start video muted // Video stummgeschaltet starten")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.performAfterNav,expression:"action.performAfterNav"}],attrs:{id:"afterNav",type:"checkbox"},domProps:{checked:Array.isArray(t.performAfterNav)?e._i(t.performAfterNav,null)>-1:t.performAfterNav},on:{change:function(n){var i=t.performAfterNav,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"performAfterNav",i.concat([null])):o>-1&&e.$set(t,"performAfterNav",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"performAfterNav",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"afterNav","data-i18n":""}},[e._v("Perform action after navigation // Aktion erst nach Navigation ausführen")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_STEP_FORWARD,e.GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_STEP_FORWARD, GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepSeconds","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(seconds) // (Sekunden)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepSeconds,expression:"action.stepSeconds"}],staticClass:"six columns",attrs:{id:"stepSeconds",type:"number",min:"0"},domProps:{value:t.stepSeconds},on:{input:function(n){n.target.composing||e.$set(t,"stepSeconds",n.target.value)}}})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_VOLUME_UP,e.GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_VOLUME_UP, GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepVolume","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(precent) // (Prozent)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepVolume,expression:"action.stepVolume"}],staticClass:"six columns",attrs:{id:"stepVolume",type:"number",min:"0",max:"100"},domProps:{value:t.stepVolume},on:{input:function(n){n.target.composing||e.$set(t,"stepVolume",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionChangeLang"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"changeLang","data-i18n":""}},[e._v("Change application language to // Sprache der Anwendung ändern zu")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.language,expression:"action.language"}],staticClass:"six columns",attrs:{id:"changeLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"language",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("System language // Systemsprache")]),e._v(" "),e._l(e.selectFromAllLanguages?e.allLanguages:e.gridLanguages,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectFromAllLanguages,expression:"selectFromAllLanguages"}],attrs:{id:"selectFromAllLangs",type:"checkbox"},domProps:{checked:Array.isArray(e.selectFromAllLanguages)?e._i(e.selectFromAllLanguages,null)>-1:e.selectFromAllLanguages},on:{change:function(t){var n=e.selectFromAllLanguages,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.selectFromAllLanguages=n.concat([null])):r>-1&&(e.selectFromAllLanguages=n.slice(0,r).concat(n.slice(r+1)))}else e.selectFromAllLanguages=a}}}),e._v(" "),n("label",{attrs:{for:"selectFromAllLangs","data-i18n":""}},[e._v("Show all Languages for selection // Zeige alle Sprachen zur Auswahl")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e()])]):e._e()])}))],2)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v('OK, to "edit element" // OK, zu "Element bearbeiten"')]),e._v(" "),n("i",{staticClass:"fas fa-pencil-alt"})])])])])]):e._e()])])])};qi._withStripped=!0;var Zi="https://de1.api.radio-browser.info/json/",Qi=["name","country","state","language","tag","tagList","order"],ea={},ta=document.getElementById("audioPlayer"),na=document.getElementById("videoPlayer"),ia=D.get("WEBRADIO_LAST_PLAYED_ID_KEY"),aa=parseFloat(D.get("WEBRADIO_LAST_VOLUME_KEY")||1),ra=!1,oa=!1;function sa(){Sn.setTooltip(U.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*aa)),{revertOnClose:!0,timeout:5e3})}function la(e,t){return new Promise((function(n,i){if(e.radioUrl)return n(e);a.a.ajax({type:"GET",url:Zi+"url/"+e.radioId,dataType:"json"}),a.a.ajax({type:"GET",url:Zi+"stations/byuuid/"+e.radioId,dataType:"json"}).then((function(i){var a=i[0];e.radioUrl=a.url_resolved||a.url,e.radioUrl.lastIndexOf("/")===e.radioUrl.length-1&&(e.radioUrl=e.radioUrl+";");var r=e.radioUrl.lastIndexOf(":");if(r>-1){var o=e.radioUrl.substring(r+1);parseInt(o)+""===o&&(e.radioUrl=e.radioUrl+"/;")}t&&Wt.getGrid(t).then((function(t){var n=(t.webRadios||[]).filter((function(t){return e.radioId===t.radioId}))[0];n&&(n.radioUrl=e.radioUrl,Wt.saveGrid(t))})),n(e)}))}))}ea.doAction=function(e,t){Wt.getGrid(e).then((function(n){var i=n.webRadios||[],a=t.radioId||ia,r=i.filter((function(e){return a===e.radioId}))[0]||i[0],o=0;if(r)switch(t.action){case ye.WEBRADIO_ACTION_START:la(r,e).then((function(e){ea.play(e)}));break;case ye.WEBRADIO_ACTION_TOGGLE:la(r,e).then((function(e){ea.toggle(e)}));break;case ye.WEBRADIO_ACTION_STOP:ea.stop();break;case ye.WEBRADIO_ACTION_NEXT:if((o=i.map((function(e){return e.radioId})).indexOf(r.radioId))<0||i.length<2)return;la(i[o=o+1=0?o-1:i.length-1],e).then((function(e){ea.play(e)}));break;case ye.WEBRADIO_ACTION_VOLUP:ea.volumeUp();break;case ye.WEBRADIO_ACTION_VOLDOWN:ea.volumeDown()}else log.info("no radio station to play found.")}))},ea.play=function(e){e&&(ta.paused||ia!==e.radioId)&&(ta.paused&&na.paused||ea.stop(),ia=e.radioId||ia,D.save("WEBRADIO_LAST_PLAYED_ID_KEY",ia),la(e).then((function(t){log.debug("playing: "+t.radioUrl);var i=Promise.resolve();-1!==e.radioUrl.indexOf(".m3u8")?(oa=!0,na.src=t.radioUrl,n.e(4).then(n.t.bind(null,638,7)).then((function(e){if((e=e.default).isSupported()){var n=new e;n.loadSource(t.radioUrl),n.attachMedia(na),n.on(e.Events.MANIFEST_PARSED,(function(){na.play()}))}}))):(oa=!1,ta.src=t.radioUrl,ta.volume=aa,i=ta.play());var a=U.translate("playing: {?} // Wiedergabe: {?}",t.radioName);Sn.setTooltip(a,{closeOnNavigate:!1,actionLink:U.translate("Stop // Stopp"),actionLinkFn:ea.stop,imageUrl:t.faviconUrl}),i&&i.then&&i.catch((function(){ia===e.radioId&&function(e){Sn.setTooltip(U.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName),{msgType:"warn"})}(e)}))})))},ea.stop=function(e){e&&e!==ia||(ta.pause(),na.pause(),Sn.clearTooltip())},ea.toggle=function(e){!oa&&ta.paused||oa&&na.paused?ea.play(e):ea.stop()},ea.volumeUp=function(){aa=aa+.15<=1?aa+.15:1,aa=Math.round(100*aa)/100,D.save("WEBRADIO_LAST_VOLUME_KEY",aa),sa(),ta.volume=aa,na.volume=aa},ea.volumeDown=function(){aa=aa-.15>=0?aa-.15:0,aa=Math.round(100*aa)/100,D.save("WEBRADIO_LAST_VOLUME_KEY",aa),sa(),ta.volume=aa,na.volume=aa},ea.search=function(e,t,n){if(!e)return Promise.resolve([]);var i={},r=[];Qi.forEach((function(t){var n=e.indexOf(t+":");n>-1&&r.push({param:t,position:n})})),r.sort((function(e,t){return e.position-t.position})),r.forEach((function(t,n,a){var r=a[n+1],o=r?r.position-1:void 0,s=e.substring(t.position+t.param.length+1,o);s=s.replace(/(^")|("$)/g,""),i[t.param]=s})),0===Object.keys(i).length&&(i.name=e);var o=t||20;return o++,i.limit=o,n&&(i.offset=n),new Promise((function(e,t){a.a.ajax({type:"POST",url:Zi+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then((function(t){ra=t.length===o;var n=t.filter((function(e){return"0"!==e.lastcheckok}));n=n.slice(0,o-1),e(n.map((function(e){return{radioId:e.stationuuid,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon}})))}),(function(e){t(e)}))}))},ea.hasMoreSearchResults=function(){return ra};var ca={};function ua(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak"),ri.speak(e.label,t.speakLanguage);break;case"GridActionSpeakCustom":log.debug("action speak custom"),t.speakText&&ri.speak(t.speakText,t.speakLanguage);break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?Fo.toLastGrid():Fo.isOnEditPage()?Fo.toEditGrid(t.toGridId):Fo.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?da(t,i):Wt.getGrid(n).then((function(e){da(t,e)}));break;case"GridActionPredict":log.debug("action predict"),At.predict(U.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),Ni.doCollectElementActions(t.action);break;case"GridActionWebradio":ea.doAction(n,t);break;case"GridActionYoutube":fi.doAction(t);break;case"GridActionChangeLang":U.setLanguage(t.language),U.initDomI18n()}}function da(e,t){if(e.componentId){var n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;an.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then((function(){e.dataPortId&&e.dataPortSendData&&an.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&an.triggerEvent(e.componentId,e.eventPortId,e.areURL)}))}}ca.doAction=function(e,t){e&&t&&Wt.getGridElement(e,t).then((function(n){switch(log.debug("do actions for: "+U.getTranslation(n.label)+", "+t),n.type){case Ae.ELEMENT_TYPE_COLLECT:Ni.doAction(n);break;case Ae.ELEMENT_TYPE_PREDICTION:At.doAction(n.id)}!function(e,t){e.actions.forEach((function(n){ua(e,n,t)}))}(n,e),$(window).trigger(s.ELEMENT_EVENT_ID,[n])}))},ca.testAction=function(e,t,n){ua(e,t,n.id,n)};var fa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[e._m(0),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.areURL,expression:"action.areURL"}],staticClass:"six columns",attrs:{id:"inputAREURI",type:"text"},domProps:{value:e.action.areURL},on:{change:function(t){return e.fixAreUrl()},input:function(t){t.target.composing||e.$set(e.action,"areURL",t.target.value)}}}),e._v(" "),n("div",{staticClass:"six columns"},[n("button",{staticStyle:{width:"70%"},on:{click:function(t){return e.testAREUrl(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test URL // URL testen")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:void 0===e.areConnected,expression:"areConnected === undefined"}],staticClass:"spaced"},[n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areConnected,expression:"areConnected"}],staticClass:"spaced",staticStyle:{color:"green"}},[n("i",{staticClass:"fas fa-check"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.areConnected,expression:"areConnected == false"}],staticClass:"spaced",staticStyle:{color:"red"}},[n("i",{staticClass:"fas fa-times"})])])])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],attrs:{"data-i18n":""}},[e._v("Loading Model from ARE... // Lade Modell von ARE...")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Could not load Model from ARE! // Konnte Modell nicht von ARE laden!")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&!e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && !areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("(no ARE model) // (kein ARE Modell)")]),e._v(" "),!e.loading&&e.areModelFile&&e.areModelFile.dataBase64?n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.downloadModelFile(e.areModelFile)}}},[e._v(e._s(e.areModelFile.fileName))])]):e._e()])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.reloadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-download"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download from ARE // Download von ARE")])]),e._v(" "),e.areModelFile&&e.areModelFile.dataBase64?n("button",{staticClass:"six columns",on:{click:function(t){return e.uploadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-upload"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Upload to ARE // Upload zu ARE")])]):e._e()])])]),e._v(" "),e.areModelSync?e._e():n("div",{staticClass:"row"},[n("div",{staticClass:"ten columns offset-by-two"},[n("i",{staticClass:"fas fa-info-circle"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&e.areModelFile.dataBase64,expression:"areModelFile && areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Upload the saved model or download current ARE model in order to define the action. // Laden Sie das gespeicherte Modell hoch oder das aktuelle ARE Modell herunter um die Aktion zu definieren.")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&!e.areModelFile.dataBase64,expression:"areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Download the current ARE model in order to define the action. // Laden Sie das aktuelle ARE Modell herunter um die Aktion zu definieren.")])])]),e._v(" "),e.areModelSync?n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.componentId,expression:"action.componentId"}],staticClass:"five columns",attrs:{id:"inputComponentId"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"componentId",t.target.multiple?n:n[0])},function(t){return e.reloadPorts(e.action)}]}},e._l(e.areComponentIds,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentPorts.length?n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputDataPortId"}},[e._v("Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortId,expression:"action.dataPortId"}],staticClass:"full-width",attrs:{id:"inputDataPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"dataPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"inputDataPortData","data-i18n":""}},[e._v("Data // Daten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortSendData,expression:"action.dataPortSendData"}],staticClass:"full-width",attrs:{id:"inputDataPortData",type:"text"},domProps:{value:e.action.dataPortSendData},on:{input:function(t){t.target.composing||e.$set(e.action,"dataPortSendData",t.target.value)}}})])]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentEventPorts.length?n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputeventPortId"}},[e._v("Event-Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.eventPortId,expression:"action.eventPortId"}],staticClass:"full-width",attrs:{id:"inputeventPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"eventPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentEventPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.testAction(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test action // Aktion Testen")])]),e._v(" "),n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])};fa._withStripped=!0;var pa={props:["action","gridData","modelFile","setGridFileFn","endEditFn"],data:function(){return{loading:!1,areConnected:null,areComponentIds:[],areComponentPorts:[],areComponentEventPorts:[],areModelFile:null,areModelSync:!1}},methods:{endEditAction:function(){this.endEditFn()},testAction:function(e){var t=this.areModelFile.dataBase64?{additionalFiles:[this.areModelFile]}:{};ca.testAction(null,e,new He(t,this.gridData))},reloadAREModel:function(e){var t=this;t.loading=!0,an.downloadDeployedModelBase64(e.areURL).then((function(n){an.getModelName(e.areURL).then((function(i){t.areModelFile.dataBase64=n,t.areModelFile.fileName=i,e.areModelGridFileName=i,t.setGridFileFn(t.action,t.areModelFile),t.loading=!1,t.areModelSync=!0,t.reloadComponentIds(e),t.reloadPorts(e)}))})).catch((function(){t.areModelFile.dataBase64=null,t.setGridFileFn(t.action,null),t.loading=!1}))},uploadAREModel:function(e){var t=this;an.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then((function(){t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0}))},reloadComponentIds:function(e){var t=this;an.getRuntimeComponentIds(e.areURL).then((function(e){t.areComponentIds=e}))},reloadPorts:function(e){var t=this;an.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then((function(e){t.areComponentEventPorts=e})),an.getComponentInputPortIds(e.componentId,e.areURL).then((function(e){t.areComponentPorts=e}))},testAREUrl:function(e){var t=this;e.areURL=an.getRestURL(e.areURL),t.areConnected=void 0,an.getModelName(e.areURL).then((function(){t.areConnected=!0})).catch((function(){t.areConnected=!1}))},downloadModelFile:function(e){var t=new Blob([window.atob(e.dataBase64)],{type:"text/plain;charset=utf-8"}),n=-1!=e.fileName.indexOf(".acs")?e.fileName:e.fileName+".acs";X.a.saveAs(t,n)},fixAreUrl:function(){this.action.areURL=an.getRestURL(this.action.areURL)}},mounted:function(){this.action.areURL=this.action.areURL||an.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new He(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new Ne),Kt.setHelpLocation("05_actions","#asterics-action")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation()}},ha=(n(89),_n(pa,fa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputAREURI"}},[this._v("ARE URL")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text"},[this._v("ARE Model")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputComponentId","data-i18n":""}},[this._v("Component // Komponente")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputDataPortId","data-i18n":""}},[t("span",[this._v("Send data "),t("span",{staticClass:"show-mobile"},[this._v("to port")])]),this._v(" "),t("span",[this._v("Sende Daten "),t("span",{staticClass:"show-mobile"},[this._v("zu Port")])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputeventPortId","data-i18n":""}},[t("span",[this._v("Trigger event "),t("span",{staticClass:"show-mobile"},[this._v("on event port")])]),this._v(" "),t("span",[this._v("Event triggern "),t("span",{staticClass:"show-mobile"},[this._v("auf Event-Port")])])])])}],!1,null,"74c379ae",null));ha.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var va=ha.exports,ma=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[n("h3",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),e._v(" "),n("button",{staticClass:"six columns",on:{click:e.addAllRadioElements}},[e._v("Grid-Elemente für Radios erstellen")])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.selectedRadioList,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",on:{click:function(n){return e.removeRadio(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Remove // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop")]),e._v(" "),n("i",{staticClass:"fas fa-pause"})]):e._e(),e._v(" "),n("button",{staticClass:"right",on:{click:function(n){return e.moveWebradioUp(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Up // Nach oben")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-up"})])])])])})),0),e._v(" "),0===e.selectedRadioList.length?n("div",{attrs:{"data-i18n":""}},[e._v("No selected radio stations, use search bar below to add radio stations. // Keine ausgewählten Radiosender, verwenden Sie die Suche unten um Radiosender hinzuzufügen.")]):e._e()]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"searchwebradios","data-i18n":""}},[e._v("Search term // Suchbegriff")]),e._v(" "),n("i",{staticClass:"fas fa-info-circle hide-mobile",attrs:{title:e._f("translate")("by default searches for radio station name, advanced search possible like e.g. tag:jazz, language:english or country:austria // sucht standardmäßig nach Radiosender-Name, erweiterte Suche z.B. möglich mit tag:jazz, language:english oder country:austria")}})]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.webradioSearch,expression:"webradioSearch"}],staticClass:"six columns",attrs:{id:"searchwebradios",type:"text"},domProps:{value:e.webradioSearch},on:{input:[function(t){t.target.composing||(e.webradioSearch=t.target.value)},function(t){return e.searchWebradios(t)}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.webradioSearchResults,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",attrs:{disabled:e.selectedRadioList.map((function(e){return e.radioId})).indexOf(t.radioId)>-1},on:{click:function(n){e.selectedRadioList.push(t),e.modelChanged()}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Select // Wählen")]),e._v(" "),n("i",{staticClass:"fas fa-plus"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop ")]),n("i",{staticClass:"fas fa-pause"})]):e._e()])])])})),0),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.webradioSearchResults.length&&e.webradioSearch&&!e.webradioSearching&&!e.webradioSearchError,expression:"webradioSearchResults.length === 0 && webradioSearch && !webradioSearching && !webradioSearchError"}],attrs:{"data-i18n":""}},[e._v("No radio stations found, try an other search term. // Keine Radiosender gefunden, versuchen Sie einen anderen Suchbegriff.")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchError,expression:"webradioSearchError"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Searching failed, no connection to internet. // Suche fehlgeschlagen, keine Verbindung zum Internet.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:e.searchWebradios}},[e._v("Retry // Erneut versuchen")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchResults.length>0,expression:"webradioSearchResults.length > 0"}],staticStyle:{display:"flex","margin-top":"0.5em"}},[n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:0===e.webradioStartIndex},on:{click:e.prevSearchResults}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Previous page // Vorige Seite")])]),e._v(" "),n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:!e.hasMoreWebradios},on:{click:e.nextSearchResults}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Next page // Nächste Seite")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])])])};ma._withStripped=!0;var ga={props:{value:Object},watch:{value:{handler:function(e){this.gridData=JSON.parse(JSON.stringify(e)),this.selectedRadioList=this.gridData.webRadios},deep:!0}},data:function(){return{gridData:null,selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:ea,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}},methods:{modelChanged:function(){this.gridData.webRadios=this.selectedRadioList,this.$emit("input",JSON.parse(JSON.stringify(this.gridData)))},addAllRadioElements:function(){var e=this;if(confirm(U.translate("This action adds {?} new elements to the grid. Continue? // Diese Aktion fügt {?} neue Elemente zum Grid hinzu. Fortfahren?",this.gridData.webRadios.length))){var t=this,n=Promise.resolve();t.gridData.webRadios.forEach((function(e,i){var a;n=n.then((a=e,function(){return ie.urlToBase64(a.faviconUrl).then((function(e){var n=e?new se({data:e}):void 0,i=new He(t.gridData).getNewGridElement({label:U.getTranslationObject(a.radioName),actions:[new ye({radioId:a.radioId,action:ye.WEBRADIO_ACTION_START})],image:n});return t.gridData.gridElements.push(i),Promise.resolve()}))}))})),n.then((function(){e.modelChanged()}))}},searchWebradios:function(e){this.webradioSearch=e.target.value,this.webradioStartIndex=0,this.searchWebradiosInternal()},nextSearchResults:function(){this.webradioStartIndex+=10,this.searchWebradiosInternal()},prevSearchResults:function(){this.webradioStartIndex-=10,this.searchWebradiosInternal()},searchWebradiosInternal:function(){var e=this;e.webradioSearching=!0,e.webradioSearchError=!1,Dt.debounce((function(){ea.search(e.webradioSearch,10,e.webradioStartIndex).then((function(t){e.hasMoreWebradios=ea.hasMoreSearchResults(),e.webradioSearchResults=t,e.webradioSearching=!1})).catch((function(t){e.webradioSearchError=!0,e.webradioSearching=!1}))}),500)},moveWebradioUp:function(e){var t=this.selectedRadioList.indexOf(e);t>0&&(this.selectedRadioList.splice(t-1,0,this.selectedRadioList.splice(t,1)[0]),this.modelChanged())},removeRadio:function(e){ea.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter((function(t){return t.radioId!==e.radioId})),this.modelChanged()}},mounted:function(){this.gridData=JSON.parse(JSON.stringify(this.value)),this.selectedRadioList=this.gridData.webRadios,U.initDomI18n()},updated:function(){U.initDomI18n()}},_a=(n(91),_n(ga,ma,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h3",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Webradio search // Webradio Suche")]),this._v(" "),t("span",{staticClass:"six columns",attrs:{id:"poweredby","data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])])])])}],!1,null,"a1b68270",null));_a.options.__file="src/vue-components/components/radioListSelector.vue";var ya={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:Ae,editActionId:null,selectedNewAction:Ae.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:Ae.getActionTypes(),voiceLangs:ri.getVoicesLangs(),dictionaryKeys:At.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:ge.getActions(),webradioActions:ye.getActions(),currentLang:U.getBrowserLang(),allLanguages:U.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1,GridActionYoutube:we,GridElement:Ae}},components:{RadioListSelector:_a.exports,Accordion:Dn,EditAreAction:va},methods:{selectedRadioChanged:function(e){var t=this,n=this.gridData.webRadios.filter((function(t){return t.radioId===e}))[0].faviconUrl;n&&ie.urlToBase64(n).then((function(e){e&&(t.gridElement.image=new se({data:e}))}))},deleteAction:function(e){this.setAdditionalGridFile(e,null),this.gridElement.actions=this.gridElement.actions.filter((function(t){return t.id!=e.id}))},editAction:function(e){this.editActionId=e.id},endEditAction:function(){this.editActionId=null},testAction:function(e){var t=this.additionalGridFiles[e.id]?{additionalFiles:[this.additionalGridFiles[e.id]]}:{};ca.testAction(this.gridElement,e,new He(t,this.gridData))},addAction:function(){var e=JSON.parse(JSON.stringify(Ae.getActionInstance(this.selectedNewAction)));e.modelName===ee.getModelName()&&(e.toGridId=Object.keys(this.gridLabels)[0]),this.gridElement.actions.push(e),this.editActionId=e.id},setAdditionalGridFile:function(e,t){t?this.additionalGridFiles[e.id]=t:delete this.additionalGridFiles[e.id]},save:function(e){var t=this;t.saveInternal().then((function(){t.$emit("close"),e&&t.$emit("edit")}))},openHelp:function(){Kt.openHelp()},editNext:function(e){var t=this;t.saveInternal().then((function(){t.editElementId=new He(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#selectActionType").focus()}))},saveInternal:function(){var e=this;return e.gridData.gridElements.forEach((function(t,n){t.id===e.gridElement.id&&(e.gridData.gridElements[n]=e.gridElement)})),Wt.saveGrid(e.gridData).then((function(){return Wt.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then((function(){return e.$emit("reload"),Promise.resolve()}))}))},initInternal:function(){var e=this;Wt.getGrid(e.gridIdParam).then((function(t){e.gridData=JSON.parse(JSON.stringify(t));var n=Object.keys(e.gridData.label);e.gridLanguages=e.allLanguages.filter((function(e){return-1!==n.indexOf(e.code)})),e.gridElement=e.gridData.gridElements.filter((function(t){return t.id===e.editElementId}))[0]})),Wt.getGridsAttribute("label").then((function(t){e.gridLabels=t}))}},mounted:function(){this.editElementId=this.editElementIdParam,this.initInternal(),Kt.setHelpLocation("05_actions","#edit-actions-modal")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.setHelpLocation("02_navigation","#edit-view")}},ba=(n(93),_n(ya,qi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h2",{staticClass:"twelve columns",staticStyle:{"margin-top":"1em","font-size":"1.2em"},attrs:{for:"actionList","data-i18n":""}},[this._v("Current actions // Aktuelle Aktionen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("No actions defined, click on '"),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Add action")]),this._v("' to add one.")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v('Keine Aktionen definiert, klicken Sie auf "'),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Aktion hinzufügen")]),this._v('" um eine Aktion zu definieren.')])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang2","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inCustomText","data-i18n":""}},[this._v("Text to speak // Auszusprechender Text")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectGrid","data-i18n":""}},[this._v("Navigate to grid // Navigieren zu Grid")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"comboUseDict","data-i18n":""}},[this._v("Dictionary to use // Zu verwendendes Wörterbuch")])])}],!1,null,"07fb84aa",null));ba.options.__file="src/vue-components/modals/editActionsModal.vue";var Ea=ba.exports,Ca=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",staticStyle:{"max-width":"500px"},on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridRows","data-i18n":""}},[e._v("Number of rows // Anzahl der Zeilen")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.rowCount,expression:"gridData.rowCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridRows",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.rowCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"rowCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridCols","data-i18n":""}},[e._v("Minimum number of columns // Minimale Anzahl der Spalten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.minColumnCount,expression:"gridData.minColumnCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridCols",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.minColumnCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"minColumnCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),e.isGlobalGrid&&e.metadata&&1===e.gridHeight?n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"metadataHeight","data-i18n":""}},[e._v("Height of first global grid row [%] // Höhe der ersten Zeile des globalen Grids [%]")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.metadata.globalGridHeightPercentage,expression:"metadata.globalGridHeightPercentage",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"metadataHeight",type:"number",min:"5",max:"50"},domProps:{value:e.metadata.globalGridHeightPercentage},on:{input:function(t){t.target.composing||e.$set(e.metadata,"globalGridHeightPercentage",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]):e._e()]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ca._withStripped=!0;var wa={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new He(this.gridDataParam).getHeight(),metadata:null}},methods:{save:function(){var e=this;D.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});var t=[];this.metadata&&t.push(Wt.saveMetadata(this.metadata)),Promise.all(t).then((function(){e.$emit("save",e.gridData.rowCount,e.gridData.minColumnCount),e.$emit("close")}))}},mounted:function(){var e=this;this.isGlobalGrid&&Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),setTimeout((function(){return U.initDomI18n()}),10)})),U.initDomI18n()}},Ta=(n(95),_n(wa,Ca,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Set grid size // Grid-Größe anpassen\n ")])])}],!1,null,"5f4007c6",null));Ta.options.__file="src/vue-components/modals/gridDimensionModal.vue";var Aa=Ta.exports,Sa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.otherGrids&&e.gridElement&&e.selectedGrid?n("div",{staticClass:"modal-body container"},[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"moveGrid"}},[e._v(e._s(e.i18nService.translate('Move element "{?}" to grid // Verschiebe Element "{?}" nach Grid',e.i18nService.getTranslation(this.gridElement.label))))]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",staticStyle:{"margin-bottom":"1em"},attrs:{id:"moveGrid"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]}}},e._l(e.otherGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.selectedGrid.thumbnail?e.selectedGrid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"four columns"},[n("button",{staticStyle:{width:"49%"},on:{click:e.prev}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Back // Zurück")])]),e._v(" "),n("button",{staticStyle:{width:"49%"},on:{click:e.next}},[n("span",{attrs:{"data-i18n":""}},[e._v("Next // Weiter")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.moveAllElements,expression:"moveAllElements"}],attrs:{id:"moveAll",type:"checkbox"},domProps:{checked:Array.isArray(e.moveAllElements)?e._i(e.moveAllElements,null)>-1:e.moveAllElements},on:{change:function(t){var n=e.moveAllElements,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.moveAllElements=n.concat([null])):r>-1&&(e.moveAllElements=n.slice(0,r).concat(n.slice(r+1)))}else e.moveAllElements=a}}}),e._v(" "),n("label",{attrs:{for:"moveAll","data-i18n":""}},[e._v("Move all elements to this grid // Alle Elemente zu diesem Grid verschieben")])])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Sa._withStripped=!0;var Na={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:U,imageUtil:ie}},methods:{prev:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var a=i-1<0?e.otherGrids.length-1:i-1;t=e.otherGrids[a]}})),this.selectedGrid=t},next:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var a=i+11||e.height>1,i=t.getNewXYPos(n);e.x=i.x,e.y=i.y,t.gridElements.push(e)})),e.gridData.gridElements=e.moveAllElements?[]:e.gridData.gridElements.filter((function(t){return t.id!==e.gridElement.id}));var n=[];return n.push(Wt.saveGrid(e.gridData)),n.push(Wt.saveGrid(t)),Promise.all(n)}))}},mounted:function(){var e=this;Wt.getGrid(this.gridId).then((function(t){e.gridData=JSON.parse(JSON.stringify(t)),e.gridElement=e.gridData.gridElements.filter((function(t){return t.id===e.gridElementId}))[0],U.initDomI18n()})),Wt.getGrids(!1,!0).then((function(t){e.otherGrids=JSON.parse(JSON.stringify(t)).filter((function(t){return t.id!==e.gridId})),e.selectedGrid=e.otherGrids[0]}))},updated:function(){U.initDomI18n()}},Ia=(n(97),_n(Na,Sa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Move grid element // Grid-Element verschieben\n ")])])}],!1,null,"0fc126e0",null));Ia.options.__file="src/vue-components/modals/elementMoveModal.vue";var ka=Ia.exports,Oa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),void 0!==e.gridData?n("div",{staticClass:"modal-body"},[n("div",[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"gridSelect","data-i18n":""}},[e._v("Grid to translate // Zu übersetzendes Grid")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.gridData,expression:"gridData"}],staticClass:"four columns",attrs:{id:"gridSelect"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.gridData=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("show all Grids // alle Grids anzeigen")]),e._v(" "),e._l(e.allGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])}))],2)]),e._v(" "),e.usedLocales.length>0?n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{"data-i18n":""}},[e._v("Select already used languages // Auswahl bereits verwendeter Sprachen")]),e._v(" "),n("span",{staticClass:"six columns"},e._l(e.usedLocales,(function(t){return t!==e.currentLocale?n("button",{staticStyle:{"margin-right":"0.5em"},on:{click:function(n){e.chosenLocale=t}}},[e._v(e._s(e.getLocaleTranslation(t)))]):e._e()})),0)]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-top":"2em"}},[n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v(" "),n("strong",[e._v(e._s(e.currentLangTranslated)+" ("+e._s(e.currentLocale)+")")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.currentLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.currentLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])]),e._v(" "),n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v("\n  "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.chosenLocale,expression:"chosenLocale"}],on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.chosenLocale=t.target.multiple?n:n[0]}}},e._l(e.allLanguages.filter((function(t){return t.code!==e.currentLocale})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.chosenLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.chosenLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])])]),e._v(" "),n("div",{attrs:{id:"translationList"}},e._l(e.gridData?[e.gridData]:e.allGrids,(function(t){return n("ul",[n("li",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.currentLocale],expression:"data.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:t.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.currentLocale,n.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.chosenLocale],expression:"data.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:t.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.chosenLocale,n.target.value)}}})])]),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",[i.label[e.currentLocale]||i.label[e.chosenLocale]?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.currentLocale],expression:"el.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.chosenLocale],expression:"el.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.chosenLocale,t.target.value)}}})]):e._e()]):e._e()})),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",e._l(i.actions,(function(i){return i.modelName===e.GridActionSpeakCustom.getModelName()&&(i.speakText[e.currentLocale]||i.speakText[e.chosenLocale])?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.currentLocale],expression:"action.speakText[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.speakText[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.chosenLocale],expression:"action.speakText[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.speakText[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.chosenLocale,t.target.value)}}})]):e._e()})),0):e._e()}))],2)})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"three columns offset-by-six",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"three columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Save // Speichern")])])])])])])])])};Oa._withStripped=!0,window.hideKeyboardTranslations=!0;var La={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:U.getBrowserLang(),chosenLocale:U.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:de,allLanguages:U.getAllLanguages(),usedLocales:D.getUsedLocales(),changedGrids:[]}},computed:{currentLangTranslated:function(){return this.getLocaleTranslation(this.currentLocale)},chosenLangTranslated:function(){return this.getLocaleTranslation(this.chosenLocale)}},methods:{save:function(){var e=this,t=e.gridData||e.allGrids[0];D.addUsedLocales(Object.keys(t.label)),Wt.saveGrids(JSON.parse(JSON.stringify(e.changedGrids))).then((function(){e.$emit("reload"),e.$emit("close")}))},changedGrid:function(e){e?-1===this.changedGrids.indexOf(e)&&this.changedGrids.push(e):this.changedGrids=this.allGrids},getLocaleTranslation:function(e){return U.getTranslation(this.allLanguages.filter((function(t){return t.code===e}))[0])},copy:function(e){var t=a()("#translationList input[lang='".concat(e,"']")).toArray().reduce((function(e,t){return e+t.value+"\n"}),"");Dt.copyToClipboard(t)},paste:function(e){var t=this;Dt.getClipboardContent().then((function(n){if(n){t.changedGrid(t.gridData);var i=n.trim().split("\n");a()("#translationList input[lang='".concat(e,"']")).toArray().forEach((function(e,t){i[t]&&(a()(e).val(i[t]),a()(e)[0].dispatchEvent(new Event("input")))}))}}))},showGridElements:function(e){return!window.hideKeyboardTranslations||null!==this.gridData||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))}},mounted:function(){var e=this;Wt.getGrids(!0).then((function(t){e.allGrids=JSON.parse(JSON.stringify(t)),e.allGrids.sort((function(e,t){return U.getTranslation(e.label).localeCompare(U.getTranslation(t.label))})),e.gridData=e.allGrids.filter((function(t){return t.id===e.gridDataId}))[0]})),U.initDomI18n()},updated:function(){U.initDomI18n()}},xa=(n(99),_n(La,Oa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Translate Grids // Grids übersetzen\n ")])])}],!1,null,"7d6c5d35",null));xa.options.__file="src/vue-components/modals/gridTranslateModal.vue";var Da=xa.exports,Ra=null,Ma=null;var Pa=_n({props:["gridId"],data:function(){return{gridData:null,metadata:null,canUndo:!1,canRedo:!1,doingUndoRedo:!1,showEditModal:!1,showMultipleModal:!1,showActionsModal:!1,showDimensionsModal:!1,showMoveModal:!1,showTranslateModal:!1,editElementId:null,showGrid:!1,constants:s,markedElement:null}},components:{GridTranslateModal:Da,ElementMoveModal:ka,GridDimensionModal:Aa,EditGridModal:Wi,AddMultipleModal:Xi,EditActionsModal:Ea,HeaderIcon:kn},methods:{setDimensions:function(e,t){Ma.setDimensions(e,t)},fillGaps:function(){Ma.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ma.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ma.redo()}),10)},reload:function(e){Ma.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back:function(){Fo.toMain()},editElement:function(e){this.editElementId=e,this.showEditModal=!0},removeElement:function(e){var t=this;Ma.removeElement(e).then((function(e){t.gridData=e}))},newElement:function(e){switch(e){case Ae.ELEMENT_TYPE_PREDICTION:case Ae.ELEMENT_TYPE_COLLECT:case Ae.ELEMENT_TYPE_YT_PLAYER:var t=new He(this.gridData).getNewXYPos(),n=new Ae({type:e,x:t.x,y:t.y});if(e===Ae.ELEMENT_TYPE_YT_PLAYER){var i=new we({action:we.actions.YT_TOGGLE});n.actions=[i]}this.gridData.gridElements.push(n),Ma.updateGridWithUndo(this.gridData);break;default:this.editElementId=null,this.showEditModal=!0}},editActions:function(e){this.editElementId=e,this.showActionsModal=!0},newElements:function(){this.showMultipleModal=!0},clearElements:function(){confirm(U.translate("CONFIRM_DELETE_ALL_ELEMS"))&&(this.gridData.gridElements=[],Ma.updateGridWithUndo(this.gridData))},fillElements:function(){var e=Oe.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),Ma.updateGridWithUndo(this.gridData)},reloadFn:function(e,t,n){if(Ra&&t.includes(Ra.gridData.id)&&Ma&&Ma.isInitialized()){var i=new He(n.filter((function(e){return e.id===Ra.gridData.id}))[0]);i.isEqual(Ra.gridData)||(log.debug("reloading on remote update..."),Ra.reload(i))}},markElement:function(e){var t=this;a()(".grid-item-content").removeClass("marked"),e&&setTimeout((function(){Dt.throttle((function(){t.markedElement&&t.markedElement.id===e?t.markedElement=null:(t.markedElement=e?t.gridData.gridElements.filter((function(t){return t.id===e}))[0]:null,a()("#"+e).addClass("marked"))}),null,200)}),10)},getGridInstance:function(){return Ma}},created:function(){a()(document).on(s.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){var e=this,t=this;Ra=t,un.global.stopListening(),Wt.getGrid(this.gridId).then((function(n){return n?(t.gridData=JSON.parse(JSON.stringify(n)),Promise.resolve()):(log.warn("grid not found! gridId: "+e.gridId),Fo.toMain(),Promise.reject())})).then((function(){return Wt.getMetadata().then((function(e){return t.metadata=JSON.parse(JSON.stringify(e)),t.metadata.globalGridId===t.gridData.id?Promise.resolve():(t.metadata.lastOpenedGridId=t.gridData.id,Wt.saveMetadata(t.metadata))}))})).then((function(){return e=t.gridData,Ma=new Mi("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:e.id}),Fn.setGridInstance(Ma),Ma.getInitPromise();var e})).then((function(){Ma.setLayoutChangedEndListener((function(e){t.canUndo=Ma.canUndo(),t.canRedo=Ma.canRedo(),t.doingUndoRedo=!1,t.gridData=JSON.parse(JSON.stringify(e))})),function(){var e={CONTEXT_NEW_GROUP:{name:"New // Neu",icon:"fas fa-plus-circle",items:{CONTEXT_NEW_SINGLE:{name:"New Element // Neues Element",icon:"fas fa-plus"},CONTEXT_NEW_MASS:{name:"Many new elements // Mehrere neue Elemente",icon:"fas fa-clone"},CONTEXT_NEW_COLLECT:{name:"New collect element // Neues Sammel-Element",icon:"far fa-comment-dots"},CONTEXT_NEW_PREDICT:{name:"New prediction element // Neues Vorhersage-Element",icon:"fas fa-magic"},CONTEXT_NEW_YT_PLAYER:{name:"New YouTube Player // Neuer YouTube Player",icon:"fas fa-play-circle"}}}},t={CONTEXT_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit"},CONTEXT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt"},CONTEXT_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt"},CONTEXT_MORE_GROUP:{name:"More // Mehr",icon:"fas fa-bars",items:{CONTEXT_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone"},CONTEXT_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt"},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export"}}}},n=JSON.parse(JSON.stringify(t));delete n.CONTEXT_EDIT;var i=function(){return!!Ra.markedElement},r={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:function(){return Ra.markedElement&&Ra.markedElement.type===Ae.ELEMENT_TYPE_NORMAL}},CONTEXT_ACTION_EDIT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt",visible:i},CONTEXT_ACTION_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt",visible:i},CONTEXT_ACTION_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone",visible:i},CONTEXT_ACTION_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt",visible:i},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export",visible:i},SEP0:"---------",CONTEXT_NEW_GROUP:e.CONTEXT_NEW_GROUP,CONTEXT_FILL_EMPTY:{name:"Fill with empty elements // Mit leeren Elementen füllen",icon:"fas fa-fill",visible:function(){return!new He({},Ra.gridData).isFull()}},CONTEXT_DELETE_ALL:{name:"Delete all elements // Alle Elemente löschen",icon:"fas fa-minus-circle"},SEP1:"---------",CONTEXT_GRID_DIMENSIONS:{name:"Change grid dimensions // Grid-Größe anpassen",icon:"fas fa-expand-arrows-alt"},CONTEXT_GRID_TRANSLATION:{name:"Translate grid // Grid übersetzen",icon:"fas fa-language"},CONTEXT_LAYOUT_FILL:{name:"Fill gaps // Lücken füllen",icon:"fas fa-angle-double-left"},CONTEXT_EDIT_GLOBAL_GRID:{name:"Edit global grid // Globales Grid bearbeiten",icon:"fas fa-globe",visible:!!Ra.metadata.globalGridId&&Ra.metadata.globalGridActive&&Ra.metadata.globalGridId!==Ra.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:Ra.metadata.globalGridId===Ra.gridData.id}};function o(e,t){switch(e){case"CONTEXT_EDIT":Ra.editElement(t);break;case"CONTEXT_DUPLICATE":Ma.duplicateElement(t);break;case"CONTEXT_DO_ACTION":ca.doAction(Ra.gridData.id,t);break;case"CONTEXT_ACTIONS":Ra.editActions(t);break;case"CONTEXT_DELETE":Ra.removeElement(t);break;case"CONTEXT_NEW_SINGLE":Ra.newElement();break;case"CONTEXT_NEW_MASS":Ra.newElements();break;case"CONTEXT_NEW_COLLECT":Ra.newElement(Ae.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":Ra.newElement(Ae.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_NEW_YT_PLAYER":Ra.newElement(Ae.ELEMENT_TYPE_YT_PLAYER);break;case"CONTEXT_DELETE_ALL":Ra.clearElements();break;case"CONTEXT_FILL_EMPTY":Ra.fillElements();break;case"CONTEXT_LAYOUT_FILL":Ra.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":Ra.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":Ra.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":Ra.editElement(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":Ra.editActions(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_DELETE":Ra.removeElement(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":Ma.duplicateElement(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":ca.doAction(Ra.gridData.id,Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_MOVE_TO":Ra.editElementId=t||Ra.markedElement.id,Ra.markElement(null),Ra.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":Fo.toEditGrid(Ra.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":Fo.toEditGrid(Ra.metadata.lastOpenedGridId)}}a()(".grid-container").on("click",(function(e){if(Ra){for(var t=null,n=e.target;!t&&n.parentNode;)t=a()(n).attr("data-id"),n=n.parentNode;Ra.markElement(t)}})),a.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){o(e,a()(this).attr("data-id"))},items:t,zIndex:10}),a.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){o(e,a()(this).attr("data-id"))},items:n,zIndex:10}),a.a.contextMenu({selector:".grid-container",callback:function(e,t){o(e)},items:e,zIndex:10}),a.a.contextMenu({selector:"#moreButton",callback:function(e,t){o(e)},trigger:"left",items:r,zIndex:10})}(),U.initDomI18n(),t.showGrid=!0}))},updated:function(){U.initDomI18n()},beforeDestroy:function(){a()(document).off(s.EVENT_DB_PULL_UPDATED,this.reloadFn),Ra=null,un.global.startListening(),Ma&&(Ma.destroy(),Ma=null,Fn.setGridInstance(null)),a.a.contextMenu("destroy")}},ti,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"spaced",attrs:{tabindex:"33",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"grid-container",staticStyle:{margin:"10px",display:"none"},attrs:{id:"grid-layout-background-wrapper"}},[t("div",{staticClass:"grid-container",staticStyle:{"margin-left":"204px","background-size":"209px 209px","background-image":"linear-gradient(to right, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-vertical"}}),this._v(" "),t("div",{staticClass:"grid-container",staticStyle:{"margin-top":"204px","background-size":"209px 209px","background-image":"linear-gradient(to bottom, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-horizontal"}})])}],!1,null,"6c00303f",null);Pa.options.__file="src/vue-components/views/gridEditView.vue";var Ga=Pa.exports,Ua=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"box"},[e.metadata&&!e.metadata.fullscreen?n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"left"}),e._v(" "),n("div",{staticClass:"btn-group left"},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"spaced small",attrs:{tabindex:"30"},on:{click:function(t){return e.toEditGrid()}}},[n("i",{staticClass:"fas fa-pencil-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing on // Bearbeiten ein")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"31",id:"inputConfigButton"}},[n("i",{staticClass:"fas fa-cog"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Input options // Eingabeoptionen")])])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.locked,expression:"metadata.locked"}],staticClass:"small",attrs:{tabindex:"34"},on:{click:function(t){return e.unlock()}}},[n("i",{staticClass:"fas fa-unlock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Unlock // Entsperren")]),e._v(" "),e.unlockCounter!==e.unlockCount?n("span",[e._v(e._s(e.unlockCounter))]):e._e()]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"33"},on:{click:function(t){return e.lock()}}},[n("i",{staticClass:"fas fa-lock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Lock // Sperren")])]),e._v(" "),n("button",{staticClass:"spaced small",attrs:{tabindex:"32"},on:{click:function(t){return e.applyFullscreen()}}},[n("i",{staticClass:"fas fa-expand"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Fullscreen // Vollbild")])])],1):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_HUFFMAN?n("huffman-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_DIRECTION?n("direction-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_MOUSE?n("mouse-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SCANNING?n("scanning-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SEQUENTIAL?n("sequential-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_UNLOCK?n("unlock-modal",{on:{unlock:function(t){return e.unlock(!0)},close:function(t){e.showModal=null}}}):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.viewInitialized&&e.gridData.gridElements&&0===e.gridData.gridElements.length&&(!e.globalGridData||0===e.globalGridData.length),expression:"viewInitialized && gridData.gridElements && gridData.gridElements.length === 0 && (!globalGridData || globalGridData.length === 0)"}],staticClass:"row content spaced"},[n("div",{staticStyle:{"margin-top":"2em"},attrs:{"data-i18n":""}},[n("span",[e._v("No elements, click "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Edit grid")]),e._v(" to enter edit mode.")]),e._v(" "),n("span",[e._v("Keine Elemente, klicke auf "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Grid bearbeiten")]),e._v(" um das Grid zu bearbeiten.")])])]),e._v(" "),n("div",{staticClass:"row content"},[e.viewInitialized?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}})])],1)};Ua._withStripped=!0;var Fa=function(e){if(e instanceof Node||e instanceof NodeList||e instanceof Array)return e;var t="querySelectorAll";return 0===e.indexOf("#")&&(t="getElementById",e=e.substr(1,e.length)),document[t](e)};function $a(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},Fa.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},Fa.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},Fa.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;n0&&u<1e3;){u++;var d=S(s,e,t);l.push(d),s=s.filter((function(e){return!d.includes(e)}))}return c&&(l=function(e){for(var t=[],n=0;n=0&&(a=e[n-1]),n+1=i(e)&&o<=a(e)||i(e)<=s&&a(e)>=s||i(e)>=o&&a(e)<=s}))}function N(e){return function(t,n){return e(t)-e(n)}}function I(){var e=arguments;return function(t,n){for(var i=0;i=s*n.length)i.restartScanning();else if(Fa.removeClass(e,t),Fa.addClass(e,a),h&&(Fa.addClass(n[l],t),Fa.removeClass(n,a),v=n[l],C=function(){D(n,!0,l+1,c+1)},f)){var u=0===l&&o&&n.length>2?r*d:r;m=setTimeout((function(){C()}),u)}}function R(e){var t=[];e=e||[];var n=1;c&&e.length>l&&(n=Math.ceil(e.length/2));for(var i=0,a=e.length;i1?D(R(v),!0):Fa.flattenArray(v).length>1?D(R(Fa.flattenArray(v)),!0):(p&&p(Fa.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){C&&(clearTimeout(m),C())},i.enableTouchScanning=function(){y||(y=function(){i.select()},(b=Fa(".area")[0]?Fa(".area")[0]:Fa("#grid-container")).addEventListener("click",y))},i.disableTouchScanning=function(){y&&(b.removeEventListener("click",y),y=null)},w(n)}Va.getInstanceFromConfig=function(e,t,n,i){return new ja(t,n,{autoScan:e.scanAuto,scanVertical:e.scanVertical,subScanRepeat:3,scanBinary:e.scanBinary,scanInactiveClass:i,minBinarySplitThreshold:3,scanTimeoutMs:e.scanTimeoutMs,scanTimeoutFirstElementFactor:e.scanTimeoutFirstElementFactor,touchScanning:!e.mouseclickEnabled,inputEventSelect:e.scanInputs.filter((function(e){return e.label===I.SELECT}))[0],inputEventNext:e.scanInputs.filter((function(e){return e.label===I.NEXT}))[0]})};var Ba={};function Ya(e,t){var n=e,i=void 0!==t.timeoutMs?t.timeoutMs:1e3,r=t.demoMode,o=t.selectionListener,l=t.activeListener,c={},u=[],d=null,f=null,p=!1,h=null;function v(e,t){var n=t||this;e.preventDefault(),w(n),d=n,f=e}function m(e,t){if(p){var n=t||this;e.preventDefault(),T(n)}}function g(e){p||S(!1),Dt.debounce((function(){S(!0)}),i+300,"hovering-mouseMove")}function _(){T(d)}function y(e){var t=A(e);w(t),d=t}function b(e){T(d)}function E(e){r||e.preventDefault(),Dt.throttle((function(){var t=A(e);w(t),d=t,f=e}),[],50,"hovering-touchmove")}function C(e){ri.speak(U.translate("speech output activated // Sprachausgabe aktiviert")),Sn.clearTooltip(),ni.setState(s.STATE_ACTIVATED_TTS,!0),S(!0),u.forEach((function(e){e.removeEventListener("click",C)}))}function w(e){d&&d!==e&&T(d),e&&!c[e]&&(Fa.addClass(e,"mouseentered"),l&&e!==d&&l(e),0!==i&&(c[e]=setTimeout((function(){o&&o(e)}),i)))}function T(e){e&&(Fa.removeClass(e,"mouseentered"),clearTimeout(c[e]),c[e]=null,d=null)}function A(e){if(e.touches&&0===e.touches.length&&(e=f),e){var t=e.touches?e.touches[0].pageX:e.pageX||e.clientX,n=e.touches?e.touches[0].pageY:e.pageY||e.clientY;return Dt.getElement(u,t,n)}log.warn("no event")}function S(e){p=!e,r||(e?a()("#touchElement").show():a()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(a()(n).css("cursor","none"),a()("#touchElement").css("cursor","none"),t.containerClass&&a()(t.containerClass).css("cursor","none")),u=Fa.selectAsList(n);var e=ni.getState(s.STATE_ACTIVATED_TTS);!ri.nativeSpeechSupported()||e||r?S(!0):(Sn.setTooltip(U.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),ni.onStateChanged(s.STATE_ACTIVATED_TTS,(function(e){e&&Sn.clearTooltip()})),u.forEach((function(e){e.addEventListener("click",C)}))),u.forEach((function(e){e.addEventListener("mouseenter",v),e.addEventListener("mouseleave",m),e.addEventListener("mouseup",_)})),(h=un.instance()).onTouchStart(y),h.onTouchEnd(b),h.onTouchMove(E),h.startListening(),document.addEventListener("mousemove",g)},this.destroy=function(){t.hideCursor&&(a()(n).css("cursor","default"),a()("#touchElement").css("cursor","default"),t.containerClass&&a()(t.containerClass).css("cursor","default")),Dt.clearDebounce("hovering-mouseMove"),u.forEach((function(e){e.removeEventListener("mouseenter",v),e.removeEventListener("mouseleave",m),e.removeEventListener("mouseup",_),e.removeEventListener("click",C)})),h.destroy(),document.removeEventListener("mousemove",g),Object.keys(c).forEach((function(e){clearTimeout(c[e])})),ni.clearListeners(s.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){i=e},this.setSelectionListener=function(e){o=e}}function Ha(e){var t=e,n=null,i=[];function a(e){n&&n(e.currentTarget)}function r(e){var t=e.which||e.keyCode;13!==t&&32!==t||n&&n(e.currentTarget)}this.startClickcontrol=function(){(i=Fa.selectAsList(t)).forEach((function(e){e.addEventListener("click",a),e.addEventListener("keydown",r)}))},this.destroy=function(){i.forEach((function(e){e.removeEventListener("click",a),e.removeEventListener("keydown",r)}))},this.setSelectionListener=function(e){n=e}}Ba.getInstanceFromConfig=function(e,t,n){return new Ya(t,{selectionListener:(n=n||{}).selectionListener,activeListener:n.activeListener,containerClass:n.containerClass,inputEventSelect:e.seqInputs.filter((function(e){return e.label===I.SELECT}))[0],inputEventNext:e.seqInputs.filter((function(e){return e.label===I.NEXT}))[0],timeoutMs:e.hoverTimeoutMs,demoMode:n.demoMode||e.hoverDisableHoverpane,hideCursor:e.hoverHideCursor})};var Wa=n(57),za=n.n(Wa),Ka={};function Ja(e,t,n,i){var r=this,o=e,s=t,l=n,c=!1,u=!0,d=!1,f=0,p=1e3,h=!0,v=[],m=null,g=null,_=null,y=null,b="",E=null,C="",w=!1,T=null;function A(){if(E=un.instance(),C="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");a.a.isFunction(e.selectionListener)&&(m=e.selectionListener);c=void 0!==e.printCodes&&e.printCodes,u=void 0===e.printColors||e.printColors,d=void 0!==e.colorWholeElement&&e.colorWholeElement,h=void 0===e.markInactive||e.markInactive,v=e.colors||v,f=e.elementCount||0,p=e.timeout||1e3,e.inputEvents.forEach((function(e,t){C+=t+1,E.onInputEvent(e,(function(){r.input(t+1)}))}))}(i),0!==(g=a()(o)).length){var e=g.toArray().map((function(e){return e.id}));if(e.lengthl?t.length:l})),s.assignCodeWords(C,(function(e,t){if(e.name&&(e.codeWord=t,e.element=document.getElementById(e.name),u||c)){var n="";e.codeWord.split("").forEach((function(e){var t=u?I(e):"",i=function(e){if(!e)return"";var t=(n=e,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null);var n,i;return.299*t.r+.587*t.g+.114*t.b>149?"#000000":"#ffffff"}(t),a=(100-5*l)/l+"%",r=c?e:" ";n+='').concat(r,"")}));var i=c?"10px":"3px",r=a()(e.element).width()+"px";a()(e.element).append('
    ').concat(n,"
    "))}})),y=y.filter((function(e){return e.name})),S()}}function S(){d&&y.forEach((function(e){if(0===e.codeWord.indexOf(b)){var t=e.codeWord.substring(b.length)[0];e.element.style.background=I(t)}}))}function N(e){g.removeClass(l);var t=e.map((function(e){return e.id})),n=g.toArray().filter((function(e){return-1===t.indexOf(e.id)}));a()(n).addClass(l)}function I(e){var t=parseInt(e)-1;return v[t]}r.start=function(){w=!0,d&&a()(g).addClass("noanimation"),E.startListening()},r.stop=function(){w=!1,a()(g).find(".huffman-code-visualization").remove(),d&&(a()(g).removeClass("noanimation"),a()(g).css("background","")),E.stopListening()},r.destroy=function(){r.stop(),E.destroy()},r.reinit=function(){w&&(r.stop(),A(),r.start())},r.input=function(e){if(e+="",clearTimeout(T),1===e.length){b+=e,S();var t,n=y.filter((function(e){return e.codeWord===b})).map((function(e){return e.element})),i=y.filter((function(e){return 0===e.codeWord.indexOf(b)})).map((function(e){return e.element}));g.removeClass(s),n[0]?(t=n[0],_=t||_,g.removeClass(s),a()(_).addClass(s),N(g.toArray()),m&&m(n[0])):h&&N(i),(n[0]||0===i.length)&&(N(g.toArray()),b="",S()),p>0&&(T=setTimeout((function(){N(g.toArray()),b="",S()}),p))}},r.getCurrentInput=function(){return b},A()}Ka.getInstanceFromConfig=function(e,t,n,i,a){return new Ja(t,n,i,{printCodes:e.huffShowNumbers,printColors:e.huffShowColors,colorWholeElement:e.huffColorWholeElement,colors:e.huffColors,inputEvents:e.huffInputs,elementCount:e.huffElementCount,timeout:e.huffTimeout,markInactive:e.huffMarkInactive,selectionListener:a})};var Xa={};function qa(e,t,n){var i=this,r=e,s=t,l=!0,c=!1,u=null,d=null,f=null,p={},h=un.instance();function v(e){p[f.id]&&m(p[f.id][e])}function m(e){f=e||f,d.removeClass(s),a()(f).addClass(s)}i.start=function(){m(d[0]),h.startListening()},i.destroy=function(){d.removeClass(s),h.destroy()},i.left=function(){v("left")},i.right=function(){v("right")},i.up=function(){v("up")},i.down=function(){v("down")},i.select=function(){u&&u(f),c&&m(d[0])},0!==(d=a()(r)).length&&(setTimeout((function(){d.toArray().forEach((function(e){var t=d.toArray().filter((function(t){return t.id!==e.id})),n=e.getBoundingClientRect(),i=function(e,t,n,i){return e>0&&t>0&&n>0&&i>0},a=function(e,t,n,i){return e<0&&t<0&&n<0&&i<0},r=t.map((function(e){var t=e.getBoundingClientRect(),r=n.left-t.right,o=n.right-t.left,s=n.right-t.right,l=n.left-t.left,c=n.top-t.bottom,u=n.bottom-t.top,d=n.top-t.top,f=n.bottom-t.bottom,p=Math.min(Math.abs(r),Math.abs(o),Math.abs(s),Math.abs(l)),h=Math.min(Math.abs(c),Math.abs(u),Math.abs(d),Math.abs(f));return{element:e,left:i(r,o,s,l),right:a(r,o,s,l),up:i(c,u,d,f),down:a(c,u,d,f),absDiffX:p,absDiffY:h,absDiff:p+h}}));function s(e,t,n,i,a){var r=e.filter((function(e){return e[t]}));if(r.length>0)return r[0].element;if(l){var s=Math.min.apply(Math,o()(e.map((function(e){return e[a]})))),c=e.filter((function(e){return e[a]===s&&e[n]})),u=Math.max.apply(Math,o()(c.map((function(e){return e[i]})))),d=c.filter((function(e){return e[i]===u}))[0];return d?d.element:null}return null}var c=s(r=r.sort((function(e,t){return e.absDiff-t.absDiff})),"left","right","absDiffX","absDiffY"),u=s(r,"right","left","absDiffX","absDiffY"),f=s(r,"up","down","absDiffY","absDiffX"),h=s(r,"down","up","absDiffY","absDiffX");p[e.id]={element:e,left:c,right:u,up:f,down:h}}))}),200),function(e){e&&(a.a.isFunction(e.selectionListener)&&(u=e.selectionListener),l=void 0!==e.wrapAround&&e.wrapAround,c=void 0!==e.resetToStart&&e.resetToStart,h.onInputEvent(e.inputEventLeft,i.left),h.onInputEvent(e.inputEventRight,i.right),h.onInputEvent(e.inputEventUp,i.up),h.onInputEvent(e.inputEventDown,i.down),h.onInputEvent(e.inputEventSelect,i.select))}(n))}Xa.getInstanceFromConfig=function(e,t,n,i){return new qa(t,n,{inputEventLeft:e.dirInputs.filter((function(e){return e.label===I.LEFT}))[0],inputEventRight:e.dirInputs.filter((function(e){return e.label===I.RIGHT}))[0],inputEventUp:e.dirInputs.filter((function(e){return e.label===I.UP}))[0],inputEventDown:e.dirInputs.filter((function(e){return e.label===I.DOWN}))[0],inputEventSelect:e.dirInputs.filter((function(e){return e.label===I.SELECT}))[0],wrapAround:e.dirWrapAround,resetToStart:e.dirResetToStart,selectionListener:i})};var Za={};function Qa(e,t){var n=this,i=e,r=null,o=null,s=null,l=null,c=null,u=0;function d(e){l.removeClass(r),a()(e).addClass(r),s&&s(e)}n.start=function(){c.startListening(),d(l[0]),u=0},n.destroy=function(){c.destroy(),l.removeClass(r)},n.next=function(){++u>l.length-1&&(u=0),d(l[u])},n.prev=function(){--u<0&&(u=l.length-1),d(l[u])},n.select=function(){o&&o(l[u])},c=un.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(a.a.isFunction(e.selectionListener)&&(o=e.selectionListener),a.a.isFunction(e.activeListener)&&(s=e.activeListener),r=e.activeClass||"scanFocus",c.onInputEvent(e.inputEventSelect,(function(){n.select()})),c.onInputEvent(e.inputEventNext,(function(){n.next()})),c.onInputEvent(e.inputEventPrev,(function(){n.prev()})))}(t),l=a()(i)}Za.getInstanceFromConfig=function(e,t,n){return new Qa(t,{selectionListener:n.selectionListener,activeListener:n.activeListener,inputEventSelect:e.seqInputs.filter((function(e){return e.label===I.SELECT}))[0],inputEventNext:e.seqInputs.filter((function(e){return e.label===I.NEXT_ELEMENT}))[0],inputEventPrev:e.seqInputs.filter((function(e){return e.label===I.PREVIOUS_ELEMENT}))[0]})};var er=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Scanning input method: 1-2 input events // Eingabemethode Scanning: 1-2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}],attrs:{type:"checkbox",id:"enableScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanEnabled)?e._i(e.inputConfig.scanEnabled,null)>-1:e.inputConfig.scanEnabled},on:{change:function(t){var n=e.inputConfig.scanEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableScanning","data-i18n":""}},[e._v("Enable Scanning // Scanning aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.NEXT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.scanInputs,callback:function(t){e.$set(e.inputConfig,"scanInputs",t)},expression:"inputConfig.scanInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanVertical,expression:"inputConfig.scanVertical"}],attrs:{type:"checkbox",id:"chkVerticalScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanVertical)?e._i(e.inputConfig.scanVertical,null)>-1:e.inputConfig.scanVertical},on:{change:function(t){var n=e.inputConfig.scanVertical,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanVertical",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanVertical",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanVertical",a)}}}),e._v(" "),n("label",{attrs:{for:"chkVerticalScanning","data-i18n":""}},[e._v("Vertical scanning // Scanning vertikal")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanBinary,expression:"inputConfig.scanBinary"}],attrs:{type:"checkbox",id:"chkBinaryScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanBinary)?e._i(e.inputConfig.scanBinary,null)>-1:e.inputConfig.scanBinary},on:{change:function(t){var n=e.inputConfig.scanBinary,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanBinary",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanBinary",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanBinary",a)}}}),e._v(" "),n("label",{attrs:{for:"chkBinaryScanning","data-i18n":""}},[e._v("Binary scanning // Scanning binär")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.touchScanning,expression:"touchScanning"}],attrs:{type:"checkbox",id:"chkTouchScanning"},domProps:{checked:Array.isArray(e.touchScanning)?e._i(e.touchScanning,null)>-1:e.touchScanning},on:{change:[function(t){var n=e.touchScanning,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.touchScanning=n.concat([null])):r>-1&&(e.touchScanning=n.slice(0,r).concat(n.slice(r+1)))}else e.touchScanning=a},e.changeTouchScanning]}}),e._v(" "),n("label",{attrs:{for:"chkTouchScanning","data-i18n":""}},[e._v("Scanning-selection by mouse click or tap // Scanning-Auswahl durch Mausklick oder tippen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],attrs:{type:"checkbox",id:"chkAutoScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanAuto)?e._i(e.inputConfig.scanAuto,null)>-1:e.inputConfig.scanAuto},on:{change:function(t){var n=e.inputConfig.scanAuto,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanAuto",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanAuto",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanAuto",a)}}}),e._v(" "),n("label",{attrs:{for:"chkAutoScanning","data-i18n":""}},[e._v("Automatic (timed) scanning // Automatisches (zeitgesteuertes) Scanning")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inScanTime","data-i18n":""}},[e._v("Scanning Time (ms) // Scanning Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inScanTime",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inFirstElement","data-i18n":""}},[e._v("Time factor first element // Zeit-Faktor erstes Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"range",id:"inFirstElement",min:"1",max:"5",step:"0.1"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"number",min:"1",max:"5",step:"0.5"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};er._withStripped=!0;var tr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("ul",e._l(e.inputs,(function(t,i){return n("li",[n("div",{staticClass:"row nomargin"},[n("label",{staticClass:"three columns input-label",attrs:{for:t.label+i}},[n("span",[e._v(e._s(e._f("translate")(t.label)))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.label===e.InputConfig.GENERAL_INPUT,expression:"input.label === InputConfig.GENERAL_INPUT"}]},[e._v(e._s(i+1))])]),e._v(" "),n("select",{staticClass:"five columns",attrs:{id:t.label+i},on:{change:function(t){return e.typeChange(i,t.target.value)}}},[e._m(0,!0),e._v(" "),e._l(e.inputEventTypes,(function(i){return n("option",{domProps:{value:i.getModelName(),selected:i.getModelName()===t.modelName}},[e._v("\n "+e._s(e._f("translate")(i.getModelName()))+"\n ")])}))],2),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.errorInputs.indexOf(t.label)>-1,expression:"errorInputs.indexOf(input.label) > -1"}],staticClass:"two columns"},[n("i",{staticClass:"warn fas fa-exclamation-triangle"})])]),e._v(" "),t.modelName===e.InputEventKey.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordKey(t,i)}}},[n("i",{staticClass:"fas fa-keyboard"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("Record key // Taste aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("press key ... // Taste drücken ...")))])]),e._v(" "),n("span",{staticClass:"four columns"},[n("b",{attrs:{"data-i18n":""}},[e._v("Current key: // Aktuelle Taste:")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.keyCode,expression:"!input.keyCode"}],attrs:{"data-i18n":""}},[e._v("(no key) // (keine Taste)")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.keyCode,expression:"input.keyCode"}]},[e._v(e._s(t.keyName+" ("+t.keyCode+")"))])])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"nine columns offset-by-three",attrs:{"acc-label":"more // mehr"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inTimeout"+i}},[e._v("Timeout (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:t.timeout,expression:"input.timeout",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inTimeout"+i,type:"number",min:"0",max:"5000",step:"100"},domProps:{value:t.timeout},on:{input:[function(n){n.target.composing||e.$set(t,"timeout",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Repetitions // Wiederholungen")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:0===t.holdDuration,expression:"input.holdDuration === 0"},{name:"model",rawName:"v-model.number",value:t.repeat,expression:"input.repeat",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"1",max:"9"},domProps:{value:t.repeat},on:{input:[function(n){n.target.composing||e.$set(t,"repeat",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.holdDuration>0,expression:"input.holdDuration > 0"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if hold duration is set. // deaktiviert bei gesetzter Haltedauer.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.holdDuration=0,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Hold duration (ms) // Haltedauer (ms)")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:1===t.repeat,expression:"input.repeat === 1"},{name:"model",rawName:"v-model.number",value:t.holdDuration,expression:"input.holdDuration",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"0",max:"5000",step:"100",disabled:t.repeat>1},domProps:{value:t.holdDuration},on:{input:[function(n){n.target.composing||e.$set(t,"holdDuration",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.repeat>1,expression:"input.repeat > 1"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if repetitions are set. // deaktiviert bei gesetzten Wiederholungen.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.repeat=1,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])])])],1)]):e._e(),e._v(" "),t.modelName===e.InputEventARE.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordAREEvent(t,i)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("Record ARE event // ARE Event aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("waiting for event ... // warte auf Event ...")))])]),e._v(" "),n("label",{staticClass:"four columns",attrs:{for:"inputAreUrl"}},[e._v("ARE URL")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.areURL,expression:"input.areURL"}],staticClass:"four columns",attrs:{id:"inputAreUrl",type:"text",placeholder:e._f("translate")("empty = automatic // leer = automatisch")},domProps:{value:t.areURL},on:{change:function(n){return e.changedAreURL(t)},input:[function(n){n.target.composing||e.$set(t,"areURL",n.target.value)},function(n){e.areError[t.label+i]=!1}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.areError[t.label+i],expression:"areError[input.label+index]"}],staticClass:"nine columns offset-by-three"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v("\n "+e._s(e._f("translate")("Error connecting to ARE! // Verbindung zu ARE konnte nicht hergestellt werden!"))+" "+e._s("("+e.areService.getRestURL(t.areURL)+")")+"\n ")])]),e._v(" "),n("div",{staticClass:"row"},e._l(t.eventNames,(function(i,a){return n("span",{staticClass:"nine columns offset-by-three"},[n("b",[e._v("Event:")]),e._v(" "+e._s(e.formatAreEvent(i))+" "),n("button",{staticStyle:{"margin-left":"1em",padding:"0 0.5em"},attrs:{title:e._f("translate")("Delete // Löschen")},on:{click:function(n){return e.removeAREEvent(t,a)}}},[n("i",{staticClass:"fas fa-trash"})])])})),0)]):e._e()])})),0)])};tr._withStripped=!0;var nr={components:{Accordion:Dn},props:{value:Array,inputLabels:Array,canAdd:Boolean,maxElements:Number,errorInputs:Array,minInputs:Number,maxInputs:Number},watch:{value:{handler:function(e){this.initWithValue(e)},deep:!0}},data:function(){return{inputs:[],inputEventTypes:I.getInputEventTypes(),InputEventKey:T,InputEventARE:S,InputConfig:I,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:un.instance(),lastInitTime:null,areService:an}},methods:{typeChange:function(e,t){var n=this.inputs[e],i=this.inputs.filter((function(e){return!e.modelName}));if(!t)return n.modelName="",this.minInputs&&this.inputs.length>this.minInputs&&i.length>=1&&this.inputs.splice(e,1),void this.modelChanged();var a=I.getInputEventInstance(t,{label:n.label});nn.a.set(this.inputs,e,JSON.parse(JSON.stringify(a))),this.maxInputs&&this.inputs.length "+t.targetComponentId},changedAreURL:function(e){e.areURL&&(e.areURL=an.getRestURL(e.areURL))},modelChanged:function(){var e=this.inputs.filter((function(e){return!!e.modelName&&I.getInputEventInstance(e.modelName,e).isValid()})),t=JSON.parse(JSON.stringify(e));JSON.stringify(t)!==JSON.stringify(this.lastEmitValue)&&(this.lastInitTime=(new Date).getTime(),this.$emit("input",t),this.lastEmitValue=t)},addInput:function(e){e=e||1;for(var t=0;t0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"scanInputs",JSON.parse(JSON.stringify(I.DEFAULT_SCAN_INPUTS))),this.inputChanged()},changeTouchScanning:function(){this.inputConfig.mouseclickEnabled=!this.touchScanning},initTest:function(){var e=this;setTimeout((function(){e.stopTest(),e.inputConfig.scanEnabled&&(e.scanner=Va.getInstanceFromConfig(e.inputConfig,".area-element-inner","active","inactive"),e.scanner.setSelectionListener((function(t){e.selectedTestElement=t})),e.scanner.startScanning())}),100)},stopTest:function(){this.scanner&&this.scanner.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled})),Kt.setHelpLocation("04_input_options","#scanning")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},ur=(n(105),_n(cr,er,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header"}},[this._v("\n Scanning\n ")])])}],!1,null,"3cc44ad7",null));ur.options.__file="src/vue-components/modals/input/scanningModal.vue";var dr=ur.exports,fr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.mouseclickEnabled,expression:"inputConfig.mouseclickEnabled"}],attrs:{type:"checkbox",id:"enableClick"},domProps:{checked:Array.isArray(e.inputConfig.mouseclickEnabled)?e._i(e.inputConfig.mouseclickEnabled,null)>-1:e.inputConfig.mouseclickEnabled},on:{change:function(t){var n=e.inputConfig.mouseclickEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"mouseclickEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"mouseclickEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"mouseclickEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableClick","data-i18n":""}},[e._v("Select with mouse click (or tap) // Auswahl mit Mausklick (oder Antippen)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],attrs:{type:"checkbox",id:"enableHover"},domProps:{checked:Array.isArray(e.inputConfig.hoverEnabled)?e._i(e.inputConfig.hoverEnabled,null)>-1:e.inputConfig.hoverEnabled},on:{change:function(t){var n=e.inputConfig.hoverEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHover","data-i18n":""}},[e._v("Enable hovering // Hovering aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inHoverTime","data-i18n":""}},[e._v("Hover Time (ms) // Hovering Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inHoverTime",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverHideCursor,expression:"inputConfig.hoverHideCursor"}],attrs:{type:"checkbox",id:"hoverHideCursor"},domProps:{checked:Array.isArray(e.inputConfig.hoverHideCursor)?e._i(e.inputConfig.hoverHideCursor,null)>-1:e.inputConfig.hoverHideCursor},on:{change:function(t){var n=e.inputConfig.hoverHideCursor,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverHideCursor",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverHideCursor",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverHideCursor",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"hoverHideCursor","data-i18n":""}},[e._v("Hide Cursor // Cursor verstecken")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.hoverDisableHoverpane,expression:"inputConfig.hoverDisableHoverpane"}],attrs:{type:"checkbox",id:"chkDisableHoverpane"},domProps:{checked:Array.isArray(e.inputConfig.hoverDisableHoverpane)?e._i(e.inputConfig.hoverDisableHoverpane,null)>-1:e.inputConfig.hoverDisableHoverpane},on:{change:function(t){var n=e.inputConfig.hoverDisableHoverpane,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverDisableHoverpane",a)}}}),e._v(" "),n("label",{attrs:{for:"chkDisableHoverpane","data-i18n":""}},[e._v("Disable hover pane // Hover-Fläche deaktivieren")])])]),e._v(" "),n("accordion",{staticClass:"row",attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1)],1):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};fr._withStripped=!0;var pr=_n({props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,clicker:null,hover:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")}))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},initTest:function(){var e=this;setTimeout((function(){var t=e;e.stopTest(),t.inputConfig.hoverEnabled&&(t.hover=Ba.getInstanceFromConfig(t.inputConfig,".area-element-inner",{demoMode:!0,containerClass:".area .area-row"}),t.hover.setSelectionListener((function(e){t.selectedTestElement=e})),t.hover.startHovering()),t.inputConfig.mouseclickEnabled&&(t.clicker=new Ha(".area-element-inner"),t.clicker.setSelectionListener((function(e){t.selectedTestElement=e})),t.clicker.startClickcontrol())}),100)},stopTest:function(){this.clicker&&this.clicker.destroy(),this.hover&&this.hover.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#mousetouch-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},fr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Mouse/Touch input // Maus-/Toucheingabe")])])}],!1,null,"33ee2cbd",null);pr.options.__file="src/vue-components/modals/input/mouseModal.vue";var hr=pr.exports,vr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Direction input method: 2-5 input events // Richtungs-Eingabe: 2-5 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}],attrs:{type:"checkbox",id:"enableDirinput"},domProps:{checked:Array.isArray(e.inputConfig.dirEnabled)?e._i(e.inputConfig.dirEnabled,null)>-1:e.inputConfig.dirEnabled},on:{change:function(t){var n=e.inputConfig.dirEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableDirinput","data-i18n":""}},[e._v("Enable direction input // Richtungs-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.RIGHT,e.InputConfig.DOWN,e.InputConfig.LEFT,e.InputConfig.UP],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.dirInputs,callback:function(t){e.$set(e.inputConfig,"dirInputs",t)},expression:"inputConfig.dirInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirWrapAround,expression:"inputConfig.dirWrapAround"}],attrs:{type:"checkbox",id:"chkWrapAround"},domProps:{checked:Array.isArray(e.inputConfig.dirWrapAround)?e._i(e.inputConfig.dirWrapAround,null)>-1:e.inputConfig.dirWrapAround},on:{change:function(t){var n=e.inputConfig.dirWrapAround,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirWrapAround",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirWrapAround",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirWrapAround",a)}}}),e._v(" "),n("label",{attrs:{for:"chkWrapAround","data-i18n":""}},[e._v("Wrap around (jump to first element after last element) // Enden verbinden (springe zu erstem Element nach letztem Element)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirResetToStart,expression:"inputConfig.dirResetToStart"}],attrs:{type:"checkbox",id:"chkReset"},domProps:{checked:Array.isArray(e.inputConfig.dirResetToStart)?e._i(e.inputConfig.dirResetToStart,null)>-1:e.inputConfig.dirResetToStart},on:{change:function(t){var n=e.inputConfig.dirResetToStart,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirResetToStart",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirResetToStart",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirResetToStart",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReset","data-i18n":""}},[e._v("Go to start position after select // Zu Startposition nach Auswahl")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};vr._withStripped=!0;var mr={props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,error:"",errorInputs:[],dirInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},validateInputs:function(){return this.errorInputs=[],this.error="",!this.inputConfig.dirEnabled||(0===this.inputConfig.dirInputs.filter((function(e){return e.label===I.SELECT})).length&&this.errorInputs.push(I.SELECT),this.inputConfig.dirInputs.length<2&&this.errorInputs.push(I.RIGHT),!(this.errorInputs.length>0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"dirInputs",JSON.parse(JSON.stringify(I.DEFAULT_DIR_INPUTS))),this.inputChanged()},initTest:function(){var e=this;setTimeout((function(){var t=e;t.stopTest(),t.inputConfig.dirEnabled&&(t.dirInput=Xa.getInstanceFromConfig(t.inputConfig,".area-element-inner","active",(function(e){t.selectedTestElement=e})),t.dirInput.start())}),100)},stopTest:function(){this.dirInput&&this.dirInput.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#direction-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},gr=(n(107),_n(mr,vr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Direction Input // Richtungs-Eingabe")])])}],!1,null,"4c9162fd",null));gr.options.__file="src/vue-components/modals/input/directionInputModal.vue";var _r=gr.exports,yr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Huffman input method: 2 or more input events // Huffman-Eingabe: 2 oder mehr Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}],attrs:{type:"checkbox",id:"enableHuffinput"},domProps:{checked:Array.isArray(e.inputConfig.huffEnabled)?e._i(e.inputConfig.huffEnabled,null)>-1:e.inputConfig.huffEnabled},on:{change:function(t){var n=e.inputConfig.huffEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHuffinput","data-i18n":""}},[e._v("Enable huffman input // Huffman-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"min-inputs":2,"max-inputs":9,"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.huffInputs,callback:function(t){e.$set(e.inputConfig,"huffInputs",t)},expression:"inputConfig.huffInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowNumbers,expression:"inputConfig.huffShowNumbers"}],attrs:{type:"checkbox",id:"chkNumbers"},domProps:{checked:Array.isArray(e.inputConfig.huffShowNumbers)?e._i(e.inputConfig.huffShowNumbers,null)>-1:e.inputConfig.huffShowNumbers},on:{change:function(t){var n=e.inputConfig.huffShowNumbers,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowNumbers",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowNumbers",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowNumbers",a)}}}),e._v(" "),n("label",{attrs:{for:"chkNumbers","data-i18n":""}},[e._v("Show numbers // Zeige Nummern")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowColors,expression:"inputConfig.huffShowColors"}],attrs:{type:"checkbox",id:"chkColors"},domProps:{checked:Array.isArray(e.inputConfig.huffShowColors)?e._i(e.inputConfig.huffShowColors,null)>-1:e.inputConfig.huffShowColors},on:{change:function(t){var n=e.inputConfig.huffShowColors,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowColors",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowColors",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowColors",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColors","data-i18n":""}},[e._v("Show colors // Zeige Farben")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColorWholeElement,expression:"inputConfig.huffColorWholeElement"}],attrs:{type:"checkbox",id:"chkColorWholeElement"},domProps:{checked:Array.isArray(e.inputConfig.huffColorWholeElement)?e._i(e.inputConfig.huffColorWholeElement,null)>-1:e.inputConfig.huffColorWholeElement},on:{change:function(t){var n=e.inputConfig.huffColorWholeElement,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffColorWholeElement",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffColorWholeElement",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffColorWholeElement",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColorWholeElement","data-i18n":""}},[e._v("Color whole element // Färbe ganzes Element")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffMarkInactive,expression:"inputConfig.huffMarkInactive"}],attrs:{type:"checkbox",id:"chkMarkInactive"},domProps:{checked:Array.isArray(e.inputConfig.huffMarkInactive)?e._i(e.inputConfig.huffMarkInactive,null)>-1:e.inputConfig.huffMarkInactive},on:{change:function(t){var n=e.inputConfig.huffMarkInactive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffMarkInactive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffMarkInactive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffMarkInactive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkMarkInactive","data-i18n":""}},[e._v("Mark inactive elements // Markiere inaktive Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inTimeout","data-i18n":""}},[e._v("Timeout in ms (0 means disabled) // Timeout in ms (0 ist deaktiviert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"range",id:"inTimeout",min:"0",max:"10000",step:"100"},domProps:{value:e.inputConfig.huffTimeout},on:{__r:function(t){e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"10000",step:"200"},domProps:{value:e.inputConfig.huffTimeout},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inElementCount","data-i18n":""}},[e._v("Number of elements (0 means automatic) // Anzahl der Elemente (0 ist automatisch)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"range",min:"0",max:"300",id:"inElementCount"},domProps:{value:e.inputConfig.huffElementCount},on:{__r:function(t){e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"300",id:"inElementCount2"},domProps:{value:e.inputConfig.huffElementCount},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},e._l(e.inputConfig.huffInputs.length,(function(t){return n("div",[n("label",{staticStyle:{"margin-right":"1em"},attrs:{for:"colorInput"+t}},[n("span",{attrs:{"data-i18n":""}},[e._v("Color // Farbe")]),e._v(" "+e._s(t))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColors[t-1],expression:"inputConfig.huffColors[i-1]"}],attrs:{id:"colorInput"+t,type:"color"},domProps:{value:e.inputConfig.huffColors[t-1]},on:{input:function(n){n.target.composing||e.$set(e.inputConfig.huffColors,t-1,n.target.value)}}})])})),0),e._v(" "),n("button",{staticClass:"four columns",staticStyle:{"margin-top":"1em"},attrs:{"data-i18n":""},on:{click:function(t){e.inputConfig.huffColors=JSON.parse(JSON.stringify(e.InputConfig.DEFAULT_HUFF_COLORS))}}},[e._v("Reset colors // Farben zurücksetzen")])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};yr._withStripped=!0;var br={props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,error:"",errorInputs:[],huffInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.validateInputs()&&(this.inputConfig.huffElementCount=this.inputConfig.huffElementCount||0,this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},validateInputs:function(){return this.errorInputs=[],this.error="",!this.inputConfig.huffEnabled||(this.inputConfig.huffInputs.length<2&&this.errorInputs.push(I.GENERAL_INPUT),!(this.errorInputs.length>0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"huffInputs",JSON.parse(JSON.stringify(I.DEFAULT_HUFF_INPUTS))),this.inputChanged()},initTest:function(){var e=this;setTimeout((function(){var t=e;t.stopTest(),t.inputConfig.huffEnabled&&(e.huffInput=Ka.getInstanceFromConfig(e.inputConfig,".area-element-inner","active","inactive",(function(t){e.selectedTestElement=t})),e.huffInput.start())}),100)},stopTest:function(){this.huffInput&&this.huffInput.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#huffman-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},Er=(n(109),_n(br,yr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Huffman Input // Huffman-Eingabe")])])}],!1,null,"fff4292a",null));Er.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var Cr=Er.exports,wr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Sequential input method: 2 input events // Sequentielle Eingabe: 2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}],attrs:{type:"checkbox",id:"enableSeqinput"},domProps:{checked:Array.isArray(e.inputConfig.seqEnabled)?e._i(e.inputConfig.seqEnabled,null)>-1:e.inputConfig.seqEnabled},on:{change:function(t){var n=e.inputConfig.seqEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"seqEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"seqEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"seqEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableSeqinput","data-i18n":""}},[e._v("Enable sequential input // Sequentielle Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.NEXT_ELEMENT,e.InputConfig.PREVIOUS_ELEMENT,e.InputConfig.SELECT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.seqInputs,callback:function(t){e.$set(e.inputConfig,"seqInputs",t)},expression:"inputConfig.seqInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};wr._withStripped=!0;var Tr={props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,error:"",errorInputs:[],seqInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},validateInputs:function(){return this.errorInputs=[],this.error="",!this.inputConfig.seqEnabled||(0===this.inputConfig.seqInputs.filter((function(e){return e.label===I.NEXT_ELEMENT})).length&&this.errorInputs.push(I.NEXT_ELEMENT),0===this.inputConfig.seqInputs.filter((function(e){return e.label===I.SELECT})).length&&this.errorInputs.push(I.SELECT),!(this.errorInputs.length>0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"seqInputs",JSON.parse(JSON.stringify(I.DEFAULT_SEQ_INPUTS))),this.inputChanged()},initTest:function(){var e=this;setTimeout((function(){var t=e;t.stopTest(),t.inputConfig.seqEnabled&&(t.seqInput=Za.getInstanceFromConfig(t.inputConfig,".area-element-inner",{selectionListener:function(e){t.selectedTestElement=e}}),t.seqInput.start())}),100)},stopTest:function(){this.seqInput&&this.seqInput.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#sequential-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},Ar=(n(111),_n(Tr,wr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Sequential Input // Sequentielle Eingabe")])])}],!1,null,"071e6452",null));Ar.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var Sr=Ar.exports,Nr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"number-row",staticStyle:{"text-align":"center","margin-bottom":"1em"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Input passcode // PIN eingeben")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("(use buttons or keyboard) // (verwenden Sie Buttons oder Tastatur)")]),n("br"),e._v(" "),n("span",{staticStyle:{"font-size":"3em"},attrs:{"aria-hidden":"true"}},[e._l(e.inputPasscode.length,(function(t){return n("span",[e._v("●")])})),e._v(" "),e._l(Math.max(0,e.passcode.length-e.inputPasscode.length),(function(t){return n("span",[e._v("_")])}))],2)]),e._v(" "),n("div",{staticClass:"number-row"},e._l([1,2,3],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([4,5,6],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([7,8,9],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},[n("button",{staticStyle:{"margin-left":"33%"},on:{click:function(t){return e.inputDigit(0)}}},[e._v("0")])])]),e._v(" "),n("div",{staticClass:"modal-footer"})])])])])};Nr._withStripped=!0;var Ir={props:[],data:function(){return{passcode:D.getUnlockPasscode(),inputPasscode:"",timeoutHandler:null,masterkeyPossible:!0,timeoutMasterkeyHandler:null,keyHandler:null}},methods:{inputDigit:function(e){this.resetTimeout(),this.inputPasscode=this.inputPasscode+e,this.inputPasscode===this.passcode?(this.$emit("unlock"),this.$emit("close")):!this.masterkeyPossible&&this.inputPasscode.length>=this.passcode.length?this.$emit("close"):this.masterkeyPossible&&10===this.inputPasscode.length&&(this.$emit("unlock"),this.$emit("close"))},resetTimeout:function(){var e=this;clearTimeout(this.timeoutHandler),clearTimeout(this.timeoutMasterkeyHandler),this.timeoutHandler=setTimeout((function(){e.$emit("close")}),5e3),this.timeoutMasterkeyHandler=setTimeout((function(){e.masterkeyPossible=!1}),500)}},mounted:function(){var e=this;this.keyHandler=un.instance(),this.keyHandler.onAnyKey((function(t){var n=t-48;n>=0&&n<=9&&e.inputDigit(n)})),this.keyHandler.startListening(),U.initDomI18n(),this.resetTimeout()},beforeDestroy:function(){this.keyHandler.destroy()}},kr=(n(113),_n(Ir,Nr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Unlock application // Anwendung entsperren\n ")])])}],!1,null,"1e4b04a9",null));kr.options.__file="src/vue-components/modals/unlockModal.vue";var Or=kr.exports,Lr=null,xr=null,Dr={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL",MODAL_UNLOCK:"MODAL_UNLOCK"};function Rr(){Lr&&window.removeEventListener("resize",Lr.resizeListener,!0),Lr&&a()(document).off(s.EVENT_GRID_RESIZE,Lr.resizeListener),Lr&&Lr.scanner&&Lr.scanner.destroy(),Lr&&Lr.hover&&Lr.hover.destroy(),Lr&&Lr.clicker&&Lr.clicker.destroy(),Lr&&Lr.directionInput&&Lr.directionInput.destroy(),Lr&&Lr.huffmanInput&&Lr.huffmanInput.destroy(),Lr&&Lr.seqInput&&Lr.seqInput.destroy()}function Mr(){a.a.contextMenu("destroy");function e(e,t){return e?t?" (aktiv)":" (active)":""}function t(t,n,i){return"".concat(t).concat(e(i)," // ").concat(n).concat(e(i,!0))}var n=Lr.metadata.inputConfig,i=n.mouseclickEnabled||n.hoverEnabled,r={CONTEXT_MOUSE:{name:t("Mouse/Touch input","Maus-/Toucheingabe",i),icon:"fas fa-mouse-pointer",className:i?"boldFont":""},CONTEXT_SCANNING:{name:t("Scanning","Scanning",n.scanEnabled),icon:"fas fa-sort-amount-down",className:n.scanEnabled?"boldFont":""},CONTEXT_DIRECTION:{name:t("Direction input","Richtungs-Eingabe",n.dirEnabled),icon:"fas fa-arrows-alt",className:n.dirEnabled?"boldFont":""},CONTEXT_HUFFMAN:{name:t("Huffman input","Huffman-Eingabe",n.huffEnabled),icon:"fas fa-ellipsis-h",className:n.huffEnabled?"boldFont":""},CONTEXT_SEQUENTIAL:{name:t("Sequential input","Sequentielle Eingabe",n.seqEnabled),icon:"fas fa-arrow-right",className:n.seqEnabled?"boldFont":""}};a.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":Lr.openModal(Dr.MODAL_MOUSE);break;case"CONTEXT_SCANNING":Lr.openModal(Dr.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":Lr.openModal(Dr.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":Lr.openModal(Dr.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":Lr.openModal(Dr.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:r,zIndex:10})}var Pr=_n({props:["gridId"],data:function(){return{gridData:{},globalGridData:null,metadata:null,updatedMetadataDoc:null,scanner:null,hover:null,clicker:null,directionInput:null,seqInput:null,huffmanInput:null,showModal:null,modalTypes:Dr,viewInitialized:!1,unlockCount:8,unlockCounter:8}},components:{UnlockModal:Or,SequentialInputModal:Sr,HuffmanInputModal:Cr,DirectionInputModal:_r,MouseModal:hr,ScanningModal:dr,HeaderIcon:kn},methods:{openModal:function(e){this.showModal=e,Rr()},lock:function(){this.metadata.locked=!0,this.unlockCounter=8,Wt.saveMetadata(this.metadata).then((function(){a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)}))},unlock:function(e){var t=this;e||!D.getUnlockPasscode()?(t.unlockCounter--,Dt.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,Wt.saveMetadata(t.metadata).then((function(){a()(document).trigger(s.EVENT_SIDEBAR_OPEN)})))):t.showModal=Dr.MODAL_UNLOCK},applyFullscreen:function(e){Dt.openFullscreen(),this.metadata.fullscreen=!0;var t=Promise.resolve();e||(t=Wt.saveMetadata(this.metadata)),t.then((function(){a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)}))},initInputMethods:function(){var e=this;if(xr){var t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),a()(document).on(s.EVENT_GRID_RESIZE,e.resizeListener);var n=function(t){Fa.removeAddClass(t,"selected"),ca.doAction(e.gridData.id,t.id)},i=function(n){t.globalReadActive&&ri.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=Za.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',{selectionListener:n,activeListener:i}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=Xa.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=Ka.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=Va.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus","scanInactive"),e.scanner.setSelectionListener(n),xr.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),xr.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=Ba.getInstanceFromConfig(t,".grid-item-content",{activeListener:i,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):a()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new Ha(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())}},reinitInputMethods:function(){var e=this;Rr(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),Mr(),e.initInputMethods()}))},reload:function(e){var t=this;xr.reinit(e).then((function(){e&&(t.gridData=JSON.parse(JSON.stringify(e))),t.reinitInputMethods()}))},reloadOnLangChange:function(){this.reload()},toEditGrid:function(){Fo.toEditGrid(this.gridData.id)},toManageGrids:function(){Fo.toManageGrids()},toLogin:function(){Fo.toLogin()},reloadFn:function(e,t,n){var i=this;if(Lr&&xr&&xr.isInitialized()){log.debug("got update event, ids updated:"+t);var r=n.filter((function(e){return Lr.gridData&&e.id===Lr.gridData.id}))[0];this.updatedMetadataDoc=n.filter((function(e){return Lr.metadata&&e.id===Lr.metadata.id}))[0]||this.updatedMetadataDoc,r&&Lr.reload(new He(r)),D.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==Lr.gridData.id?Wt.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then((function(e){e.hasOutdatedThumbnail()||Fo.toLastOpenedGrid()})):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==Lr.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?Lr.applyFullscreen(!0):a()(document).trigger(s.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==Lr.metadata.locked&&(this.updatedMetadataDoc.locked?Lr.lock():Lr.unlock(!0))))}else setTimeout((function(){i.reloadFn(e,t,n)}),500)},onSidebarOpen:function(){Lr&&Lr.metadata&&(Lr.metadata.fullscreen=!1,a()(document).trigger(s.EVENT_GRID_RESIZE))},resizeListener:function(){var e=this;Dt.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created:function(){a()(document).on(s.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).on(s.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).on(s.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){var e=this,t=this;Lr=t,Wt.getGlobalGrid().then((function(e){return t.globalGridData=e,Wt.getGrid(t.gridId)})).then((function(n){if(!n)return log.warn("grid not found! gridId: "+e.gridId),Wt.getGrids(!1,!0).then((function(e){return e[0]?Fo.toGrid(e[0].id):Fo.toManageGrids(),Promise.reject()}));if(n.hasAREModel()){var i=n.getAREModel();an.uploadAndStartModel(i.dataBase64,n.getAREURL(),i.fileName)}return t.gridData=JSON.parse(JSON.stringify(n)),Fo.addToGridHistory(t.gridData.id),Promise.resolve()})).then((function(){return Wt.getMetadata()})).then((function(n){var i=JSON.parse(JSON.stringify(n||new O));return i.lastOpenedGridId=e.gridId,i.locked=void 0===i.locked?We.isDemoMode()&&Wt.getCurrentUser()===s.LOCAL_DEMO_USERNAME:i.locked,i.fullscreen=void 0===i.fullscreen?We.isDemoMode()&&Wt.getCurrentUser()===s.LOCAL_DEMO_USERNAME:i.fullscreen,i.inputConfig.scanEnabled=!!We.isScanningEnabled()||i.inputConfig.scanEnabled,i.inputConfig.dirEnabled=!!We.isDirectionEnabled()||i.inputConfig.dirEnabled,i.inputConfig.huffEnabled=!!We.isHuffmanEnabled()||i.inputConfig.huffEnabled,Wt.saveMetadata(i).then((function(){i.locked&&a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)})),t.metadata=i,Promise.resolve()})).then((function(){return e=t.gridData.id,xr=new Mi("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:e,globalGridHeightPercentage:Lr.metadata.globalGridHeightPercentage}),Fn.setGridInstance(xr),xr.getInitPromise();var e})).then((function(){Mr(),t.viewInitialized=!0,a()(document).trigger(s.EVENT_GRID_LOADED);var e=new He(t.gridData);e.hasOutdatedThumbnail()&&ie.getScreenshot("#grid-container").then((function(n){var i={data:n,hash:e.getHash()};t.gridData.thumbnail=i,Wt.saveGrid(t.gridData)})),t.initInputMethods()})).catch((function(e){e&&log.warn(e)}))},updated:function(){U.initDomI18n()},beforeDestroy:function(){a()(document).off(s.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).off(s.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).off(s.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),Rr(),a.a.contextMenu("destroy"),Lr=null,xr&&(xr.destroy(),xr=null,Fn.setGridInstance(null))}},Ua,[],!1,null,"cc4f17d6",null);Pr.options.__file="src/vue-components/views/gridView.vue";var Gr=Pr.exports,Ur=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced",on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginPlain(e.user,e.password)}}},[e._m(0),e._v(" "),n("div",{staticClass:"eleven columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"eleven columns"},e._l(e.allUsersList,(function(t){return n("div",{staticClass:"row saved-user",staticStyle:{"margin-bottom":"0"}},[n("div",{class:t===e.activeUser?"loggedIn":""},[n("div",{staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"}},[n("span",{staticStyle:{"margin-right":"0.6em"}},[e.savedLocalUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_LOCAL")}},[n("i",{staticClass:"fas fa-user fa-2x"})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_CLOUD")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-cloud fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)||e.savedLocalUsers.includes(t)?e._e():n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_ONLINE")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-globe fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})])]),e._v(" "),n("strong",[e._v(e._s(t))]),e._v(" "),n("em",{directives:[{name:"show",rawName:"v-show",value:t===e.activeUser,expression:"username === activeUser"}],attrs:{"data-i18n":""}},[e._v("(active) // (aktiv)")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.loginStored(t)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.loginTryUser!==t,expression:"loginTryUser !== username"}],staticClass:"fas fa-sign-in-alt"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:null==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == undefined && loginTryUser === username"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == false && loginTryUser === username"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == true && loginTryUser === username"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.removeStoredUser(t)}}},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.savedLocalUsers.includes(t),expression:"!savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logout // Ausloggen")]),e._v(" "),n("i",{staticClass:"fas fa-user-times"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.savedLocalUsers.includes(t),expression:"savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Delete // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hasValidMajorModelVersion(t),expression:"!hasValidMajorModelVersion(username)"}],staticClass:"eight columns"},[e._m(1,!0),e._v(" "),e._m(2,!0)])])])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("form",{staticClass:"eleven columns saved-user",attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[e._m(3),e._v(" "),n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),e.savedUsers.includes(e.user)&&e.hasValidMajorModelVersion(e.user)?n("button",{staticClass:"four columns",attrs:{type:"button"},on:{click:function(t){return e.loginStored(e.user)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{staticClass:"fas fa-sign-in-alt"})]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[e._m(5),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[n("div",{staticClass:"four columns offset-by-two",staticStyle:{"margin-bottom":"1.0em"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(6)]),e._v(" "),n("button",{staticClass:"five columns offset-by-one",attrs:{type:"button",disabled:!e.user||!e.password},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Login // Einloggen")]),e._v(" "),n("span",[n("i",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess === undefined && loginTryUser === user"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == false && loginTryUser === user"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == true && loginTryUser === user"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.allUsersList.length,expression:"allUsersList.length == 0"}]},[n("form",{attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(7),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser2",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(8),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword2",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember2"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(9),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check for a one-time login on a foreign device. // Für einmaliges Einloggen auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-one",attrs:{disabled:!e.user||!e.password,"data-i18n":""},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[e._v("Login // Einloggen")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess,expression:"loginSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logging in // Einloggen")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!1===e.loginSuccess,expression:"loginSuccess === false"}]},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.loginErrorCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.loginSuccess,expression:"loginSuccess === true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Login successful // Login erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}],attrs:{"data-i18n":""}},[e._v("No account? // Kein Account?")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}],attrs:{"data-i18n":""}},[e._v("Add new account? // Weiteren Account hinzufügen?")]),e._v(" "),n("a",{attrs:{href:"#register","data-i18n":""}},[e._v("Register now // Jetzt registrieren")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("AsTeRICS Grid is free and all you need is to register is a username and a password. // AsTeRICS Grid ist kostenlos und Sie benötigen nur einen Usernamen und ein Passwort.")])])])]),e._v(" "),e._m(10)])])],1)};Ur._withStripped=!0;var Fr,$r=n(14),Vr=n.n($r),jr={},Br=null,Yr=null,Hr=null,Wr=null,zr=!1,Kr=null,Jr=null,Xr=s.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function qr(e,t,n){return Hr!==e?Promise.reject():(Wr=e,Kr=t,Jr=n,e=e.trim(),Vr.a.login({username:e,password:t}).then((function(i){return log.info("login success!"),jr.stopAutoRetryLogin(),Br=i,Yr=e,D.setLastActiveUser(e),D.setAutologinUser(n?e:""),n&&D.saveUserPassword(e,t),Promise.resolve()})))}function Zr(e,t,n){return qr(e,t,n).then((function(){return Gt.initForUser(e,t,jr.getLoggedInUserDatabase(),!n).then((function(){return Promise.resolve(!0)}))}),(function(i){return Hr!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),D.isDatabaseSynced(e)?(log.info("using offline local database..."),D.setLastActiveUser(e),D.setAutologinUser(n?e:""),Qr(i)!==jr.ERROR_CODE_UNAUTHORIZED&&eo(e,t,n),Gt.initForUser(e,t).then((function(){return Promise.resolve(!1)}))):Promise.reject(Qr(i)))}))}function Qr(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?jr.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?jr.ERROR_CODE_NETWORK_ERROR:void 0}function eo(e,t,n){jr.stopAutoRetryLogin(),Fr=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),Zr(e,t,n)}),1e4)}jr.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",jr.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",jr.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",Vr.a.configure({serverUrl:Xr,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),jr.getLoggedInUsername=function(){return Yr},jr.getLoggedInUserDatabase=function(){if(!Br||!Br.userDBs)return null;var e=Object.keys(Br.userDBs);return Br.userDBs[e[0]]},jr.loginPlainPassword=function(e,t,n){Hr=e;var i=Ue.getUserPasswordHash(t);return jr.loginHashedPassword(e,i,n)},jr.loginHashedPassword=function(e,t,n){return Hr=e,Zr(e,t,n)},jr.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if(zr)return log.warn("login currently in progress - aborting..."),Promise.reject();Hr=e,zr=!0;var n=D.getSavedOnlineUsers(),i=D.getSavedLocalUsers(),a=new Promise((function(t,a){if(jr.getLoggedInUsername()===e)return t();if(jr.logout(),n.includes(e)&&D.isDatabaseSynced(e)){var r=D.getUserPassword(e);Gt.initForUser(e,r).then((function(){jr.loginHashedPassword(e,r,!0),t()}))}else if(n.includes(e)){log.info("waiting for successful login because user wasn't completely synced before...");var o=D.getUserPassword(e);jr.loginHashedPassword(e,o,!0).then((function(){t()})).catch((function(e){a(e)}))}else i.includes(e)&&(D.setAutologinUser(e),Gt.initForUser(e,e).then((function(){t()})))}));return a.then((function(){t||Fo.toMain()})),a.finally((function(){zr=!1})),a},jr.logout=function(){jr.stopAutoRetryLogin(),Yr&&(log.debug("logging out user: "+Yr),Gt.closeCurrentDatabase(),Vr.a.logout(Yr),Yr=null,Br=null)},jr.register=function(e,t,n){Hr=e,jr.stopAutoRetryLogin(),e=e.trim();var i=Ue.getUserPasswordHash(t);return log.debug("password hash: "+i),Vr.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then((function(t){return qr(e,i,n)})).then((function(){return log.info("registration successful!"),Gt.registerForUser(Yr,i,jr.getLoggedInUserDatabase(),!n)})).then((function(){return Wt.importDefaultGridset()})).catch((function(e){return log.info("registration failed!"),log.info(e),Promise.reject(e)}))},jr.registerOffline=function(e,t){return jr.logout(),D.saveLocalUser(e),D.setAutologinUser(e),Gt.registerForUser(e,t).then((function(){return Wt.importDefaultGridset()}))},jr.validateUsername=function(e){return new Promise((function(t,n){e&&s.USERNAME_REGEX.test(e)?D.isSavedLocalUser(e)||e===s.LOCAL_DEMO_USERNAME?t(s.VALIDATION_ERROR_EXISTING):Vr.a.validateUsername(e).then((function(){t(s.VALIDATION_VALID)}),(function(e){log.debug(e),t(s.VALIDATION_ERROR_EXISTING)})):t(s.VALIDATION_ERROR_REGEX)}))},jr.stopAutoRetryLogin=function(){Fr&&(window.clearInterval(Fr),Fr=null)},jr.ping=function(){a.a.get(Xr+"/ping")},a()(document).on(s.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),Wr&&Kr&&eo(Wr,Kr,Jr)})),a()(document).on(s.EVENT_DB_DATAMODEL_UPDATE,(function(){jr.logout(),D.setAutologinUser(""),Fo.toLogin()}));var to={components:{HeaderIcon:kn},props:[],data:function(){return{user:null,password:null,remember:!0,loginTryUser:null,loginSuccess:null,loginErrorCode:null,savedUsers:[],savedOnlineUsers:[],savedLocalUsers:[],allUsersList:[],activeUser:null}},methods:{toMain:function(){Fo.toMain()},loginPlain:function(e,t){var n=this;this.savedUsers.includes(e)?n.loginStored(e):e&&t&&(n.loginTryUser=e,n.loginSuccess=void 0,n.loginErrorCode="",jr.loginPlainPassword(e,t,this.remember).then((function(){n.loginSuccess=!0,Fo.toMain()})).catch((function(e){n.loginSuccess=!1,n.loginErrorCode=e})))},loginStored:function(e){var t=this;e&&(t.savedUsers.includes(e)||jr.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",jr.loginStoredUser(e).then((function(){t.loginSuccess=!0})).catch((function(e){t.loginSuccess=!1,t.loginErrorCode=e})))},removeStoredUser:function(e){if(this.savedOnlineUsers.includes(e)||this.savedLocalUsers.includes(e)){var t=this.savedOnlineUsers.includes(e)?"CONFIRM_REMOVE_USER":"CONFIRM_REMOVE_USER_LOCAL";if(!confirm(U.translate(t,e)))return;D.unmarkSyncedDatabase(e),D.removeUserPassword(e),jr.getLoggedInUsername()===e&&jr.logout(),Gt.deleteDatabase(e)}else jr.logout();this.allUsersList=D.getSavedUsers(this.activeUser),this.savedUsers=D.getSavedUsers(this.activeUser),this.savedOnlineUsers=D.getSavedOnlineUsers(),this.savedLocalUsers=D.getSavedLocalUsers()},hasValidMajorModelVersion:function(e){return D.getUserMajorModelVersion(e)<=_.getLatestModelVersion().major}},mounted:function(){var e=jr.getLoggedInUsername();this.activeUser=D.getAutologinUser()||e,this.savedUsers=D.getSavedUsers(this.activeUser),this.allUsersList=D.getSavedUsers(this.activeUser),this.savedOnlineUsers=D.getSavedOnlineUsers(),this.savedLocalUsers=D.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:D.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),U.initDomI18n()},updated:function(){U.initDomI18n()}},no=(n(141),_n(to,Ur,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Login // Einloggen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("i",{staticClass:"fas fa-exclamation-triangle"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Incompatible data model version! // Inkompatible Version des Datenmodells!")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{"data-i18n":""}},[t("span",[this._v("Change to "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" to open this user.")]),this._v(" "),t("span",[this._v("Wechseln sie zu "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" um diesen User zu verwenden.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("strong",{attrs:{"data-i18n":""}},[this._v("Login with other user // Login mit anderem User")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputPassword"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputUser2"}},[t("span",{staticClass:"desktop-right"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputPassword2"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember2"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"twelve columns"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to create an offline-only user? // Möchten Sie einen Offline-User erstellen?")]),this._v(" "),t("a",{attrs:{href:"#add","data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])])}],!1,null,"906058d8",null));no.options.__file="src/vue-components/views/loginView.vue";var io=no.exports,ao=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("form",{attrs:{autocomplete:"off",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"},{name:"debounce",rawName:"v-debounce",value:300,expression:"300"},{name:"focus",rawName:"v-focus"}],staticClass:"six columns",attrs:{type:"text",name:"username",id:"inputUser"},domProps:{value:e.user},on:{change:e.validateUsername,input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&0==e.usernameValid,expression:"user != null && usernameValid == false"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",[e._v(e._s(e._f("translate")(e.usernameValidationCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&1==e.usernameValid,expression:"user != null && usernameValid == true"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Valid username // Username OK")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"six columns",attrs:{type:"password",id:"inputPassword"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password2,expression:"password2"}],staticClass:"six columns",attrs:{type:"password",id:"inputConfirmPassword"},domProps:{value:e.password2},on:{input:function(t){t.target.composing||(e.password2=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password!==e.password2,expression:"!!password && password2 !== null && password !== password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords do not match // Passwörter stimmen nicht überein")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords match // Passwörter stimmen überein")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("i",{staticClass:"fas fa-2x fa-info-circle",staticStyle:{color:"blue"}}),e._v(" "),e._m(4)])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(5),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check if you are using a foreign device. // Auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns offset-by-two",attrs:{disabled:!(e.user&&e.password&&e.password2&&e.password===e.password2&&e.usernameValid),"data-i18n":""},on:{click:e.register}},[e._v("Register // Registrieren")])]),e._v(" "),e._m(6),e._v(" "),e._m(7),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"six columns offset-by-two"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.registerSuccess,expression:"registerSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering // Registriere")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.registerSuccess,expression:"registerSuccess == false"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering failed // Registrierung fehlgeschlagen")]),e._v(" "),n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("ul",e._l(e.validationErrors,(function(t){return n("li",[e._v(e._s(t))])})),0)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:1==e.registerSuccess,expression:"registerSuccess == true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Successfully registered // Registrierung erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])]),e._v(" "),n("comparison-component")],1)],1)};ao._withStripped=!0;var ro=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("accordion",{staticClass:"six columns offset-by-two",attrs:{"acc-label":"HEADER_COMPARE_ONLINE_OFFLINE"}},[n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Offline user // Offline-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline // alle Grids werden offline gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all functions available // voller Funktionsumfang")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("ideal for using on a single device // optimal für Nutzung auf einem einzelnen Gerät")])])])]),e._v(" "),n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Online user // Online-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline and online // alle Grids werden offline und online gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("automatic synchronization across multiple devices (e.g. PC, tablet, smartphone) // automatische Synchronisierung zwischen verschiedenen Geräten (z.B. PC, Tablet, Smartphone)")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all data is end-to-end encrypted and only you are able to access it // alle Daten werden verschlüsselt und es kann niemand außer Sie darauf zugreifen")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("for registration only a username and a password is needed // für die Registrierung wird nur ein Username und ein Passwort benötigt")])])])])])],1)};ro._withStripped=!0;var oo={props:[],components:{Accordion:Dn},data:function(){return{showInfo:!1}},methods:{},mounted:function(){U.initDomI18n()}},so=(n(143),_n(oo,ro,[],!1,null,"2a375b84",null));so.options.__file="src/vue-components/components/comparisonComponent.vue";var lo=so.exports,co={components:{ComparisonComponent:lo,HeaderIcon:kn},props:[],data:function(){return{user:null,usernameValid:null,usernameValidationCode:null,password:null,password2:null,remember:!0,registerSuccess:null,creationTime:(new Date).getTime(),spamTime:1e4,validationErrors:[]}},methods:{toMain:function(){Fo.toMain()},register:function(){var e=this,t=(new Date).getTime()-e.creationTime;if(t0,expression:"dicts && dicts.length > 0"}],attrs:{id:"dictList"}},[e._m(0),e._v(" "),e._l(e.dicts,(function(t){return n("li",{staticClass:"dict-table-elem"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[e.editModeId!==t.id?n("div",[e._v("\n "+e._s(t.dictionaryKey)+"\n "),n("button",{staticClass:"small-button",on:{click:function(n){return e.enableEditName(t)}}},[n("i",{staticClass:"far fa-edit"})])]):e._e(),e._v(" "),e.editModeId===t.id?n("div",[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"dict.dictionaryKey"}],attrs:{type:"text"},domProps:{value:t.dictionaryKey},on:{input:function(n){n.target.composing||e.$set(t,"dictionaryKey",n.target.value)}}}),e._v(" "),n("div",{staticClass:"inline"},[e.originalLabel?n("button",{staticClass:"small-button",on:{click:function(t){return e.cancelEditName()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("button",{staticClass:"small-button",attrs:{disabled:e.isLabelDuplicate(t.dictionaryKey)},on:{click:function(n){return e.finishEditName(t)}}},[n("i",{staticClass:"fas fa-check"})])])]):e._e()]),e._v(" "),n("div",{staticClass:"eight columns actionbuttons",staticStyle:{display:"flex"}},[n("div",{staticClass:"four columns show-mobile",staticStyle:{margin:"0.5em 0 0 0.2em"},attrs:{"data-i18n":""}},[e._v("Actions\n // Aktionen\n ")]),e._v(" "),n("button",{on:{click:function(n){return e.edit(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.clone(t.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteDict(t.id,t.dictionaryKey)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])])])]),e._v(" "),e.editId===t.id?n("div",{staticClass:"edit-container"},[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchWord,expression:"searchWord"}],staticClass:"four columns",attrs:{type:"text",placeholder:"Search word"},domProps:{value:e.searchWord},on:{input:[function(t){t.target.composing||(e.searchWord=t.target.value)},function(t){return e.inputSearchWord()}]}}),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){e.showImportModal=!0}}},[n("i",{staticClass:"fas fa-file-import"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Import words // Wörter importieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Words: // Wörter:")]),e._v(" "),n("ul",{staticStyle:{"margin-left":"0"}},e._l(e.wordlist,(function(i){return n("li",[n("button",{staticClass:"small-button",staticStyle:{"margin-right":"0.5em"},on:{click:function(n){return e.deleteWord(i,t)}}},[n("i",{staticClass:"far fa-trash-alt"})]),e._v(e._s(i)+"\n ")])})),0),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.totalWords>e.wordlist.length&&""===e.searchWord,expression:"totalWords > wordlist.length && searchWord === ''"}]},[e._v("\n "+e._s(e.totalWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) available. Type in search field to filter. // mehr Wörter verfügbar. Tippe in Suchfeld um zu filtern.")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.filterWords>e.wordlist.length&&""!==e.searchWord,expression:"filterWords > wordlist.length && searchWord !== ''"}]},[e._v("\n "+e._s(e.filterWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) for this filter. Refine search to show more. // mehr Wörter für diese Suche. Verfeinere die Suche um mehr anzuzeigen.")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchWord&&e.totalWords>0&&0===e.wordlist.length,expression:"searchWord && totalWords > 0 && wordlist.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("No words for this filter. Clear search field to show elements. // Keine Wörter für diese Suche. Lösche Suchfeld um Elemente anzuzeigen.")]),e._v(" "),n("button",{on:{click:function(t){return e.inputSearchWord("")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear // Löschen")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.totalWords,expression:"totalWords === 0"}],attrs:{"data-i18n":""}},[e._v("This dictionary contains no words. // Dieses Wörterbuch enthält keine Wörter.")])])]):e._e(),e._v(" "),n("div",[e.showImportModal?n("import-dictionary-modal",{attrs:{"dict-data":t},on:{close:function(t){e.showImportModal=!1},reload:e.reload}}):e._e()],1)])}))],2),e._v(" "),e.dicts&&0!==e.dicts.length?e._e():n("p",{attrs:{"data-i18n":""}},[e._v("\n No dictionaries found! // Keine Ergebnisse gefunden!\n ")])])])])};Ao._withStripped=!0;var So=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body container"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"nine columns offset-by-three btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:function(){e.showAdvanced=!e.showAdvanced}}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.showAdvanced,expression:"!showAdvanced"}],staticClass:"fas fa-chevron-down"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.showAdvanced,expression:"showAdvanced"}],staticClass:"fas fa-chevron-up"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Advanced options // Erweiterte Einstellungen")])])]),e._v(" "),e.showAdvanced?n("div",{staticClass:"row"},[n("div",{staticClass:"nine columns offset-by-three",staticStyle:{"background-color":"whitesmoke"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElementSeparator","data-i18n":""}},[e._v("Element separator // Trennzeichen Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.elementSeparator,expression:"elementSeparator"}],attrs:{id:"inputElementSeparator",type:"text"},domProps:{value:e.elementSeparator},on:{input:[function(t){t.target.composing||(e.elementSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankSeparator","data-i18n":""}},[e._v("In-element separator // Trennzeichen innerhalb Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankSeparator,expression:"rankSeparator"}],attrs:{id:"inputRankSeparator",type:"text"},domProps:{value:e.rankSeparator},on:{input:[function(t){t.target.composing||(e.rankSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElIndex","data-i18n":""}},[e._v("Word index (0-based) // Index Wort (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.wordPosition,expression:"wordPosition"}],attrs:{id:"inputElIndex",type:"number"},domProps:{value:e.wordPosition},on:{input:[function(t){t.target.composing||(e.wordPosition=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankIndex","data-i18n":""}},[e._v("Rank index (0-based) // Index Rank (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankPosition,expression:"rankPosition"}],attrs:{id:"inputRankIndex",type:"number"},domProps:{value:e.rankPosition},on:{input:[function(t){t.target.composing||(e.rankPosition=t.target.value)},e.textChanged]}})])])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Word1 Word2 Word3..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Words // Erkannte Wörter")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.elementCount))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Word(s) // Wörter")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))]),e._v(" "),e.parsedElems.length1},show:function(e){},edit:function(e){this.cancelEditName(),this.editId!==e.id?(this.editId=e.id,this.predictionary=Tt.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),Kt.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished:function(){this.editId=null,this.searchWord="",Kt.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord:function(e){var t=this,n=void 0===e?200:0;Dt.debounce((function(){t.searchWord=void 0===e?t.searchWord:e;var n=t.predictionary.predict(t.searchWord,{maxPredicitons:1e4});t.filterWords=n.length,t.wordlist=n.slice(0,9)}),n,Dt.DEFAULT_KEY2)},clone:function(e){var t=this;Wt.getDictionary(e).then((function(e){Wt.saveDictionary(e.clone()).then((function(){t.reload()}))}))},deleteWord:function(e,t){var n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,Dt.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),Wt.saveDictionary(t)}),2e3,Dt.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){var t=this,n=this;Wt.getDictionaries().then((function(i){t.dicts=JSON.parse(JSON.stringify(i)),n.editId&&e&&e.data&&(n.editFinished(),n.edit(e))}))},updatedHandler:function(e,t,n){n[0].modelName===mt.getModelName()&&this.reload(n[0])}},created:function(){var e=this;a()(document).on(s.EVENT_DB_PULL_UPDATED,e.updatedHandler),Wt.getDictionaries().then((function(t){log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1}))},mounted:function(){this,U.initDomI18n()},updated:function(){U.initDomI18n()},beforeDestroy:function(){At.init(),a()(document).off(s.EVENT_DB_PULL_UPDATED,this.updatedHandler),a.a.contextMenu("destroy")}},xo=(n(155),_n(Lo,Ao,[function(){var e=this.$createElement,t=this._self._c||e;return t("li",{staticClass:"hide-mobile table-headers"},[t("span",{staticClass:"four columns"},[this._v("Dictionary Name")]),this._v(" "),t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Actions // Aktionen")]),t("br")])}],!1,null,"594606fa",null));xo.options.__file="src/vue-components/views/dictionariesView.vue";var Do=xo.exports,Ro=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),e.show?n("div",{staticClass:"row content spaced"},[n("div",{staticClass:"row"},[n("h2",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("General settings // Allgemeine Einstellungen")]),e._v(" "),e.saveSuccess?n("div",{staticStyle:{"padding-top":"1.7em"}},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("All changes saved! // Alle Änderungen gespeichert!")])]):e._e()]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Application Language // Anwendungs-Sprache")]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"inLanguage","data-i18n":""}},[e._v("Select language // Sprache wählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.langCode,expression:"langCode"}],staticClass:"five columns",attrs:{id:"inLanguage"},on:{input:function(t){return e.saveLangCode()},change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.langCode=t.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.allLanguages.filter((function(t){return-1!==["de","en"].indexOf(t.code)||-1!==e.gridLanguages.indexOf(t.code)})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])}))],2)]),e._v(" "),e._m(0),e._v(" "),e._m(1)]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Voice // Stimme")]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedVoiceName,expression:"selectedVoiceName"}],staticClass:"five columns",attrs:{id:"inVoice"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedVoiceName=t.target.multiple?n:n[0]},function(t){return e.saveVoice()}]}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.voices,(function(t){return n("option",{domProps:{value:t.name}},[e._v(e._s(t.name))])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.testText,expression:"testText"}],staticClass:"five columns",attrs:{type:"text"},domProps:{value:e.testText},on:{input:function(t){t.target.composing||(e.testText=t.target.value)}}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{id:"testVoice","data-i18n":""},on:{click:e.testSpeak}},[e._v("Test // Testen")])])]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Miscellaneous // Diverses")]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.syncNavigation,expression:"syncNavigation"}],attrs:{id:"chkSyncNavigation",type:"checkbox"},domProps:{checked:Array.isArray(e.syncNavigation)?e._i(e.syncNavigation,null)>-1:e.syncNavigation},on:{change:[function(t){var n=e.syncNavigation,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.syncNavigation=n.concat([null])):r>-1&&(e.syncNavigation=n.slice(0,r).concat(n.slice(r+1)))}else e.syncNavigation=a},function(t){return e.saveSyncNavigation()}]}}),e._v(" "),n("label",{attrs:{for:"chkSyncNavigation","data-i18n":""}},[e._v("Synchronize navigation and locked/fullscreen state for online users // Navigation und Sperr- bzw. Vollbildstatus für online User synchronisieren")])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"unlockPass","data-i18n":""}},[e._v("Passcode for unlocking user interface (only numbers) // PIN um Oberfläche zu entsperren (nur Ziffern)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.unlockPasscode,expression:"unlockPasscode"}],staticClass:"five columns",attrs:{id:"unlockPass",type:"number",placeholder:e.i18nService.translate("(no passcode) // (kein PIN)")},domProps:{value:e.unlockPasscode},on:{input:[function(t){t.target.composing||(e.unlockPasscode=t.target.value)},function(t){e.unlockPasscode=e.unlockPasscode.substring(0,6),e.savePasscode()}]}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{"data-i18n":""},on:{click:function(t){e.unlockPasscode=null,e.savePasscode()}}},[e._v("Reset // Löschen")])])])]):e._e()],1)};Ro._withStripped=!0;var Mo={components:{HeaderIcon:kn},props:[],data:function(){return{metadata:null,show:!1,langCode:"",gridLanguages:[],allLanguages:U.getAllLanguages(),currentLang:U.getBrowserLang(),saveSuccess:null,speechService:ri,syncNavigation:D.shouldSyncNavigation(),unlockPasscode:D.getUnlockPasscode(),voices:ri.getVoices(),selectedVoiceName:ri.getPreferredVoiceName(),testText:U.translate("This is an english sentence. // Das ist ein deutscher Satz."),i18nService:U}},methods:{saveLangCode:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){U.setLanguage(e.langCode),U.initDomI18n(),e.saveSuccess=!0}),300,"SAVE_LANG")},saveVoice:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){ri.setPreferredVoiceName(e.selectedVoiceName),e.saveSuccess=!0}),300,"SAVE_VOICE")},saveSyncNavigation:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){D.setShouldSyncNavigation(e.syncNavigation),e.saveSuccess=!0}),300,"SAVE_NAV")},savePasscode:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){D.setUnlockPasscode(e.unlockPasscode),e.saveSuccess=!0}),500,"SAVE_UNLOCK")},testSpeak:function(){ri.speak(this.testText,null,this.selectedVoiceName)}},mounted:function(){var e=this;U.initDomI18n(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0})),Wt.getGrids(!1,!0).then((function(t){e.gridLanguages=t[0]?Object.keys(t[0].label):[]})),e.langCode=U.getCustomLanguage()},updated:function(){U.initDomI18n()}},Po=(n(157),_n(Mo,Ro,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word"},[t("span",{attrs:{"data-i18n":""}},[t("span",[this._v('Grids can be translated to every language. To add or edit a translation use "Edit grid -> More -> Translate Grid".')]),this._v(" "),t("span",[this._v('Grids können in alle Sprachen übersetzt werden. Um eine Übersetzung zu bearbeiten oder hinzuzufügen, verwenden Sie "Grid bearbeiten -> Mehr -> Grid übersetzen".')])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word",attrs:{"data-i18n":""}},[t("span",[this._v("For user interface only English (en) and German (de) are available. For all other languages English will be used.")]),this._v(" "),t("span",[this._v("Das User-Interface ist nur in Englisch (en) and Deutsch (de) verfügbar. Für andere Sprachen wird Englisch verwendet.")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Preferred voice // Bevorzugte Stimme")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Test text // Test-Text")])])}],!1,null,"747d2ef2",null));Po.options.__file="src/vue-components/views/settingsView.vue";var Go=Po.exports,Uo=["#login","#register","#welcome","#add","#about"],Fo={},$o=null,Vo=null,jo=!1,Bo=null,Yo=[];function Ho(){var e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function Wo(e,t){Vo=t?null:location.hash,location.hash=e}function zo(e,t,n){var i;Bo=e,e!==Gr&&a()("#touchElement").hide(),i=n||Ho(),a()("nav button").removeClass("selected"),a()("nav a[href='".concat(i,"'] button")).addClass("selected"),log.debug("loading view: "+e.__file),Sn.setViewComponent(e,t)}function Ko(){Wt.getMetadata().then((function(e){var t=e?e.lastOpenedGridId:null;zo(Gr,{gridId:t})}))}Fo.init=function(e,t){jo=!0,e,($o=new G.a(null,!0)).on({main:function(){Kt.setHelpLocation("02_navigation","#main-view"),Ko()},"grids/":function(){Kt.setHelpLocation("02_navigation","#manage-grids-view"),zo(ei)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),Kt.setHelpLocation("02_navigation","#main-view"),zo(Gr,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),Kt.setHelpLocation("02_navigation","#main-view"),Wt.getGrids().then((function(t){var n=t.filter((function(t){return U.getTranslation(t.label)===e.gridName})),i=n[0]?n[0].id:null;i?zo(Gr,{gridId:i},"#main"):(log.warn("no grid with name ".concat(e.gridName," found!")),Ko())}))},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),Kt.setHelpLocation("02_navigation","#edit-view"),zo(Ga,{gridId:e.gridId})},login:function(){Kt.setHelpLocation("02_navigation","#change-user-view"),zo(io)},register:function(){Kt.setHelpLocation("06_users","#online-users"),zo(fo)},add:function(){Kt.setHelpLocation("06_users","#offline-users"),zo(mo)},welcome:function(){Kt.setHelpLocationIndex(),zo(bo)},about:function(){Kt.setHelpLocationIndex(),zo(To)},dictionaries:function(){Kt.setHelpLocation("02_navigation","#manage-dictionaries-view"),zo(Do)},settings:function(){zo(Go)},"*":function(){Kt.setHelpLocation("02_navigation","#main-view"),Fo.toMain()}}),$o.hooks({before:function(e,t){Bo&&Bo.destroy&&(Bo.destroy(),Bo=null);var n=function(){var e=location.hash;if(!Gt.getCurrentUsedDatabase()){var t=D.getLastActiveUser()||D.getSavedUsers().length>0;e=(e=Uo.includes(e)?e:null)||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),Wo(n)):e(),fi.destroy()},after:function(e){},leave:function(e){}}),t&&Wo(t),$o.resolve()},Fo.isInitialized=function(){return jo},Fo.toMain=function(){0===Ho().indexOf("#main")?Wo("#main?date="+(new Date).getTime()):Wo("#main")},Fo.toRegister=function(){Wo("#register")},Fo.toAddOffline=function(){Wo("#add")},Fo.toAbout=function(){Wo("#about")},Fo.toLogin=function(){Wo("#login")},Fo.toLastOpenedGrid=function(){Wt.getMetadata().then((function(e){Fo.toGrid(e.lastOpenedGridId)}))},Fo.toGrid=function(e){e&&Wo("#grid/"+e+"?date="+(new Date).getTime())},Fo.toEditGrid=function(e){e&&Wo("#grid/edit/"+e)},Fo.toManageGrids=function(){Wo("#grids")},Fo.back=function(){Vo&&Vo!==location.hash?Wo(Vo,!0):this.toMain()},Fo.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},Fo.getCurrentView=function(){return Bo},Fo.addToGridHistory=function(e){Yo.length>0&&Yo[Yo.length-1]===e||(-1===Yo.indexOf(e)?Yo.push(e):Yo=[e])},Fo.toLastGrid=function(){if(1!==Yo.length){Yo.pop();var e=Yo.pop();Fo.toGrid(e)}};var Jo={},Xo=null;Jo.init=function(){nn.a.directive("focus",{inserted:function(e,t){(t.value||void 0===t.value)&&(e.focus&&e.focus(),e.select&&e.select())},updated:function(e,t){t.value&&(e.focus&&e.focus(),e.select&&e.select())}}),nn.a.directive("debounce",{inserted:function(e,t){e.oninput=function(n){clearTimeout(Xo),Xo=setTimeout((function(){e.dispatchEvent(new Event("change"))}),parseInt(t.value)||500)}}}),nn.a.filter("translate",(function(e){return U.translate(e)})),nn.a.filter("extractTranslation",(function(e){return U.getTranslation(e)}))};n(159),n(161),n(163);var qo={init:function(){un.global.onAnyKey((function(e,t,n){if(n.ctrlKey&&n.shiftKey&&39===e){var i=D.getSavedUsers(),a=Wt.getCurrentUser(),r=i.indexOf(a),o=i[r=r+1_.getLatestModelVersion().major&&(log.info('data model version of user "'.concat(n,'" is newer than version of running AsTeRICS Grid -> prevent autologin.')),n=null,D.setAutologinUser("")),log.info("autologin user: "+n),We.isDemoMode()?(e.push(jr.registerOffline(s.LOCAL_DEMO_USERNAME,s.LOCAL_DEMO_USERNAME)),D.setAutologinUser("")):e.push(jr.loginStoredUser(n,!0)),Promise.all(e).finally((function(){Sn.init();var e=n||We.isDemoMode(),i=t||D.getSavedUsers().length>0;D.setLastActiveUser(n||t||"");var a=location.hash||(e?"#main":i?"#login":"#welcome");Fo.isInitialized()||Fo.init("#injectView",a)}))}()}]); \ No newline at end of file + */!function(o){var s=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};function l(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=void 0!==e.maxListeners?e.maxListeners:10,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=10}function u(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==i&&i.emitWarning){var a=new Error(n);a.name="MaxListenersExceededWarning",a.emitter=this,a.count=e,i.emitWarning(a)}else console.error(n),console.trace&&console.trace()}function d(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}function f(e,t,n,i){if(!n)return[];var a,r,o,s,l,c,u,d=[],p=t.length,h=t[i],v=t[i+1];if(i===p&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(a=0,r=n._listeners.length;a0&&a._listeners.length>this._maxListeners&&(a._listeners.warned=!0,u.call(this,a._listeners.length,r))):a._listeners=t,!0;r=e.shift()}return!0}d.EventEmitter2=d,d.prototype.delimiter=".",d.prototype.setMaxListeners=function(e){void 0!==e&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},d.prototype.event="",d.prototype.once=function(e,t){return this._once(e,t,!1)},d.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},d.prototype._once=function(e,t,n){return this._many(e,1,t,n),this},d.prototype.many=function(e,t,n){return this._many(e,t,n,!1)},d.prototype.prependMany=function(e,t,n){return this._many(e,t,n,!0)},d.prototype._many=function(e,t,n,i){var a=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function r(){return 0==--t&&a.off(e,r),n.apply(this,arguments)}return r._origin=n,this._on(e,r,i),a},d.prototype.emit=function(){this._events||l.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,n,i,a,r,o=arguments.length;if(this._all&&this._all.length){if(r=this._all.slice(),o>3)for(t=new Array(o),a=0;a3)for(t=new Array(o-1),a=1;a3)for(t=new Array(s),a=1;a3)for(t=new Array(s-1),a=1;a0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,u.call(this,this._events[e].length,e))):this._events[e]=t,this)},d.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var a="string"==typeof e?e.split(this.delimiter):e.slice();i=f.call(this,null,a,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var o=0;o0&&e(t[a]),0===Object.keys(o).length&&delete t[a])}}}(this.listenerTree),this},d.prototype.offAny=function(e){var t,n=0,i=0;if(e&&this._all&&this._all.length>0){for(n=0,i=(t=this._all).length;ni,.context-menu-icon.context-menu-icon--fa5.context-menu-hover svg{color:#fff}.context-menu-icon.context-menu-icon--fa5.context-menu-disabled i,.context-menu-icon.context-menu-icon--fa5.context-menu-disabled svg{color:#bbb}.context-menu-list{position:absolute;display:inline-block;min-width:13em;max-width:26em;padding:.25em 0;margin:.3em;font-family:inherit;font-size:inherit;list-style-type:none;background:#fff;border:1px solid #bebebe;border-radius:.2em;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.5);box-shadow:0 2px 5px rgba(0,0,0,0.5)}.context-menu-item{position:relative;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;padding:.2em 2em;color:#2f2f2f;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.context-menu-separator{padding:0;margin:.35em 0;border-bottom:1px solid #e6e6e6}.context-menu-item>label>input,.context-menu-item>label>textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.context-menu-item.context-menu-hover{color:#fff;cursor:pointer;background-color:#2980b9}.context-menu-item.context-menu-disabled{color:#bbb;cursor:default;background-color:#fff}.context-menu-input.context-menu-hover{color:#2f2f2f;cursor:default}.context-menu-submenu:after{position:absolute;top:50%;right:.5em;z-index:1;width:0;height:0;content:\'\';border-color:transparent transparent transparent #2f2f2f;border-style:solid;border-width:.25em 0 .25em .25em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%)}.context-menu-item.context-menu-input{padding:.3em .6em}.context-menu-input>label>*{vertical-align:top}.context-menu-input>label>input[type="checkbox"],.context-menu-input>label>input[type="radio"]{position:relative;top:.12em;margin-right:.4em}.context-menu-input>label{margin:0}.context-menu-input>label,.context-menu-input>label>input[type="text"],.context-menu-input>label>textarea,.context-menu-input>label>select{display:block;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.context-menu-input>label>textarea{height:7em}.context-menu-item>.context-menu-list{top:.3em;right:-.3em;display:none}.context-menu-item.context-menu-visible>.context-menu-list{display:block}.context-menu-accesskey{text-decoration:underline}\n',""])},function(e,t,n){var i=n(164);"string"==typeof i&&(i=[[e.i,i,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(7)(i,a);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(6)(!1)).push([e.i,".holy-grail{min-height:100vh}.holy-grail,.holy-grail-body{display:flex;flex:1 1 auto;flex-direction:row}.holy-grail-content{flex:1 1 auto}.holy-grail-sidebar-1{order:-1;border-right:2px solid lightgray;max-height:98vh;overflow-x:hidden;padding-top:2vh;display:flex;flex-flow:column}.hg-sidebar{flex:0 0 250px;z-index:3}nav li:focus{outline:none}@media (max-width: 850px){.hg-sidebar{flex:0 0 50px}#astericsIcon{margin-bottom:1em}nav li button{padding-left:0.5em}.hg-sidebar button{padding-left:0;padding-right:0;text-align:center}}@media (max-width: 850px) and (max-height: 500px){.hg-sidebar{flex:0 0 12vh}.hg-sidebar button,#syncVisualization{font-size:3vh;line-height:0}#astericsIcon{height:10vh}header button,header a,header input{height:10vh !important;max-height:40px;font-size:4vh;line-height:0}}\n",""])},function(e,t,n){"use strict";n.r(t);var i=n(0),a=n.n(i),r=n(13),o=n.n(r),s={ELEMENT_EVENT_ID:"ELEMENT_EVENT_ID",MODEL_VERSION:'{"major": 3, "minor": 0, "patch": 0}',LOCAL_NOLOGIN_USERNAME:"default-user",LOCAL_DEMO_USERNAME:"local-demo-user",USERNAME_REGEX:/^[a-z][a-z0-9_-]{2,50}$/,VALIDATION_ERROR_REGEX:"VALIDATION_ERROR_REGEX",VALIDATION_ERROR_EXISTING:"VALIDATION_ERROR_EXISTING",VALIDATION_VALID:"VALIDATION_VALID",EVENT_DB_CONNECTION_LOST:"EVENT_DB_CONNECTION_LOST",EVENT_DB_PULL_UPDATED:"EVENT_DB_PULL_UPDATED",EVENT_DB_SYNC_STATE_CHANGE:"EVENT_DB_SYNC_STATE_CHANGE",EVENT_DB_INITIALIZED:"EVENT_DB_INITIALIZED",EVENT_DB_CLOSED:"EVENT_DB_CLOSED",EVENT_DB_DATAMODEL_UPDATE:"EVENT_DB_DATAMODEL_UPDATE",EVENT_SIDEBAR_OPEN:"event-sidebar-open",EVENT_SIDEBAR_OPENED:"event-sidebar-opened",EVENT_SIDEBAR_CLOSE:"event-sidebar-close",EVENT_GRID_RESIZE:"EVENT_GRID_RESIZE",EVENT_GRID_LOADED:"EVENT_GRID_LOADED",EVENT_USER_CHANGED:"EVENT_USER_CHANGED",EVENT_LANGUAGE_CHANGE:"EVENT_LANGUAGE_CHANGE",DB_SYNC_STATE_SYNCINC:"DB_SYNC_STATE_SYNCINC",DB_SYNC_STATE_SYNCED:"DB_SYNC_STATE_SYNCED",DB_SYNC_STATE_STOPPED:"DB_SYNC_STATE_STOPPED",DB_SYNC_STATE_FAIL:"DB_SYNC_STATE_FAIL",DB_SYNC_STATE_ONLINEONLY:"DB_SYNC_STATE_ONLINEONLY",ENVIRONMENT:"PROD"};s.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===s.ENVIRONMENT,s.IS_ENVIRONMENT_PROD=!s.IS_ENVIRONMENT_DEV,s.CURRENT_VERSION="release-2021-02-05-14.44/+0100",s.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),s.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var l=n(2),c=n.n(l),u=n(3),d=n.n(u),f=n(4),p=n.n(f),h=n(5),v=n.n(h),m=n(1),g=n.n(m),_={},y=100,b=JSON.parse(s.MODEL_VERSION),E={major:null,minor:null,patch:null};_.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+y++},_.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},_.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},_.setDefaults=function(e,t,n){if(t&&e&&n&&n.definition){var i=Object.keys(n.definition);Object.keys(t).forEach((function(n){i.includes(n)&&null==e[n]&&(e[n]=t[n])}))}return e},_.hashCode=function(e){e=e||{};var t=JSON.parse(JSON.stringify(e));return delete t._rev,delete t._id,delete t.id,JSON.stringify(t).split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0)},_.getModelVersionString=function(){return s.MODEL_VERSION},_.getModelVersionObject=function(e){if(!e)return E;var t=JSON.parse(e);return t.major&&(t.major=parseInt(t.major),t.minor=parseInt(t.minor),t.patch=parseInt(t.patch)),t.major?t:E},_.getLatestModelVersion=function(){return b};var C=window.Model;function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}var T=function(e){p()(n,e);var t=w(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId("input-event-key"),a}return d()(n,[{key:"isValid",value:function(){return this.modelName&&this.label&&this.keyCode}}],[{key:"getModelName",value:function(){return"InputEventKey"}}]),n}(C({id:String,modelName:String,modelVersion:String,label:[String],keyCode:[Number],keyName:[String],repeat:[Number],timeout:[Number],holdDuration:[Number]}));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}T.defaults({id:"",modelName:T.getModelName(),modelVersion:s.MODEL_VERSION,repeat:1,timeout:0,holdDuration:0});var S=function(e){p()(n,e);var t=A(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId("input-event-are"),a}return d()(n,[{key:"isValid",value:function(){return this.modelName&&this.label&&this.eventNames.length>0}}],[{key:"getModelName",value:function(){return"InputEventARE"}}]),n}(C({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[C.Array(String)],areURL:[String]}));function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}S.defaults({id:"",modelName:S.getModelName(),modelVersion:s.MODEL_VERSION,eventNames:[]});var I=function(e){p()(n,e);var t=N(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId("input-config"),a}return d()(n,null,[{key:"getModelName",value:function(){return"InputConfig"}},{key:"getInputEventTypes",value:function(){return[T,S]}},{key:"getInputEventInstance",value:function(e,t){var n=this.getInputEventTypes().filter((function(t){return t.getModelName()===e}))[0];if(n)return new n(t);log.warn("input event type not found: "+e)}}]),n}(C({id:String,modelName:String,modelVersion:String,globalReadActive:[Boolean],scanEnabled:[Boolean],scanAuto:[Boolean],scanTimeoutMs:[Number],scanTimeoutFirstElementFactor:[Number],scanVertical:[Boolean],scanBinary:[Boolean],scanInputs:[C.Array(Object)],hoverEnabled:[Boolean],hoverTimeoutMs:Number,hoverHideCursor:[Boolean],hoverDisableHoverpane:[Boolean],mouseclickEnabled:[Boolean],dirEnabled:[Boolean],dirInputs:[C.Array(Object)],dirWrapAround:[Boolean],dirResetToStart:[Boolean],seqEnabled:[Boolean],seqInputs:[C.Array(Object)],huffEnabled:[Boolean],huffElementCount:[Number],huffInputs:[C.Array(Object)],huffColors:[C.Array(String)],huffShowColors:[Boolean],huffShowNumbers:[Boolean],huffColorWholeElement:[Boolean],huffTimeout:[Number],huffMarkInactive:[Boolean]}));function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}I.UP="UP",I.DOWN="DOWN",I.LEFT="LEFT",I.RIGHT="RIGHT",I.SELECT="SELECT",I.NEXT="NEXT",I.NEXT_ELEMENT="NEXT_ELEMENT",I.PREVIOUS_ELEMENT="PREVIOUS_ELEMENT",I.GENERAL_INPUT="GENERAL_INPUT",I.getNumConst=function(e){return"NUM"+e},I.DEFAULT_SCAN_INPUTS=[new T({label:I.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new T({label:I.NEXT,keyCode:32,keyName:"Space"})],I.DEFAULT_SEQ_INPUTS=[new T({label:I.SELECT,keyCode:32,keyName:"Space"}),new T({label:I.NEXT_ELEMENT,keyCode:39,keyName:"ArrowRight"}),new T({label:I.PREVIOUS_ELEMENT,keyCode:37,keyName:"ArrowLeft"})],I.DEFAULT_DIR_INPUTS=[new T({label:I.SELECT,keyCode:32,keyName:"Space"}),new T({label:I.LEFT,keyCode:37,keyName:"ArrowLeft"}),new T({label:I.RIGHT,keyCode:39,keyName:"ArrowRight"}),new T({label:I.UP,keyCode:38,keyName:"ArrowUp"}),new T({label:I.DOWN,keyCode:40,keyName:"ArrowDown"})],I.DEFAULT_HUFF_INPUTS=[new T({label:I.GENERAL_INPUT,keyCode:49,keyName:"Digit1"}),new T({label:I.GENERAL_INPUT,keyCode:50,keyName:"Digit2"}),new T({label:I.GENERAL_INPUT,keyCode:51,keyName:"Digit3"}),new T({label:I.GENERAL_INPUT,keyCode:52,keyName:"Digit4"})],I.DEFAULT_HUFF_COLORS=["#D55E00","#F0E442","#009E73","#0072B2","#CC79A7","#E69F00","#56B4E9","#000000","#016619"],I.defaults({id:"",modelName:I.getModelName(),modelVersion:s.MODEL_VERSION,scanAuto:!1,scanTimeoutMs:1e3,scanTimeoutFirstElementFactor:1,scanBinary:!0,hoverTimeoutMs:1e3,mouseclickEnabled:!0,scanInputs:I.DEFAULT_SCAN_INPUTS,dirInputs:I.DEFAULT_DIR_INPUTS,seqInputs:I.DEFAULT_SEQ_INPUTS,dirWrapAround:!0,huffInputs:I.DEFAULT_HUFF_INPUTS,huffColors:I.DEFAULT_HUFF_COLORS,huffShowColors:!0,huffShowNumbers:!0,huffElementCount:0,huffTimeout:4e3,huffMarkInactive:!0});var O=function(e){p()(n,e);var t=k(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n)||{},(a=t.call(this,e)).id=a.id||_.generateId(n.getIdPrefix()),a}return d()(n,[{key:"isEqual",value:function(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}}],[{key:"getModelName",value:function(){return"MetaData"}},{key:"getIdPrefix",value:function(){return"meta-data"}}]),n}(C({id:String,modelName:String,modelVersion:String,lastOpenedGridId:[String],globalGridId:[String],globalGridActive:[Boolean],globalGridHeightPercentage:[Number],locked:[Boolean],fullscreen:[Boolean],hashCodes:[Object],inputConfig:I}));O.defaults({id:"",modelName:O.getModelName(),modelVersion:s.MODEL_VERSION,locked:void 0,fullscreen:void 0,hashCodes:{},inputConfig:new I,globalGridActive:!1,globalGridHeightPercentage:15});var L="could not access local storage, maybe disabled by user? Error: ",x=null;if("undefined"!=typeof Storage)try{x=window.localStorage}catch(e){log.error(L+e)}var D={save:function(e,t){if(x)try{return x.setItem(e,t)}catch(e){log.error(L+e)}},get:function(e){if(x)try{return x.getItem(e)}catch(e){log.error(L+e)}},remove:function(e){if(x)try{return x.removeItem(e)}catch(e){log.error(L+e)}},getUserPassword:function(e){return e?R("USER_PASSWORDS_KEY")[e]:null},saveLocalUser:function(e){var t=R("USER_PASSWORDS_KEY");t[e]="",D.save("USER_PASSWORDS_KEY",JSON.stringify(t))},isSavedLocalUser:function(e){return""===R("USER_PASSWORDS_KEY")[e]},isLastActiveUserLocal:function(){return""===R("USER_PASSWORDS_KEY")[D.getLastActiveUser()]},saveUserPassword:function(e,t){var n=R("USER_PASSWORDS_KEY");n[e]=t,D.save("USER_PASSWORDS_KEY",JSON.stringify(n))},removeUserPassword:function(e){var t=R("USER_PASSWORDS_KEY");delete t[e],D.save("USER_PASSWORDS_KEY",JSON.stringify(t)),D.getAutologinUser()===e&&D.setAutologinUser("")},getSavedUsers:function(e){var t=D.getSavedLocalUsers(),n=D.getSavedOnlineUsers().concat(t);return e&&n.includes(e)&&(n=n.filter((function(t){return t!==e}))).unshift(e),n},getSavedLocalUsers:function(){var e=R("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter((function(t){return""===e[t]})).sort((function(e,t){return e===s.LOCAL_DEMO_USERNAME?1:t===s.LOCAL_DEMO_USERNAME?-1:e.localeCompare(t)}))},getSavedOnlineUsers:function(){var e=R("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter((function(t){return""!==e[t]})).sort()},setLastActiveUser:function(e){D.save("LAST_ACTIVEUSER_KEY",e)},getLastActiveUser:function(){return D.get("LAST_ACTIVEUSER_KEY")},setAutologinUser:function(e){e!==s.LOCAL_DEMO_USERNAME&&D.save("AUTOLOGIN_USER_KEY",e)},getAutologinUser:function(){return D.get("AUTOLOGIN_USER_KEY")},markSyncedDatabase:function(e){var t=M();t.includes(e)||t.push(e),D.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},isDatabaseSynced:function(e){return M().includes(e)},unmarkSyncedDatabase:function(e){var t=M();t=t.filter((function(t){return t!==e})),D.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},getUserMajorModelVersion:function(e){var t=R("USER_MODELVERSION_KEY");return t[e]?parseInt(JSON.parse(t[e]).major):1},setUserModelVersion:function(e,t){if(D.getUserMajorModelVersion(e)n[e].toLowerCase()?1:-1})),Y=e),B},U.translate=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i-1){var a=e.split(" // "),r="en"===n[0]||"de"===n[0]?n[0]:U.getBrowserLang(),o=j.indexOf(r);return o=o>0?o:0,n.forEach((function(e){a[o]=a[o].replace("{?}",e)})),a[o]}var s=this.translations[this.getBrowserLang()]?this.getBrowserLang():"en",l=this.translations[s][e]?this.translations[s][e]:e;return n.forEach((function(e){l=l.replace("{?}",e)})),l},U.getTranslation=function(e,t,n){if(!e)return"";if(t=t||"en","string"==typeof e)return e;var i=U.getBrowserLang();if(e[i])return n?{lang:i,text:e[i]}:e[i];if(e[t])return n?{lang:t,text:e[t]}:e[t];var a=Object.keys(e);return e[a[0]]?n?{lang:a[0],text:e[a[0]]}:e[a[0]]:n?{lang:void 0,text:""}:""},U.getTranslationObject=function(e,t){t=t||U.getBrowserLang(),e=U.translate(e,t);var n={};return n[t]=e,n},U.setLanguage=function(e){F=e,V&&V.changeLanguage(e),D.save("CUSTOM_LANGUAGE_KEY",F),a()(document).trigger(s.EVENT_LANGUAGE_CHANGE)},U.getCustomLanguage=function(){return F},U.translations={},U.translations.en={GridActionSpeak:"Speak label",GridActionSpeakCustom:"Speak custom text",GridActionNavigate:"Navigate to other grid",GridActionARE:"AsTeRICS action",GridActionPredict:"Fill prediction elements",GridActionCollectElement:"Collect element action",GridActionWebradio:"Web radio action",GridActionYoutube:"YouTube action",GridActionChangeLang:"Change app language",COLLECT_ACTION_CLEAR:"Clear collect element",COLLECT_ACTION_REMOVE_WORD:"Delete last word",COLLECT_ACTION_REMOVE_CHAR:"Delete last character",COLLECT_ACTION_COPY_CLIPBOARD:"Copy text to clipboard",COLLECT_ACTION_APPEND_CLIPBOARD:"Append text to clipboard",COLLECT_ACTION_CLEAR_CLIPBOARD:"Clear clipboard",COLLECT_ACTION_TO_YOUTUBE:"Search text on YouTube",WEBRADIO_ACTION_START:"Turn radio on",WEBRADIO_ACTION_TOGGLE:"Turn radio on/off",WEBRADIO_ACTION_STOP:"Turn radio off",WEBRADIO_ACTION_NEXT:"Next radio channel",WEBRADIO_ACTION_PREV:"Previous radio channel",WEBRADIO_ACTION_VOLUP:"Radio volume up",WEBRADIO_ACTION_VOLDOWN:"Radio volume down",CONFIRM_IMPORT_BACKUP:'Caution: This action will delete the existing configuration and replace it with the data from file "{?}". Continue?',CONFIRM_DELETE_GRID:'Do you really want to delete the grid "{?}"?',CONFIRM_DELETE_DICT:'Do you really want to delete the dictionary "{?}"?',CONFIRM_RESET_DB:"Do you really want to reset to default configuration? All current grids will be deleted!",CONFIRM_DELETE_ALL_ELEMS:"Do you really want to delete all elements of the current grid?",CONFIRM_REMOVE_USER:'Do you really want to unlink user "{?}"? This will not delete the user itself, but all data of the user stored on this device.',CONFIRM_REMOVE_USER_LOCAL:'Do you really want to delete user "{?}"? Since the user is not synchronized this action will permanently delete the user.',PLACEHOLDER_SEARCH_GRID:"Search grid",LABEL_USER_LOCAL:"offline-only user",LABEL_USER_CLOUD:"user synced with the cloud",LABEL_USER_ONLINE:"only online, no offline synchronization",ERROR_CODE_UNAUTHORIZED:"Login failed, wrong username or password.",ERROR_CODE_NETWORK_ERROR:"Login failed (network error), please try again later.",DB_SYNC_STATE_SYNCINC:"synchronizing with cloud...",DB_SYNC_STATE_SYNCED:"synchronized with cloud",DB_SYNC_STATE_STOPPED:"synchronization with cloud paused",DB_SYNC_STATE_FAIL:"not synchronizing with cloud",DB_SYNC_STATE_ONLINEONLY:"online-only, no offline synchronization",VALIDATION_ERROR_REGEX:'Username must contain only lowercase letters, digits or the characters ["-", "_"], valid length is 3-50 characters.',VALIDATION_ERROR_EXISTING:"Username is already existing.",SEARCH_IMAGE_PLACEHOLDER:"input search term",HEADER_COMPARE_ONLINE_OFFLINE:"Information about online/offline users",ADVANCED_SETTINGS:"Advanced Settings",TEST_CONFIGURATION:"Test configuration",SELECT:"Select element",NEXT:"Next scanning group",NEXT_ELEMENT:"Next element",PREVIOUS_ELEMENT:"Previous Element",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event",ELEMENT_TYPE_COLLECT:"Collect element",ELEMENT_TYPE_PREDICTION:"Prediction element",ELEMENT_TYPE_YT_PLAYER:"YouTube player",YT_PLAY:"Play video",YT_PAUSE:"Pause video",YT_TOGGLE:"Play/pause video",YT_RESTART:"Restart video",YT_STOP:"Stop Video",YT_STEP_FORWARD:"Step forward within video",YT_STEP_BACKWARD:"Step backward within video",YT_NEXT_VIDEO:"Next video",YT_PREV_VIDEO:"Previous video",YT_PLAY_VIDEO:"Play single video",YT_PLAY_PLAYLIST:"Play playlist",YT_PLAY_SEARCH:"Play videos from search query",YT_PLAY_CHANNEL:"Play videos from channel",YT_ENTER_FULLSCREEN:"Show video in fullscreen",YT_VOLUME_UP:"Video volume up",YT_VOLUME_DOWN:"Video volume down",YT_VOLUME_MUTE:"Mute/unmute video"},U.translations.de={GridActionSpeak:"Label aussprechen",GridActionSpeakCustom:"Benutzerdefinierten Text aussprechen",GridActionNavigate:"Zu anderem Grid navigieren",GridActionARE:"AsTeRICS Aktion",GridActionPredict:"Vorhersage-Elemente füllen",GridActionCollectElement:"Sammelelement Aktion",GridActionWebradio:"Web-Radio Aktion",GridActionYoutube:"YouTube Aktion",GridActionChangeLang:"Anwendungssprache ändern",COLLECT_ACTION_CLEAR:"Sammelelement leeren",COLLECT_ACTION_REMOVE_WORD:"Letztes Word löschen",COLLECT_ACTION_REMOVE_CHAR:"Letzten Buchstaben löschen",COLLECT_ACTION_COPY_CLIPBOARD:"Text in die Zwischenablage kopieren",COLLECT_ACTION_APPEND_CLIPBOARD:"Text zu Zwischenablage hinzufügen",COLLECT_ACTION_CLEAR_CLIPBOARD:"Zwischenablage leeren",COLLECT_ACTION_TO_YOUTUBE:"Text auf YouTube suchen",WEBRADIO_ACTION_START:"Radio einschalten",WEBRADIO_ACTION_TOGGLE:"Radio ein-/ausschalten",WEBRADIO_ACTION_STOP:"Radio ausschalten",WEBRADIO_ACTION_NEXT:"Nächster Radiosender",WEBRADIO_ACTION_PREV:"Voriger Radiosender",WEBRADIO_ACTION_VOLUP:"Radio-Lautstärke erhöhen",WEBRADIO_ACTION_VOLDOWN:"Radio-Lautstärke vermindern",CONFIRM_IMPORT_BACKUP:'Achtung: Diese Aktion wird die aktuelle Konfiguration löschen und sie mit den Daten der Datei "{?}" ersetzen. Fortfahren?',CONFIRM_DELETE_GRID:'Möchten Sie das Grid "{?}" wirklich löschen?',CONFIRM_DELETE_DICT:'Möchten Sie das Wörterbuch "{?}" wirklich löschen?',CONFIRM_RESET_DB:"Möchten Sie wirklich die Standardkonfiguration wiederherstellen? Alle aktuellen Grids werden dadurch gelöscht!",CONFIRM_DELETE_ALL_ELEMS:"Möchten Sie wirklich alle Elemente des aktuellen Grids löschen?",CONFIRM_REMOVE_USER:'Möchten Sie den Account "{?}" wirklich von diesem Gerät abmelden? Diese Aktion löscht nicht den User selbst, aber alle Daten des Users auf diesem Gerät.',PLACEHOLDER_SEARCH_GRID:"Grid suchen",LABEL_USER_LOCAL:"nur offline gespeicherter User",CONFIRM_REMOVE_USER_LOCAL:'Möchten Sie den User "{?}" wirklich permanent löschen? Diese Aktion kann nicht rückgängig gemacht werden.',LABEL_USER_CLOUD:"mit Cloud synchronisierter User",LABEL_USER_ONLINE:"nur online, keine offline Synchronisation",ERROR_CODE_UNAUTHORIZED:"Login fehlgeschlagen, falscher Benutzername oder Passwort.",ERROR_CODE_NETWORK_ERROR:"Login fehlgeschlagen (Netzwerkproblem), bitte versuchen Sie es später nochmal.",DB_SYNC_STATE_SYNCINC:"synchronisiere mit Cloud...",DB_SYNC_STATE_SYNCED:"Mit Cloud synchronisiert",DB_SYNC_STATE_STOPPED:"Synchronisation mit Cloud pausiert",DB_SYNC_STATE_FAIL:"Keine Synchronisierung mit Cloud",DB_SYNC_STATE_ONLINEONLY:"nur online, keine Offline-Synchronisierung",VALIDATION_ERROR_REGEX:'Username darf nur Kleinbuchstaben, Ziffern und die Zeichen ["-", "_"] enthalten, erlaubte Länge ist 3-50 Zeichen.',VALIDATION_ERROR_EXISTING:"Username existiert bereits.",SEARCH_IMAGE_PLACEHOLDER:"Suchbegriff eingeben",HEADER_COMPARE_ONLINE_OFFLINE:"Informationen über Online-/Offline-User",ADVANCED_SETTINGS:"Erweiterte Einstellungen",TEST_CONFIGURATION:"Konfiguration testen",SELECT:"Element auswählen",NEXT:"Nächste Gruppe",NEXT_ELEMENT:"Nächstes Element",PREVIOUS_ELEMENT:"Vorheriges Element",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event",ELEMENT_TYPE_COLLECT:"Sammel-Element",ELEMENT_TYPE_PREDICTION:"Vorhersage-Element",ELEMENT_TYPE_YT_PLAYER:"YouTube Player",YT_PLAY:"Video abspielen",YT_PAUSE:"Video pausieren",YT_TOGGLE:"Video abspielen/pausieren",YT_RESTART:"Video neu starten",YT_STOP:"Video stoppen",YT_STEP_FORWARD:"Im Video weiterspringen",YT_STEP_BACKWARD:"Im Video zurückspringen",YT_NEXT_VIDEO:"Nächstes Video",YT_PREV_VIDEO:"Vorheriges Video",YT_PLAY_VIDEO:"Einzelnes Video abspielen",YT_PLAY_PLAYLIST:"Playlist abspielen",YT_PLAY_SEARCH:"Videos aus Suchanfrage abspielen",YT_PLAY_CHANNEL:"Videos aus Kanal abspielen",YT_ENTER_FULLSCREEN:"Zeige Video in Vollbild",YT_VOLUME_UP:"Videolautstärke erhöhen",YT_VOLUME_DOWN:"Videolautstärke vermindern",YT_VOLUME_MUTE:"Video stummschalten / Ton einschalten"};var H=n(10),W=n.n(H),z=n(12),K=n.n(z),J=n(15),X=n.n(J),q={},Z="20px";function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}q.getFontSizePx=function(e,t){var n=function(e){if(e.attr("data-label"))return e.attr("data-label");if($(e).find(".text-container span").text())return $(e).find(".text-container span").text();return""}(e),i=e.attr("data-type"),a=e.attr("data-img-id");if(!n)return"10px";var r=e[0].getBoundingClientRect(),o=r.height*r.width/(a?2:1),s=Math.floor(Math.sqrt(.5*o/Math.max(15,n.length))),l=t?n.length:Math.max.apply(null,n.split(" ").map((function(e){return e.length}))),c=1.4*r.width/l;return c=t?Math.min(c,30):c,(Z=Math.min(s,c))>r.height/3&&(Z=.3*r.height),1===n.length&&"ELEMENT_TYPE_NORMAL"===i&&(Z*=2),Z+"px"},q.adaptFontSize=function(e){for(var t=0;t\n \n ')},te.getGridItem=function(e,t){switch(e.type){case Ae.ELEMENT_TYPE_COLLECT:return function(e){e=ne(e);var t=U.getTranslation(e.label);return'\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • ')}(e);case Ae.ELEMENT_TYPE_PREDICTION:return function(e){e=ne(e);var t=U.getTranslation(e.label);return'\n
  • \n
    \n
    ').concat(t,"
    \n
    \n
  • ")}(e);case Ae.ELEMENT_TYPE_YT_PLAYER:return function(e){e=ne(e);var t=U.getTranslation(e.label);return'\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • ')}(e);default:return function(e,t){e=ne(e);var n="",i="",a="font-size:"+q.getLastFontSize()+";",r="1%",o=U.getTranslation(e.label,t),s=o?"80%":"100%",l=e.backgroundColor?"background: ".concat(e.backgroundColor,";"):"";e.image?(n=e.image.data,i=e.image.id):(a+="flex: 1 1 auto;",r="0");return'\n
  • \n
    \n
    \n
    ').concat(o,"
    \n ").concat(function(e){var t=e.hidden?'':"",n=e.actions.filter((function(e){return e.modelName===ee.getModelName()})).length>0?'':"";return''.concat(t+" "+n,"")}(e),"\n
    \n
  • ")}(e,t)}};var ie={};function ae(e){try{var t=parseInt(e.documentElement.width.baseVal.value)||500,n=parseInt(e.documentElement.height.baseVal.value)||500;return e.documentElement.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,t),e.documentElement.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,n),e}catch(t){return e}}function re(e){try{return"data:image/svg+xml;base64,"+btoa((new XMLSerializer).serializeToString(e))}catch(e){return null}}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}ie.getBase64FromImg=function(e,t,n){t=t||150;var i=0===e.src.indexOf("data:")?e.src.substring(5,e.src.indexOf(";")):null;i=(i=(i=i||(e.src.indexOf(".png")>-1?"image/png":null))||(e.src.indexOf(".svg")>-1?"image/svg+xml":null))||"image/jpeg";var a=document.createElement("canvas"),r=1;e.width>t&&(r=t/e.width),a.width=e.width*r,a.height=e.height*r,a.getContext("2d").drawImage(e,0,0,a.width,a.height);try{return a.toDataURL(i,n)}catch(e){throw"image converting failed!"}},ie.getBase64FromInput=function(e){return new Promise((function(t){if(e.files&&e.files[0]){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.readAsDataURL(e.files[0])}}))},ie.convertBase64=function(e,t,n){return new Promise((function(i,a){if(!e)return i(null);if("image/svg+xml"===e.substring(5,e.indexOf(";")))return i(e);t=t||150;var r=document.createElement("img");r.onload=function(){try{i(ie.getBase64FromImg(r,t,n))}catch(e){i(null)}},r.src=e}))},ie.base64SvgToBase64Png=function(e,t,n){return new Promise((function(i){var a=document.createElement("img");a.onload=function(){if(!n&&(0===a.naturalWidth||0===a.naturalHeight)){var r=ae((o=e,s=(s=atob(o.substring(o.indexOf("base64,")+7))).substring(s.indexOf("=i)return"break";var r=t.reduce((function(t,n){return t&&(a>=n.y+n.height||e>=n.x+n.width)}),!0);r&&(i=e+a),n.push({x:e,y:a,sum:e+a,valid:r})},r=0;r<10;r++){if("break"===a(r))break}},r=0;r<10;r++)a(r);var o=n.filter((function(e){return i===e.sum&&e.valid}))[0];return o?{x:o.x,y:o.y}:{x:e.getWidth(),y:e.getHeight()}},Oe.getFreeCoordinates=function(e){for(var t=new He({},e),n={},i=0;i0}))}(n,i).length>0;var n,i})),r=e.filter((function(e){return-1!==function(e){return e.gridElements.reduce((function(e,t){return e.concat(t.actions.filter((function(e){return e.modelName===ee.getModelName()})))}),[]).map((function(e){return e.toGridId}))}(t).indexOf(e.id)})),o={grid:t,parents:a,children:r,navCount:a.length+r.length};n.push(o),i[t.id]=o})),n.sort((function(e,t){return t.navCount-e.navCount})),n.forEach((function(e){e.parents=e.parents.map((function(e){return i[e.id]})),e.children=e.children.map((function(e){return i[e.id]})),e.allRelatives=e.children.concat(e.parents.filter((function(t){return-1===e.children.indexOf(t)})))})),n},Oe.getAllChildrenRecursive=function(e,t,n){return function e(t,n,i){var a=t.filter((function(e){return e.grid.id===n}))[0];i=i||[];var r=[];return a.children.forEach((function(e){-1===i.indexOf(e.grid)&&(i.push(e.grid),r.push(e.grid.id))})),r.forEach((function(n){i=e(t,n,i)})),i}(e,t,n).filter((function(e){return e.id!==t}))};var xe=function(e){p()(n,e);var t=Le(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId(n.getModelName().toLowerCase()),a}return d()(n,null,[{key:"getModelName",value:function(){return"EncryptedObject"}}]),n}(C({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]}));xe.defaults({modelVersion:s.MODEL_VERSION});var De={},Re=["thumbnail"];De.removeLongPropertyValues=function(e,t,n){if(!e)return e;n=void 0===n?"_removed_":n,t=t||500;var i=JSON.parse(JSON.stringify(e));return Object.keys(i).forEach((function(e){-1===Re.indexOf(e)&&(i[e]=function e(t,n,i){if(!t)return t;if("string"==typeof t||t instanceof String){if(t.length>n)return i}else if(t instanceof Array)for(var a=0;a1?i[0]:i;"string"==typeof e?i?a&&"function"!=typeof a?Pe.warn("object type has to be a constructor function or empty, aborting."):r&&r.isShortVersion?Pe.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],a&&(n[e]=a)):Pe.warn("cache-values has to be set, aborting."):Pe.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"==typeof e){if(!t[e])return null;var a=JSON.parse(t[e]),r=n[e];return a instanceof Array?a.map((function(e){return i(r,e)})):i(r,a)}Pe.warn("cache-key has to be a string, aborting.")},e.getAsPromise=function(t){var n=e.get(t);return new Promise((function(e){setTimeout((function(){e(n)}),1)}))},e.has=function(e){return"string"!=typeof e?(Pe.warn("cache-key has to be a string, aborting."),!1):!!t[e]},e.clear=function(e){e&&(delete t[e],delete n[e])},e.clearAll=function(){t={},n={}}}var Ue={},Fe=null,$e=null,Ve=!1,je=new Ge;function Be(){if(!$e||!Fe){var e="using encryptionService uninitialized is not possible, aborting...";throw Pe.error(e),e}}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g()(e);if(t){var a=g()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return v()(this,n)}}Ue.encryptObject=function(e,t){if(Be(),!e)return e;t=t||{};var n=new xe({id:e.id,modelName:e.modelName});n._id=e.id,e._rev&&(n._rev=e._rev);var i=JSON.stringify(e),a=JSON.stringify(De.removeLongPropertyValues(e)),r=i!==a;return n.encryptedDataBase64=Ue.encryptString(i,t.encryptionKey),n.encryptedDataBase64Short=r?Ue.encryptString(a,t.encryptionKey):null,n},Ue.decryptObjects=function(e,t){if(Be(),!e)return e;var n=(t=t||{}).onlyShortVersion,i=[];return(e=e instanceof Array?e:[e]).forEach((function(e){try{var a=null,r=null;if(n){var o=e.encryptedDataBase64Short||e.encryptedDataBase64;a=Ue.decryptString(o,t.encryptionKey),(r=JSON.parse(a)).isShortVersion=!0}else a=Ue.decryptString(e.encryptedDataBase64,t.encryptionKey),r=JSON.parse(a);r._id=e._id,r._rev=e._rev,i.push(r)}catch(t){throw Pe.error("error decrypting object: "+e.modelName+", id: "+e.id),Pe.error(t),t}})),i.length>1?i:i[0]},Ue.encryptString=function(e,t){t||Be();return(t=t||$e)&&!Ve?Me.encrypt(t,e,{iter:1e3}):e},Ue.decryptString=function(e,t){if(t||Be(),je.has(e))return Pe.debug("using decryption cache..."),je.get(e);t=t||$e;var n=null;(new Date).getTime();if(t&&!Ve)n=Me.decrypt(t,e);else try{n=e;var i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=Me.decrypt(t,e))}catch(i){n=Me.decrypt(t,e)}return je.set(e,n),n},Ue.getStringHash=function(e){var t=Me.hash.sha256.hash(e);return Me.codec.hex.fromBits(t)},Ue.getUserPasswordHash=function(e){return Ue.getStringHash("STATIC_USER_PW_SALT"+e)},Ue.setEncryptionProperties=function(e,t,n){e=e||"",Fe=t,$e=Ue.getStringHash(""+Fe+e),Ve=n,je.clearAll(),Pe.debug("new encryption key is: "+$e)},Ue.resetEncryptionProperties=function(){Pe.debug("reset encryption properties..."),Fe=null,$e=null,Ve=!1};var He=function(e){p()(n,e);var t=Ye(n);function n(e,i){var a;return c()(this,n),(e=_.setDefaults(e,i,n))&&(e.id=e.id?e.id:_.generateId(n.getIdPrefix())),(a=t.call(this,e)).minColumnCount=e.minColumnCount||a.getWidth()||D.getLastGridDimensions().minColumnCount||4,a.rowCount=e.rowCount||a.getHeight()||D.getLastGridDimensions().rowCount||3,a.id=a.id||_.generateId("grid-data"),a}return d()(n,[{key:"hasSetPositions",value:function(){return this.gridElements.every((function(e){return e.hasSetPosition()}))}},{key:"getHash",value:function(){var e="";return this.gridElements.forEach((function(t){e+=JSON.stringify(t.label)+t.x+t.y,t.image&&(e+=t.image.data.substring(t.image.data.length-30))})),Ue.getStringHash(e)}},{key:"hasOutdatedThumbnail",value:function(){return!this.thumbnail||!this.thumbnail.data||this.thumbnail.hash!==this.getHash()}},{key:"getWidth",value:function(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map((function(e){return e.x+e.width})))}},{key:"getHeight",value:function(){return 0===this.gridElements.length?0:Math.max.apply(null,this.gridElements.map((function(e){return e.y+e.height})))}},{key:"getWidthWithBounds",value:function(){return Math.max(this.getWidth(),this.minColumnCount)}},{key:"getHeightWithBounds",value:function(){return Math.max(this.getHeight(),this.rowCount)}},{key:"isFull",value:function(){return 0!==this.gridElements.length&&this.getWidthWithBounds()*this.getHeightWithBounds()===this.gridElements.reduce((function(e,t){return e+t.width*t.height}),0)}},{key:"getNewXYPos",value:function(e){var t=this.gridElements.reduce((function(e,t){var n=t.x+t.width;return 0===t.y&&n>e&&(e=n),e}),0);if(e)return{x:t,y:0};var n=Oe.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}},{key:"getNewGridElement",value:function(e){e=e||{};var t=this.getNewXYPos();return e=Object.assign(e,{x:t.x,y:t.y}),new Ae(e)}},{key:"isEqual",value:function(e){var t=JSON.parse(JSON.stringify(e)),n=JSON.parse(JSON.stringify(this));return delete t._rev,delete n._rev,delete t._id,delete n._id,JSON.stringify(t)==JSON.stringify(n)}},{key:"getNextElementId",value:function(e,t){if(!this.gridElements||0===this.gridElements.length)return e;if(1===this.gridElements.length)return this.gridElements[0].id;var n=JSON.parse(JSON.stringify(this.gridElements)).sort((function(e,t){return e.y!==t.y?e.y-t.y:e.x-t.x})),i=(n=n.filter((function(e){return e.type===Ae.ELEMENT_TYPE_NORMAL}))).map((function(e){return e.id})),a=i.indexOf(e);if(-1===a)return i[0];var r=a+(t?-1:1);return i[r=(r=r>i.length-1?0:r)<0?i.length-1:r]}},{key:"getPreviousElementId",value:function(e){return this.getNextElementId(e,!0)}},{key:"getAdditionalFile",value:function(e){var t=this.additionalFiles.filter((function(t){return t.fileName===e}));return t.length>0?t[0]:null}},{key:"getAREModel",value:function(){var e=this.getAREFirstAction();return e?this.additionalFiles.filter((function(t){return t.fileName===e.areModelGridFileName}))[0]:null}},{key:"hasAREModel",value:function(){return!!this.getAREModel()}},{key:"getAREFirstAction",value:function(){var e=[];return this.gridElements.forEach((function(t){e=e.concat(t.actions)})),e.filter((function(e){return e.modelName===pe.getModelName()}))[0]}},{key:"getAREURL",value:function(){var e=this.getAREFirstAction();return e?e.areURL:null}},{key:"clone",value:function(){var e=this,t=new n(this);return delete t._id,delete t._rev,t.id=_.generateId("grid-data"),Object.keys(this.label).forEach((function(n){t.label[n]=e.label[n]+" (Copy)"})),t}}],[{key:"getModelName",value:function(){return"GridData"}},{key:"getIdPrefix",value:function(){return"grid-data"}}]),n}(C({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:C.Array(Ae),additionalFiles:[C.Array(Ne)],webRadios:[C.Array(ke)],thumbnail:[Object]}));He.defaults({id:"",modelName:He.getModelName(),modelVersion:s.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:U.getBrowserLang()});var We={params:{PARAM_DEMO_MODE:"demo",PARAM_SCANNING:"scanning",PARAM_HUFFMAN:"huffman",PARAM_DIR_INPUT:"direction",PARAM_RESET_DATABASE:"reset",PARAM_DEFAULT_GRIDSET:"default"}},ze=!1,Ke=!1;function Je(e){return new URLSearchParams(window.location.search).has(e)}function Xe(e){return new URLSearchParams(window.location.search).get(e)}function qe(e){return"false"===Xe(e)}We.isDemoMode=function(){return ze=ze||Je(We.params.PARAM_DEMO_MODE),function(e){if(!Je(e))return;var t=new URLSearchParams(window.location.search);if(t.delete(e),history.replaceState){var n=t.toString().length>0?"?"+t.toString():"",i=window.location.protocol+"//"+window.location.host+window.location.pathname+n+window.location.hash;history.replaceState(null,"",i)}}(We.params.PARAM_DEMO_MODE),ze},We.isScanningEnabled=function(){return Je(We.params.PARAM_SCANNING)&&!qe(We.params.PARAM_SCANNING)},We.isDirectionEnabled=function(){return Je(We.params.PARAM_DIR_INPUT)&&!qe(We.params.PARAM_DIR_INPUT)},We.isHuffmanEnabled=function(){return Je(We.params.PARAM_HUFFMAN)&&!qe(We.params.PARAM_HUFFMAN)},We.shouldResetDatabase=function(){var e=!Ke&&(We.isDemoMode()||"true"===Xe(We.params.PARAM_RESET_DATABASE));return Ke=!0,e},We.getDefaultGridsetName=function(){return Xe(We.params.PARAM_DEFAULT_GRIDSET)};var Ze=n(16),Qe=n.n(Ze),et={};function tt(e,t,n){if(!e)return e;var i=e instanceof Array;e=i?e:[e];for(var a=function(i){n(_.getModelVersionObject(e[i].modelVersion)).forEach((function(n){e[i]=n(e[i],t)}))},r=0;r0&&(t=(n=e.change.docs.filter((function(e){return!!w(e)&&!function(e){return v[w(e)]&&C(e)0&&0===t.length?log.info("ignoring pull because of outdated revision"):log.info("pouchdb pulled updates...")):e.direction?log.info("pouchdb pushed updates..."):!e.direction&&e.id&&(log.info("change from remote database..."),t.push(e.id),e.doc&&n.push(e.doc)),!p&&(t.length>0||n.length>0)&&r(t,n)}catch(e){log.error(e)}}function E(e){e&&e.length>0&&e.forEach((function(e){var t=w(e),n=C(e);(!v[t]||v[t]0?e.docs.forEach((function(e){t.push(e)})):e.rows&&e.rows.length>0&&e.rows.forEach((function(e){e.doc&&e.doc.modelName&&t.push(e.doc)}));return 0===t.length?null:1===t.length?t[0]:t}(n);t&&a?lt.set(t,a):!t&&e&&a&<.set(e,a),i(a)})).catch((function(e){log.error(e),a()})).finally((function(){pt()}))}))},ot.save=function(e,t){return log.debug("saving "+e+"..."),ft(),t.id&&(lt.clear(t.id,t),lt.clear(e)),new Promise((function(n,i){if(!(t&&t._id&&e&&t.encryptedDataBase64))return log.error('did not specify needed parameter "idPrefix" or "_id" or data is not encrypted! aborting.'),i();st.put(t).then((function(i){t._rev=i.rev,lt.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()})).catch((function(e){t.id&<.clear(t.id),"conflict"===e.error?(log.warn("conflict with remote version updating document with id: "+t.id),n()):(log.error(e),i(e)),i()})).finally((function(){pt()}))}))},ot.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();ft(),lt.clearAll();var t=st.bulkDocs(e);return t.finally((function(){pt()})),t},ot.remove=function(e){var t=ut();return ot.all(null,e).then((function(e){return lt.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)}))},ot.resetDatabase=function(e){return ot.isUsingLocalDb()&&ot.getOpenedDatabaseName()===s.LOCAL_DEMO_USERNAME?(lt.clearAll(),new Promise((function(t){st.destroyDb(e).then((function(){st=null,ot.initDatabase(e).then((function(){return t()}))})).catch((function(e){log.error("error destroying database: "+e)}))}))):Promise.reject("do not destroy!")},ot.deleteDatabase=function(e){if(ot.getOpenedDatabaseName()===e&&!ot.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();lt.clearAll();var t=[];return ot.getOpenedDatabaseName()===e&&t.push(ot.closeCurrentDatabase()),Promise.all(t).then((function(){return new Qe.a(e).destroy()}))},ot.closeCurrentDatabase=function(){if(!st)return Promise.resolve();ft();var e=st.close();return st=null,e},ot.getOpenedDatabaseName=function(){return st?st.getOpenedDatabaseName():null},ot.isUsingLocalDb=function(){return st?st.isUsingLocalDb():null},ot.getSyncState=function(){return st?st.getSyncState():null},ot.isSyncEnabled=function(){return st?st.isSyncEnabled():null};var mt=function(e){p()(n,e);var t=vt(n);function n(e,i){var a;return c()(this,n),e=_.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||_.generateId(n.getIdPrefix()),a}return d()(n,[{key:"clone",value:function(){var e=new n(this);return delete e._id,delete e._rev,e.id=_.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}}],[{key:"getModelName",value:function(){return"Dictionary"}},{key:"getIdPrefix",value:function(){return"dictionary"}}]),n}(C({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]}));mt.defaults({id:"",modelName:mt.getModelName(),modelVersion:s.MODEL_VERSION,data:JSON.stringify({})});var gt={};gt.createItem=function(e,t){if(!e)throw'parameter "word" must be specified.';var n,i=parseInt(t),a={w:e,f:0,t:{}};return(n=i)==parseInt(n)&&(a.r=i),a};var _t=gt;var yt=function(){var e=this,t={},n=null,i=null;function a(e){if(!e)return[];var n=[];return t[e]&&n.push(t[e]),t[e.toLowerCase()]&&-1===n.indexOf(t[e.toLowerCase()])&&n.push(t[e.toLowerCase()]),t[e.toUpperCase()]&&-1===n.indexOf(t[e.toUpperCase()])&&n.push(t[e.toUpperCase()]),t[o(e)]&&-1===n.indexOf(t[o(e)])&&n.push(t[o(e)]),n}function r(e){var t=a(e);return t.length>0?t[0]:null}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}e.load=function(e){var n=JSON.parse(e);Object.keys(n).forEach((function(e){n[e].w=e})),t=n},e.toJSON=function(){var e=JSON.parse(JSON.stringify(t));return Object.keys(e).forEach((function(t){delete e[t].w})),JSON.stringify(e)},e.addWord=function(e,n){e&&(t[e]||(t[e]=_t.createItem(e,n)))},e.addWords=function(t){if(!(t instanceof Array)||0===t.length)throw"words to add must be an array with at least one element.";t.forEach((function(t){e.addWord(t)}))},e.deleteWord=function(e,n){Object.keys(t).forEach((function(i){if(n?e.toUpperCase()===i.toUpperCase():e===i)delete t[i];else{var a=t[i];Object.keys(a.t).forEach((function(t){(n?e.toUpperCase()===t.toUpperCase():e===t)&&delete a.t[t]}))}}))},e.contains=function(e,n){return n?!!t[e]:!!r(e)},e.predictCompleteWord=function(a,r){a=a||"",r=r||{};var o=[];if(Object.keys(t).forEach((function(e){0===e.toLowerCase().indexOf(a.toLowerCase())&&o.push(t[e])})),0===o.length&&a.length>1){var s=null;return(s=n&&i&&0===a.indexOf(n)?i:e.predictCompleteWord(a.substring(0,a.length-1),r)).forEach((function(e){e.fuzzyMatch=!0})),s}return n=a,i=o.map((function(e){return{word:e.w,frequency:e.f,rank:e.r}}))},e.predictNextWord=function(e,t){var n=a(e),i=[];return n.forEach((function(e){Object.keys(e.t).forEach((function(t){i.push({word:t,frequency:e.t[t]})}))})),i},e.learn=function(t,n,i){if(t&&(e.contains(t)||i)){i&&t&&!e.contains(t)&&e.addWord(t),i&&n&&!e.contains(n)&&e.addWord(n);var a=r(n),o=r(t);o.f++,a&&a.t&&(a.t[o.w]?a.t[o.w]++:a.t[o.w]=1)}},e.getWords=function(){return Object.keys(t)}};function bt(){this.DEFAULT_DICTIONARY_KEY="DEFAULT_DICTIONARY_KEY";var e=this,t={},n=null;function i(n,i,a){var r=[];(i=i||{}).maxPredictions=i.maxPredictions||i.maxPredicitons||10,i.applyToInput=i.applyToInput||!1,Object.keys(t).forEach((function(e){var o=t[e];if(!o.disabled){var s="PREDICT_METHOD_NEXT_WORD"===a?o.predictNextWord:"PREDICT_METHOD_COMPLETE_WORD"===a?o.predictCompleteWord:null;s=s||(Ct(n)?o.predictNextWord:o.predictCompleteWord),r=r.concat(s(Et(n),i))}})),r.sort((function(e,t){return e.fuzzyMatch!==t.fuzzyMatch?e.fuzzyMatch?1:-1:e.frequency!==t.frequency?e.frequency0&&(!Ct(c)||new RegExp("[\\.\\?!,]").test(c[c.length-1]))&&(c+=" "),o||e.learn(n,r?l:s,a),c+n+" "},this.learn=function(n,i,a){n=wt(n),i=wt(i);var r=e.getDictionaryKeys(!0);if(a=1===r.length?r[0]:a,r.length>0&&(!a||!t[a])){var o=0;r.forEach((function(t){var r=0;e.hasWord(n,t)&&(r+=2),e.hasWord(i,t)&&r++,r>0&&r>=o&&(o=r,a=t)}))}a=a||e.DEFAULT_DICTIONARY_KEY,t[a]||e.addDictionary(a),Object.keys(t).forEach((function(e){var r=t[e];r.disabled||r.learn(n,i,a===e)}))},this.learnFromInput=function(t,i){if(Ct(t)){var a=Et(t,2),r=Et(t,3);if(a&&a!==n)return n=a,e.learn(a,r,i),!0}return!1},this.learnFromText=function(e,t){var n=this;(e=e.replace(/\s\s/g," ")).split(new RegExp("[\\.\\?!]")).forEach((function(e){for(var i=e.split(" "),a=0;a-1&&At.init(Nt)}));var Dt={},Rt={},Mt={},Pt="";Dt.DEFAULT_KEY="DEFAULT_KEY",Dt.DEFAULT_KEY2="DEFAULT_KEY2",Dt.debounce=function(e,t,n){n=n||Dt.DEFAULT_KEY,e||t?(Rt[n]&&clearTimeout(Rt[n]),Rt[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},Dt.clearDebounce=function(e){e=e||Dt.DEFAULT_KEY,Rt[e]&&clearTimeout(Rt[e])},Dt.throttle=function(e,t,n,i){if(e&&e.apply){n=n||500;var a=i||e,r=Mt[a];(!r||(new Date).getTime()-r>n)&&(e.apply(null,t),Mt[a]=(new Date).getTime())}},Dt.copyToClipboard=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";Pt=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},Dt.appendToClipboard=function(e){Dt.copyToClipboard(Pt+e)},Dt.getClipboardContent=function(){return navigator.clipboard.readText().then((function(e){return Promise.resolve(e)})).catch((function(e){return log.warn("failed to read clipboard."),Promise.resolve(null)}))},Dt.getElement=function(e,t,n){var i=document.elementsFromPoint(t,n),a=null;return i.forEach((function(t){a=a||function(e,t){for(var n=0;e&&-1===t.indexOf(e)&&n<100;n++)e=e.parentElement;return e}(t,e)})),a},Dt.splitInChunks=function(e,t){for(var n=[],i=0,a=e.length;i1&&a.push(function(e,t){log.warn("fixing duplicated metadata...");var n=null;return ot.all().then((function(i){var a=[];n=t.map((function(e){return e.id}));var r=[];i.forEach((function(t){a.push(function t(n,i){var a=JSON.parse(JSON.stringify(i));try{return Ue.decryptObjects(n)}catch(i){if(0===a.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return Ue.setEncryptionProperties(e,a.pop()),t(n,a)}}(t,n))}));var o=n.pop();return Ue.setEncryptionProperties(e,o),log.warn("keeiping metadata: "+o),log.warn("decrypted docs:"),log.warn(a),log.warn("re-encrypting and saving them..."),a.forEach((function(e){var t=Bt(e.modelName,e);r.push(t)})),Promise.all(r)})).then((function(){var e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach((function(t){e.push(ot.remove(t))})),Promise.all(e)})).then((function(){return log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()}))}(e,t))):(i=new O,Ue.setEncryptionProperties(e,i.id,n),a.push(Bt(O.getIdPrefix(),i))),Promise.all(a)})).then((function(){return ot.all(mt.getIdPrefix()).then((function(e){return e?Promise.resolve():new Promise((function(e){log.info("importing dictionary: "+$t),a.a.get($t).success((function(t){log.debug("success getting default dictionary."),e(t)})).fail((function(t){log.debug("error getting default dictionary."),e()}))}))})).then((function(e){if(!e)return Promise.resolve();var t=new mt({dictionaryKey:Vt,data:e,isDefault:!0});return Bt(mt.getIdPrefix(),t)}))}))).then((function(){Ft=null,At.init(),a()(document).trigger(s.EVENT_USER_CHANGED)})),Ut}function Bt(e,t){return new Promise((function(n,i){var a=et.convertLiveToDatabaseObjects(t);ot.save(e,a).then((function(){log.debug("saved "+e+", id: "+t.id),n()})).catch((function(e){i(e)}))}))}Gt.getObject=function(e,t,n){return new Promise((function(i,a){Ut.then((function(){if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),a();ot.all(e.getIdPrefix(),t).then((function(t){var a={objectType:e,onlyShortVersion:n},r=et.convertDatabaseToLiveObjects(t,a),o=function(e){if(!e)return null;if(e.modelVersion)return e.modelVersion;if(e[0]&&e[0].modelVersion)return e[0].modelVersion;return null}(r);o&&Ft!==o&&(Ft=o,D.setUserModelVersion(ot.getOpenedDatabaseName(),o)),i(r)})).catch((function(e){a(e)}))}))}))},Gt.getSingleObject=function(e,t,n){return Gt.getObject(e,t,n).then((function(e){return Promise.resolve(e instanceof Array?e[0]:e)}))},Gt.saveObject=function(e,t,n){return Ut.then((function(){return t&&e&&e.getModelName?t.isShortVersion?(log.warn("short versions of objects cannot be saved/updated! aborting."),Promise.reject()):(log.debug("saving "+e.getModelName()+"..."),Gt.getObject(e,t.id)):(log.error('did not specify needed parameter "objectType"!'),Promise.reject())})).then((function(i){if(i){log.debug(e.getModelName()+" already existing, doing update. id: "+i.id);var a=new e(t,i),r=JSON.parse(JSON.stringify(a));return r._id=i._id,r._rev=i._rev,Bt(e.getIdPrefix(),r)}if(n)return log.warn("no existing "+e.getModelName()+" found to update, aborting."),Promise.reject();var o=JSON.parse(JSON.stringify(t));return o._id=o.id,Bt(e.getIdPrefix(),o)}))},Gt.bulkSave=function(e){if(!e||0===e.length)return Promise.resolve();if(e[0].isShortVersion)return log.warn("not saving short version!"),Promise.resolve();var t=e.reduce((function(e,t){return e+(t.gridElements?t.gridElements.length:0)}),0),n=Math.floor(t/e.length),i=[];if(et.convertLiveToDatabaseObjects(e).forEach((function(e){e._id=e.id})),t>1e3){var a=Math.floor(1e3/n);i=Dt.splitInChunks(e,a)}else i=[e];return function e(t){var n=JSON.parse(JSON.stringify(t.shift()));return ot.bulkDocs(n).then((function(){return t.length>0?e(t):Promise.resolve()}))}(i)},Gt.bulkDelete=function(e){return e.forEach((function(e){e._deleted=!0,e._id=e.id})),ot.bulkDocs(JSON.parse(JSON.stringify(e)))},Gt.removeObject=function(e){return ot.remove(e)},Gt.initForUser=function(e,t,n,i){var a=n&&!i||!1,r=ot.getOpenedDatabaseName()===e,o=-1!==D.getSavedLocalUsers().indexOf(e);return r&&a===ot.isSyncEnabled()?Promise.resolve():ot.initDatabase(e,n,i).then((function(){return r?Promise.resolve():jt(t,e,o)}))},Gt.registerForUser=function(e,t,n,i){var a=n&&!i,r=-1!==D.getSavedLocalUsers().indexOf(e);return ot.getOpenedDatabaseName()===e&&a===ot.isSyncEnabled()?Promise.resolve():ot.createDatabase(e,n,i).then((function(){return jt(t,e,r)}))},Gt.deleteDatabase=function(e){if(e)return ot.deleteDatabase(e)},Gt.closeCurrentDatabase=function(){return ot.closeCurrentDatabase()},Gt.getCurrentUsedDatabase=function(){return ot.getOpenedDatabaseName()};var Yt={};Yt.gridDataToOBF=function(e){},Yt.gridSetToOBZ=function(e){},Yt.OBFToGridData=function(e,t){var n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():U.getBrowserLang(),a=new He({obfId:e.id,label:U.getTranslationObject(e.name,i),locale:i,rowCount:e.grid.rows,minColumnCount:e.grid.columns,gridElements:[]});return e.buttons.forEach((function(r){if(!r.hidden){var o=function(e,t){var n=t.grid.order,i=null;return n.forEach((function(t,n){t.forEach((function(t,a){t===e&&(i={x:a,y:n})}))})),i}(r.id,e),s=new Ae({width:1,height:1,label:U.getTranslationObject(r.label,i),x:o.x,y:o.y,backgroundColor:r.background_color});(s=function(e,t,n,i){t.vocalization&&(e.actions=e.actions.filter((function(e){return e.modelName!==ce.getModelName()})),e.actions.push(new de({speakText:t.vocalization,speakLanguage:n.locale})));if(t.load_board&&t.load_board.path){var a=function(e,t){if(!t)return null;var n=t["manifest.json"].paths.boards,i=null;return Object.keys(n).forEach((function(t){n[t]===e&&(i=t)})),i}(t.load_board.path,i);a&&e.actions.push(new ee({toGridId:a}))}return e}(s,r,e,t)).actions.filter((function(e){return e.modelName===ce.getModelName()})).forEach((function(t){t.speakLanguage=e.locale})),n.push(function(e,t,n){var i=t.images.filter((function(t){return t.id===e}))[0],a=null,r=[];if(!i)return Promise.resolve(null);if(i.data)a=i.data;else if(i.path){var o=i.path.substring(i.path.lastIndexOf(".")),s=i.content_type||"image/png",l="data:".concat(s=".svg"===o?"image/svg+xml":s,";base64,"),c=n[i.path];a=l+c}else i.url&&r.push(ie.urlToBase64(i.url).then((function(e){return a=e,Promise.resolve()})));return Promise.all(r).then((function(){return a?Promise.resolve(new se({data:a})):(log.info("failed to import image: "+e),Promise.resolve(null))}))}(r.image_id,e,t).then((function(e){return s.image=e,Promise.resolve()}))),a.gridElements.push(s)}})),Promise.all(n).then((function(){return Promise.resolve(a)}))},Yt.OBZToGridSet=function(e){var t=[],n=[];return Object.keys(e).forEach((function(i){-1!==i.indexOf(".obf")&&t.push(Yt.OBFToGridData(e[i],e).then((function(e){return n.push(e),Promise.resolve()})))})),Promise.all(t).then((function(){return n.forEach((function(e){e.gridElements.forEach((function(e){e.actions.forEach((function(t){if(t.modelName===ee.getModelName()){var i=t.toGridId,a=n.reduce((function(e,t){return e||(t.obfId===i?t.id:null)}),null);a?t.toGridId=a:e.actions=e.actions.filter((function(e){return e.id!==t.id}))}}))}))})),n.forEach((function(e){delete e.obfId})),Promise.resolve(n)}))};var Ht={readZip:function(e,t){var i={};return new Promise((function(a){Promise.all([n.e(3),n.e(1)]).then(n.t.bind(null,636,7)).then((function(n){n.loadAsync(e).then((function(e){var n=[];Object.keys(e.files).forEach((function(a){var r=e.files[a];n.push(r.async("base64").then((function(e){try{i[a]=t?JSON.parse(atob(e)):e}catch(t){i[a]=e}})))})),Promise.all(n).then((function(){a(i)}))}))}))}))}},Wt={},zt="app/examples/default.grd.json";We.getDefaultGridsetName()&&(zt="app/examples/"+We.getDefaultGridsetName()),Wt.getGrid=function(){var e=K()(W.a.mark((function e(t,n){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",Promise.resolve(null));case 2:return e.abrupt("return",Gt.getSingleObject(He,t,n).then((function(e){return Promise.resolve(e?new He(e):null)})));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Wt.getGlobalGrid=function(e){return Wt.getMetadata().then((function(t){return t.globalGridId&&(e||t.globalGridActive)?Wt.getGrid(t.globalGridId).then((function(e){return Promise.resolve(e)})):Promise.resolve(null)}))},Wt.getGrids=function(e,t){return new Promise((function(n){Gt.getObject(He,null,!e).then((function(e){if(e){var i=e instanceof Array?e:[e];t?Wt.getMetadata().then((function(e){n(i.filter((function(t){return t.id!==e.globalGridId})))})):n(i)}else n([])}))}))},Wt.saveGrid=function(e){return e.gridElements=Oe.sortGridElements(e.gridElements),Gt.saveObject(He,e)},Wt.saveGrids=function(e){return e.forEach((function(e){e.gridElements=Oe.sortGridElements(e.gridElements)})),Gt.bulkSave(e)},Wt.updateGrid=function(e,t){return t.id=e,t.gridElements=Oe.sortGridElements(t.gridElements),Gt.saveObject(He,t,!0)},Wt.deleteGrid=function(e){return Gt.removeObject(e)},Wt.deleteAllGrids=function(){return Wt.getGrids().then((function(e){return e&&0!==e.length?Gt.bulkDelete(e):Promise.resolve()})).then((function(){return e="",Wt.getMetadata().then((function(t){return t.globalGridId=e,t.globalGridActive=!!e,Wt.saveMetadata(t)}));var e}))},Wt.importDefaultGridset=function(){return Promise.resolve().then((function(){return a.a.get(zt)})).then((function(e){if(!e)return Promise.resolve();log.info("importing default grid set "+zt);try{e=JSON.parse(e)}catch(e){}return Wt.importData(e,!1,!0)}))},Wt.saveAdditionalGridFiles=function(e,t){return new Promise((function(n){t||n(),Wt.getGrid(e).then((function(e){t.forEach((function(t){var n=(e=JSON.parse(JSON.stringify(e))).additionalFiles.findIndex((function(e){return e.fileName===t.fileName}));-1!==n?e.additionalFiles[n]=t:e.additionalFiles.push(t)})),Wt.saveGrid(e).then((function(){n()}))}))}))},Wt.getGridElement=function(e,t){return new Promise((function(n){Wt.getGrid(e).then((function(e){var i=e.gridElements.filter((function(e){return e.id===t}))[0];i?n(i):Wt.getGlobalGrid().then((function(e){n(e.gridElements.filter((function(e){return e.id===t}))[0])}))}))}))},Wt.getGridsAttribute=function(e){return new Promise((function(t){Wt.getGrids().then((function(n){var i={};n.forEach((function(t){i[t.id]=t[e]})),t(i)}))}))},Wt.addGridElements=function(e,t){return new Promise((function(n){Wt.getGrid(e).then((function(i){(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),Wt.updateGrid(e,i).then((function(){n()}))}))}))},Wt.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise((function(n){Wt.getMetadata().then((function(i){if(i){var a=i instanceof Array?i[0].id:i.id;e.id=a,D.saveLocalMetadata(e),D.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():Gt.saveObject(O,e).then((function(){n()}))}))}))},Wt.getMetadata=function(){return new Promise((function(e){Gt.getObject(O).then((function(t){var n=null;if(n=t?t instanceof Array?t[0]:t:new O,!D.shouldSyncNavigation()){var i=D.getLocalMetadata();i&&(n.locked=i.locked,n.fullscreen=i.fullscreen,n.lastOpenedGridId=i.lastOpenedGridId)}e(new O(n))}))}))},Wt.saveImage=function(e){return t=se,n=e,i=[],new Promise((function(e,a){Wt.getMetadata().then((function(r){if(!r||!r.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void a();var o=null;r.hashCodes[t.getModelName()]?o=r.hashCodes[t.getModelName()]:(o={},r.hashCodes[t.getModelName()]=o);var s=_.hashCode(n);o[s]?(log.debug("saveHashedItemInternal: hash found, not saving new element"),n.id=o[s]):(log.debug("saveHashedItemInternal: hash not found, saving new element"),o[s]=n.id,i.push(Gt.saveObject(t,n)),i.push(Gt.saveObject(O,r))),Promise.all(i).then((function(){e(n.id)}))}))}));var t,n,i},Wt.getImage=function(e){return Gt.getObject(se,e)},Wt.getDictionary=function(e){return e?Gt.getSingleObject(mt,e).then((function(e){return Promise.resolve(new mt(e))})):Promise.resolve(null)},Wt.getDictionaries=function(){return new Promise((function(e){Gt.getObject(mt).then((function(t){if(t){var n=t instanceof Array?t.map((function(e){return new mt(e)})):[new mt(t)];e(n)}else e([])}))}))},Wt.saveDictionary=function(e){return e.isDefault=!1,Gt.saveObject(mt,e)},Wt.deleteObject=function(e){return Gt.removeObject(e)},Wt.downloadSingleGrid=function(e){Wt.getGrid(e).then((function(e){if(e){var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});X.a.saveAs(t,U.getTranslation(e.label)+".grd")}}))},window.backupPrepareForDefault=!1,Wt.downloadBackup=function(){var e={},t=[];t.push(Wt.getMetadata().then((function(t){return e.metadata=t,Promise.resolve()}))),t.push(Wt.getDictionaries().then((function(t){return t.reduce((function(e,t){return e&&t.isDefault}),!0)||(e.dictionaries=t),Promise.resolve()}))),t.push(Wt.getGrids(!0).then((function(t){return e.grids=t,Promise.resolve()}))),Promise.all(t).then((function(){backupPrepareForDefault&&(delete e.dictionaries,e.metadata.inputConfig=new I,e.metadata.locked=void 0,e.metadata.fullscreen=void 0,e.metadata.hashCodes={});var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});X.a.saveAs(t,"my-backup.grd")}))},Wt.downloadAllGridsSimple=function(){Wt.getGrids(!0).then((function(e){e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:De.removeLongPropertyValues(e)})))}))},Wt.importGridsFromFile=function(e,t,n){var i=e.name.substring(e.name.length-4),a=!1;return n=n||function(){},new Promise((function(r,o){var s=new FileReader;s.onload=function(o){var s=o.target.result,l=[];t&&(n(10,U.translate("Deleting grids // Grids werden gelöscht")),l.push(Wt.deleteAllGrids())),Promise.all(l).then((function(){var o=null,l=[];if(n(40,U.translate("Extracting grids from file // Grids werden aus Datei extrahiert")),".grd"===i)o=JSON.parse(s);else if(".obf"===i)l.push(Yt.OBFToGridData(JSON.parse(s)).then((function(e){return o=e,Promise.resolve()})));else if(".obz"===i){var c=Ht.readZip(e,!0).then((function(e){return Yt.OBZToGridSet(e)})).then((function(e){return o=e,t&&(a=!0),Promise.resolve()}));l.push(c)}Promise.all(l).then((function(){n(80,U.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),Wt.importData(o,a,t).then((function(){n(100),r()}))}))}))},s.readAsText(e)}))},Wt.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();var i=null,a=null,r=null,o=[];return e instanceof Array?r=et.updateDataModel(e):(i=n?et.updateDataModel(e.dictionaries):null,a=n?et.updateDataModel(e.metadata):null,r=et.updateDataModel(e.grids),i||a||r||!e.id||(r=[et.updateDataModel(e)])),(a?Promise.resolve(a):Wt.getMetadata()).then((function(e){return r&&o.push(Wt.getGrids().then((function(n){var i=n.map((function(e){return U.getTranslation(e.label)})),o=null,s=Oe.regenerateIDs(r);r=s.grids,a&&(e.lastOpenedGridId=s.idMapping[e.lastOpenedGridId],e.globalGridId=s.idMapping[e.globalGridId]),r.forEach((function(e){var t=U.getTranslation(e.label);e.label[U.getBrowserLang()]=_.getNewName(t,i)}));var l=r[0]?r[0].locale:null;if(t){var c=r[0].id;o=Oe.generateGlobalGrid(c,l),r.unshift(o),e.globalGridId=o.id,e.globalGridActive=!!e.globalGridId}return Wt.saveGrids(r).then((function(){return Wt.saveMetadata(e,!0)}))}))),i&&o.push(Wt.getDictionaries().then((function(e){return Gt.bulkDelete(e)})).then((function(){return i=i.map((function(e){return delete e.id,delete e._id,delete e._rev,new mt(e)})),Gt.bulkSave(i).then((function(){return At.init(),Promise.resolve()}))}))),Promise.all(o)}))},Wt.getSyncState=function(){return ot.getSyncState()},Wt.getCurrentUser=function(){return Gt.getCurrentUsedDatabase()};var Kt={},Jt="#asterics-grid-user-documentation",Xt="",qt=Jt,Zt=Xt,Qt=qt;Kt.setHelpLocation=function(e,t){Zt=Xt,Qt=qt,Xt=e,qt=t||""},Kt.setHelpLocationIndex=function(){Kt.setHelpLocation("",Jt)},Kt.revertToLastLocation=function(){Kt.setHelpLocation(Zt,Qt)},Kt.openHelp=function(){var e="https://www.asterics.eu/manuals/asterics-grid/"+(Xt?Xt+".html"+qt:qt);U.isBrowserLangDE()&&(e="https://translate.google.com/translate?sl=en&tl=de&u="+encodeURI(e)),window.open(e,"_blank")},window.onhelp=function(){return!1},window.addEventListener("keydown",(function(e){112!==(e.keyCode||e.which)&&"F1"!==e.key||(e.preventDefault(),Kt.openHelp())}));var en=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"all-grids-view overflow-content box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon"),e._v(" "),e._m(0),e._v(" "),n("button",{staticClass:"spaced hide-mobile small",attrs:{tabindex:"31"},on:{click:function(t){return e.addGrid()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("New Grid // Neues Grid")])]),e._v(" "),n("div",{staticStyle:{display:"none"}},[n("input",{attrs:{type:"file",id:"inputFile",accept:".grd, .obf, .obz"},on:{change:e.importFromFile}}),e._v(" "),n("input",{attrs:{type:"file",id:"inputFileBackup",accept:".grd, .obz"},on:{change:e.importBackupFromFile}})])],1),e._v(" "),n("div",{staticClass:"row content text-content"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.showLoading||null===e.grids,expression:"showLoading || grids === null"}],staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin",staticStyle:{position:"relative","margin-top":"30vh",top:"0"}})]),e._v(" "),e.selectedGraphElement?n("div",[n("h1",[e._v(e._s(e.headerDetails))]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("img",{staticStyle:{height:"150px","max-width":"100%",border:"1px solid lightgray"},attrs:{src:e.selectedGraphElement.grid.thumbnail?e.selectedGraphElement.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"five columns",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticStyle:{display:"block"},attrs:{for:"gridName","data-i18n":""}},[e._v("Name of grid // Grid-Name")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newLabel[e.currentLanguage],expression:"newLabel[currentLanguage]"}],staticStyle:{width:"77%"},attrs:{id:"gridName",type:"text",maxlength:"25"},domProps:{value:e.newLabel[e.currentLanguage]},on:{input:function(t){t.target.composing||e.$set(e.newLabel,e.currentLanguage,t.target.value)}}}),e._v(" "),n("button",{staticStyle:{width:"17%",padding:"0 1%"},attrs:{disabled:e.isLabelDuplicate(e.newLabel[e.currentLanguage]),title:e.i18nService.translate("Save name // Name speichern")},on:{click:e.saveGridLabel}},[n("i",{staticClass:"fas fa-check"})])])]),e._v(" "),e._m(1),e._v(" "),n("div",{staticClass:"action-buttons",attrs:{id:"actionGroup"}},[n("div",{staticStyle:{display:"flex"}},[n("button",{on:{click:function(t){return e.show(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Show // Öffnen")])]),e._v(" "),n("button",{on:{click:function(t){return e.edit(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(t){return e.clone(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.deleteGrid(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToFile(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"fas fa-file-export"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Export // Exportieren")])]),e._v(" "),n("button",{on:{click:function(t){return e.exportToPdf(e.selectedGraphElement.grid.id)}}},[n("i",{staticClass:"far fa-file-pdf"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Save as PDF // Als PDF speichern")])])])])]):e._e(),e._v(" "),n("h1",{attrs:{"data-i18n":""}},[e._v("Grid list // Grid-Liste")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.graphList.length>0,expression:"graphList.length > 0"}],staticClass:"row",staticStyle:{"margin-bottom":"1.5em"}},[n("label",{staticClass:"three columns",attrs:{for:"selectMode","data-i18n":""}},[e._v("Grids to show // Anzuzeigende Grids")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectValue,expression:"selectValue"}],staticClass:"four columns",attrs:{id:"selectMode"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectValue=t.target.multiple?n:n[0]},e.reinitContextMenu]}},[e.selectedGraphElement?n("option",{domProps:{value:e.selectValues.CONNECTED_GRIDS}},[e._v(e._s(e.connectedGridsOptionLabel))]):e._e(),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.NOT_REACHABLE_GRIDS}},[e._v("Not reachable grids // Nicht erreichbare Grids")]),e._v(" "),n("option",{attrs:{"data-i18n":""},domProps:{value:e.selectValues.ALL_GRIDS}},[e._v("All grids // Alle Grids")])]),e._v(" "),n("span",{staticClass:"three columns"},[e._v(e._s(e.graphElemsToShow.length)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("elements // Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",[e._l(e.graphElemsToShow,(function(t){return n("li",{staticStyle:{display:"inline-block","margin-right":"2em","margin-bottom":"1.5em",position:"relative"}},[n("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"javascript:;"},on:{click:function(n){return e.setSelectedGraphElement(t)}}},[n("div",{staticStyle:{width:"100%",border:"1px solid lightgray"}},[n("div",[e._v(e._s(e._f("extractTranslation")(t.grid.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px","max-width":"100%"},attrs:{src:t.grid.thumbnail?t.grid.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("button",{staticClass:"gridOptions",staticStyle:{position:"absolute",bottom:"3px",right:"0",padding:"0 20px",margin:"0"},attrs:{"data-grid-id":t.grid.id,title:e.i18nService.translate("More // Mehr")}},[n("i",{staticClass:"fas fa-ellipsis-v"})])])})),e._v(" "),n("li",{directives:[{name:"show",rawName:"v-show",value:0===e.graphElemsToShow.length,expression:"graphElemsToShow.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("(no grids) // (keine Grids)")])])],2)]),e._v(" "),e.graphList.length>0?n("div",[n("h1",{attrs:{"data-i18n":""}},[e._v("Global grid // Globales Grid")]),e._v(" "),n("p",{attrs:{"data-i18n":""}},[e._v('A global grid is shown within each other grid and can contain elements like e.g. "back" or "home". // Ein globales Grid wird innerhalb jedes anderen Grids angezeigt und kann beispielsweise Elemente wie "Zurück" oder "Zum Start" beinhalten.')]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"globalGridActions","data-i18n":""}},[e._v("Actions for global grid // Aktionen für globales Grid")]),e._v(" "),e.metadata?n("div",{staticClass:"eight columns",attrs:{id:"globalGridActions"}},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.globalGridActive||!e.hasGlobalGrid,expression:"!metadata.globalGridActive || !hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!0)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Activate global Grid // Globales Grid aktivieren")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.globalGridActive&&e.hasGlobalGrid,expression:"metadata.globalGridActive && hasGlobalGrid"}],on:{click:function(t){return e.setGlobalGridActive(!1)}}},[n("i",{staticClass:"fas fa-globe"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Deactivate global Grid // Globales Grid deaktivieren")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.edit(e.metadata.globalGridId)}}},[n("i",{staticClass:"fas fa-edit"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Edit global Grid // Globales Grid bearbeiten")])]),e._v(" "),n("button",{attrs:{disabled:!e.metadata.globalGridActive},on:{click:function(t){return e.resetGlobalGrid()}}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Reset global grid to default // Globales Grid zurücksetzen")])])]):e._e()])]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-bottom":"10em"}}),e._v(" "),e.linkModal.show?n("grid-link-modal",{attrs:{"grid-from-prop":e.linkModal.gridFrom,"grid-to-prop":e.linkModal.gridTo},on:{close:function(t){e.linkModal.show=!1},reload:function(t){return e.reload(e.linkModal.gridFrom.id)}}}):e._e(),e._v(" "),e.pdfModal.show?n("export-pdf-modal",{attrs:{"grids-data":e.grids},on:{close:function(t){e.pdfModal.show=!1}}}):e._e()],1)])};en._withStripped=!0;var tn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return!e.fullHeader||e.show?n(e.tag,{tag:"component"},[n("div",{attrs:{"aria-hidden":"true"}},[e.show?n("div",[n("a",{staticStyle:{margin:"0.2em 1em 0 0.5em",color:"#266697"},attrs:{tabindex:"20",href:"javascript:void(0)"},on:{click:function(t){return e.openSidebar()}}},[n("i",{staticClass:"fas fa-2x fa-bars inline"})]),e._v(" "),n("a",{staticClass:"hide-mobile",attrs:{tabindex:"21",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{attrs:{id:"astericsIcon",src:"app/img/asterics-grid-icon-raw.svg",height:"40",width:"121",alt:"AsTeRICS Grid"}})])])]):e._e(),e._v(" "),n("a",{staticClass:"show-mobile",attrs:{tabindex:"22",href:"#main"}},[n("h1",{staticClass:"inline"},[n("img",{staticStyle:{margin:"0"},attrs:{id:"astericsIcon",src:"app/img/asterics_icon.png",alt:"AsTeRICS Grid"}})])])])]):e._e()};tn._withStripped=!0;var nn=n(9),an={},rn={},on=null,sn=!1;function ln(e){null!==rn[e]&&(rn[e].close(),rn[e]=null,log.debug("SSE closed."))}function cn(e){for(var t="",n=0;n-1?"http://127.0.0.1:8081":"http://"+window.location.hostname+":8081"),-1===e.indexOf("http")&&(e="http://"+e);var t=document.createElement("a");return t.href=e,t.pathname="/rest/",t.port||(t.port=8081),t.href},an.getTypeId=function(e,t){var n=window.atob(t);return a()(n).find('components component[id="'+e+'"]').attr("type_id")},an.getComponentDescriptorsAsXml=function(e){return new Promise((function(t,n){a.a.ajax({type:"GET",url:an.getRestURL(e)+"storage/components/descriptors/xml",datatype:"text/xml",crossDomain:!0,success:function(e,n,i){t(e,n)},error:function(e,t,i){n(i,e.responseText)}})}))},an.getPossibleEvents=function(e,t,n){return new Promise((function(i){an.getComponentDescriptorsAsXml(n).then((function(n){var r=an.getTypeId(e,t),o=a()(n).find('componentType[id="'+r+'"] eventListenerPort').map((function(){return this.id})).get();i(o)}))}))},an.subscribeEvents=function(e,t,n){if("undefined"!=typeof EventSource){var i=an.getRestURL(e);rn[i]||(rn[i]=new EventSource(i+"runtime/model/channels/event/listener"),rn[i].onopen=function(e){log.debug("SSE opened."),sn=!0},rn[i].onerror=function(a){ln(i),n&&n(a),sn&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),on=setTimeout((function(){on=null,an.subscribeEvents(e,t,n)}),3e3))}),rn[i].addEventListener("event",(function(e){t(e.data,200)}),!1)}else log.warn("SSE not supported by browser")},an.unsubscribeEvents=function(e){on&&clearTimeout(on),sn=!1,e?ln(e):Object.keys(rn).forEach((function(e){ln(e)}))};var un={},dn=[],fn={},pn=0;function hn(){var e={},t=null,n=null,i=[],a=[],r=[],s=[],l=[],c=[],u=[],d=[],f=[],p=[],h={},v=document.body,m=!1,g={},_=pn++;function y(e,t){an.subscribeEvents(e.areURL,(function(n){e.eventNames.indexOf(n)>-1&&t()}))}function b(t,n){if(t&&t.keyCode&&n){var i=t.keyCode+"",a=h[i]?h[i]:[];return h[i]=a,a.push(function(e,t){return{handler:e,inputEvent:t,lastKeydown:null,lastAction:null,counter:0,timeoutHandler:null}}(n,t)),e}}function E(e){(e.clientY<5||e.clientX<5)&&R(i)}function C(e){R(c,[e],!0),n&&t?e.touches[0].clientY>n+100?(log.debug("swipe down."),n=null,R(r)):e.touches[0].clientYt+100?(log.debug("swipe right."),t=null,R(l)):e.touches[0].clientX0&&!e.repeat&&f.forEach((function(n){n(t,e.code,e)}));var n=t+"";if(h[n]){var i=function(e){e.lastAction=(new Date).getTime(),e.handler(),L(a)};if(e.preventDefault(),e.repeat)return;var a=h[n];(a=a.sort((function(e,t){return e.counter-t.counter||e.inputEvent.repeat-t.inputEvent.repeat}))).forEach((function(e){e.inputEvent.timeout=e.inputEvent.repeat>1?e.inputEvent.timeout||500:e.inputEvent.timeout,x(e.lastKeydown,e.inputEvent.timeout)&&(e.counter=0)})),a.forEach((function(e){var t=e.inputEvent;if(t.repeat&&1!==t.repeat||t.holdDuration||!x(e.lastAction,t.timeout))if(t.repeat>1){if(e.counter++,e.counter===t.repeat){var n=a.filter((function(n){return n!==e&&n.inputEvent.repeat>t.repeat})).length>0?t.timeout:0;e.counter=0,function(e){e.forEach((function(e){return clearTimeout(e.timeoutHandler)}))}(a),e.timeoutHandler=setTimeout((function(){i(e)}),n)}}else t.holdDuration&&(e.timeoutHandler=setTimeout((function(){i(e)}),t.holdDuration));else{var r=a.filter((function(t){return t!==e&&t.inputEvent.holdDuration})).length>0,s=a.filter((function(t){return t!==e&&t.inputEvent.repeat>1})),l=s.length>0,c=Math.max.apply(null,s.map((function(e){return e.counter})));if(r)e.doOnKeyup=function(){i(e)};else if(l&&c<1){var u=Math.max.apply(Math,o()(s.map((function(e){return e.inputEvent.timeout}))));e.timeoutHandler=setTimeout((function(){i(e)}),u+10)}else l||i(e)}e.lastKeydown=(new Date).getTime()}))}}function I(e){if(!e.repeat){var t=(e.which||e.keyCode)+"";if(h[t]){var n=h[t];n.forEach((function(e){e.doOnKeyup&&(e.doOnKeyup(),L(n)),e.inputEvent.holdDuration&&O(e)}))}}}function k(){document.fullscreenElement||R(p)}function O(e){clearTimeout(e.timeoutHandler),e.timeoutHandler=null,e.doOnKeyup=null,e.counter=0}function L(e){e.forEach((function(e){return O(e)}))}function x(e,t){return!e||!t||(new Date).getTime()-e>t}function D(t,n){return t&&n.push(t),e}function R(e,t,n){e.forEach((function(e){e.apply?n?e.apply(null,t):Dt.throttle((function(){e.apply(null,t)})):log.warn("handler seems to be not a function!")}))}return e.startListening=function(){m||(m=!0,Object.keys(g).forEach((function(e){var t=g[e];y(t.inputEvent,t.fn)})),document.addEventListener("mousemove",E),document.addEventListener("keydown",N),document.addEventListener("keyup",I),document.addEventListener("fullscreenchange",k),v.addEventListener("touchmove",C,{passive:!1}),v.addEventListener("touchstart",A),v.addEventListener("touchend",w))},e.stopListening=function(){m=!1,Object.keys(g).forEach((function(e){var t=g[e];an.unsubscribeEvents(t.areURL)})),document.removeEventListener("mousemove",E),document.removeEventListener("keydown",N),document.removeEventListener("keyup",I),document.removeEventListener("fullscreenchange",k),v.removeEventListener("touchmove",C),v.removeEventListener("touchstart",A),v.removeEventListener("touchend",w)},e.destroy=function(){e.stopListening(),dn=dn.filter((function(t){return t.getID()!==e.getID()}))},e.isListening=function(){return m},e.getID=function(){return _},e.onMouseUpperOrLeftBorder=function(e){return D(e,i)},e.onSwipedDown=function(e){return D(e,r)},e.onSwipedUp=function(e){return D(e,a)},e.onSwipedRight=function(e){return D(e,l)},e.onSwipedLeft=function(e){return D(e,s)},e.onEscape=function(e){return b(new T({keyCode:27}),e)},e.onAnyKey=function(e){return D(e,f)},e.onTouchMove=function(e){return D(e,c)},e.onTouchStart=function(e){return D(e,u)},e.onTouchEnd=function(e){return D(e,d)},e.onExitFullscreen=function(e){return D(e,p)},e.off=function(e){var t=function(t){return t!==e};i=i.filter(t),a=a.filter(t),r=r.filter(t),s=s.filter(t),l=l.filter(t),c=c.filter(t),u=u.filter(t),d=d.filter(t),f=f.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case T.getModelName():return b(e,t);case S.getModelName():g[e.id]={inputEvent:e,fn:t},m&&y(e,t)}},e}un.instance=function(){var e=new hn;return dn.push(e),e},un.pauseAll=function(){dn.forEach((function(e){fn[e.getID()]=e.isListening(),e.stopListening()}))},un.resumeAll=function(){dn.forEach((function(e){fn[e.getID()]&&e.startListening()}))},un.global=un.instance();var vn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.tooltipHTML,expression:"tooltipHTML"}],staticStyle:{display:"flex"},attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),e.tooltipOptions.faIcon?n("i",{class:e.tooltipOptions.faIcon}):e._e(),e._v(" "),n("div",{staticStyle:{"padding-left":"0.5em"}},[n("span",{domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.tooltipOptions.actionLinkFn?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e(),e._v(" "),e.tooltipOptions.actionLinkUrl?n("a",{staticStyle:{display:"block",color:"#44a8f1"},attrs:{href:e.tooltipOptions.actionLinkUrl,target:"_blank"}},[e._v(e._s(e._f("translate")(e.actionLink)))]):e._e()]),e._v(" "),n("button",{staticStyle:{position:"absolute",top:"0",right:"10px",padding:"0 10px"},on:{click:function(t){e.tooltipHTML=""}}},[e._v("X")])])};vn._withStripped=!0;var mn={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null,faIcon:null,msgType:null};var gn={props:["fullHeader"],data:function(){return{tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:mn,currentToolTipID:null}},methods:{setTooltip:function(e,t){var n=this;switch(n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(mn)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout((function(){n.clearTooltip()}),n.tooltipOptions.timeout)),n.tooltipOptions.msgType){case"warn":n.tooltipOptions.faIcon="fas fa-exclamation-triangle fa-2x";break;case"info":n.tooltipOptions.faIcon="fas fa-info-circle fa-2x"}return this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink,this.currentToolTipID=(new Date).getTime(),this.currentToolTipID},clearTooltip:function(e){if(!e||e===this.currentToolTipID){this.tooltipOptions.revertOnClose&&this.tooltipHTML?this.setTooltip(this.lastTooltipHTML,this.lastTooltipOptions):(this.tooltipHTML=null,this.actionLink=null,this.tooltipImageUrl=null),this.lastTooltipOptions={},this.lastTooltipHTML=null}},onActionLink:function(){this.tooltipOptions.actionLinkFn&&this.tooltipOptions.actionLinkFn()}},mounted:function(){!function(){var e=document.getElementById("notificationBar"),t=document.getElementById("notificationBarImg"),n=JSON.stringify({x:window.innerWidth,y:window.innerHeight}),i=D.get(D.get("WINDOW_SIZE_KEY"));D.save("WINDOW_SIZE_KEY",n),i&&n!==i&&s();var r=D.get("NOTIFICATION_BAR_STYLE_KEY"),o=D.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");r&&(e.setAttribute("style",r),e.style.display="none");o&&t.setAttribute("style",o);function s(){var n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),D.save("NOTIFICATION_BAR_STYLE_KEY",""),D.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}a()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){Dt.debounce((function(){D.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),a()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",D.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){Dt.debounce((function(){D.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),window.addEventListener("resize",(function(){Dt.debounce((function(){s()}),300,"RESIZE_RESET_NOTIFICATIONBAR")}))}(),this},beforeDestroy:function(){}};n(70);function _n(e,t,n,i,a,r,o,s){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=l):a&&(l=s?function(){a.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}var yn=_n(gn,vn,[],!1,null,"7bec61b8",null);yn.options.__file="src/vue-components/components/notificationBar.vue";var bn=yn.exports,En=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:function(t){return t.type.indexOf("key")||27===t.keyCode?e.close():null}}},[e.options.closable?n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header","data-i18n":""}},[e._v(e._s(e.options.header))])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"biggerFont"},[e._v(e._s(e.options.text)+" ...")]),e._v(" "),n("div",{staticStyle:{border:"1px solid","border-radius":"3px",width:"100%",height:"50px",margin:"0.5em 0"},attrs:{id:"progressWrapper"}},[n("div",{style:"width: "+e.progressPercentage+"%; height: 100%; background-color: green",attrs:{id:"progressBar"}})]),e._v(" "),n("div",{staticClass:"biggerFont",staticStyle:{"text-align":"right",width:"100%"}},[e._v(e._s(e.progressPercentage)+"%")])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.options.closable?n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.close()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])])]):e._e()])])])])])};En._withStripped=!0;n(8);var Cn={header:"",closable:!1,cancelFn:null,text:""},wn={props:[],data:function(){return{progressPercentage:0,options:JSON.parse(JSON.stringify(Cn))}},methods:{setProgress:function(e,t){var n=this;this.progressPercentage=Math.min(e,100),Object.keys(this.options).forEach((function(e){t&&void 0!==t[e]&&(n.options[e]=t[e])})),100===this.progressPercentage&&setTimeout((function(){n.options=JSON.parse(JSON.stringify(Cn)),n.$emit("close")}),200)},close:function(){this.options.closable&&(this.$emit("close"),this.options.cancelFn&&this.options.cancelFn(),this.options=JSON.parse(JSON.stringify(Cn)))}},mounted:function(){U.initDomI18n()}},Tn=(n(74),_n(wn,En,[],!1,null,"2fce46f7",null));Tn.options.__file="src/vue-components/modals/progressBarModal.vue";var An=Tn.exports,Sn={},Nn=null;Sn.setViewComponent=function(e,t){Nn&&Nn.$refs.notificationBar.tooltipOptions.closeOnNavigate&&Sn.clearTooltip(),Nn.setComponent(e,t)},Sn.isSidebarOpen=function(){return Nn.showSidebar},Sn.setTooltip=function(e,t){if(Nn)return Nn.$refs.notificationBar.setTooltip(e,t)},Sn.setTooltipI18n=function(e,t){var n=U.translate(e);Sn.setTooltip(n,t)},Sn.clearTooltip=function(){Nn&&Nn.$refs.notificationBar.clearTooltip()},Sn.showProgressBar=function(e,t){Nn&&(Nn.showProgressBar=!0,Nn.$refs.progressBar.setProgress(e,t))},Sn.init=function(){Nn=new nn.a({el:"#app",components:{NotificationBar:bn,ProgressBarModal:An},data:function(){return{component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:Gt.getCurrentUsedDatabase(),isLocalUser:D.isSavedLocalUser(Gt.getCurrentUsedDatabase()),syncState:Wt.getSyncState(),showProgressBar:!1,constants:s,tooltipHTML:null,actionLink:null}},methods:{setComponent:function(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar:function(){a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)},openSidebar:function(){a()(document).trigger(s.EVENT_SIDEBAR_OPEN)},openHelp:function(){Kt.openHelp()},moreNavigation:function(){a.a.contextMenu("destroy"),a.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":Fo.toRegister();break;case"CONTEXT_ADD_OFFLINE":Fo.toAddOffline();break;case"CONTEXT_ABOUT":Fo.toAbout()}}(e)},items:{CONTEXT_ADD_ONLINE:{name:"Add online user // Online-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ADD_OFFLINE:{name:"Add offline user // Offline-User hinzufügen",icon:"fas fa-user-plus"},CONTEXT_ABOUT:{name:"About AsTeRICS Grid // Über AsTeRICS Grid",icon:"fas fa-info-circle"}},trigger:"left",zIndex:10}),U.initDomI18n(),a()("#moreNavigation").contextMenu()}},mounted:function(){var e=this,t=this;function n(){!t.showSidebar&&Gt.getCurrentUsedDatabase()&&(Dt.closeFullscreen(),Wt.getMetadata().then((function(e){e.fullscreen&&(e.fullscreen=!1,Wt.saveMetadata(e).then((function(){t.openSidebar()})))})))}U.initDomI18n(),a()(document).on(s.EVENT_SIDEBAR_OPEN,(function(){if(!t.showSidebar)return Gt.getCurrentUsedDatabase()?void Wt.getMetadata().then((function(n){n.locked||n.fullscreen||(t.showSidebar=!0,e.$nextTick((function(){a()(document).trigger(s.EVENT_SIDEBAR_OPENED),a()(document).trigger(s.EVENT_GRID_RESIZE)})))})):(t.showSidebar=!0,void e.$nextTick((function(){a()(document).trigger(s.EVENT_SIDEBAR_OPENED),a()(document).trigger(s.EVENT_GRID_RESIZE)})))})),a()(document).on(s.EVENT_SIDEBAR_CLOSE,(function(){t.showSidebar=!1,e.$nextTick((function(){a()(document).trigger(s.EVENT_GRID_RESIZE)}))})),a()(document).on(s.EVENT_DB_INITIALIZED,(function(){t.currentUser=Gt.getCurrentUsedDatabase(),t.isLocalUser=D.isSavedLocalUser(t.currentUser)})),a()(document).on(s.EVENT_DB_CLOSED,(function(){t.currentUser=Gt.getCurrentUsedDatabase(),t.isLocalUser=D.isSavedLocalUser(t.currentUser)})),a()(document).on(s.EVENT_DB_SYNC_STATE_CHANGE,(function(e,n){t.syncState=n})),t.syncState=Wt.getSyncState(),window.addEventListener("resize",(function(){Dt.debounce((function(){a()(document).trigger(s.EVENT_GRID_RESIZE)}),300,s.EVENT_GRID_RESIZE)})),un.global.onSwipedDown(n).onEscape(n).onExitFullscreen(n),un.global.startListening(),t.openSidebar()},updated:function(){U.initDomI18n()}})};var In=_n({props:["fullHeader"],data:function(){return{show:!Sn.isSidebarOpen(),tag:"div"}},methods:{openSidebar:function(){a()(document).trigger(s.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn:function(){this.show=!1},onCloseFn:function(){this.show=!0}},mounted:function(){a()(document).on(s.EVENT_SIDEBAR_CLOSE,this.onCloseFn),a()(document).on(s.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy:function(){a()(document).off(s.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},tn,[],!1,null,"4ff1a546",null);In.options.__file="src/vue-components/components/headerIcon.vue";var kn=In.exports,On=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("button",{staticClass:"btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:e.toggleOpen}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.isOpen,expression:"!isOpen"}],staticClass:"fas fa-chevron-down arrow"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"fas fa-chevron-up arrow"}),e._v(" "),n(e.componentType,{tag:"component",staticStyle:{"margin-left":"2em",display:"inline-block"},attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.accLabel)))])],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],staticClass:"accordion-content",style:"background-color:"+e.backgroundColor},[e._t("default")],2)])};On._withStripped=!0;var Ln={props:["accLabel","accOpen","accLabelType","accBackgroundColor"],data:function(){return{isOpen:"true"===this.accOpen||!0===this.accOpen,componentType:this.accLabelType||"span",backgroundColor:this.accBackgroundColor||"whitesmoke"}},methods:{toggleOpen:function(){this.isOpen=!this.isOpen,this.isOpen?this.$emit("open"):this.$emit("close")},open:function(){this.isOpen=!0}},mounted:function(){U.initDomI18n()},updated:function(){U.initDomI18n()}},xn=(n(77),_n(Ln,On,[],!1,null,"66ff21d8",null));xn.options.__file="src/vue-components/components/accordion.vue";var Dn=xn.exports,Rn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.gridFrom?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("div",[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridFrom.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridFrom.thumbnail?e.gridFrom.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-right hide-mobile two columns",staticStyle:{"margin-top":"2em"}}),e._v(" "),n("i",{staticClass:"fas fa-2x fa-arrow-down show-mobile two columns",staticStyle:{margin:"0.5em 20%"}}),e._v(" "),n("div",{staticClass:"four columns"},[n("div",[e._v(e._s(e._f("extractTranslation")(e.gridTo.label)))]),e._v(" "),n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.gridTo.thumbnail?e.gridTo.thumbnail.data:e.imageUtil.getEmptyImage()}})])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementName","data-i18n":""}},[e._v("Connect with element // Verknüpfung über Element")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedElement,expression:"selectedElement"}],staticClass:"four columns",attrs:{id:"elementName"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedElement=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("create new Element // neues Element erstellen")]),e._v(" "),e._l(e.gridFrom.gridElements,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e.i18nService.getTranslation(t.label)||e.i18nService.translate("(empty element) // (leeres Element)")))])}))],2)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.selectedElement||!e.i18nService.getTranslation(e.selectedElement.label),expression:"!selectedElement || !i18nService.getTranslation(selectedElement.label)"}],staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"elementLabel","data-i18n":""}},[e._v("Label of new element // Label des neuen Elements")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.newElementLabel[e.i18nService.getBrowserLang()],expression:"newElementLabel[i18nService.getBrowserLang()]"}],staticClass:"four columns",attrs:{type:"text",id:"elementLabel",maxlength:"35"},domProps:{value:e.newElementLabel[e.i18nService.getBrowserLang()]},on:{input:function(t){t.target.composing||e.$set(e.newElementLabel,e.i18nService.getBrowserLang(),t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedElement&&e.selectedElement.actions.filter((function(t){return t.modelName===e.GridActionNavigate.getModelName()})).length>0,expression:"selectedElement && selectedElement.actions.filter(e => e.modelName === GridActionNavigate.getModelName()).length > 0"}],staticClass:"row"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "),e._m(1)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Rn._withStripped=!0;var Mn={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:ee,imageUtil:ie,i18nService:U}},methods:{save:function(){var e=this;this.saveInternal().then((function(){e.$emit("reload"),e.$emit("close")}))},saveInternal:function(){var e=this.selectedElement;if(!e){var t=new He(this.gridFrom).getNewXYPos();e=new Ae({label:this.newElementLabel,x:t.x,y:t.y}),this.gridFrom.gridElements.push(e)}return e.label=e.label||this.newElementLabel,e.actions=e.actions.filter((function(e){return e.modelName!==ee.getModelName()})),e.actions.push(new ee({toGridId:this.gridTo.id})),Wt.saveGrid(this.gridFrom)}},mounted:function(){var e=this;this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),Wt.getGrid(this.gridFromProp.id).then((function(t){e.gridFrom=JSON.parse(JSON.stringify(t)),U.initDomI18n()}))},updated:function(){U.initDomI18n()}},Pn=(n(79),_n(Mn,Rn,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Link grids // Grids verknüpfen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{attrs:{"data-i18n":""}},[t("span",[t("b",[this._v("Hint: ")]),this._v(" This element already navigates to another grid. This navigation will be overwritten.")]),this._v(" "),t("span",[t("b",[this._v("Hinweis: ")]),this._v(" Dieses Element navigiert bereits zu einem anderen Grid. Diese Navigation wird überschrieben.")])])}],!1,null,"00ff350d",null));Pn.options.__file="src/vue-components/modals/gridLinkModal.vue";var Gn=Pn.exports,Un=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"selectGrid","data-i18n":""}},[e._v("Select grid // Grid auswählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",attrs:{id:"selectGrid"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]},e.selectedGridChanged]}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("All grids // Alle Grids")]),e._v(" "),e._l(e.graphList,(function(t){return n("option",{domProps:{value:t.grid}},[e._v(e._s(e._f("extractTranslation")(t.grid.label)))])}))],2),e._v(" "),n("div",{staticClass:"four columns"},[e.selectedGrid&&e.selectedGrid.thumbnail?n("img",{attrs:{src:e.selectedGrid.thumbnail.data}}):e._e()])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.selectedGrid&&e.allChildren&&e.allChildren.length>0,expression:"selectedGrid && allChildren && allChildren.length > 0"}],staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.exportConnected,expression:"options.exportConnected"}],attrs:{id:"exportConnected",type:"checkbox"},domProps:{checked:Array.isArray(e.options.exportConnected)?e._i(e.options.exportConnected,null)>-1:e.options.exportConnected},on:{change:function(t){var n=e.options.exportConnected,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"exportConnected",n.concat([null])):r>-1&&e.$set(e.options,"exportConnected",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"exportConnected",a)}}}),e._v(" "),n("label",{attrs:{for:"exportConnected"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Export all child grids // Alle untergeordneten Grids exportieren")]),e._v(" "),n("span",[e._v("("+e._s(e.allChildren?e.allChildren.length:0)+" "),n("span",{attrs:{"data-i18n":""}},[e._v("grids // Grids")]),e._v(")")])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showLinks,expression:"options.showLinks"}],attrs:{id:"showLinks",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showLinks)?e._i(e.options.showLinks,null)>-1:e.options.showLinks},on:{change:function(t){var n=e.options.showLinks,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showLinks",n.concat([null])):r>-1&&e.$set(e.options,"showLinks",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showLinks",a)}}}),e._v(" "),n("label",{attrs:{for:"showLinks","data-i18n":""}},[e._v("Insert links between pages // Verknüpfungen zwischen Seiten anzeigen")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.printBackground,expression:"options.printBackground"}],attrs:{id:"printBackground",type:"checkbox"},domProps:{checked:Array.isArray(e.options.printBackground)?e._i(e.options.printBackground,null)>-1:e.options.printBackground},on:{change:function(t){var n=e.options.printBackground,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"printBackground",n.concat([null])):r>-1&&e.$set(e.options,"printBackground",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"printBackground",a)}}}),e._v(" "),n("label",{attrs:{for:"printBackground","data-i18n":""}},[e._v("Print background color // Hintergrundfarbe drucken")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.options.showRegister,expression:"options.showRegister"}],attrs:{id:"showRegister",type:"checkbox"},domProps:{checked:Array.isArray(e.options.showRegister)?e._i(e.options.showRegister,null)>-1:e.options.showRegister},on:{change:function(t){var n=e.options.showRegister,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.options,"showRegister",n.concat([null])):r>-1&&e.$set(e.options,"showRegister",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.options,"showRegister",a)}}}),e._v(" "),n("label",{attrs:{for:"showRegister","data-i18n":""}},[e._v("Print index at side edge // Griffregister am Seitenrand drucken")])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download PDF // PDF herunterladen")])])])])])])])])};Un._withStripped=!0;var Fn={},$n=null,Vn=5,jn=8,Bn=3,Yn=1,Hn=1,Wn=.8;function zn(e,t,n){var i=[];t=new He(t);var a=n.showRegister&&n.pages>1?10:0,r=!1!==n.showFooter?jn:0,o=(297-2*Vn)/t.getWidth(),s=(210-2*Vn-r-a)/t.getHeight();if(r>0){var l=210-Vn-a,c=.4*r/.352778;e.setTextColor(0),e.setFontSize(c);var u=U.translate("Printed by AsTeRICS Grid, https://grid.asterics.eu // Gedruckt mit AsTeRICS Grid, https://grid.asterics.eu"),d=U.getTranslation(t.label),f=n.idParentsMap[t.id][0];if(n.showLinks&&f){d=JSON.stringify(n.idParentsMap[t.id].slice(0,5))+" => "+d;var p=e.getTextWidth(d);e.link(148.5-p/2,l-.4*r,p,.4*r,{pageNumber:f})}var h=(n.idPageMap[t.id]||1)+" / "+(Object.keys(n.idPageMap).length||1);e.text(u,Vn+Yn,l,{baseline:"bottom",align:"left"}),e.text(d,148.5,l,{baseline:"bottom",align:"center"}),e.text(h,297-Vn-Yn,l,{baseline:"bottom",align:"right"})}if(a>0){var v=1,m=n.pages;n.pages>30&&(v=Math.ceil(n.pages/30),m=Math.ceil(n.pages/v)),e.setFillColor(255,255,255),e.setDrawColor(0),e.roundedRect(0,210-a,297,a,0,0),e.setFontSize(13);for(var g=297/m,_=0;_.5*i||d>u?o-=s:o+=s}else c.w>i?o-=s:o+=s;s/=2}return Math.floor(Math.min(o,n))}(e,o,(s?i*(1-Wn):i/2)/.352778*.8,l,i-2*Bn,!s);e.setTextColor(0,0,0),e.setFontSize(c);var u=e.getTextDimensions(o),d=Math.ceil(u.w/l),f=s?i-2*Yn:(i-u.h*d)/2;e.text(o,a+n/2,r+f,{baseline:s?"bottom":"top",align:"center",maxWidth:l})}(e,t,a,r,l,c),i.push(function(e,t,n,i,a,r){if(!t||!t.image||!t.image.data||0!==t.image.data.indexOf("data:"))return Promise.resolve();return t.image.getDimensions().then(function(){var o=K()(W.a.mark((function o(s){var l,c,u,d,f,p,h,v,m,g,_,y,b,E;return W.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(E=function(n){e.addImage(t.image.data,n,g,_,p,h)},l=t.image.getImageType(),c=U.getTranslation(t.label)?Wn:1,f=(u=n-2*Hn)/(d=(i-2*Hn)*c),p=u,h=d,v=0,m=0,s.ratio>=f?(isNaN(s.ratio)||(h=p/s.ratio),m=(d-h)/2):(isNaN(s.ratio)||(p=h*s.ratio),v=(u-p)/2),g=a+Hn+v,_=r+Hn+m,l!==se.IMAGE_TYPES.PNG){o.next=15;break}E("PNG"),o.next=25;break;case 15:if(l!==se.IMAGE_TYPES.JPEG){o.next=19;break}E("JPEG"),o.next=25;break;case 19:if(l!==se.IMAGE_TYPES.SVG){o.next=25;break}return y=p/.084666667,o.next=23,ie.base64SvgToBase64Png(t.image.data,y);case 23:b=o.sent,e.addImage(b,l,g,_,p,h);case 25:return o.abrupt("return",Promise.resolve());case 26:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}())}(e,t,a,r,l,c).then((function(){if(n.showLinks&&n.idPageMap[t.getNavigateGridId()]){var i=n.idPageMap[t.getNavigateGridId()],o=Math.max(a/10,7),s=a-o-1;if(e.setDrawColor(255),e.setFillColor(90,113,122),e.roundedRect(l+s,c+1,o,o,1,1,"FD"),e.link(l,c,a,r,{pageNumber:i}),i){var u=.6*o/.352778;e.setTextColor(255,255,255),e.setFontSize(u),e.text(i+"",l+s+o/2,c+1+o/2,{baseline:"middle",align:"center",maxWidth:o})}}return Promise.resolve()})))})),Promise.all(i)}Fn.initPrintHandlers=function(){window.addEventListener("beforeprint",(function(){$n&&($("#grid-container").width("27.7cm"),$("#grid-container").height("19cm"),$n.autosize())})),window.addEventListener("afterprint",(function(){$n&&($("#grid-container").width(""),$("#grid-container").height(""),$n.autosize())}))},Fn.setGridInstance=function(e){$n=e},Fn.gridsToPdf=function(){var e=K()(W.a.mark((function e(t,i){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.e(5).then(n.bind(null,637)).then(function(){var e=K()(W.a.mark((function e(n){var a,r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(i=i||{}).idPageMap={},i.idParentsMap={},t.forEach((function(e,t){i.idPageMap[e.id]=t+1})),t.forEach((function(e){i.idParentsMap[e.id]=i.idParentsMap[e.id]||[],e.gridElements.forEach((function(t){var n=(t=new Ae(t)).getNavigateGridId();n&&(i.idParentsMap[n]=i.idParentsMap[n]||[],i.idParentsMap[n].push(i.idPageMap[e.id]))}))})),a=new n.jsPDF({orientation:"landscape",compress:!0}),i.pages=t.length,r=0;case 8:if(!(re.gridsData.length/2)){i.next=4;break}return i.abrupt("return",Wt.getGrids(!0,!0));case 4:a=[],r=0;case 6:if(!(r0},saveGridLabel:function(){this.selectedGraphElement.grid.label=JSON.parse(JSON.stringify(this.newLabel)),Wt.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show:function(e){Fo.toGrid(e)},edit:function(e){Fo.toEditGrid(e)},clone:function(e){var t=this;Wt.getGrid(e).then((function(e){var n=e.clone();Wt.saveGrid(n).then((function(){t.reload(n.id)}))}))},exportToFile:function(e){e?Wt.downloadSingleGrid(e):Wt.downloadBackup()},exportToPdf:function(e){Wt.getGrid(e).then((function(e){Fn.gridsToPdf([e])}))},importFromFile:function(e){this.importFromFileInternal(e,!1)},importBackupFromFile:function(e){var t=e.target&&e.target.files[0]&&e.target.files[0]?e.target.files[0].name:"";confirm(U.translate("CONFIRM_IMPORT_BACKUP",t))?this.importFromFileInternal(e,!0):this.resetFileInput(e)},reload:function(e){var t=this;return Wt.getMetadata().then((function(e){return t.metadata=JSON.parse(JSON.stringify(e)),Wt.getGrids()})).then((function(n){t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=Oe.getGraphList(t.grids,t.metadata.globalGridId);var i=e||t.metadata.lastOpenedGridId;return t.setSelectedGraphElement(t.graphList.filter((function(e){return e.grid.id===i}))[0]||t.graphList[0],!0),Promise.resolve()}))},onPullUpdate:function(){var e=this.selectedGraphElement?this.selectedGraphElement.grid.id:null;this.reload(e)},reset:function(){var e=this;confirm(U.translate("CONFIRM_RESET_DB"))&&(this.showLoading=!0,Sn.showProgressBar(0,{header:U.translate("Reset to default gridset // Zurücksetzen auf Standard-Gridset"),text:U.translate("Deleting grids // Grids werden gelöscht")}),Wt.deleteAllGrids().then((function(){return Sn.showProgressBar(50,{text:U.translate("Importing grids // Grids werden importiert")}),Wt.importDefaultGridset()})).then((function(){Sn.showProgressBar(100),e.reload()})))},deleteAll:function(){var e=this;confirm(U.translate("Do you really want to delete all grids? This operation cannot be undone! // Möchten Sie wirklich alle Grids löschen? Diese Aktion kann nicht rückgängig gemacht werden!"))&&(this.showLoading=!0,Wt.deleteAllGrids().then((function(){e.reload()})))},setGlobalGridActive:function(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,Wt.saveMetadata(this.metadata)},resetGlobalGrid:function(e){var t=this;(e||confirm(U.translate("Do you really want to reset the global grid to default? // Möchten Sie das globale Grid wirklich zurücksetzen?")))&&Wt.getGlobalGrid(!0).then((function(e){return e?Wt.deleteGrid(e.id):Promise.resolve()})).then((function(){var e=Oe.generateGlobalGrid(t.grids[0].id);return t.metadata.globalGridId=e.id,t.metadata.globalGridActive=!0,Wt.saveGrid(e)})).then((function(){return Wt.saveMetadata(t.metadata)})).then((function(){t.reload()}))},importFromFileInternal:function(e,t){var n=this,i=e.target.files[0];i&&i.name&&(this.showLoading=!0,Sn.showProgressBar(0,{header:U.translate("Importing grids // Grids werden importiert"),text:U.translate("Reading file // Datei wird gelesen")}),Wt.importGridsFromFile(i,t,(function(e,t){Sn.showProgressBar(e,{text:t})})).then((function(){n.resetFileInput(e),n.reload()})))},resetFileInput:function(e){var t=a()(e.target);t.wrap("").closest("form").get(0).reset(),t.unwrap()}},computed:{headerDetails:function(){return this.selectedGraphElement?U.translate("Details for grid {?} // Details für Grid {?}",'"'.concat(U.getTranslation(this.selectedGraphElement.grid.label),'"')):""},connectedGridsOptionLabel:function(){return this.selectedGraphElement?U.translate('Grids connected with "{?}" // Grid verknüpft mit "{?}"',U.getTranslation(this.selectedGraphElement.grid.label)):""},hasGlobalGrid:function(){var e=this;return!(!this.grids||!this.metadata)&&(this.metadata.globalGridId&&!!this.grids.filter((function(t){return t.id===e.metadata.globalGridId}))[0])},graphElemsToShow:function(){if(!this.graphList||!this.selectedGraphElement)return[];switch(this.selectValue){case this.selectValues.CONNECTED_GRIDS:return this.selectedGraphElement.allRelatives;case this.selectValues.NOT_REACHABLE_GRIDS:return this.graphList.filter((function(e){return 0===e.parents.length}));case this.selectValues.ALL_GRIDS:return this.graphList}}},created:function(){a()(document).on(s.EVENT_DB_PULL_UPDATED,this.onPullUpdate)},mounted:function(){var e=this;qn=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then((function(){e.reinitContextMenu(),U.initDomI18n()}))},updated:function(){U.initDomI18n()},beforeDestroy:function(){a()(document).off(s.EVENT_DB_PULL_UPDATED,this.onPullUpdate),a.a.contextMenu("destroy")}},Qn=(n(83),_n(Zn,en,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"small",attrs:{tabindex:"32",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("label",{attrs:{for:"actionGroup","data-i18n":""}},[this._v("Actions // Aktionen")])])}],!1,null,"dd9feaca",null));Qn.options.__file="src/vue-components/views/allGridsView.vue";var ei=Qn.exports,ti=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.gridData?n("div",{staticClass:"box"},[n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{staticClass:"left"}),e._v(" "),n("button",{staticClass:"spaced small left",attrs:{tabindex:"30",title:"Back"},on:{click:e.back}},[n("i",{staticClass:"fas fa-eye"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing off // Bearbeiten aus")])]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"spaced btn-group"},[n("button",{staticClass:"small",attrs:{tabindex:"31",title:"Undo",disabled:!e.canUndo||e.doingUndoRedo},on:{click:e.undo}},[n("i",{staticClass:"fas fa-undo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Undo // Rückgängig")])]),e._v(" "),n("button",{staticClass:"small spaced",attrs:{tabindex:"32",title:"Redo",disabled:!e.canRedo||e.doingUndoRedo},on:{click:e.redo}},[n("i",{staticClass:"fas fa-redo"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Redo // Wiederherstellen")])])])],1),e._v(" "),n("div",[e.showEditModal?n("edit-grid-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-instance":e.getGridInstance(),"grid-data-id":e.gridData.id},on:{close:function(t){e.showEditModal=!1},mark:e.markElement,actions:function(t){e.editElementId=t,e.showActionsModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showMultipleModal?n("add-multiple-modal",{attrs:{"grid-data":e.gridData,"grid-instance":e.getGridInstance()},on:{close:function(t){e.showMultipleModal=!1}}}):e._e()],1),e._v(" "),n("div",[e.showActionsModal?n("edit-actions-modal",{attrs:{"edit-element-id-param":e.editElementId,"grid-id-param":e.gridData.id},on:{close:function(t){e.showActionsModal=!1},reload:e.reload,edit:function(t){e.showEditModal=!0}}}):e._e()],1),e._v(" "),n("div",[e.showDimensionsModal?n("grid-dimension-modal",{attrs:{"grid-data-param":e.gridData,"is-global-grid":e.metadata.globalGridId===e.gridData.id},on:{close:function(t){e.showDimensionsModal=!1},save:e.setDimensions}}):e._e()],1),e._v(" "),n("div",[e.showMoveModal?n("element-move-modal",{attrs:{"grid-id":e.gridData.id,"grid-element-id":e.editElementId},on:{close:function(t){e.showMoveModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",[e.showTranslateModal?n("grid-translate-modal",{attrs:{"grid-data-id":e.gridData.id},on:{close:function(t){e.showTranslateModal=!1},reload:e.reload}}):e._e()],1),e._v(" "),n("div",{staticClass:"row content"},[e.showGrid?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}}),e._v(" "),e._m(1)])]):e._e()};ti._withStripped=!0;var ni={},ii={},ai={};ni.setState=function(e,t){ii[e]!==t&&(ii[e]=t,ai[e]=ai[e]||[],ai[e].forEach((function(e){e(t)})))},ni.getState=function(e){return ii[e]},ni.onStateChanged=function(e,t){ai[e]=ai[e]||[],ai[e].push(t)},ni.clearListeners=function(e){e?ai[e]=[]:ai={}};var ri={};ri.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",ri.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";var oi=D.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",si=[],li=JSON.parse('[{"name":"UK English Female","lang":"en-GB"},{"name":"UK English Male","lang":"en-GB"},{"name":"US English Female","lang":"en-US"},{"name":"US English Male","lang":"en-US"},{"name":"Arabic Male","lang":"ar-SA"},{"name":"Arabic Female","lang":"ar-SA"},{"name":"Armenian Male","lang":"hy-AM"},{"name":"Australian Female","lang":"en-AU"},{"name":"Australian Male","lang":"en-AU"},{"name":"Bangla Bangladesh Female","lang":"bn-BD"},{"name":"Bangla Bangladesh Male","lang":"bn-BD"},{"name":"Bangla India Female","lang":"bn-IN"},{"name":"Bangla India Male","lang":"bn-IN"},{"name":"Brazilian Portuguese Female","lang":"pt-BR"},{"name":"Chinese Female","lang":"zh-CN"},{"name":"Chinese Male","lang":"zh-CN"},{"name":"Chinese (Hong Kong) Female","lang":"zh-HK"},{"name":"Chinese (Hong Kong) Male","lang":"zh-HK"},{"name":"Chinese Taiwan Female","lang":"zh-TW"},{"name":"Chinese Taiwan Male","lang":"zh-TW"},{"name":"Czech Female","lang":"cs-CZ"},{"name":"Danish Female","lang":"da-DK"},{"name":"Deutsch Female","lang":"de-DE"},{"name":"Deutsch Male","lang":"de-DE"},{"name":"Dutch Female","lang":"nl-NL"},{"name":"Dutch Male","lang":"nl-NL"},{"name":"Estonian Male","lang":"et-EE"},{"name":"Filipino Female","lang":"fil-PH"},{"name":"Finnish Female","lang":"fi-FI"},{"name":"French Female","lang":"fr-FR"},{"name":"French Male","lang":"fr-FR"},{"name":"French Canadian Female","lang":"fr-CA"},{"name":"French Canadian Male","lang":"fr-CA"},{"name":"Greek Female","lang":"el-GR"},{"name":"Hindi Female","lang":"hi-IN"},{"name":"Hindi Male","lang":"hi-IN"},{"name":"Hungarian Female","lang":"hu-HU"},{"name":"Indonesian Female","lang":"id-ID"},{"name":"Indonesian Male","lang":"id-ID"},{"name":"Italian Female","lang":"it-IT"},{"name":"Italian Male","lang":"it-IT"},{"name":"Japanese Female","lang":"ja-JP"},{"name":"Japanese Male","lang":"ja-JP"},{"name":"Korean Female","lang":"ko-KR"},{"name":"Korean Male","lang":"ko-KR"},{"name":"Latin Male","lang":"la"},{"name":"Nepali","lang":"ne-NP"},{"name":"Norwegian Female","lang":"nb-NO"},{"name":"Norwegian Male","lang":"nb-NO"},{"name":"Polish Female","lang":"pl-PL"},{"name":"Polish Male","lang":"pl-PL"},{"name":"Portuguese Female","lang":"pt-BR"},{"name":"Portuguese Male","lang":"pt-BR"},{"name":"Romanian Female","lang":"ro-RO"},{"name":"Russian Female","lang":"ru-RU"},{"name":"Sinhala","lang":"si-LK"},{"name":"Slovak Female","lang":"sk-SK"},{"name":"Spanish Female","lang":"es-ES"},{"name":"Spanish Latin American Female","lang":"es-MX"},{"name":"Spanish Latin American Male","lang":"es-MX"},{"name":"Swedish Female","lang":"sv-SE"},{"name":"Swedish Male","lang":"sv-SE"},{"name":"Tamil Female","lang":"hi-IN"},{"name":"Tamil Male","lang":"hi-IN"},{"name":"Thai Female","lang":"th-TH"},{"name":"Thai Male","lang":"th-TH"},{"name":"Turkish Female","lang":"tr-TR"},{"name":"Turkish Male","lang":"tr-TR"},{"name":"Ukrainian Female","lang":"uk-UA"},{"name":"Vietnamese Female","lang":"vi-VN"},{"name":"Vietnamese Male","lang":"vi-VN"},{"name":"Afrikaans Male","lang":"af-ZA"},{"name":"Albanian Male","lang":"sq-AL"},{"name":"Bosnian Male","lang":"bs"},{"name":"Catalan Male","lang":"ca-ES"},{"name":"Croatian Male","lang":"hr-HR"},{"name":"Esperanto Male","lang":"eo"},{"name":"Icelandic Male","lang":"is-IS"},{"name":"Latvian Male","lang":"lv-LV"},{"name":"Macedonian Male","lang":"mk-MK"},{"name":"Moldavian Female","lang":"md"},{"name":"Montenegrin Male","lang":"me"},{"name":"Serbian Male","lang":"sr-RS"},{"name":"Serbo-Croatian Male","lang":"hr-HR"},{"name":"Swahili Male","lang":"sw-KE"},{"name":"Welsh Male","lang":"cy"},{"name":"Fallback UK Female","lang":"en-GB"}]');function ci(e){var t=si.filter((function(t){return t.name===e}));return t.length>0?t:null}function ui(e,t,n,i){-1===si.map((function(e){return e.name})).indexOf(e)&&si.push({name:e,lang:t.substring(0,2),type:n,ref:i})}function di(){si.sort((function(e,t){return e.type===ri.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===ri.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name)}))}ri.speak=function(e,t,n){var i=null,a="string"==typeof e;if(e&&(a||0!==Object.keys(e).length)){if(a)i=e;else{var r=e[t=function(e){var t=ci(e);return t&&t[0]?t[0].lang:null}(oi)||t]||U.getTranslation(e,null,!0);i=void 0!==r.text?r.text:r,t=t||r.lang}ri.stopSpeaking(),t=t||U.getBrowserLang();var o=ci(n)||ci(oi)||function(e){return si.filter((function(t){return t.lang.substring(0,2)===e}))}(t),l=o.filter((function(e){return e.type===ri.VOICE_TYPE_NATIVE})),c=o.filter((function(e){return e.type===ri.VOICE_TYPE_RESPONSIVEVOICE}));if(ri.nativeSpeechSupported()&&l.length>0){var u=new SpeechSynthesisUtterance(i);u.voice=l[0].ref,log.debug("used voice: "+u.voice.name),window.speechSynthesis.speak(u)}else c.length>0&&responsiveVoice.speak(i,c[0].name);d(),setTimeout((function(){d()}),700)}function d(){ri.isSpeaking()&&ni.setState(s.STATE_ACTIVATED_TTS,!0)}},ri.speakLabel=function(e,t){e&&t&&Wt.getGridElement(e,t).then((function(e){ri.speak(U.getTranslation(e.label))}))},ri.stopSpeaking=function(){ri.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},ri.isSpeaking=function(){return ri.nativeSpeechSupported()&&window.speechSynthesis.speaking||responsiveVoice.isPlaying()},ri.getVoicesLangs=function(){var e=si.map((function(e){return e.lang.substring(0,2)}));return U.getAllLanguages().filter((function(t){return-1!==e.indexOf(t.code)}))},ri.getVoices=function(){return si},ri.setPreferredVoiceName=function(e){oi=e,D.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},ri.getPreferredVoiceName=function(){return oi},ri.nativeSpeechSupported=function(){return!("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis||!window.speechSynthesis.getVoices)},ri.nativeSpeechSupported()&&(window.speechSynthesis.getVoices(),setTimeout((function(){window.speechSynthesis.getVoices().forEach((function(e){ui(e.name,e.lang,ri.VOICE_TYPE_NATIVE,e)})),di()}),100)),li.forEach((function(e){ui(e.name,e.lang,ri.VOICE_TYPE_RESPONSIVEVOICE)})),di();var fi={},pi=2,hi=1,vi={lastPlayType:we.playTypes.YT_PLAY_PLAYLIST,lastData:"https://www.youtube.com/watch?v=5ffLB4a9APc&list=PL0UXHkT03dGrIHldlEKR0ZWfNMkShuTNz",lastVideoId:null,lastTimes:{},lastPlaylistIndexes:{},dataApiCalls:{},muted:!1,volume:100},mi=!1,gi=null,_i=D.getYTState()||JSON.parse(JSON.stringify(vi)),yi=!1,bi=null,Ei=null,Ci=null;function wi(e,t){return void 0!==e?e:_i.lastTimes[t]}function Ti(e,t){var n=null;try{n=new URL(e)}catch(e){}return n?n.searchParams.get(t):null}function Ai(){if(gi){var e=fi.getCurrentVideoId(),t=gi.getPlaylistIndex();e&&(_i.lastTimes[e]=gi.getCurrentTime()),t>=0&&_i.lastPlayType!==we.playTypes.YT_PLAY_VIDEO&&(_i.lastPlaylistIndexes[_i.lastData]=t)}JSON.stringify(_i).length>1048576&&(_i.lastPlaylistIndexes={},_i.lastTimes={},_i.dataApiCalls={}),D.saveYTState(_i)}function Si(){Ci=Sn.setTooltip(U.translate("Error on playing YouTube video. Please check internet connection. // Fehler bei der Wiedergabe des YouTube Videos. Bitte Internet-Verbindung überprüfen."),{timeout:3e4,msgType:"warn"})}fi.doAction=function(e){if(e.performAfterNav)fi.setActionAfterNavigate(e);else switch(e.action){case we.actions.YT_PLAY:fi.play(e);break;case we.actions.YT_PAUSE:fi.pause();break;case we.actions.YT_TOGGLE:fi.toggle(e);break;case we.actions.YT_RESTART:fi.restart(e);break;case we.actions.YT_STOP:fi.stop();break;case we.actions.YT_STEP_FORWARD:fi.seekToRelative(e.stepSeconds);break;case we.actions.YT_STEP_BACKWARD:fi.seekToRelative(-e.stepSeconds);break;case we.actions.YT_NEXT_VIDEO:fi.nextVideo();break;case we.actions.YT_PREV_VIDEO:fi.previousVideo();break;case we.actions.YT_ENTER_FULLSCREEN:fi.enterFullscreen();break;case we.actions.YT_VOLUME_UP:fi.volumeUp(e.stepVolume);break;case we.actions.YT_VOLUME_DOWN:fi.volumeDown(e.stepVolume);break;case we.actions.YT_VOLUME_MUTE:fi.volumeToggleMute()}},fi.play=function(e,t){var n=Promise.resolve();Sn.clearTooltip(Ci),mi||(n=function(){if(mi)return Promise.resolve();a()(document).on(s.EVENT_GRID_RESIZE,(function(){gi&&setTimeout((function(){var e=a()(".yt-container")[0].getBoundingClientRect();gi.setSize(e.width,e.height)}),400)})),a()(document).on(s.EVENT_USER_CHANGED,(function(){_i=D.getYTState()||JSON.parse(JSON.stringify(vi))})),window.addEventListener("beforeunload",(function(e){Ai()}));var e=document.createElement("script"),t=document.createElement("script");document.body.appendChild(e),document.body.appendChild(t),e.onerror=function(e){log.warn("error on loading YouTube Iframe API script"),Si()},t.onerror=function(e){log.warn("error on loading YouTube data API script")};var n=new Promise((function(e){window.onYouTubeIframeAPIReady=function(){mi=!0,e()}})),i=new Promise((function(e){t.addEventListener("load",(function(){e()}))})).then((function(){return new Promise((function(e){gapi.load("client",e)}))})).then((function(){return gapi.client.setApiKey("AIzaSyCDOUROr3UWS8K-WJNlAG21yBTOsveWQn8"),gapi.client.load("https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest")})).catch((function(e){return log.error("Error loading GAPI client for API",e),Promise.resolve()}));return e.src="https://www.youtube.com/iframe_api",t.src="https://apis.google.com/js/api.js",Promise.all([i,n])}()),n.then((function(){function n(){switch(e.playType){case we.playTypes.YT_PLAY_VIDEO:var n=fi.getVideoId(e.data);if(!n)return;if(n===fi.getCurrentVideoId())return void gi.playVideo();_i.lastVideoId=n,gi.loadVideoById(n,wi(t,n));break;case we.playTypes.YT_PLAY_SEARCH:yi=!0,(o="gapi.client.youtube.search.list",s={maxResults:100,q:e.data,type:"video",videoEmbeddable:!0},new Promise((function(e){l=l||9e5;var t=o.split("."),n=window;if(t.forEach((function(e){n&&(n=n[e])})),n){_i.dataApiCalls=_i.dataApiCalls||{};var i=o+JSON.stringify(s),a=_i.dataApiCalls[i];if(a&&(new Date).getTime()-a.time0},this.canRedo=function(){return t.length>0},this.updateGrid=function(n){return new Promise((function(i){Wt.getGrid(n.id).then((function(a){a.isEqual(n)?(log.debug("grid not updated, do noting"),i(!1)):(e.push(JSON.parse(JSON.stringify(a))),t=[],Wt.saveGrid(n).then((function(){i(!0)})))}))}))},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return Wt.getGrid(n.id).then((function(e){t.push(JSON.parse(JSON.stringify(e))),Wt.saveGrid(n)})),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return Wt.getGrid(n.id).then((function(t){e.push(JSON.parse(JSON.stringify(t))),Wt.saveGrid(n)})),n}}}function Mi(e,t,n){var i=this,r=(e=e,t=t,!1),o=!1,l=null,c=null,u=null,d=null,f=null,p=null,h=null,v=null,m=null,g=new Ri,_=!1;function y(e){return _=!1,(m=new Promise((function(t){e?(b(n,e),E(p).then((function(){t()}))):Wt.getGrid(n.gridId).then((function(e){b(n,e),E(p).then((function(){t()}))}))}))).then((function(){_=!0})),m}function b(e,t){e&&(l=e.gridId||l,r=null!=e.enableResizing?e.enableResizing:r,o=e.dragAndDrop),h=(p=t).rowCount,v=p.minColumnCount}function E(l){var d=[];return n.dragAndDrop||(l.gridElements=l.gridElements.filter((function(e){return!e.hidden})),d.push(Wt.getGlobalGrid().then((function(e){if(e){var t=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,i=1,a=1;1===e.getHeight()&&(a=t*p.rowCount/(1-t),i=1/(p.rowCount*t)-1/p.rowCount,a>=1?(i=1,a=Math.round(a)):(a=1,i=Math.round(i)));var r=Oe.getOffset(e),o=e.getWidth()-r.x,s=p.getWidthWithBounds();e.gridElements.forEach((function(e){e.width*=s,e.x*=s,0===e.y&&(e.height*=a)})),p.gridElements.forEach((function(e){e.width*=o,e.x*=o,e.x+=r.x*s,e.y+=r.y*a+e.y*(i-1),e.height*=i})),p.rowCount*=i,p.rowCount+=r.y*a,h=p.rowCount,p.gridElements=e.gridElements.concat(p.gridElements)}return Promise.resolve()})))),Promise.all(d).then((function(){return Ni.initWithElements(p.gridElements,o),At.initWithElements(p.gridElements),a()(e).empty(),a()(e).append(te.getGridBase(l.id)),u=a()("#"+l.id),l.gridElements.forEach((function(e){u.append(e.toHTML())})),u.gridList({lanes:h,minColumns:v,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:o},{start:w,stop:A}),c=u.data("_gridList"),l.hasSetPositions()||(u.gridList("resize",h),i.toGridData().then((function(e){p=e,Wt.updateGrid(p.id,p)}))),function(){var e=[];r&&e.push(a()(t).resizable(C()));return a()(document).on(s.EVENT_GRID_RESIZE,(function(){i.autosize()})),Promise.all(e)}().then((function(){i.autosize(200)})),Promise.resolve()}))}function C(){var e=c._cellHeight,t=c._cellWidth;return{autoHide:!1,handles:"se",disabled:!r,start:w,stop:function(e,t){var n=t.element.parent(),i=t.element.attr("id");new Promise((function(e){var t=n.attr("data-img-id");t?Wt.getImage(t).then((function(t){if(t){var r=a()("#"+i)[0].getBoundingClientRect().width;ie.convertBase64(t.data,r).then((function(t){n.attr("data-img",t),n.children().children()[0].style.backgroundImage='url("'+t+'")',e()}))}else e()})):e()})).then((function(){A()}))},resize:function(n,i){var a=i.element.parent();a.css("z-index",1);var r=Math.max(Math.round(i.element.width()/t),1),o=Math.max(Math.round(i.element.height()/e),1);o=o<=h?o:h,q.adaptFontSize(a),u.gridList("resizeItem",i.element.parent(),{w:r,h:o}),i.element.css("height",""),i.element.css("width","")}}}function w(){a.a.isFunction(d)&&d(p)}function T(){a.a.isFunction(f)&&setTimeout((function(){f(p)}),200)}function A(){return new Promise((function(e){i.toGridData().then((function(t){g.updateGrid(t).then((function(n){n&&(p=t,i.autosize(),T()),e()}))}))}))}i.autosize=function(e){e=e||0,q.adaptFontSizeForGridElements(),setTimeout((function(){u.gridList("autosize"),setTimeout((function(){if(a()("#grid-layout-background-vertical")[0]){var e=c._cellWidth,t=c._cellHeight;a()("#grid-layout-background-vertical").css("margin-left","".concat(e-5,"px")),a()("#grid-layout-background-vertical").css("background-size","".concat(e,"px ").concat(e,"px")),a()("#grid-layout-background-horizontal").css("margin-top","".concat(t-5,"px")),a()("#grid-layout-background-horizontal").css("background-size","".concat(t,"px ").concat(t,"px")),a()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){q.adaptFontSizeForGridElements()}),200),r&&a()(t).resizable(C())}),e)},i.enableElementResizing=function(){a()(t).resizable("enable")},i.disableElementResizing=function(){a()(t).resizable("disable")},i.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(h=e,v=t,u.gridList("resize",h,t)),A()},i.removeElement=function(e){return w(),p.gridElements=p.gridElements.filter((function(t){return t.id!==e})),y(p).then((function(){return A()})).then((function(){return Promise.resolve(p)}))},i.duplicateElement=function(e){w();var t=p.gridElements.filter((function(t){return t.id===e}))[0].duplicate();p.gridElements.push(t),y(p).then((function(){c.resolveCollisions(t.id),A()}))},i.reinit=function(e){return w(),y(e).then((function(){T()})),m},i.fillGaps=function(){w(),u.gridList("fillGaps"),A()},i.undo=function(){if(g.canUndo()){var e=g.doUndo();y(p=new He(e)).then((function(){T()}))}},i.redo=function(){if(g.canRedo()){var e=g.doRedo();y(p=new He(e)).then((function(){T()}))}},i.updateGridWithUndo=function(e){return new Promise((function(t){g.updateGrid(e).then((function(e){e?(w(),y().then((function(){t(!0),T()}))):t(!1)}))}))},i.canUndo=function(){return g.canUndo()},i.canRedo=function(){return g.canRedo()},i.setLayoutChangedStartListener=function(e){d=e},i.setLayoutChangedEndListener=function(e){f=e},i.getCurrentGridId=function(){return p.id},i.toGridData=function(){return new Promise((function(e){var t=[];p.rowCount=h,p.minColumnCount=v,c.items.forEach((function(e){var n=e.$element.attr("data-id"),i=p.gridElements.filter((function(e){return e.id===n}))[0];i.x=e.x,i.y=e.y,i.height=e.h,i.width=e.w,t.push(i)})),p.gridElements=t,e(p)}))},i.getInitPromise=function(){return m},i.isInitialized=function(){return _},i.destroy=function(){a()(document).off(s.EVENT_GRID_RESIZE),i.setLayoutChangedEndListener(null),i.setLayoutChangedStartListener(null)},y()}Ni.initWithElements=function(e,t){Ii=[];var n=0,i=0;if(Li=null,e.forEach((function(e){if(e&&e.type===Ae.ELEMENT_TYPE_NORMAL){i++;var t=U.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===Ae.ELEMENT_TYPE_COLLECT){var a=JSON.parse(JSON.stringify(e));Li=Li||a.actions.reduce((function(e,t){var n=ve.getModelName()?t.dictionaryKey:null;return e||n}),null),Ii.push(a)}})),Oi=n/i,Ii.length>0)var a=setInterval((function(){$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(a),xi(),t||At.predict(ki,Li))}),100)},Ni.doAction=function(e){Di(e,"GridActionPredict")&&At.predict(ki,Li);var t=e.actions.filter((function(e){return e.modelName===ce.getModelName()}))[0],n=t&&t.speakLanguage?t.speakLanguage:U.getBrowserLang();ri.speak(ki,n)},Ni.doCollectElementActions=function(e){if(e){switch(e){case ge.COLLECT_ACTION_CLEAR:xi("");break;case ge.COLLECT_ACTION_REMOVE_WORD:var t=ki.trim().split(" ");t.pop();var n=t.join(" ");xi(""===n?"":n+" ");break;case ge.COLLECT_ACTION_REMOVE_CHAR:xi(ki.substring(0,ki.length-1));break;case ge.COLLECT_ACTION_COPY_CLIPBOARD:Dt.copyToClipboard(ki);break;case ge.COLLECT_ACTION_APPEND_CLIPBOARD:Dt.appendToClipboard(ki);break;case ge.COLLECT_ACTION_CLEAR_CLIPBOARD:Dt.copyToClipboard("");break;case ge.COLLECT_ACTION_TO_YOUTUBE:fi.setActionAfterNavigate(new we({action:we.actions.YT_PLAY,playType:we.playTypes.YT_PLAY_SEARCH,data:ki}))}At.predict(ki,Li)}},$(window).on(s.ELEMENT_EVENT_ID,(function(e,t){if(0!==Ii.length&&!Di(t,ge.getModelName())&&!Di(t,ee.getModelName())){if(!t.type||t.type===Ae.ELEMENT_TYPE_NORMAL){if(!U.getTranslation(t.label))return;var n=U.getTranslation(t.label),i=1===n.length&&Oi>.5?n.toLowerCase():n+" ";xi(ki+i),Ii.forEach((function(e){var t=Di(e,"GridActionPredict");t&&t.suggestOnChange&&At.predict(ki,Li)}))}if(t.type&&t.type===Ae.ELEMENT_TYPE_PREDICTION){var a=$("#".concat(t.id," .text-container span")).text();if(a)xi(At.applyPrediction(ki||"",a,Li)),Ii.forEach((function(e){var t=Di(e,"GridActionPredict");t&&t.suggestOnChange&&At.predict(ki,Li)}))}}}));var Pi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper",on:{dragenter:e.preventDefault,dragover:e.preventDefault,drop:e.imageDropped}},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.nextFromKeyboard():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[e.editElementId?n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n Edit grid item // Grid-Element bearbeiten\n ")]):e._e(),e._v(" "),e.editElementId?e._e():n("h1",{staticClass:"inline",attrs:{name:"header","data-i18n":""}},[e._v("\n New grid item // Neues Grid-Element\n ")])]),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputLabel"}},[e._v("Label")]),e._v(" "),e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.label[e.currentLang],expression:"gridElement.label[currentLang]"}],staticClass:"five columns",attrs:{type:"text",id:"inputLabel"},domProps:{value:e.gridElement.label[e.currentLang]},on:{input:function(t){t.target.composing||e.$set(e.gridElement.label,e.currentLang,t.target.value)}}}):e._e(),e._v(" "),n("button",{staticClass:"two columns",attrs:{label:e.i18nService.translate("Search for images // Suche nach Bildern")},on:{click:function(t){return e.search(e.gridElement.label[e.currentLang])}}},[n("i",{staticClass:"fas fa-search"})]),e._v(" "),n("div",{staticClass:"three columns"},[e.gridElement?n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.gridElement.hidden,expression:"gridElement.hidden"}],attrs:{type:"checkbox",id:"inputHidden"},domProps:{checked:Array.isArray(e.gridElement.hidden)?e._i(e.gridElement.hidden,null)>-1:e.gridElement.hidden},on:{change:function(t){var n=e.gridElement.hidden,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.gridElement,"hidden",n.concat([null])):r>-1&&e.$set(e.gridElement,"hidden",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.gridElement,"hidden",a)}}}):e._e(),e._v(" "),n("label",{attrs:{for:"inputHidden","data-i18n":""}},[e._v("Hide element // Element ausblenden")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputImg","data-i18n":""}},[e._v("Image // Bild")]),e._v(" "),n("button",{staticClass:"five columns file-input",attrs:{onclick:"document.getElementById('inputImg').click();"}},[n("input",{staticClass:"five columns",attrs:{type:"file",id:"inputImg",accept:"image/*"},on:{change:e.changedImg}}),e._v(" "),e._m(0)]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"five columns",on:{click:e.clearImage}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear image // Bild löschen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"img-preview offset-by-two four columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"show-mobile"},[n("i",{staticClass:"fas fa-image"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("no image chosen // kein Bild ausgewählt")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.tempImage.data,expression:"!tempImage.data"}],staticClass:"hide-mobile"},[n("i",{staticClass:"fas fa-arrow-down"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("drop image here // Bild hierher ziehen")])]),e._v(" "),e.tempImage.data?n("img",{attrs:{id:"imgPreview",src:e.tempImage.data}}):e._e(),e._v(" "),e.tempImage.data&&e.tempImage.author?n("div",[e._v("\n by "),n("a",{attrs:{href:e.tempImage.authorURL,target:"_blank"}},[e._v(e._s(e.tempImage.author))])]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.tempImage.data,expression:"tempImage.data"}],staticClass:"img-preview five columns hide-mobile",staticStyle:{"margin-top":"50px"}},[e._m(1)])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"two columns",attrs:{for:"inputSearch","data-i18n":""}},[e._v("Image search // Bildsuche")]),e._v(" "),n("div",{staticClass:"five columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchText,expression:"searchText"}],attrs:{id:"inputSearch",type:"text",placeholder:e._f("translate")("SEARCH_IMAGE_PLACEHOLDER")},domProps:{value:e.searchText},on:{input:[function(t){t.target.composing||(e.searchText=t.target.value)},function(t){return e.searchInput(500,t)}]}}),e._v(" "),n("button",{attrs:{"aria-label":"Clear"},on:{click:e.clearSearch}},[n("i",{staticClass:"fas fa-times"})])]),e._v(" "),e._m(2)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"offset-by-two ten columns"},[e._l(e.searchResults,(function(t){return n("div",{staticClass:"inline"},[t.base64?n("img",{staticClass:"inline",attrs:{src:t.base64,title:"by "+t.author,width:"60",height:"60",role:"button"},on:{click:function(n){return e.setImage(t)}}}):e._e(),e._v(" "),t.base64||t.failed?e._e():n("span",{staticStyle:{position:"relative"}},[n("img",{staticClass:"inline",attrs:{src:"data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E",title:t.image_url,width:"60",height:"60"}}),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin",staticStyle:{position:"absolute",top:"-25px",left:"25px"}})])])})),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchResults&&e.searchResults.length>0&&e.hasNextChunk,expression:"searchResults && searchResults.length > 0 && hasNextChunk"}],staticClass:"inline"},[n("button",{staticStyle:{height:"60px",margin:"0 0 0 0.5em",padding:"0.7em",float:"left"},on:{click:e.searchMore}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("more // mehr")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.searchLoading,expression:"searchLoading"}]},[n("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("searching... // suche...")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[e._m(3),e._v(" "),e._m(4)]),n("br"),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.searchLoading&&e.searchResults&&0===e.searchResults.length,expression:"!searchLoading && searchResults && searchResults.length === 0"}],attrs:{"data-i18n":""}},[n("span"),e._v(" "),e._m(5)])],2)])]),e._v(" "),n("div",{staticClass:"modal-footer"},[e.gridElement?n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[e.editElementId?n("div",[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]):e._e(),e._v(" "),e.editElementId?e._e():n("div",[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.addNext()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, add another // OK, weiteres Element")])])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit actions // OK, Aktionen bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-bolt"})])])]):e._e()])])])])])};Pi._withStripped=!0;var Gi={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},Ui=10,Fi=1,$i=null,Vi=null,ji=!1;function Bi(e,t,n){n=n||Ui,t=t||1;var i=[];return new Promise((function(r){if(!e)return r([]);function o(a){a&&a.length&&0!==a.length||(a=[]);var o=t*n-n,s=o+n-1;ji=a.length>s+1;for(var l=o;l<=s;l++)a[l]&&function(){var e=JSON.parse(JSON.stringify(a[l])),t=ie.urlToBase64(e[Gi.PROP_IMAGE_URL]);e.promise=t,t.then((function(t){t?e.base64=t:e.failed=!0})),i.push(e)}();$i=e,r(i)}$i!==e?a.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){Vi=e,o(e)})):o(Vi)}))}Gi.query=function(e,t,n){return Fi=t=t||1,Ui=n||Ui,Bi(e,t,n)},Gi.nextChunk=function(){return Fi++,Bi($i,Fi,Ui)},Gi.hasNextChunk=function(){return ji};var Yi={props:["editElementIdParam","gridDataId","gridInstance"],data:function(){return{gridData:null,gridElement:null,metadata:null,originalGridElementJSON:null,elementW:null,editElementId:null,searchText:null,searchResults:null,searchLoading:!1,hasNextChunk:!0,tempImage:{},i18nService:U,currentLang:U.getBrowserLang()}},methods:{changedImg:function(){var e=this;e.clearImage(),ie.getBase64FromInput($("#inputImg")[0]).then((function(t){e.tempImage.data=t}))},imageDropped:function(e){var t=this;if(e.preventDefault(),this.clearImage(),e.dataTransfer.files&&e.dataTransfer.files.length>0)$("#inputImg")[0].files=e.dataTransfer.files,this.changedImg();else{var n=e.dataTransfer.getData("URL");ie.urlToBase64(n).then((function(e){t.tempImage.data=e}))}},setImage:function(e){this.tempImage.data=e.base64,this.tempImage.author=e.author,this.tempImage.authorURL=e.author_url},clearImage:function(){this.tempImage.data=this.tempImage.author=this.tempImage.authorURL=null},save:function(e){var t=this;this.saveInternal().then((function(n){t.$emit("close"),n&&!t.editElementId&&t.$emit("mark",t.gridElement.id),e&&t.$emit("actions",t.gridElement.id)}))},addNext:function(){var e=this;e.saveInternal().then((function(){e.initInternal(),$("#inputLabel").focus()}))},editNext:function(e){var t=this;t.editElementId&&t.saveInternal().then((function(){t.editElementId=new He(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#inputLabel").focus()}))},nextFromKeyboard:function(){this.editElementId?this.editNext():this.addNext()},saveInternal:function(){var e=this;return new Promise((function(t){function n(){if(e.gridElement&&e.originalGridElementJSON!==JSON.stringify(e.gridElement)){var n=Oe.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then((function(e){t(e)}))}else t(!1)}e.gridElement.image||(e.gridElement.image=new se),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,ie.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then((function(e){var t=new se({data:e});return Wt.saveImage(t)})).then((function(t){return e.gridElement.image.id=t,ie.convertBase64(e.tempImage.data,e.elementW)})).then((function(t){e.gridElement.image.data=t,n()}))):(e.tempImage.data||(e.gridElement.image=null),n())}))},initInternal:function(){var e=this,t=this;t.resetInternal(),t.tempImage=JSON.parse(JSON.stringify(new se)),Wt.getGrid(t.gridDataId).then((function(n){if(t.gridData=JSON.parse(JSON.stringify(n)),t.editElementId){var i=t.gridData.gridElements.filter((function(e){return e.id===t.editElementId}))[0];t.gridElement=JSON.parse(JSON.stringify(i)),i.image&&i.image.data&&(t.tempImage=JSON.parse(JSON.stringify(new se(i.image)))),t.elementW=$("#"+e.gridElement.id)[0].getBoundingClientRect().width,t.originalGridElementJSON=JSON.stringify(i)}else{var a=n.getNewXYPos();log.debug("creating element: x "+a.x+" / y "+a.y),t.gridElement=JSON.parse(JSON.stringify(new Ae({x:a.x,y:a.y})));var r=Math.round($("#grid-container")[0].getBoundingClientRect().height/n.rowCount);t.elementW=2*r,t.originalGridElementJSON=JSON.stringify(t.gridElement)}})),Wt.getMetadata().then((function(e){t.metadata=e}))},resetInternal:function(){this.gridElement=this.metadata=this.originalGridElementJSON=this.elementW=null},preventDefault:function(e){e.preventDefault()},openHelp:function(){Kt.openHelp()},search:function(e){this.searchText=e,this.searchInput(0)},searchInput:function(e,t){var n=this;n.searchText=t?t.target.value:n.searchText,e=void 0===e?500:e,n.searchResults=[],n.searchLoading=!0,Dt.debounce((function(){Gi.query(n.searchText).then((function(e){n.processSearchResults(e)}))}),e)},searchMore:function(){var e=this;Gi.nextChunk().then((function(t){e.processSearchResults(t)}))},clearSearch:function(){this.searchLoading=!1,this.searchResults=null,this.searchText=""},processSearchResults:function(e){var t=this;t.hasNextChunk=Gi.hasNextChunk(),t.searchResults=t.searchResults.concat(e),t.searchLoading=!1,t.$forceUpdate(),e.forEach((function(e){e.promise.then((function(){t.$forceUpdate()}))}))}},mounted:function(){this.editElementId=this.editElementIdParam,this.initInternal(),Kt.setHelpLocation("03_appearance_layout","#edit-modal")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation()}},Hi=(n(85),_n(Yi,Pi,[function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-file-upload"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Choose file // Datei auswählen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("i",{staticClass:"fas fa-arrow-down"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("drop new image here // neues Bild hierher ziehen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.opensymbols.org/",target:"_blank"}},[this._v("opensymbols.org")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("No search results.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("b",[this._v("Keine Resultate.")]),this._v(" Versuchen Sie es ev. nochmal mit einem "),t("b",[this._v("englischen Suchbegriff")]),this._v(".")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("Für eine Symbolsuche auf Deutsch können Sie "),t("a",{attrs:{target:"_blank",href:"https://www.pictoselector.eu/de/home/download/"}},[this._v("Picto-Selector")]),this._v(" verwenden. Symbole aus diesem Programm können mit Drag & Drop direkt in AsTeRICS Grid eingefügt werden.")])}],!1,null,"2dc40afd",null));Hi.options.__file="src/vue-components/modals/editGridModal.vue";var Wi=Hi.exports,zi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Element1;Element2;Element3;..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Elements // Erkannte Elemente")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.parsedElems.length))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Element(s) // Element(e)")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.parsedElems.length,expression:"parsedElems.length == 0"}],staticClass:"nine columns"},[n("span",{attrs:{"data-i18n":""}},[e._v("No elements // Keine Elemente")])])])]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]",disabled:0==e.parsedElems.length},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Insert elements // Elemente einfügen")])])])])])])])])};zi._withStripped=!0;var Ki={props:["gridData","gridInstance"],data:function(){return{inputText:"",parsedElems:[]}},methods:{textChanged:function(){var e=(e=this.inputText||"").replace(/\n/gi,";").replace(/;;/gi,";");this.parsedElems=e.split(";").map((function(e){return e.trim()})).filter((function(e){return e.length>0}))},save:function(){if(0!==this.parsedElems.length){var e=new He(this.gridData);this.parsedElems.forEach((function(t){var n=new Ae({label:U.getTranslationObject(t),x:e.getNewXYPos().x,y:e.getNewXYPos().y});e.gridElements.push(n)})),this.gridInstance.updateGridWithUndo(e),this.$emit("close")}}},mounted:function(){U.initDomI18n(),Kt.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy:function(){Kt.revertToLastLocation()}},Ji=(n(87),_n(Ki,zi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Add multiple grid items // Mehrere Grid-Elemente hinzufügen\n ")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("label",{staticClass:"three columns",attrs:{for:"inputText","data-i18n":""}},[this._v("Input // Eingabe")]),this._v(" "),t("span",{staticClass:"nine columns",attrs:{"data-i18n":""}},[this._v('Insert Labels for new elements, separated by ";" or [Enter] // Geben Sie Label für neue Elemente getrennt durch ";" oder [Enter] ein')])])}],!1,null,"761467a8",null));Ji.options.__file="src/vue-components/modals/addMultipleModal.vue";var Xi=Ji.exports,qi=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[e.gridElement?n("div",{staticClass:"modal-container",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.$emit("close")},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.ctrlKey?"button"in t&&2!==t.button?null:e.editNext():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])?null:t.ctrlKey?"button"in t&&0!==t.button?null:e.editNext(!0):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"y",void 0,t.key,void 0)?null:t.ctrlKey?e.save(!0):null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),n("div",{staticClass:"modal-header"},[n("h1",{attrs:{name:"header"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Edit actions // Aktionen bearbeiten")]),e._v(" "),n("span",[n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type === GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type!==e.GridElement.ELEMENT_TYPE_NORMAL,expression:"gridElement.type !== GridElement.ELEMENT_TYPE_NORMAL"}]},[e._v('("'+e._s(e._f("translate")(e.gridElement.type))+'")')])]),e._v(" "),e.gridElement.image?n("img",{staticClass:"spaced",staticStyle:{"max-height":"1.5em","margin-bottom":"-0.3em"},attrs:{id:"imgPreview",src:e.gridElement.image.data}}):e._e()])]),e._v(" "),e.gridElement?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("New Action // Neue Aktion")]),e._v(" "),n("select",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.selectedNewAction,expression:"selectedNewAction"}],staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"},attrs:{id:"selectActionType"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedNewAction=t.target.multiple?n:n[0]}}},e._l(e.actionTypes,(function(t){return n("option",{domProps:{value:t.getModelName()}},[e._v(e._s(e._f("translate")(t.getModelName())))])})),0),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.addAction()}}},[n("i",{staticClass:"fas fa-plus"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Add action // Aktion hinzufügen")])])]),e._v(" "),e._m(0),e._v(" "),n("ul",{attrs:{id:"actionList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.gridElement.actions.length,expression:"gridElement.actions.length == 0"}],staticClass:"row",attrs:{"data-i18n":""}},[e._m(1),e._v(" "),e._m(2)]),e._v(" "),e._l(e.gridElement.actions,(function(t){return n("li",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.editActionId!=t.id,expression:"editActionId != action.id"}]},[n("div",{staticClass:"four columns"},[e._v("\n "+e._s(e._f("translate")(t.modelName))+"\n ")]),e._v(" "),n("div",{staticClass:"eight columns actionbtns"},[n("button",{on:{click:function(n){return e.editAction(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteAction(t)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])]),e._v(" "),"GridActionNavigate"!=t.modelName?n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])]):e._e()])]),e._v(" "),e.editActionId==t.id?n("div",[n("div",{},[n("b",[e._v(e._s(e._f("translate")(t.modelName)))]),e._v(" "),n("a",{staticClass:"black",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})])]),e._v(" "),n("div",["GridActionSpeak"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(3,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticStyle:{width:"55%"},attrs:{id:"selectLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2),e._v(" "),n("button",{staticClass:"inline spaced",on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionSpeakCustom"==t.modelName?n("div",[n("div",{staticClass:"row"},[e._m(4,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.speakLanguage,expression:"action.speakLanguage"}],staticClass:"eight columns",attrs:{id:"selectLang2"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"speakLanguage",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("automatic (current language) // automatisch (aktuelle Sprache)")]),e._v(" "),e._l(e.voiceLangs,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(5,!0),e._v(" "),n("div",{staticClass:"nine columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.speakText[e.currentLang],expression:"action.speakText[currentLang]"}],staticStyle:{width:"70%"},attrs:{id:"inCustomText",type:"text"},domProps:{value:t.speakText[e.currentLang]},on:{input:function(n){n.target.composing||e.$set(t.speakText,e.currentLang,n.target.value)}}}),e._v(" "),n("button",{on:{click:function(n){return e.testAction(t)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Test // Testen")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionNavigate"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.toLastGrid,expression:"action.toLastGrid"}],attrs:{id:"navigateBackChkbox",type:"checkbox"},domProps:{checked:Array.isArray(t.toLastGrid)?e._i(t.toLastGrid,null)>-1:t.toLastGrid},on:{change:function(n){var i=t.toLastGrid,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"toLastGrid",i.concat([null])):o>-1&&e.$set(t,"toLastGrid",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"toLastGrid",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"navigateBackChkbox","data-i18n":""}},[e._v("Navigate to last opened grid // Zum zuletzt geöffneten Grid navigieren")])]),e._v(" "),n("div",{staticClass:"row"},[e._m(6,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.toGridId,expression:"action.toGridId"}],staticClass:"eight columns",attrs:{id:"selectGrid",type:"text",disabled:t.toLastGrid},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"toGridId",n.target.multiple?i:i[0])}}},e._l(e.gridLabels,(function(t,i){return n("option",{domProps:{value:i}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionARE"==t.modelName?n("div",[n("edit-are-action",{attrs:{action:t,"grid-data":e.gridData,"model-file":e.additionalGridFiles[t.id],"set-grid-file-fn":e.setAdditionalGridFile,"end-edit-fn":e.endEditAction}})],1):e._e(),e._v(" "),"GridActionPredict"==t.modelName?n("div",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.gridElement.type===e.GridElementClass.ELEMENT_TYPE_COLLECT,expression:"gridElement.type === GridElementClass.ELEMENT_TYPE_COLLECT"}],staticClass:"row"},[n("div",{staticClass:"eight columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.suggestOnChange,expression:"action.suggestOnChange"}],attrs:{id:"chkSuggestOnChange",type:"checkbox"},domProps:{checked:Array.isArray(t.suggestOnChange)?e._i(t.suggestOnChange,null)>-1:t.suggestOnChange},on:{change:function(n){var i=t.suggestOnChange,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"suggestOnChange",i.concat([null])):o>-1&&e.$set(t,"suggestOnChange",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"suggestOnChange",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"chkSuggestOnChange","data-i18n":""}},[e._v("Refresh suggestions on change // Vorschläge bei Änderung aktualisieren")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(7,!0),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"action.dictionaryKey"}],staticClass:"eight columns",attrs:{id:"comboUseDict"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"dictionaryKey",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("all dictionaries // alle Wörterbücher")]),e._v(" "),e._l(e.dictionaryKeys,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionCollectElement"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectCollectElmAction","data-i18n":""}},[e._v("Perform action on collect element // Aktion für Sammelelement ausführen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectCollectElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.collectActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionWebradio"==t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadioElmAction","data-i18n":""}},[e._v("Web radio action // Web-Radio Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"selectRadioElmAction"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.webradioActions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:"WEBRADIO_ACTION_START"===t.action||"WEBRADIO_ACTION_TOGGLE"===t.action,expression:"action.action === 'WEBRADIO_ACTION_START' || action.action === 'WEBRADIO_ACTION_TOGGLE'"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"selectRadio","data-i18n":""}},[e._v("Webadio to play // Abzuspielendes Webradio")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.radioId,expression:"action.radioId"}],staticClass:"six columns",attrs:{id:"selectRadio"},on:{change:[function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"radioId",n.target.multiple?i:i[0])},function(n){return e.selectedRadioChanged(t.radioId)}]}},[n("option",{attrs:{value:"",selected:"","data-i18n":""}},[e._v("automatic (last played) // automatisch (zuletzt gespielt)")]),e._v(" "),e._l(e.gridData.webRadios,(function(t){return n("option",{domProps:{value:t.radioId}},[e._v("\n "+e._s(t.radioName)+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"twelve columns",attrs:{"acc-label":"Manage webradio list // Webradioliste verwalten","acc-open":0===e.gridData.webRadios.length?"true":"false"}},[n("radio-list-selector",{model:{value:e.gridData,callback:function(t){e.gridData=t},expression:"gridData"}})],1)],1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionYoutube"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytActions","data-i18n":""}},[e._v("YouTube video action // YouTube-Video Aktion")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.action,expression:"action.action"}],staticClass:"six columns",attrs:{id:"ytActions"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"action",n.target.multiple?i:i[0])}}},e._l(e.GridActionYoutube.actions,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(e._f("translate")(t))+"\n ")])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytPlayType","data-i18n":""}},[e._v("Play type // Wiedergabe Typ")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.playType,expression:"action.playType"}],staticClass:"six columns",attrs:{id:"ytPlayType"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"playType",n.target.multiple?i:i[0])}}},e._l(Object.keys(e.GridActionYoutube.playTypes).filter((function(t){return t!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED})),(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("translate")(t)))])})),0)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType&&-1!==[e.GridActionYoutube.actions.YT_PLAY,e.GridActionYoutube.actions.YT_TOGGLE,e.GridActionYoutube.actions.YT_RESTART].indexOf(t.action),expression:"action.playType && [GridActionYoutube.actions.YT_PLAY, GridActionYoutube.actions.YT_TOGGLE, GridActionYoutube.actions.YT_RESTART].indexOf(action.action) !== -1"}]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.playType!==e.GridActionYoutube.playTypes.YT_PLAY_RELATED,expression:"action.playType !== GridActionYoutube.playTypes.YT_PLAY_RELATED"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"ytList"}},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_VIDEO,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_VIDEO"}],attrs:{"data-i18n":""}},[e._v("Video link // Video Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_SEARCH,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_SEARCH"}],attrs:{"data-i18n":""}},[e._v("YouTube search query // YouTube Suchanfrage")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_PLAYLIST,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_PLAYLIST"}],attrs:{"data-i18n":""}},[e._v("YouTube playlist link // YouTube Playlist Link")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.playType===e.GridActionYoutube.playTypes.YT_PLAY_CHANNEL,expression:"action.playType === GridActionYoutube.playTypes.YT_PLAY_CHANNEL"}],attrs:{"data-i18n":""}},[e._v("YouTube channel link // YouTube Channel-Link")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.data,expression:"action.data"}],staticClass:"six columns",attrs:{id:"ytList",type:"text"},domProps:{value:t.data},on:{input:function(n){n.target.composing||e.$set(t,"data",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.showCC,expression:"action.showCC"}],attrs:{id:"showCC",type:"checkbox"},domProps:{checked:Array.isArray(t.showCC)?e._i(t.showCC,null)>-1:t.showCC},on:{change:function(n){var i=t.showCC,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"showCC",i.concat([null])):o>-1&&e.$set(t,"showCC",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"showCC",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"showCC","data-i18n":""}},[e._v("Show video subtitles (if available) // Zeige Video-Untertitel (wenn verfügbar)")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.playMuted,expression:"action.playMuted"}],attrs:{id:"playMuted",type:"checkbox"},domProps:{checked:Array.isArray(t.playMuted)?e._i(t.playMuted,null)>-1:t.playMuted},on:{change:function(n){var i=t.playMuted,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"playMuted",i.concat([null])):o>-1&&e.$set(t,"playMuted",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"playMuted",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"playMuted","data-i18n":""}},[e._v("Start video muted // Video stummgeschaltet starten")])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.performAfterNav,expression:"action.performAfterNav"}],attrs:{id:"afterNav",type:"checkbox"},domProps:{checked:Array.isArray(t.performAfterNav)?e._i(t.performAfterNav,null)>-1:t.performAfterNav},on:{change:function(n){var i=t.performAfterNav,a=n.target,r=!!a.checked;if(Array.isArray(i)){var o=e._i(i,null);a.checked?o<0&&e.$set(t,"performAfterNav",i.concat([null])):o>-1&&e.$set(t,"performAfterNav",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(t,"performAfterNav",r)}}}),e._v(" "),n("label",{staticClass:"normal-text",attrs:{for:"afterNav","data-i18n":""}},[e._v("Perform action after navigation // Aktion erst nach Navigation ausführen")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_STEP_FORWARD,e.GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_STEP_FORWARD, GridActionYoutube.actions.YT_STEP_BACKWARD].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepSeconds","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(seconds) // (Sekunden)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepSeconds,expression:"action.stepSeconds"}],staticClass:"six columns",attrs:{id:"stepSeconds",type:"number",min:"0"},domProps:{value:t.stepSeconds},on:{input:function(n){n.target.composing||e.$set(t,"stepSeconds",n.target.value)}}})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:-1!==[e.GridActionYoutube.actions.YT_VOLUME_UP,e.GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(t.action),expression:"[GridActionYoutube.actions.YT_VOLUME_UP, GridActionYoutube.actions.YT_VOLUME_DOWN].indexOf(action.action) !== -1"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"stepVolume","data-i18n":""}},[e._v(e._s(e._f("translate")(t.action))+" "),n("span",{attrs:{"data-i18n":""}},[e._v("(precent) // (Prozent)")])]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.stepVolume,expression:"action.stepVolume"}],staticClass:"six columns",attrs:{id:"stepVolume",type:"number",min:"0",max:"100"},domProps:{value:t.stepVolume},on:{input:function(n){n.target.composing||e.$set(t,"stepVolume",n.target.value)}}})])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e(),e._v(" "),"GridActionChangeLang"===t.modelName?n("div",[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("label",{staticClass:"five columns normal-text",attrs:{for:"changeLang","data-i18n":""}},[e._v("Change application language to // Sprache der Anwendung ändern zu")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.language,expression:"action.language"}],staticClass:"six columns",attrs:{id:"changeLang"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(t,"language",n.target.multiple?i:i[0])}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:void 0}},[e._v("System language // Systemsprache")]),e._v(" "),e._l(e.selectFromAllLanguages?e.allLanguages:e.gridLanguages,(function(t){return n("option",{domProps:{value:t.code}},[e._v("\n "+e._s(e._f("extractTranslation")(t))+"\n ")])}))],2)])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.selectFromAllLanguages,expression:"selectFromAllLanguages"}],attrs:{id:"selectFromAllLangs",type:"checkbox"},domProps:{checked:Array.isArray(e.selectFromAllLanguages)?e._i(e.selectFromAllLanguages,null)>-1:e.selectFromAllLanguages},on:{change:function(t){var n=e.selectFromAllLanguages,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.selectFromAllLanguages=n.concat([null])):r>-1&&(e.selectFromAllLanguages=n.slice(0,r).concat(n.slice(r+1)))}else e.selectFromAllLanguages=a}}}),e._v(" "),n("label",{attrs:{for:"selectFromAllLangs","data-i18n":""}},[e._v("Show all Languages for selection // Zeige alle Sprachen zur Auswahl")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])]):e._e()])]):e._e()])}))],2)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container"},[n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-four",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Left]"},on:{click:function(t){return e.editNext(!0)}}},[n("i",{staticClass:"fas fa-angle-double-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit previous // OK, voriges bearbeiten")])]),e._v(" "),n("button",{staticClass:"four columns",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Right]"},on:{click:function(t){return e.editNext()}}},[n("span",{attrs:{"data-i18n":""}},[e._v("OK, edit next // OK, nächstes bearbeiten")]),e._v(" "),n("i",{staticClass:"fas fa-angle-double-right"})])]),e._v(" "),n("div",{staticClass:"hide-mobile row"},[n("button",{staticClass:"four columns offset-by-eight",attrs:{disabled:!1,title:"Keyboard: [Ctrl + Y]"},on:{click:function(t){return e.save(!0)}}},[n("span",{attrs:{"data-i18n":""}},[e._v('OK, to "edit element" // OK, zu "Element bearbeiten"')]),e._v(" "),n("i",{staticClass:"fas fa-pencil-alt"})])])])])]):e._e()])])])};qi._withStripped=!0;var Zi="https://de1.api.radio-browser.info/json/",Qi=["name","country","state","language","tag","tagList","order"],ea={},ta=document.getElementById("audioPlayer"),na=document.getElementById("videoPlayer"),ia=D.get("WEBRADIO_LAST_PLAYED_ID_KEY"),aa=parseFloat(D.get("WEBRADIO_LAST_VOLUME_KEY")||1),ra=!1,oa=!1;function sa(){Sn.setTooltip(U.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*aa)),{revertOnClose:!0,timeout:5e3})}function la(e,t){return new Promise((function(n,i){if(e.radioUrl)return n(e);a.a.ajax({type:"GET",url:Zi+"url/"+e.radioId,dataType:"json"}),a.a.ajax({type:"GET",url:Zi+"stations/byuuid/"+e.radioId,dataType:"json"}).then((function(i){var a=i[0];e.radioUrl=a.url_resolved||a.url,e.radioUrl.lastIndexOf("/")===e.radioUrl.length-1&&(e.radioUrl=e.radioUrl+";");var r=e.radioUrl.lastIndexOf(":");if(r>-1){var o=e.radioUrl.substring(r+1);parseInt(o)+""===o&&(e.radioUrl=e.radioUrl+"/;")}t&&Wt.getGrid(t).then((function(t){var n=(t.webRadios||[]).filter((function(t){return e.radioId===t.radioId}))[0];n&&(n.radioUrl=e.radioUrl,Wt.saveGrid(t))})),n(e)}))}))}ea.doAction=function(e,t){Wt.getGrid(e).then((function(n){var i=n.webRadios||[],a=t.radioId||ia,r=i.filter((function(e){return a===e.radioId}))[0]||i[0],o=0;if(r)switch(t.action){case ye.WEBRADIO_ACTION_START:la(r,e).then((function(e){ea.play(e)}));break;case ye.WEBRADIO_ACTION_TOGGLE:la(r,e).then((function(e){ea.toggle(e)}));break;case ye.WEBRADIO_ACTION_STOP:ea.stop();break;case ye.WEBRADIO_ACTION_NEXT:if((o=i.map((function(e){return e.radioId})).indexOf(r.radioId))<0||i.length<2)return;la(i[o=o+1=0?o-1:i.length-1],e).then((function(e){ea.play(e)}));break;case ye.WEBRADIO_ACTION_VOLUP:ea.volumeUp();break;case ye.WEBRADIO_ACTION_VOLDOWN:ea.volumeDown()}else log.info("no radio station to play found.")}))},ea.play=function(e){e&&(ta.paused||ia!==e.radioId)&&(ta.paused&&na.paused||ea.stop(),ia=e.radioId||ia,D.save("WEBRADIO_LAST_PLAYED_ID_KEY",ia),la(e).then((function(t){log.debug("playing: "+t.radioUrl);var i=Promise.resolve();-1!==e.radioUrl.indexOf(".m3u8")?(oa=!0,na.src=t.radioUrl,n.e(4).then(n.t.bind(null,638,7)).then((function(e){if((e=e.default).isSupported()){var n=new e;n.loadSource(t.radioUrl),n.attachMedia(na),n.on(e.Events.MANIFEST_PARSED,(function(){na.play()}))}}))):(oa=!1,ta.src=t.radioUrl,ta.volume=aa,i=ta.play());var a=U.translate("playing: {?} // Wiedergabe: {?}",t.radioName);Sn.setTooltip(a,{closeOnNavigate:!1,actionLink:U.translate("Stop // Stopp"),actionLinkFn:ea.stop,imageUrl:t.faviconUrl}),i&&i.then&&i.catch((function(){ia===e.radioId&&function(e){Sn.setTooltip(U.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName),{msgType:"warn"})}(e)}))})))},ea.stop=function(e){e&&e!==ia||(ta.pause(),na.pause(),Sn.clearTooltip())},ea.toggle=function(e){!oa&&ta.paused||oa&&na.paused?ea.play(e):ea.stop()},ea.volumeUp=function(){aa=aa+.15<=1?aa+.15:1,aa=Math.round(100*aa)/100,D.save("WEBRADIO_LAST_VOLUME_KEY",aa),sa(),ta.volume=aa,na.volume=aa},ea.volumeDown=function(){aa=aa-.15>=0?aa-.15:0,aa=Math.round(100*aa)/100,D.save("WEBRADIO_LAST_VOLUME_KEY",aa),sa(),ta.volume=aa,na.volume=aa},ea.search=function(e,t,n){if(!e)return Promise.resolve([]);var i={},r=[];Qi.forEach((function(t){var n=e.indexOf(t+":");n>-1&&r.push({param:t,position:n})})),r.sort((function(e,t){return e.position-t.position})),r.forEach((function(t,n,a){var r=a[n+1],o=r?r.position-1:void 0,s=e.substring(t.position+t.param.length+1,o);s=s.replace(/(^")|("$)/g,""),i[t.param]=s})),0===Object.keys(i).length&&(i.name=e);var o=t||20;return o++,i.limit=o,n&&(i.offset=n),new Promise((function(e,t){a.a.ajax({type:"POST",url:Zi+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then((function(t){ra=t.length===o;var n=t.filter((function(e){return"0"!==e.lastcheckok}));n=n.slice(0,o-1),e(n.map((function(e){return{radioId:e.stationuuid,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon}})))}),(function(e){t(e)}))}))},ea.hasMoreSearchResults=function(){return ra};var ca={};function ua(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak"),ri.speak(e.label,t.speakLanguage);break;case"GridActionSpeakCustom":log.debug("action speak custom"),t.speakText&&ri.speak(t.speakText,t.speakLanguage);break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?Fo.toLastGrid():Fo.isOnEditPage()?Fo.toEditGrid(t.toGridId):Fo.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?da(t,i):Wt.getGrid(n).then((function(e){da(t,e)}));break;case"GridActionPredict":log.debug("action predict"),At.predict(U.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),Ni.doCollectElementActions(t.action);break;case"GridActionWebradio":ea.doAction(n,t);break;case"GridActionYoutube":fi.doAction(t);break;case"GridActionChangeLang":U.setLanguage(t.language),U.initDomI18n()}}function da(e,t){if(e.componentId){var n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;an.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then((function(){e.dataPortId&&e.dataPortSendData&&an.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&an.triggerEvent(e.componentId,e.eventPortId,e.areURL)}))}}ca.doAction=function(e,t){e&&t&&Wt.getGridElement(e,t).then((function(n){switch(log.debug("do actions for: "+U.getTranslation(n.label)+", "+t),n.type){case Ae.ELEMENT_TYPE_COLLECT:Ni.doAction(n);break;case Ae.ELEMENT_TYPE_PREDICTION:At.doAction(n.id)}!function(e,t){e.actions.forEach((function(n){ua(e,n,t)}))}(n,e),$(window).trigger(s.ELEMENT_EVENT_ID,[n])}))},ca.testAction=function(e,t,n){ua(e,t,n.id,n)};var fa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[e._m(0),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.areURL,expression:"action.areURL"}],staticClass:"six columns",attrs:{id:"inputAREURI",type:"text"},domProps:{value:e.action.areURL},on:{change:function(t){return e.fixAreUrl()},input:function(t){t.target.composing||e.$set(e.action,"areURL",t.target.value)}}}),e._v(" "),n("div",{staticClass:"six columns"},[n("button",{staticStyle:{width:"70%"},on:{click:function(t){return e.testAREUrl(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test URL // URL testen")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:void 0===e.areConnected,expression:"areConnected === undefined"}],staticClass:"spaced"},[n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areConnected,expression:"areConnected"}],staticClass:"spaced",staticStyle:{color:"green"}},[n("i",{staticClass:"fas fa-check"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.areConnected,expression:"areConnected == false"}],staticClass:"spaced",staticStyle:{color:"red"}},[n("i",{staticClass:"fas fa-times"})])])])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("div",{staticClass:"ten columns"},[n("div",{staticClass:"row nomargin"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],attrs:{"data-i18n":""}},[e._v("Loading Model from ARE... // Lade Modell von ARE...")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Could not load Model from ARE! // Konnte Modell nicht von ARE laden!")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.loading&&!e.areModelSync&&e.areModelFile&&!e.areModelFile.dataBase64,expression:"!loading && !areModelSync && areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("(no ARE model) // (kein ARE Modell)")]),e._v(" "),!e.loading&&e.areModelFile&&e.areModelFile.dataBase64?n("span",[n("a",{attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.downloadModelFile(e.areModelFile)}}},[e._v(e._s(e.areModelFile.fileName))])]):e._e()])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.reloadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-download"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Download from ARE // Download von ARE")])]),e._v(" "),e.areModelFile&&e.areModelFile.dataBase64?n("button",{staticClass:"six columns",on:{click:function(t){return e.uploadAREModel(e.action)}}},[n("i",{staticClass:"fas fa-upload"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Upload to ARE // Upload zu ARE")])]):e._e()])])]),e._v(" "),e.areModelSync?e._e():n("div",{staticClass:"row"},[n("div",{staticClass:"ten columns offset-by-two"},[n("i",{staticClass:"fas fa-info-circle"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&e.areModelFile.dataBase64,expression:"areModelFile && areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Upload the saved model or download current ARE model in order to define the action. // Laden Sie das gespeicherte Modell hoch oder das aktuelle ARE Modell herunter um die Aktion zu definieren.")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.areModelFile&&!e.areModelFile.dataBase64,expression:"areModelFile && !areModelFile.dataBase64"}],attrs:{"data-i18n":""}},[e._v("Download the current ARE model in order to define the action. // Laden Sie das aktuelle ARE Modell herunter um die Aktion zu definieren.")])])]),e._v(" "),e.areModelSync?n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.componentId,expression:"action.componentId"}],staticClass:"five columns",attrs:{id:"inputComponentId"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"componentId",t.target.multiple?n:n[0])},function(t){return e.reloadPorts(e.action)}]}},e._l(e.areComponentIds,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentPorts.length?n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputDataPortId"}},[e._v("Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortId,expression:"action.dataPortId"}],staticClass:"full-width",attrs:{id:"inputDataPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"dataPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)]),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"inputDataPortData","data-i18n":""}},[e._v("Data // Daten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.action.dataPortSendData,expression:"action.dataPortSendData"}],staticClass:"full-width",attrs:{id:"inputDataPortData",type:"text"},domProps:{value:e.action.dataPortSendData},on:{input:function(t){t.target.composing||e.$set(e.action,"dataPortSendData",t.target.value)}}})])]):e._e(),e._v(" "),e.areModelSync&&0!=e.areComponentEventPorts.length?n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text hide-mobile",attrs:{for:"inputeventPortId"}},[e._v("Event-Port")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.action.eventPortId,expression:"action.eventPortId"}],staticClass:"full-width",attrs:{id:"inputeventPortId"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.action,"eventPortId",t.target.multiple?n:n[0])}}},e._l(e.areComponentEventPorts,(function(t){return n("option",{domProps:{value:t}},[e._v("\n "+e._s(t)+"\n ")])})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",on:{click:function(t){return e.testAction(e.action)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Test action // Aktion Testen")])]),e._v(" "),n("button",{staticClass:"six columns",on:{click:function(t){return e.endEditAction()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])};fa._withStripped=!0;var pa={props:["action","gridData","modelFile","setGridFileFn","endEditFn"],data:function(){return{loading:!1,areConnected:null,areComponentIds:[],areComponentPorts:[],areComponentEventPorts:[],areModelFile:null,areModelSync:!1}},methods:{endEditAction:function(){this.endEditFn()},testAction:function(e){var t=this.areModelFile.dataBase64?{additionalFiles:[this.areModelFile]}:{};ca.testAction(null,e,new He(t,this.gridData))},reloadAREModel:function(e){var t=this;t.loading=!0,an.downloadDeployedModelBase64(e.areURL).then((function(n){an.getModelName(e.areURL).then((function(i){t.areModelFile.dataBase64=n,t.areModelFile.fileName=i,e.areModelGridFileName=i,t.setGridFileFn(t.action,t.areModelFile),t.loading=!1,t.areModelSync=!0,t.reloadComponentIds(e),t.reloadPorts(e)}))})).catch((function(){t.areModelFile.dataBase64=null,t.setGridFileFn(t.action,null),t.loading=!1}))},uploadAREModel:function(e){var t=this;an.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then((function(){t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0}))},reloadComponentIds:function(e){var t=this;an.getRuntimeComponentIds(e.areURL).then((function(e){t.areComponentIds=e}))},reloadPorts:function(e){var t=this;an.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then((function(e){t.areComponentEventPorts=e})),an.getComponentInputPortIds(e.componentId,e.areURL).then((function(e){t.areComponentPorts=e}))},testAREUrl:function(e){var t=this;e.areURL=an.getRestURL(e.areURL),t.areConnected=void 0,an.getModelName(e.areURL).then((function(){t.areConnected=!0})).catch((function(){t.areConnected=!1}))},downloadModelFile:function(e){var t=new Blob([window.atob(e.dataBase64)],{type:"text/plain;charset=utf-8"}),n=-1!=e.fileName.indexOf(".acs")?e.fileName:e.fileName+".acs";X.a.saveAs(t,n)},fixAreUrl:function(){this.action.areURL=an.getRestURL(this.action.areURL)}},mounted:function(){this.action.areURL=this.action.areURL||an.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new He(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new Ne),Kt.setHelpLocation("05_actions","#asterics-action")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation()}},ha=(n(89),_n(pa,fa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputAREURI"}},[this._v("ARE URL")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text"},[this._v("ARE Model")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputComponentId","data-i18n":""}},[this._v("Component // Komponente")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputDataPortId","data-i18n":""}},[t("span",[this._v("Send data "),t("span",{staticClass:"show-mobile"},[this._v("to port")])]),this._v(" "),t("span",[this._v("Sende Daten "),t("span",{staticClass:"show-mobile"},[this._v("zu Port")])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"two columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inputeventPortId","data-i18n":""}},[t("span",[this._v("Trigger event "),t("span",{staticClass:"show-mobile"},[this._v("on event port")])]),this._v(" "),t("span",[this._v("Event triggern "),t("span",{staticClass:"show-mobile"},[this._v("auf Event-Port")])])])])}],!1,null,"74c379ae",null));ha.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var va=ha.exports,ma=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"row"},[n("h3",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),e._v(" "),n("button",{staticClass:"six columns",on:{click:e.addAllRadioElements}},[e._v("Grid-Elemente für Radios erstellen")])]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.selectedRadioList,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",on:{click:function(n){return e.removeRadio(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Remove // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop")]),e._v(" "),n("i",{staticClass:"fas fa-pause"})]):e._e(),e._v(" "),n("button",{staticClass:"right",on:{click:function(n){return e.moveWebradioUp(t)}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Up // Nach oben")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-up"})])])])])})),0),e._v(" "),0===e.selectedRadioList.length?n("div",{attrs:{"data-i18n":""}},[e._v("No selected radio stations, use search bar below to add radio stations. // Keine ausgewählten Radiosender, verwenden Sie die Suche unten um Radiosender hinzuzufügen.")]):e._e()]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"five columns"},[n("label",{staticClass:"normal-text",attrs:{for:"searchwebradios","data-i18n":""}},[e._v("Search term // Suchbegriff")]),e._v(" "),n("i",{staticClass:"fas fa-info-circle hide-mobile",attrs:{title:e._f("translate")("by default searches for radio station name, advanced search possible like e.g. tag:jazz, language:english or country:austria // sucht standardmäßig nach Radiosender-Name, erweiterte Suche z.B. möglich mit tag:jazz, language:english oder country:austria")}})]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.webradioSearch,expression:"webradioSearch"}],staticClass:"six columns",attrs:{id:"searchwebradios",type:"text"},domProps:{value:e.webradioSearch},on:{input:[function(t){t.target.composing||(e.webradioSearch=t.target.value)},function(t){return e.searchWebradios(t)}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("ul",{staticClass:"webradioList"},e._l(e.webradioSearchResults,(function(t){return n("li",[n("div",{staticClass:"webRadioListItem"},[n("img",{attrs:{src:t.faviconUrl}}),e._v(" "),n("div",{staticClass:"webRadioLabel"},[e._v(e._s(t.radioName))]),e._v(" "),n("div",{staticClass:"webRadioButtons"},[n("button",{staticClass:"right",attrs:{disabled:e.selectedRadioList.map((function(e){return e.radioId})).indexOf(t.radioId)>-1},on:{click:function(n){e.selectedRadioList.push(t),e.modelChanged()}}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Select // Wählen")]),e._v(" "),n("i",{staticClass:"fas fa-plus"})]),e._v(" "),e.webradioPlaying!==t?n("button",{staticClass:"right",on:{click:function(n){e.webradioPlaying=t,e.webradioService.play(t)}}},[n("span",{staticClass:"hide-mobile"},[e._v("Play ")]),n("i",{staticClass:"fas fa-play"})]):e._e(),e._v(" "),e.webradioPlaying===t?n("button",{staticClass:"right",on:{click:function(t){e.webradioPlaying=null,e.webradioService.stop()}}},[n("span",{staticClass:"hide-mobile"},[e._v("Stop ")]),n("i",{staticClass:"fas fa-pause"})]):e._e()])])])})),0),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.webradioSearchResults.length&&e.webradioSearch&&!e.webradioSearching&&!e.webradioSearchError,expression:"webradioSearchResults.length === 0 && webradioSearch && !webradioSearching && !webradioSearchError"}],attrs:{"data-i18n":""}},[e._v("No radio stations found, try an other search term. // Keine Radiosender gefunden, versuchen Sie einen anderen Suchbegriff.")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchError,expression:"webradioSearchError"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Searching failed, no connection to internet. // Suche fehlgeschlagen, keine Verbindung zum Internet.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:e.searchWebradios}},[e._v("Retry // Erneut versuchen")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.webradioSearchResults.length>0,expression:"webradioSearchResults.length > 0"}],staticStyle:{display:"flex","margin-top":"0.5em"}},[n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:0===e.webradioStartIndex},on:{click:e.prevSearchResults}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Previous page // Vorige Seite")])]),e._v(" "),n("button",{staticStyle:{"flex-grow":"1"},attrs:{disabled:!e.hasMoreWebradios},on:{click:e.nextSearchResults}},[n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Next page // Nächste Seite")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])])])};ma._withStripped=!0;var ga={props:{value:Object},watch:{value:{handler:function(e){this.gridData=JSON.parse(JSON.stringify(e)),this.selectedRadioList=this.gridData.webRadios},deep:!0}},data:function(){return{gridData:null,selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:ea,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}},methods:{modelChanged:function(){this.gridData.webRadios=this.selectedRadioList,this.$emit("input",JSON.parse(JSON.stringify(this.gridData)))},addAllRadioElements:function(){var e=this;if(confirm(U.translate("This action adds {?} new elements to the grid. Continue? // Diese Aktion fügt {?} neue Elemente zum Grid hinzu. Fortfahren?",this.gridData.webRadios.length))){var t=this,n=Promise.resolve();t.gridData.webRadios.forEach((function(e,i){var a;n=n.then((a=e,function(){return ie.urlToBase64(a.faviconUrl).then((function(e){var n=e?new se({data:e}):void 0,i=new He(t.gridData).getNewGridElement({label:U.getTranslationObject(a.radioName),actions:[new ye({radioId:a.radioId,action:ye.WEBRADIO_ACTION_START})],image:n});return t.gridData.gridElements.push(i),Promise.resolve()}))}))})),n.then((function(){e.modelChanged()}))}},searchWebradios:function(e){this.webradioSearch=e.target.value,this.webradioStartIndex=0,this.searchWebradiosInternal()},nextSearchResults:function(){this.webradioStartIndex+=10,this.searchWebradiosInternal()},prevSearchResults:function(){this.webradioStartIndex-=10,this.searchWebradiosInternal()},searchWebradiosInternal:function(){var e=this;e.webradioSearching=!0,e.webradioSearchError=!1,Dt.debounce((function(){ea.search(e.webradioSearch,10,e.webradioStartIndex).then((function(t){e.hasMoreWebradios=ea.hasMoreSearchResults(),e.webradioSearchResults=t,e.webradioSearching=!1})).catch((function(t){e.webradioSearchError=!0,e.webradioSearching=!1}))}),500)},moveWebradioUp:function(e){var t=this.selectedRadioList.indexOf(e);t>0&&(this.selectedRadioList.splice(t-1,0,this.selectedRadioList.splice(t,1)[0]),this.modelChanged())},removeRadio:function(e){ea.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter((function(t){return t.radioId!==e.radioId})),this.modelChanged()}},mounted:function(){this.gridData=JSON.parse(JSON.stringify(this.value)),this.selectedRadioList=this.gridData.webRadios,U.initDomI18n()},updated:function(){U.initDomI18n()}},_a=(n(91),_n(ga,ma,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h3",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Webradio search // Webradio Suche")]),this._v(" "),t("span",{staticClass:"six columns",attrs:{id:"poweredby","data-i18n":""}},[t("span",[this._v("powered by "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])]),this._v(" "),t("span",[this._v("Suche durch "),t("a",{attrs:{href:"https://www.radio-browser.info/gui/#!/",target:"_blank"}},[this._v("radio-browser.info")])])])])}],!1,null,"a1b68270",null));_a.options.__file="src/vue-components/components/radioListSelector.vue";var ya={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:Ae,editActionId:null,selectedNewAction:Ae.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:Ae.getActionTypes(),voiceLangs:ri.getVoicesLangs(),dictionaryKeys:At.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:ge.getActions(),webradioActions:ye.getActions(),currentLang:U.getBrowserLang(),allLanguages:U.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1,GridActionYoutube:we,GridElement:Ae}},components:{RadioListSelector:_a.exports,Accordion:Dn,EditAreAction:va},methods:{selectedRadioChanged:function(e){var t=this,n=this.gridData.webRadios.filter((function(t){return t.radioId===e}))[0].faviconUrl;n&&ie.urlToBase64(n).then((function(e){e&&(t.gridElement.image=new se({data:e}))}))},deleteAction:function(e){this.setAdditionalGridFile(e,null),this.gridElement.actions=this.gridElement.actions.filter((function(t){return t.id!=e.id}))},editAction:function(e){this.editActionId=e.id},endEditAction:function(){this.editActionId=null},testAction:function(e){var t=this.additionalGridFiles[e.id]?{additionalFiles:[this.additionalGridFiles[e.id]]}:{};ca.testAction(this.gridElement,e,new He(t,this.gridData))},addAction:function(){var e=JSON.parse(JSON.stringify(Ae.getActionInstance(this.selectedNewAction)));e.modelName===ee.getModelName()&&(e.toGridId=Object.keys(this.gridLabels)[0]),this.gridElement.actions.push(e),this.editActionId=e.id},setAdditionalGridFile:function(e,t){t?this.additionalGridFiles[e.id]=t:delete this.additionalGridFiles[e.id]},save:function(e){var t=this;t.saveInternal().then((function(){t.$emit("close"),e&&t.$emit("edit")}))},openHelp:function(){Kt.openHelp()},editNext:function(e){var t=this;t.saveInternal().then((function(){t.editElementId=new He(t.gridData).getNextElementId(t.editElementId,e),t.initInternal(),$("#selectActionType").focus()}))},saveInternal:function(){var e=this;return e.gridData.gridElements.forEach((function(t,n){t.id===e.gridElement.id&&(e.gridData.gridElements[n]=e.gridElement)})),Wt.saveGrid(e.gridData).then((function(){return Wt.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then((function(){return e.$emit("reload"),Promise.resolve()}))}))},initInternal:function(){var e=this;Wt.getGrid(e.gridIdParam).then((function(t){e.gridData=JSON.parse(JSON.stringify(t));var n=Object.keys(e.gridData.label);e.gridLanguages=e.allLanguages.filter((function(e){return-1!==n.indexOf(e.code)})),e.gridElement=e.gridData.gridElements.filter((function(t){return t.id===e.editElementId}))[0]})),Wt.getGridsAttribute("label").then((function(t){e.gridLabels=t}))}},mounted:function(){this.editElementId=this.editElementIdParam,this.initInternal(),Kt.setHelpLocation("05_actions","#edit-actions-modal")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.setHelpLocation("02_navigation","#edit-view")}},ba=(n(93),_n(ya,qi,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("h2",{staticClass:"twelve columns",staticStyle:{"margin-top":"1em","font-size":"1.2em"},attrs:{for:"actionList","data-i18n":""}},[this._v("Current actions // Aktuelle Aktionen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v("No actions defined, click on '"),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Add action")]),this._v("' to add one.")])},function(){var e=this.$createElement,t=this._self._c||e;return t("span",[this._v('Keine Aktionen definiert, klicken Sie auf "'),t("i",{staticClass:"fas fa-plus"}),this._v(" "),t("span",{staticClass:"hide-mobile"},[this._v("Aktion hinzufügen")]),this._v('" um eine Aktion zu definieren.')])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectLang2","data-i18n":""}},[this._v("Language // Sprache")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"inCustomText","data-i18n":""}},[this._v("Text to speak // Auszusprechender Text")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"selectGrid","data-i18n":""}},[this._v("Navigate to grid // Navigieren zu Grid")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"three columns"},[t("label",{staticClass:"normal-text",attrs:{for:"comboUseDict","data-i18n":""}},[this._v("Dictionary to use // Zu verwendendes Wörterbuch")])])}],!1,null,"07fb84aa",null));ba.options.__file="src/vue-components/modals/editActionsModal.vue";var Ea=ba.exports,Ca=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",staticStyle:{"max-width":"500px"},on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridRows","data-i18n":""}},[e._v("Number of rows // Anzahl der Zeilen")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.rowCount,expression:"gridData.rowCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridRows",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.rowCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"rowCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"gridCols","data-i18n":""}},[e._v("Minimum number of columns // Minimale Anzahl der Spalten")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.gridData.minColumnCount,expression:"gridData.minColumnCount",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"gridCols",type:"number",min:"1",max:"100"},domProps:{value:e.gridData.minColumnCount},on:{input:function(t){t.target.composing||e.$set(e.gridData,"minColumnCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),e.isGlobalGrid&&e.metadata&&1===e.gridHeight?n("div",{staticClass:"row"},[n("label",{staticClass:"seven columns",attrs:{for:"metadataHeight","data-i18n":""}},[e._v("Height of first global grid row [%] // Höhe der ersten Zeile des globalen Grids [%]")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.metadata.globalGridHeightPercentage,expression:"metadata.globalGridHeightPercentage",modifiers:{number:!0}}],staticClass:"three columns",attrs:{id:"metadataHeight",type:"number",min:"5",max:"50"},domProps:{value:e.metadata.globalGridHeightPercentage},on:{input:function(t){t.target.composing||e.$set(e.metadata,"globalGridHeightPercentage",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]):e._e()]),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Ca._withStripped=!0;var wa={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new He(this.gridDataParam).getHeight(),metadata:null}},methods:{save:function(){var e=this;D.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});var t=[];this.metadata&&t.push(Wt.saveMetadata(this.metadata)),Promise.all(t).then((function(){e.$emit("save",e.gridData.rowCount,e.gridData.minColumnCount),e.$emit("close")}))}},mounted:function(){var e=this;this.isGlobalGrid&&Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),setTimeout((function(){return U.initDomI18n()}),10)})),U.initDomI18n()}},Ta=(n(95),_n(wa,Ca,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Set grid size // Grid-Größe anpassen\n ")])])}],!1,null,"5f4007c6",null));Ta.options.__file="src/vue-components/modals/gridDimensionModal.vue";var Aa=Ta.exports,Sa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),e.otherGrids&&e.gridElement&&e.selectedGrid?n("div",{staticClass:"modal-body container"},[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"moveGrid"}},[e._v(e._s(e.i18nService.translate('Move element "{?}" to grid // Verschiebe Element "{?}" nach Grid',e.i18nService.getTranslation(this.gridElement.label))))]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedGrid,expression:"selectedGrid"}],staticClass:"four columns",staticStyle:{"margin-bottom":"1em"},attrs:{id:"moveGrid"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedGrid=t.target.multiple?n:n[0]}}},e._l(e.otherGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[n("img",{staticStyle:{height:"150px",border:"1px solid lightgray"},attrs:{src:e.selectedGrid.thumbnail?e.selectedGrid.thumbnail.data:e.imageUtil.getEmptyImage()}})]),e._v(" "),n("div",{staticClass:"four columns"},[n("button",{staticStyle:{width:"49%"},on:{click:e.prev}},[n("i",{staticClass:"fas fa-arrow-left"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Back // Zurück")])]),e._v(" "),n("button",{staticStyle:{width:"49%"},on:{click:e.next}},[n("span",{attrs:{"data-i18n":""}},[e._v("Next // Weiter")]),e._v(" "),n("i",{staticClass:"fas fa-arrow-right"})])])]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.moveAllElements,expression:"moveAllElements"}],attrs:{id:"moveAll",type:"checkbox"},domProps:{checked:Array.isArray(e.moveAllElements)?e._i(e.moveAllElements,null)>-1:e.moveAllElements},on:{change:function(t){var n=e.moveAllElements,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.moveAllElements=n.concat([null])):r>-1&&(e.moveAllElements=n.slice(0,r).concat(n.slice(r+1)))}else e.moveAllElements=a}}}),e._v(" "),n("label",{attrs:{for:"moveAll","data-i18n":""}},[e._v("Move all elements to this grid // Alle Elemente zu diesem Grid verschieben")])])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};Sa._withStripped=!0;var Na={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:U,imageUtil:ie}},methods:{prev:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var a=i-1<0?e.otherGrids.length-1:i-1;t=e.otherGrids[a]}})),this.selectedGrid=t},next:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var a=i+11||e.height>1,i=t.getNewXYPos(n);e.x=i.x,e.y=i.y,t.gridElements.push(e)})),e.gridData.gridElements=e.moveAllElements?[]:e.gridData.gridElements.filter((function(t){return t.id!==e.gridElement.id}));var n=[];return n.push(Wt.saveGrid(e.gridData)),n.push(Wt.saveGrid(t)),Promise.all(n)}))}},mounted:function(){var e=this;Wt.getGrid(this.gridId).then((function(t){e.gridData=JSON.parse(JSON.stringify(t)),e.gridElement=e.gridData.gridElements.filter((function(t){return t.id===e.gridElementId}))[0],U.initDomI18n()})),Wt.getGrids(!1,!0).then((function(t){e.otherGrids=JSON.parse(JSON.stringify(t)).filter((function(t){return t.id!==e.gridId})),e.selectedGrid=e.otherGrids[0]}))},updated:function(){U.initDomI18n()}},Ia=(n(97),_n(Na,Sa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Move grid element // Grid-Element verschieben\n ")])])}],!1,null,"0fc126e0",null));Ia.options.__file="src/vue-components/modals/elementMoveModal.vue";var ka=Ia.exports,Oa=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),void 0!==e.gridData?n("div",{staticClass:"modal-body"},[n("div",[n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"gridSelect","data-i18n":""}},[e._v("Grid to translate // Zu übersetzendes Grid")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.gridData,expression:"gridData"}],staticClass:"four columns",attrs:{id:"gridSelect"},on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.gridData=t.target.multiple?n:n[0]}}},[n("option",{attrs:{"data-i18n":""},domProps:{value:null}},[e._v("show all Grids // alle Grids anzeigen")]),e._v(" "),e._l(e.allGrids,(function(t){return n("option",{domProps:{value:t}},[e._v(e._s(e._f("extractTranslation")(t.label)))])}))],2)]),e._v(" "),e.usedLocales.length>0?n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{"data-i18n":""}},[e._v("Select already used languages // Auswahl bereits verwendeter Sprachen")]),e._v(" "),n("span",{staticClass:"six columns"},e._l(e.usedLocales,(function(t){return t!==e.currentLocale?n("button",{staticStyle:{"margin-right":"0.5em"},on:{click:function(n){e.chosenLocale=t}}},[e._v(e._s(e.getLocaleTranslation(t)))]):e._e()})),0)]):e._e(),e._v(" "),n("div",{staticClass:"row",staticStyle:{"margin-top":"2em"}},[n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v(" "),n("strong",[e._v(e._s(e.currentLangTranslated)+" ("+e._s(e.currentLocale)+")")])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.currentLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.currentLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.currentLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])]),e._v(" "),n("div",{staticClass:"six columns"},[n("div",{staticClass:"row",staticStyle:{height:"2em"}},[n("strong",{attrs:{"data-i18n":""}},[e._v("Texts in // Texte auf")]),e._v("\n  "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.chosenLocale,expression:"chosenLocale"}],on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.chosenLocale=t.target.multiple?n:n[0]}}},e._l(e.allLanguages.filter((function(t){return t.code!==e.currentLocale})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Copy Column // Spalte kopieren")},on:{click:function(t){return e.copy(e.chosenLocale)}}},[n("i",{staticClass:"far fa-copy"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" kopieren")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte kopieren")])]),e._v(" "),n("button",{staticClass:"six columns",attrs:{title:e._f("translate")("Paste // Einfügen")},on:{click:function(t){return e.paste(e.chosenLocale)}}},[n("i",{staticClass:"far fa-clipboard"}),e._v(" "),n("span",{staticClass:"show-mobile",attrs:{"data-i18n":""}},[e._v(e._s(e.chosenLangTranslated)+" einfügen")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Spalte einfügen")])])])])]),e._v(" "),n("div",{attrs:{id:"translationList"}},e._l(e.gridData?[e.gridData]:e.allGrids,(function(t){return n("ul",[n("li",[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.currentLocale],expression:"data.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:t.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.currentLocale,n.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.label[e.chosenLocale],expression:"data.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:t.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(n){n.target.composing||e.$set(t.label,e.chosenLocale,n.target.value)}}})])]),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",[i.label[e.currentLocale]||i.label[e.chosenLocale]?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.currentLocale],expression:"el.label[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.label[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.label[e.chosenLocale],expression:"el.label[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.label[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.label,e.chosenLocale,t.target.value)}}})]):e._e()]):e._e()})),e._v(" "),e._l(t.gridElements,(function(i){return e.showGridElements(t.label[e.currentLocale])?n("li",e._l(i.actions,(function(i){return i.modelName===e.GridActionSpeakCustom.getModelName()&&(i.speakText[e.currentLocale]||i.speakText[e.chosenLocale])?n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.currentLocale],expression:"action.speakText[currentLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.currentLangTranslated+")",lang:e.currentLocale},domProps:{value:i.speakText[e.currentLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.currentLocale,t.target.value)}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:i.speakText[e.chosenLocale],expression:"action.speakText[chosenLocale]"}],staticClass:"six columns",attrs:{type:"text",placeholder:"("+e.chosenLangTranslated+")",lang:e.chosenLocale},domProps:{value:i.speakText[e.chosenLocale]},on:{change:function(n){return e.changedGrid(t)},input:function(t){t.target.composing||e.$set(i.speakText,e.chosenLocale,t.target.value)}}})]):e._e()})),0):e._e()}))],2)})),0)])]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"three columns offset-by-six",attrs:{title:"Keyboard: [Esc]"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"three columns",attrs:{title:"Keyboard: [Ctrl + Enter]"},on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Save // Speichern")])])])])])])])])};Oa._withStripped=!0,window.hideKeyboardTranslations=!0;var La={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:U.getBrowserLang(),chosenLocale:U.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:de,allLanguages:U.getAllLanguages(),usedLocales:D.getUsedLocales(),changedGrids:[]}},computed:{currentLangTranslated:function(){return this.getLocaleTranslation(this.currentLocale)},chosenLangTranslated:function(){return this.getLocaleTranslation(this.chosenLocale)}},methods:{save:function(){var e=this,t=e.gridData||e.allGrids[0];D.addUsedLocales(Object.keys(t.label)),Wt.saveGrids(JSON.parse(JSON.stringify(e.changedGrids))).then((function(){e.$emit("reload"),e.$emit("close")}))},changedGrid:function(e){e?-1===this.changedGrids.indexOf(e)&&this.changedGrids.push(e):this.changedGrids=this.allGrids},getLocaleTranslation:function(e){return U.getTranslation(this.allLanguages.filter((function(t){return t.code===e}))[0])},copy:function(e){var t=a()("#translationList input[lang='".concat(e,"']")).toArray().reduce((function(e,t){return e+t.value+"\n"}),"");Dt.copyToClipboard(t)},paste:function(e){var t=this;Dt.getClipboardContent().then((function(n){if(n){t.changedGrid(t.gridData);var i=n.trim().split("\n");a()("#translationList input[lang='".concat(e,"']")).toArray().forEach((function(e,t){i[t]&&(a()(e).val(i[t]),a()(e)[0].dispatchEvent(new Event("input")))}))}}))},showGridElements:function(e){return!window.hideKeyboardTranslations||null!==this.gridData||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))}},mounted:function(){var e=this;Wt.getGrids(!0).then((function(t){e.allGrids=JSON.parse(JSON.stringify(t)),e.allGrids.sort((function(e,t){return U.getTranslation(e.label).localeCompare(U.getTranslation(t.label))})),e.gridData=e.allGrids.filter((function(t){return t.id===e.gridDataId}))[0]})),U.initDomI18n()},updated:function(){U.initDomI18n()}},xa=(n(99),_n(La,Oa,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Translate Grids // Grids übersetzen\n ")])])}],!1,null,"7d6c5d35",null));xa.options.__file="src/vue-components/modals/gridTranslateModal.vue";var Da=xa.exports,Ra=null,Ma=null;var Pa=_n({props:["gridId"],data:function(){return{gridData:null,metadata:null,canUndo:!1,canRedo:!1,doingUndoRedo:!1,showEditModal:!1,showMultipleModal:!1,showActionsModal:!1,showDimensionsModal:!1,showMoveModal:!1,showTranslateModal:!1,editElementId:null,showGrid:!1,constants:s,markedElement:null}},components:{GridTranslateModal:Da,ElementMoveModal:ka,GridDimensionModal:Aa,EditGridModal:Wi,AddMultipleModal:Xi,EditActionsModal:Ea,HeaderIcon:kn},methods:{setDimensions:function(e,t){Ma.setDimensions(e,t)},fillGaps:function(){Ma.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ma.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ma.redo()}),10)},reload:function(e){Ma.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back:function(){Fo.toMain()},editElement:function(e){this.editElementId=e,this.showEditModal=!0},removeElement:function(e){var t=this;Ma.removeElement(e).then((function(e){t.gridData=e}))},newElement:function(e){switch(e){case Ae.ELEMENT_TYPE_PREDICTION:case Ae.ELEMENT_TYPE_COLLECT:case Ae.ELEMENT_TYPE_YT_PLAYER:var t=new He(this.gridData).getNewXYPos(),n=new Ae({type:e,x:t.x,y:t.y});if(e===Ae.ELEMENT_TYPE_YT_PLAYER){var i=new we({action:we.actions.YT_TOGGLE});n.actions=[i]}this.gridData.gridElements.push(n),Ma.updateGridWithUndo(this.gridData);break;default:this.editElementId=null,this.showEditModal=!0}},editActions:function(e){this.editElementId=e,this.showActionsModal=!0},newElements:function(){this.showMultipleModal=!0},clearElements:function(){confirm(U.translate("CONFIRM_DELETE_ALL_ELEMS"))&&(this.gridData.gridElements=[],Ma.updateGridWithUndo(this.gridData))},fillElements:function(){var e=Oe.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),Ma.updateGridWithUndo(this.gridData)},reloadFn:function(e,t,n){if(Ra&&t.includes(Ra.gridData.id)&&Ma&&Ma.isInitialized()){var i=new He(n.filter((function(e){return e.id===Ra.gridData.id}))[0]);i.isEqual(Ra.gridData)||(log.debug("reloading on remote update..."),Ra.reload(i))}},markElement:function(e){var t=this;a()(".grid-item-content").removeClass("marked"),e&&setTimeout((function(){Dt.throttle((function(){t.markedElement&&t.markedElement.id===e?t.markedElement=null:(t.markedElement=e?t.gridData.gridElements.filter((function(t){return t.id===e}))[0]:null,a()("#"+e).addClass("marked"))}),null,200)}),10)},getGridInstance:function(){return Ma}},created:function(){a()(document).on(s.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){var e=this,t=this;Ra=t,un.global.stopListening(),Wt.getGrid(this.gridId).then((function(n){return n?(t.gridData=JSON.parse(JSON.stringify(n)),Promise.resolve()):(log.warn("grid not found! gridId: "+e.gridId),Fo.toMain(),Promise.reject())})).then((function(){return Wt.getMetadata().then((function(e){return t.metadata=JSON.parse(JSON.stringify(e)),t.metadata.globalGridId===t.gridData.id?Promise.resolve():(t.metadata.lastOpenedGridId=t.gridData.id,Wt.saveMetadata(t.metadata))}))})).then((function(){return e=t.gridData,Ma=new Mi("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:e.id}),Fn.setGridInstance(Ma),Ma.getInitPromise();var e})).then((function(){Ma.setLayoutChangedEndListener((function(e){t.canUndo=Ma.canUndo(),t.canRedo=Ma.canRedo(),t.doingUndoRedo=!1,t.gridData=JSON.parse(JSON.stringify(e))})),function(){var e={CONTEXT_NEW_GROUP:{name:"New // Neu",icon:"fas fa-plus-circle",items:{CONTEXT_NEW_SINGLE:{name:"New Element // Neues Element",icon:"fas fa-plus"},CONTEXT_NEW_MASS:{name:"Many new elements // Mehrere neue Elemente",icon:"fas fa-clone"},CONTEXT_NEW_COLLECT:{name:"New collect element // Neues Sammel-Element",icon:"far fa-comment-dots"},CONTEXT_NEW_PREDICT:{name:"New prediction element // Neues Vorhersage-Element",icon:"fas fa-magic"},CONTEXT_NEW_YT_PLAYER:{name:"New YouTube Player // Neuer YouTube Player",icon:"fab fa-youtube"}}}},t={CONTEXT_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit"},CONTEXT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt"},CONTEXT_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt"},CONTEXT_MORE_GROUP:{name:"More // Mehr",icon:"fas fa-bars",items:{CONTEXT_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone"},CONTEXT_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt"},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export"}}}},n=JSON.parse(JSON.stringify(t));delete n.CONTEXT_EDIT;var i=function(){return!!Ra.markedElement},r={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:function(){return Ra.markedElement&&Ra.markedElement.type===Ae.ELEMENT_TYPE_NORMAL}},CONTEXT_ACTION_EDIT_ACTIONS:{name:"Actions // Aktionen",icon:"fas fa-bolt",visible:i},CONTEXT_ACTION_DELETE:{name:"Delete // Löschen",icon:"far fa-trash-alt",visible:i},CONTEXT_ACTION_DUPLICATE:{name:"Duplicate // Klonen",icon:"far fa-clone",visible:i},CONTEXT_ACTION_DO_ACTION:{name:"Do element action // Aktion des Elements ausführen",icon:"fas fa-bolt",visible:i},CONTEXT_MOVE_TO:{name:"Move element to other grid // Element zu anderem Grid verschieben",icon:"fas fa-file-export",visible:i},SEP0:"---------",CONTEXT_NEW_GROUP:e.CONTEXT_NEW_GROUP,CONTEXT_FILL_EMPTY:{name:"Fill with empty elements // Mit leeren Elementen füllen",icon:"fas fa-fill",visible:function(){return!new He({},Ra.gridData).isFull()}},CONTEXT_DELETE_ALL:{name:"Delete all elements // Alle Elemente löschen",icon:"fas fa-minus-circle"},SEP1:"---------",CONTEXT_GRID_DIMENSIONS:{name:"Change grid dimensions // Grid-Größe anpassen",icon:"fas fa-expand-arrows-alt"},CONTEXT_GRID_TRANSLATION:{name:"Translate grid // Grid übersetzen",icon:"fas fa-language"},CONTEXT_LAYOUT_FILL:{name:"Fill gaps // Lücken füllen",icon:"fas fa-angle-double-left"},CONTEXT_EDIT_GLOBAL_GRID:{name:"Edit global grid // Globales Grid bearbeiten",icon:"fas fa-globe",visible:!!Ra.metadata.globalGridId&&Ra.metadata.globalGridActive&&Ra.metadata.globalGridId!==Ra.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:Ra.metadata.globalGridId===Ra.gridData.id}};function o(e,t){switch(e){case"CONTEXT_EDIT":Ra.editElement(t);break;case"CONTEXT_DUPLICATE":Ma.duplicateElement(t);break;case"CONTEXT_DO_ACTION":ca.doAction(Ra.gridData.id,t);break;case"CONTEXT_ACTIONS":Ra.editActions(t);break;case"CONTEXT_DELETE":Ra.removeElement(t);break;case"CONTEXT_NEW_SINGLE":Ra.newElement();break;case"CONTEXT_NEW_MASS":Ra.newElements();break;case"CONTEXT_NEW_COLLECT":Ra.newElement(Ae.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":Ra.newElement(Ae.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_NEW_YT_PLAYER":Ra.newElement(Ae.ELEMENT_TYPE_YT_PLAYER);break;case"CONTEXT_DELETE_ALL":Ra.clearElements();break;case"CONTEXT_FILL_EMPTY":Ra.fillElements();break;case"CONTEXT_LAYOUT_FILL":Ra.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":Ra.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":Ra.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":Ra.editElement(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":Ra.editActions(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_DELETE":Ra.removeElement(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":Ma.duplicateElement(Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":ca.doAction(Ra.gridData.id,Ra.markedElement.id),Ra.markElement(null);break;case"CONTEXT_MOVE_TO":Ra.editElementId=t||Ra.markedElement.id,Ra.markElement(null),Ra.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":Fo.toEditGrid(Ra.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":Fo.toEditGrid(Ra.metadata.lastOpenedGridId)}}a()(".grid-container").on("click",(function(e){if(Ra){for(var t=null,n=e.target;!t&&n.parentNode;)t=a()(n).attr("data-id"),n=n.parentNode;Ra.markElement(t)}})),a.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){o(e,a()(this).attr("data-id"))},items:t,zIndex:10}),a.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){o(e,a()(this).attr("data-id"))},items:n,zIndex:10}),a.a.contextMenu({selector:".grid-container",callback:function(e,t){o(e)},items:e,zIndex:10}),a.a.contextMenu({selector:"#moreButton",callback:function(e,t){o(e)},trigger:"left",items:r,zIndex:10})}(),U.initDomI18n(),t.showGrid=!0}))},updated:function(){U.initDomI18n()},beforeDestroy:function(){a()(document).off(s.EVENT_DB_PULL_UPDATED,this.reloadFn),Ra=null,un.global.startListening(),Ma&&(Ma.destroy(),Ma=null,Fn.setGridInstance(null)),a.a.contextMenu("destroy")}},ti,[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"spaced",attrs:{tabindex:"33",id:"moreButton",title:"More"}},[t("i",{staticClass:"fas fa-ellipsis-v"}),this._v(" "),t("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[this._v("More // Mehr")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"grid-container",staticStyle:{margin:"10px",display:"none"},attrs:{id:"grid-layout-background-wrapper"}},[t("div",{staticClass:"grid-container",staticStyle:{"margin-left":"204px","background-size":"209px 209px","background-image":"linear-gradient(to right, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-vertical"}}),this._v(" "),t("div",{staticClass:"grid-container",staticStyle:{"margin-top":"204px","background-size":"209px 209px","background-image":"linear-gradient(to bottom, grey 1px, transparent 1px)"},attrs:{id:"grid-layout-background-horizontal"}})])}],!1,null,"6c00303f",null);Pa.options.__file="src/vue-components/views/gridEditView.vue";var Ga=Pa.exports,Ua=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"box"},[e.metadata&&!e.metadata.fullscreen?n("header",{staticClass:"row header",attrs:{role:"banner"}},[n("header-icon",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"left"}),e._v(" "),n("div",{staticClass:"btn-group left"},[n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"spaced small",attrs:{tabindex:"30"},on:{click:function(t){return e.toEditGrid()}}},[n("i",{staticClass:"fas fa-pencil-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Editing on // Bearbeiten ein")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"31",id:"inputConfigButton"}},[n("i",{staticClass:"fas fa-cog"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Input options // Eingabeoptionen")])])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.metadata.locked,expression:"metadata.locked"}],staticClass:"small",attrs:{tabindex:"34"},on:{click:function(t){return e.unlock()}}},[n("i",{staticClass:"fas fa-unlock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Unlock // Entsperren")]),e._v(" "),e.unlockCounter!==e.unlockCount?n("span",[e._v(e._s(e.unlockCounter))]):e._e()]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:!e.metadata.locked,expression:"!metadata.locked"}],staticClass:"small",attrs:{tabindex:"33"},on:{click:function(t){return e.lock()}}},[n("i",{staticClass:"fas fa-lock"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Lock // Sperren")])]),e._v(" "),n("button",{staticClass:"spaced small",attrs:{tabindex:"32"},on:{click:function(t){return e.applyFullscreen()}}},[n("i",{staticClass:"fas fa-expand"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Fullscreen // Vollbild")])])],1):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_HUFFMAN?n("huffman-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_DIRECTION?n("direction-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_MOUSE?n("mouse-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SCANNING?n("scanning-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_SEQUENTIAL?n("sequential-input-modal",{on:{close:function(t){e.showModal=null,e.reinitInputMethods()}}}):e._e(),e._v(" "),e.showModal===e.modalTypes.MODAL_UNLOCK?n("unlock-modal",{on:{unlock:function(t){return e.unlock(!0)},close:function(t){e.showModal=null}}}):e._e(),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.viewInitialized&&e.gridData.gridElements&&0===e.gridData.gridElements.length&&(!e.globalGridData||0===e.globalGridData.length),expression:"viewInitialized && gridData.gridElements && gridData.gridElements.length === 0 && (!globalGridData || globalGridData.length === 0)"}],staticClass:"row content spaced"},[n("div",{staticStyle:{"margin-top":"2em"},attrs:{"data-i18n":""}},[n("span",[e._v("No elements, click "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Edit grid")]),e._v(" to enter edit mode.")]),e._v(" "),n("span",[e._v("Keine Elemente, klicke auf "),n("a",{attrs:{href:"#grid/edit/"+e.gridId}},[e._v("Grid bearbeiten")]),e._v(" um das Grid zu bearbeiten.")])])]),e._v(" "),n("div",{staticClass:"row content"},[e.viewInitialized?e._e():n("div",{staticClass:"grid-container grid-mask"},[n("i",{staticClass:"fas fa-4x fa-spinner fa-spin"})]),e._v(" "),n("div",{staticClass:"grid-container",attrs:{id:"grid-container"}})])],1)};Ua._withStripped=!0;var Fa=function(e){if(e instanceof Node||e instanceof NodeList||e instanceof Array)return e;var t="querySelectorAll";return 0===e.indexOf("#")&&(t="getElementById",e=e.substr(1,e.length)),document[t](e)};function $a(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},Fa.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},Fa.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},Fa.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;n0&&u<1e3;){u++;var d=S(s,e,t);l.push(d),s=s.filter((function(e){return!d.includes(e)}))}return c&&(l=function(e){for(var t=[],n=0;n=0&&(a=e[n-1]),n+1=i(e)&&o<=a(e)||i(e)<=s&&a(e)>=s||i(e)>=o&&a(e)<=s}))}function N(e){return function(t,n){return e(t)-e(n)}}function I(){var e=arguments;return function(t,n){for(var i=0;i=s*n.length)i.restartScanning();else if(Fa.removeClass(e,t),Fa.addClass(e,a),h&&(Fa.addClass(n[l],t),Fa.removeClass(n,a),v=n[l],C=function(){D(n,!0,l+1,c+1)},f)){var u=0===l&&o&&n.length>2?r*d:r;m=setTimeout((function(){C()}),u)}}function R(e){var t=[];e=e||[];var n=1;c&&e.length>l&&(n=Math.ceil(e.length/2));for(var i=0,a=e.length;i1?D(R(v),!0):Fa.flattenArray(v).length>1?D(R(Fa.flattenArray(v)),!0):(p&&p(Fa.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){C&&(clearTimeout(m),C())},i.enableTouchScanning=function(){y||(y=function(){i.select()},(b=Fa(".area")[0]?Fa(".area")[0]:Fa("#grid-container")).addEventListener("click",y))},i.disableTouchScanning=function(){y&&(b.removeEventListener("click",y),y=null)},w(n)}Va.getInstanceFromConfig=function(e,t,n,i){return new ja(t,n,{autoScan:e.scanAuto,scanVertical:e.scanVertical,subScanRepeat:3,scanBinary:e.scanBinary,scanInactiveClass:i,minBinarySplitThreshold:3,scanTimeoutMs:e.scanTimeoutMs,scanTimeoutFirstElementFactor:e.scanTimeoutFirstElementFactor,touchScanning:!e.mouseclickEnabled,inputEventSelect:e.scanInputs.filter((function(e){return e.label===I.SELECT}))[0],inputEventNext:e.scanInputs.filter((function(e){return e.label===I.NEXT}))[0]})};var Ba={};function Ya(e,t){var n=e,i=void 0!==t.timeoutMs?t.timeoutMs:1e3,r=t.demoMode,o=t.selectionListener,l=t.activeListener,c={},u=[],d=null,f=null,p=!1,h=null;function v(e,t){var n=t||this;e.preventDefault(),w(n),d=n,f=e}function m(e,t){if(p){var n=t||this;e.preventDefault(),T(n)}}function g(e){p||S(!1),Dt.debounce((function(){S(!0)}),i+300,"hovering-mouseMove")}function _(){T(d)}function y(e){var t=A(e);w(t),d=t}function b(e){T(d)}function E(e){r||e.preventDefault(),Dt.throttle((function(){var t=A(e);w(t),d=t,f=e}),[],50,"hovering-touchmove")}function C(e){ri.speak(U.translate("speech output activated // Sprachausgabe aktiviert")),Sn.clearTooltip(),ni.setState(s.STATE_ACTIVATED_TTS,!0),S(!0),u.forEach((function(e){e.removeEventListener("click",C)}))}function w(e){d&&d!==e&&T(d),e&&!c[e]&&(Fa.addClass(e,"mouseentered"),l&&e!==d&&l(e),0!==i&&(c[e]=setTimeout((function(){o&&o(e)}),i)))}function T(e){e&&(Fa.removeClass(e,"mouseentered"),clearTimeout(c[e]),c[e]=null,d=null)}function A(e){if(e.touches&&0===e.touches.length&&(e=f),e){var t=e.touches?e.touches[0].pageX:e.pageX||e.clientX,n=e.touches?e.touches[0].pageY:e.pageY||e.clientY;return Dt.getElement(u,t,n)}log.warn("no event")}function S(e){p=!e,r||(e?a()("#touchElement").show():a()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(a()(n).css("cursor","none"),a()("#touchElement").css("cursor","none"),t.containerClass&&a()(t.containerClass).css("cursor","none")),u=Fa.selectAsList(n);var e=ni.getState(s.STATE_ACTIVATED_TTS);!ri.nativeSpeechSupported()||e||r?S(!0):(Sn.setTooltip(U.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),ni.onStateChanged(s.STATE_ACTIVATED_TTS,(function(e){e&&Sn.clearTooltip()})),u.forEach((function(e){e.addEventListener("click",C)}))),u.forEach((function(e){e.addEventListener("mouseenter",v),e.addEventListener("mouseleave",m),e.addEventListener("mouseup",_)})),(h=un.instance()).onTouchStart(y),h.onTouchEnd(b),h.onTouchMove(E),h.startListening(),document.addEventListener("mousemove",g)},this.destroy=function(){t.hideCursor&&(a()(n).css("cursor","default"),a()("#touchElement").css("cursor","default"),t.containerClass&&a()(t.containerClass).css("cursor","default")),Dt.clearDebounce("hovering-mouseMove"),u.forEach((function(e){e.removeEventListener("mouseenter",v),e.removeEventListener("mouseleave",m),e.removeEventListener("mouseup",_),e.removeEventListener("click",C)})),h.destroy(),document.removeEventListener("mousemove",g),Object.keys(c).forEach((function(e){clearTimeout(c[e])})),ni.clearListeners(s.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){i=e},this.setSelectionListener=function(e){o=e}}function Ha(e){var t=e,n=null,i=[];function a(e){n&&n(e.currentTarget)}function r(e){var t=e.which||e.keyCode;13!==t&&32!==t||n&&n(e.currentTarget)}this.startClickcontrol=function(){(i=Fa.selectAsList(t)).forEach((function(e){e.addEventListener("click",a),e.addEventListener("keydown",r)}))},this.destroy=function(){i.forEach((function(e){e.removeEventListener("click",a),e.removeEventListener("keydown",r)}))},this.setSelectionListener=function(e){n=e}}Ba.getInstanceFromConfig=function(e,t,n){return new Ya(t,{selectionListener:(n=n||{}).selectionListener,activeListener:n.activeListener,containerClass:n.containerClass,inputEventSelect:e.seqInputs.filter((function(e){return e.label===I.SELECT}))[0],inputEventNext:e.seqInputs.filter((function(e){return e.label===I.NEXT}))[0],timeoutMs:e.hoverTimeoutMs,demoMode:n.demoMode||e.hoverDisableHoverpane,hideCursor:e.hoverHideCursor})};var Wa=n(57),za=n.n(Wa),Ka={};function Ja(e,t,n,i){var r=this,o=e,s=t,l=n,c=!1,u=!0,d=!1,f=0,p=1e3,h=!0,v=[],m=null,g=null,_=null,y=null,b="",E=null,C="",w=!1,T=null;function A(){if(E=un.instance(),C="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");a.a.isFunction(e.selectionListener)&&(m=e.selectionListener);c=void 0!==e.printCodes&&e.printCodes,u=void 0===e.printColors||e.printColors,d=void 0!==e.colorWholeElement&&e.colorWholeElement,h=void 0===e.markInactive||e.markInactive,v=e.colors||v,f=e.elementCount||0,p=e.timeout||1e3,e.inputEvents.forEach((function(e,t){C+=t+1,E.onInputEvent(e,(function(){r.input(t+1)}))}))}(i),0!==(g=a()(o)).length){var e=g.toArray().map((function(e){return e.id}));if(e.lengthl?t.length:l})),s.assignCodeWords(C,(function(e,t){if(e.name&&(e.codeWord=t,e.element=document.getElementById(e.name),u||c)){var n="";e.codeWord.split("").forEach((function(e){var t=u?I(e):"",i=function(e){if(!e)return"";var t=(n=e,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null);var n,i;return.299*t.r+.587*t.g+.114*t.b>149?"#000000":"#ffffff"}(t),a=(100-5*l)/l+"%",r=c?e:" ";n+='').concat(r,"")}));var i=c?"10px":"3px",r=a()(e.element).width()+"px";a()(e.element).append('
    ').concat(n,"
    "))}})),y=y.filter((function(e){return e.name})),S()}}function S(){d&&y.forEach((function(e){if(0===e.codeWord.indexOf(b)){var t=e.codeWord.substring(b.length)[0];e.element.style.background=I(t)}}))}function N(e){g.removeClass(l);var t=e.map((function(e){return e.id})),n=g.toArray().filter((function(e){return-1===t.indexOf(e.id)}));a()(n).addClass(l)}function I(e){var t=parseInt(e)-1;return v[t]}r.start=function(){w=!0,d&&a()(g).addClass("noanimation"),E.startListening()},r.stop=function(){w=!1,a()(g).find(".huffman-code-visualization").remove(),d&&(a()(g).removeClass("noanimation"),a()(g).css("background","")),E.stopListening()},r.destroy=function(){r.stop(),E.destroy()},r.reinit=function(){w&&(r.stop(),A(),r.start())},r.input=function(e){if(e+="",clearTimeout(T),1===e.length){b+=e,S();var t,n=y.filter((function(e){return e.codeWord===b})).map((function(e){return e.element})),i=y.filter((function(e){return 0===e.codeWord.indexOf(b)})).map((function(e){return e.element}));g.removeClass(s),n[0]?(t=n[0],_=t||_,g.removeClass(s),a()(_).addClass(s),N(g.toArray()),m&&m(n[0])):h&&N(i),(n[0]||0===i.length)&&(N(g.toArray()),b="",S()),p>0&&(T=setTimeout((function(){N(g.toArray()),b="",S()}),p))}},r.getCurrentInput=function(){return b},A()}Ka.getInstanceFromConfig=function(e,t,n,i,a){return new Ja(t,n,i,{printCodes:e.huffShowNumbers,printColors:e.huffShowColors,colorWholeElement:e.huffColorWholeElement,colors:e.huffColors,inputEvents:e.huffInputs,elementCount:e.huffElementCount,timeout:e.huffTimeout,markInactive:e.huffMarkInactive,selectionListener:a})};var Xa={};function qa(e,t,n){var i=this,r=e,s=t,l=!0,c=!1,u=null,d=null,f=null,p={},h=un.instance();function v(e){p[f.id]&&m(p[f.id][e])}function m(e){f=e||f,d.removeClass(s),a()(f).addClass(s)}i.start=function(){m(d[0]),h.startListening()},i.destroy=function(){d.removeClass(s),h.destroy()},i.left=function(){v("left")},i.right=function(){v("right")},i.up=function(){v("up")},i.down=function(){v("down")},i.select=function(){u&&u(f),c&&m(d[0])},0!==(d=a()(r)).length&&(setTimeout((function(){d.toArray().forEach((function(e){var t=d.toArray().filter((function(t){return t.id!==e.id})),n=e.getBoundingClientRect(),i=function(e,t,n,i){return e>0&&t>0&&n>0&&i>0},a=function(e,t,n,i){return e<0&&t<0&&n<0&&i<0},r=t.map((function(e){var t=e.getBoundingClientRect(),r=n.left-t.right,o=n.right-t.left,s=n.right-t.right,l=n.left-t.left,c=n.top-t.bottom,u=n.bottom-t.top,d=n.top-t.top,f=n.bottom-t.bottom,p=Math.min(Math.abs(r),Math.abs(o),Math.abs(s),Math.abs(l)),h=Math.min(Math.abs(c),Math.abs(u),Math.abs(d),Math.abs(f));return{element:e,left:i(r,o,s,l),right:a(r,o,s,l),up:i(c,u,d,f),down:a(c,u,d,f),absDiffX:p,absDiffY:h,absDiff:p+h}}));function s(e,t,n,i,a){var r=e.filter((function(e){return e[t]}));if(r.length>0)return r[0].element;if(l){var s=Math.min.apply(Math,o()(e.map((function(e){return e[a]})))),c=e.filter((function(e){return e[a]===s&&e[n]})),u=Math.max.apply(Math,o()(c.map((function(e){return e[i]})))),d=c.filter((function(e){return e[i]===u}))[0];return d?d.element:null}return null}var c=s(r=r.sort((function(e,t){return e.absDiff-t.absDiff})),"left","right","absDiffX","absDiffY"),u=s(r,"right","left","absDiffX","absDiffY"),f=s(r,"up","down","absDiffY","absDiffX"),h=s(r,"down","up","absDiffY","absDiffX");p[e.id]={element:e,left:c,right:u,up:f,down:h}}))}),200),function(e){e&&(a.a.isFunction(e.selectionListener)&&(u=e.selectionListener),l=void 0!==e.wrapAround&&e.wrapAround,c=void 0!==e.resetToStart&&e.resetToStart,h.onInputEvent(e.inputEventLeft,i.left),h.onInputEvent(e.inputEventRight,i.right),h.onInputEvent(e.inputEventUp,i.up),h.onInputEvent(e.inputEventDown,i.down),h.onInputEvent(e.inputEventSelect,i.select))}(n))}Xa.getInstanceFromConfig=function(e,t,n,i){return new qa(t,n,{inputEventLeft:e.dirInputs.filter((function(e){return e.label===I.LEFT}))[0],inputEventRight:e.dirInputs.filter((function(e){return e.label===I.RIGHT}))[0],inputEventUp:e.dirInputs.filter((function(e){return e.label===I.UP}))[0],inputEventDown:e.dirInputs.filter((function(e){return e.label===I.DOWN}))[0],inputEventSelect:e.dirInputs.filter((function(e){return e.label===I.SELECT}))[0],wrapAround:e.dirWrapAround,resetToStart:e.dirResetToStart,selectionListener:i})};var Za={};function Qa(e,t){var n=this,i=e,r=null,o=null,s=null,l=null,c=null,u=0;function d(e){l.removeClass(r),a()(e).addClass(r),s&&s(e)}n.start=function(){c.startListening(),d(l[0]),u=0},n.destroy=function(){c.destroy(),l.removeClass(r)},n.next=function(){++u>l.length-1&&(u=0),d(l[u])},n.prev=function(){--u<0&&(u=l.length-1),d(l[u])},n.select=function(){o&&o(l[u])},c=un.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(a.a.isFunction(e.selectionListener)&&(o=e.selectionListener),a.a.isFunction(e.activeListener)&&(s=e.activeListener),r=e.activeClass||"scanFocus",c.onInputEvent(e.inputEventSelect,(function(){n.select()})),c.onInputEvent(e.inputEventNext,(function(){n.next()})),c.onInputEvent(e.inputEventPrev,(function(){n.prev()})))}(t),l=a()(i)}Za.getInstanceFromConfig=function(e,t,n){return new Qa(t,{selectionListener:n.selectionListener,activeListener:n.activeListener,inputEventSelect:e.seqInputs.filter((function(e){return e.label===I.SELECT}))[0],inputEventNext:e.seqInputs.filter((function(e){return e.label===I.NEXT_ELEMENT}))[0],inputEventPrev:e.seqInputs.filter((function(e){return e.label===I.PREVIOUS_ELEMENT}))[0]})};var er=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Scanning input method: 1-2 input events // Eingabemethode Scanning: 1-2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}],attrs:{type:"checkbox",id:"enableScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanEnabled)?e._i(e.inputConfig.scanEnabled,null)>-1:e.inputConfig.scanEnabled},on:{change:function(t){var n=e.inputConfig.scanEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableScanning","data-i18n":""}},[e._v("Enable Scanning // Scanning aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanEnabled,expression:"inputConfig.scanEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.NEXT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.scanInputs,callback:function(t){e.$set(e.inputConfig,"scanInputs",t)},expression:"inputConfig.scanInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanVertical,expression:"inputConfig.scanVertical"}],attrs:{type:"checkbox",id:"chkVerticalScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanVertical)?e._i(e.inputConfig.scanVertical,null)>-1:e.inputConfig.scanVertical},on:{change:function(t){var n=e.inputConfig.scanVertical,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanVertical",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanVertical",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanVertical",a)}}}),e._v(" "),n("label",{attrs:{for:"chkVerticalScanning","data-i18n":""}},[e._v("Vertical scanning // Scanning vertikal")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanBinary,expression:"inputConfig.scanBinary"}],attrs:{type:"checkbox",id:"chkBinaryScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanBinary)?e._i(e.inputConfig.scanBinary,null)>-1:e.inputConfig.scanBinary},on:{change:function(t){var n=e.inputConfig.scanBinary,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanBinary",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanBinary",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanBinary",a)}}}),e._v(" "),n("label",{attrs:{for:"chkBinaryScanning","data-i18n":""}},[e._v("Binary scanning // Scanning binär")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.touchScanning,expression:"touchScanning"}],attrs:{type:"checkbox",id:"chkTouchScanning"},domProps:{checked:Array.isArray(e.touchScanning)?e._i(e.touchScanning,null)>-1:e.touchScanning},on:{change:[function(t){var n=e.touchScanning,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.touchScanning=n.concat([null])):r>-1&&(e.touchScanning=n.slice(0,r).concat(n.slice(r+1)))}else e.touchScanning=a},e.changeTouchScanning]}}),e._v(" "),n("label",{attrs:{for:"chkTouchScanning","data-i18n":""}},[e._v("Scanning-selection by mouse click or tap // Scanning-Auswahl durch Mausklick oder tippen")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],attrs:{type:"checkbox",id:"chkAutoScanning"},domProps:{checked:Array.isArray(e.inputConfig.scanAuto)?e._i(e.inputConfig.scanAuto,null)>-1:e.inputConfig.scanAuto},on:{change:function(t){var n=e.inputConfig.scanAuto,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"scanAuto",n.concat([null])):r>-1&&e.$set(e.inputConfig,"scanAuto",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"scanAuto",a)}}}),e._v(" "),n("label",{attrs:{for:"chkAutoScanning","data-i18n":""}},[e._v("Automatic (timed) scanning // Automatisches (zeitgesteuertes) Scanning")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inScanTime","data-i18n":""}},[e._v("Scanning Time (ms) // Scanning Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inScanTime",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutMs,expression:"inputConfig.scanTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"100",max:"3000",step:"100"},domProps:{value:e.inputConfig.scanTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.scanAuto,expression:"inputConfig.scanAuto"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inFirstElement","data-i18n":""}},[e._v("Time factor first element // Zeit-Faktor erstes Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"range",id:"inFirstElement",min:"1",max:"5",step:"0.1"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{__r:function(t){e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.scanTimeoutFirstElementFactor,expression:"inputConfig.scanTimeoutFirstElementFactor",modifiers:{number:!0}}],attrs:{type:"number",min:"1",max:"5",step:"0.5"},domProps:{value:e.inputConfig.scanTimeoutFirstElementFactor},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"scanTimeoutFirstElementFactor",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};er._withStripped=!0;var tr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("ul",e._l(e.inputs,(function(t,i){return n("li",[n("div",{staticClass:"row nomargin"},[n("label",{staticClass:"three columns input-label",attrs:{for:t.label+i}},[n("span",[e._v(e._s(e._f("translate")(t.label)))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.label===e.InputConfig.GENERAL_INPUT,expression:"input.label === InputConfig.GENERAL_INPUT"}]},[e._v(e._s(i+1))])]),e._v(" "),n("select",{staticClass:"five columns",attrs:{id:t.label+i},on:{change:function(t){return e.typeChange(i,t.target.value)}}},[e._m(0,!0),e._v(" "),e._l(e.inputEventTypes,(function(i){return n("option",{domProps:{value:i.getModelName(),selected:i.getModelName()===t.modelName}},[e._v("\n "+e._s(e._f("translate")(i.getModelName()))+"\n ")])}))],2),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.errorInputs.indexOf(t.label)>-1,expression:"errorInputs.indexOf(input.label) > -1"}],staticClass:"two columns"},[n("i",{staticClass:"warn fas fa-exclamation-triangle"})])]),e._v(" "),t.modelName===e.InputEventKey.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordKey(t,i)}}},[n("i",{staticClass:"fas fa-keyboard"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("Record key // Taste aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}],attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")("press key ... // Taste drücken ...")))])]),e._v(" "),n("span",{staticClass:"four columns"},[n("b",{attrs:{"data-i18n":""}},[e._v("Current key: // Aktuelle Taste:")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.keyCode,expression:"!input.keyCode"}],attrs:{"data-i18n":""}},[e._v("(no key) // (keine Taste)")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.keyCode,expression:"input.keyCode"}]},[e._v(e._s(t.keyName+" ("+t.keyCode+")"))])])]),e._v(" "),n("div",{staticClass:"row"},[n("accordion",{staticClass:"nine columns offset-by-three",attrs:{"acc-label":"more // mehr"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inTimeout"+i}},[e._v("Timeout (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:t.timeout,expression:"input.timeout",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inTimeout"+i,type:"number",min:"0",max:"5000",step:"100"},domProps:{value:t.timeout},on:{input:[function(n){n.target.composing||e.$set(t,"timeout",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Repetitions // Wiederholungen")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:0===t.holdDuration,expression:"input.holdDuration === 0"},{name:"model",rawName:"v-model.number",value:t.repeat,expression:"input.repeat",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"1",max:"9"},domProps:{value:t.repeat},on:{input:[function(n){n.target.composing||e.$set(t,"repeat",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.holdDuration>0,expression:"input.holdDuration > 0"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if hold duration is set. // deaktiviert bei gesetzter Haltedauer.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.holdDuration=0,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"one-third column",attrs:{for:"inRepeat"+i,"data-i18n":""}},[e._v("Hold duration (ms) // Haltedauer (ms)")]),e._v(" "),n("input",{directives:[{name:"show",rawName:"v-show",value:1===t.repeat,expression:"input.repeat === 1"},{name:"model",rawName:"v-model.number",value:t.holdDuration,expression:"input.holdDuration",modifiers:{number:!0}}],staticClass:"two-thirds column",attrs:{id:"inRepeat"+i,type:"number",min:"0",max:"5000",step:"100",disabled:t.repeat>1},domProps:{value:t.holdDuration},on:{input:[function(n){n.target.composing||e.$set(t,"holdDuration",e._n(n.target.value))},e.modelChanged],blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.repeat>1,expression:"input.repeat > 1"}],staticClass:"two-thirds column"},[n("span",{attrs:{"data-i18n":""}},[e._v("disabled if repetitions are set. // deaktiviert bei gesetzten Wiederholungen.")]),e._v(" "),n("a",{attrs:{href:"javascript:;","data-i18n":""},on:{click:function(n){t.repeat=1,e.modelChanged()}}},[e._v("Enable // Aktivieren")])])])])],1)]):e._e(),e._v(" "),t.modelName===e.InputEventARE.getModelName()?n("div",[n("div",{staticClass:"row"},[n("button",{staticClass:"five columns offset-by-three",on:{click:function(n){return e.recordAREEvent(t,i)}}},[n("i",{staticClass:"fas fa-bolt"}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.keyRecording[t.label+i],expression:"!keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("Record ARE event // ARE Event aufnehmen")))]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.keyRecording[t.label+i],expression:"keyRecording[input.label+index]"}]},[e._v(e._s(e._f("translate")("waiting for event ... // warte auf Event ...")))])]),e._v(" "),n("label",{staticClass:"four columns",attrs:{for:"inputAreUrl"}},[e._v("ARE URL")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.areURL,expression:"input.areURL"}],staticClass:"four columns",attrs:{id:"inputAreUrl",type:"text",placeholder:e._f("translate")("empty = automatic // leer = automatisch")},domProps:{value:t.areURL},on:{change:function(n){return e.changedAreURL(t)},input:[function(n){n.target.composing||e.$set(t,"areURL",n.target.value)},function(n){e.areError[t.label+i]=!1}]}})]),e._v(" "),n("div",{staticClass:"row"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.areError[t.label+i],expression:"areError[input.label+index]"}],staticClass:"nine columns offset-by-three"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v("\n "+e._s(e._f("translate")("Error connecting to ARE! // Verbindung zu ARE konnte nicht hergestellt werden!"))+" "+e._s("("+e.areService.getRestURL(t.areURL)+")")+"\n ")])]),e._v(" "),n("div",{staticClass:"row"},e._l(t.eventNames,(function(i,a){return n("span",{staticClass:"nine columns offset-by-three"},[n("b",[e._v("Event:")]),e._v(" "+e._s(e.formatAreEvent(i))+" "),n("button",{staticStyle:{"margin-left":"1em",padding:"0 0.5em"},attrs:{title:e._f("translate")("Delete // Löschen")},on:{click:function(n){return e.removeAREEvent(t,a)}}},[n("i",{staticClass:"fas fa-trash"})])])})),0)]):e._e()])})),0)])};tr._withStripped=!0;var nr={components:{Accordion:Dn},props:{value:Array,inputLabels:Array,canAdd:Boolean,maxElements:Number,errorInputs:Array,minInputs:Number,maxInputs:Number},watch:{value:{handler:function(e){this.initWithValue(e)},deep:!0}},data:function(){return{inputs:[],inputEventTypes:I.getInputEventTypes(),InputEventKey:T,InputEventARE:S,InputConfig:I,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:un.instance(),lastInitTime:null,areService:an}},methods:{typeChange:function(e,t){var n=this.inputs[e],i=this.inputs.filter((function(e){return!e.modelName}));if(!t)return n.modelName="",this.minInputs&&this.inputs.length>this.minInputs&&i.length>=1&&this.inputs.splice(e,1),void this.modelChanged();var a=I.getInputEventInstance(t,{label:n.label});nn.a.set(this.inputs,e,JSON.parse(JSON.stringify(a))),this.maxInputs&&this.inputs.length "+t.targetComponentId},changedAreURL:function(e){e.areURL&&(e.areURL=an.getRestURL(e.areURL))},modelChanged:function(){var e=this.inputs.filter((function(e){return!!e.modelName&&I.getInputEventInstance(e.modelName,e).isValid()})),t=JSON.parse(JSON.stringify(e));JSON.stringify(t)!==JSON.stringify(this.lastEmitValue)&&(this.lastInitTime=(new Date).getTime(),this.$emit("input",t),this.lastEmitValue=t)},addInput:function(e){e=e||1;for(var t=0;t0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"scanInputs",JSON.parse(JSON.stringify(I.DEFAULT_SCAN_INPUTS))),this.inputChanged()},changeTouchScanning:function(){this.inputConfig.mouseclickEnabled=!this.touchScanning},initTest:function(){var e=this;setTimeout((function(){e.stopTest(),e.inputConfig.scanEnabled&&(e.scanner=Va.getInstanceFromConfig(e.inputConfig,".area-element-inner","active","inactive"),e.scanner.setSelectionListener((function(t){e.selectedTestElement=t})),e.scanner.startScanning())}),100)},stopTest:function(){this.scanner&&this.scanner.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled})),Kt.setHelpLocation("04_input_options","#scanning")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},ur=(n(105),_n(cr,er,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header"}},[this._v("\n Scanning\n ")])])}],!1,null,"3cc44ad7",null));ur.options.__file="src/vue-components/modals/input/scanningModal.vue";var dr=ur.exports,fr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.mouseclickEnabled,expression:"inputConfig.mouseclickEnabled"}],attrs:{type:"checkbox",id:"enableClick"},domProps:{checked:Array.isArray(e.inputConfig.mouseclickEnabled)?e._i(e.inputConfig.mouseclickEnabled,null)>-1:e.inputConfig.mouseclickEnabled},on:{change:function(t){var n=e.inputConfig.mouseclickEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"mouseclickEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"mouseclickEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"mouseclickEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableClick","data-i18n":""}},[e._v("Select with mouse click (or tap) // Auswahl mit Mausklick (oder Antippen)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],attrs:{type:"checkbox",id:"enableHover"},domProps:{checked:Array.isArray(e.inputConfig.hoverEnabled)?e._i(e.inputConfig.hoverEnabled,null)>-1:e.inputConfig.hoverEnabled},on:{change:function(t){var n=e.inputConfig.hoverEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHover","data-i18n":""}},[e._v("Enable hovering // Hovering aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inHoverTime","data-i18n":""}},[e._v("Hover Time (ms) // Hovering Zeit (ms)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"range",id:"inHoverTime",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{__r:function(t){e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.hoverTimeoutMs,expression:"inputConfig.hoverTimeoutMs",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"5000",step:"100"},domProps:{value:e.inputConfig.hoverTimeoutMs},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"hoverTimeoutMs",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.hoverEnabled,expression:"inputConfig.hoverEnabled"}],staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.hoverHideCursor,expression:"inputConfig.hoverHideCursor"}],attrs:{type:"checkbox",id:"hoverHideCursor"},domProps:{checked:Array.isArray(e.inputConfig.hoverHideCursor)?e._i(e.inputConfig.hoverHideCursor,null)>-1:e.inputConfig.hoverHideCursor},on:{change:function(t){var n=e.inputConfig.hoverHideCursor,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverHideCursor",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverHideCursor",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverHideCursor",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"hoverHideCursor","data-i18n":""}},[e._v("Hide Cursor // Cursor verstecken")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])]),e._v(" "),n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.hoverDisableHoverpane,expression:"inputConfig.hoverDisableHoverpane"}],attrs:{type:"checkbox",id:"chkDisableHoverpane"},domProps:{checked:Array.isArray(e.inputConfig.hoverDisableHoverpane)?e._i(e.inputConfig.hoverDisableHoverpane,null)>-1:e.inputConfig.hoverDisableHoverpane},on:{change:function(t){var n=e.inputConfig.hoverDisableHoverpane,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.concat([null])):r>-1&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"hoverDisableHoverpane",a)}}}),e._v(" "),n("label",{attrs:{for:"chkDisableHoverpane","data-i18n":""}},[e._v("Disable hover pane // Hover-Fläche deaktivieren")])])]),e._v(" "),n("accordion",{staticClass:"row",attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1)],1):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};fr._withStripped=!0;var pr=_n({props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,clicker:null,hover:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")}))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},initTest:function(){var e=this;setTimeout((function(){var t=e;e.stopTest(),t.inputConfig.hoverEnabled&&(t.hover=Ba.getInstanceFromConfig(t.inputConfig,".area-element-inner",{demoMode:!0,containerClass:".area .area-row"}),t.hover.setSelectionListener((function(e){t.selectedTestElement=e})),t.hover.startHovering()),t.inputConfig.mouseclickEnabled&&(t.clicker=new Ha(".area-element-inner"),t.clicker.setSelectionListener((function(e){t.selectedTestElement=e})),t.clicker.startClickcontrol())}),100)},stopTest:function(){this.clicker&&this.clicker.destroy(),this.hover&&this.hover.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#mousetouch-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},fr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Mouse/Touch input // Maus-/Toucheingabe")])])}],!1,null,"33ee2cbd",null);pr.options.__file="src/vue-components/modals/input/mouseModal.vue";var hr=pr.exports,vr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Direction input method: 2-5 input events // Richtungs-Eingabe: 2-5 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}],attrs:{type:"checkbox",id:"enableDirinput"},domProps:{checked:Array.isArray(e.inputConfig.dirEnabled)?e._i(e.inputConfig.dirEnabled,null)>-1:e.inputConfig.dirEnabled},on:{change:function(t){var n=e.inputConfig.dirEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableDirinput","data-i18n":""}},[e._v("Enable direction input // Richtungs-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.dirEnabled,expression:"inputConfig.dirEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.SELECT,e.InputConfig.RIGHT,e.InputConfig.DOWN,e.InputConfig.LEFT,e.InputConfig.UP],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.dirInputs,callback:function(t){e.$set(e.inputConfig,"dirInputs",t)},expression:"inputConfig.dirInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirWrapAround,expression:"inputConfig.dirWrapAround"}],attrs:{type:"checkbox",id:"chkWrapAround"},domProps:{checked:Array.isArray(e.inputConfig.dirWrapAround)?e._i(e.inputConfig.dirWrapAround,null)>-1:e.inputConfig.dirWrapAround},on:{change:function(t){var n=e.inputConfig.dirWrapAround,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirWrapAround",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirWrapAround",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirWrapAround",a)}}}),e._v(" "),n("label",{attrs:{for:"chkWrapAround","data-i18n":""}},[e._v("Wrap around (jump to first element after last element) // Enden verbinden (springe zu erstem Element nach letztem Element)")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.dirResetToStart,expression:"inputConfig.dirResetToStart"}],attrs:{type:"checkbox",id:"chkReset"},domProps:{checked:Array.isArray(e.inputConfig.dirResetToStart)?e._i(e.inputConfig.dirResetToStart,null)>-1:e.inputConfig.dirResetToStart},on:{change:function(t){var n=e.inputConfig.dirResetToStart,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"dirResetToStart",n.concat([null])):r>-1&&e.$set(e.inputConfig,"dirResetToStart",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"dirResetToStart",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReset","data-i18n":""}},[e._v("Go to start position after select // Zu Startposition nach Auswahl")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};vr._withStripped=!0;var mr={props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,error:"",errorInputs:[],dirInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},validateInputs:function(){return this.errorInputs=[],this.error="",!this.inputConfig.dirEnabled||(0===this.inputConfig.dirInputs.filter((function(e){return e.label===I.SELECT})).length&&this.errorInputs.push(I.SELECT),this.inputConfig.dirInputs.length<2&&this.errorInputs.push(I.RIGHT),!(this.errorInputs.length>0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"dirInputs",JSON.parse(JSON.stringify(I.DEFAULT_DIR_INPUTS))),this.inputChanged()},initTest:function(){var e=this;setTimeout((function(){var t=e;t.stopTest(),t.inputConfig.dirEnabled&&(t.dirInput=Xa.getInstanceFromConfig(t.inputConfig,".area-element-inner","active",(function(e){t.selectedTestElement=e})),t.dirInput.start())}),100)},stopTest:function(){this.dirInput&&this.dirInput.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#direction-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},gr=(n(107),_n(mr,vr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Direction Input // Richtungs-Eingabe")])])}],!1,null,"4c9162fd",null));gr.options.__file="src/vue-components/modals/input/directionInputModal.vue";var _r=gr.exports,yr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Huffman input method: 2 or more input events // Huffman-Eingabe: 2 oder mehr Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}],attrs:{type:"checkbox",id:"enableHuffinput"},domProps:{checked:Array.isArray(e.inputConfig.huffEnabled)?e._i(e.inputConfig.huffEnabled,null)>-1:e.inputConfig.huffEnabled},on:{change:function(t){var n=e.inputConfig.huffEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableHuffinput","data-i18n":""}},[e._v("Enable huffman input // Huffman-Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.huffEnabled,expression:"inputConfig.huffEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"min-inputs":2,"max-inputs":9,"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.huffInputs,callback:function(t){e.$set(e.inputConfig,"huffInputs",t)},expression:"inputConfig.huffInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowNumbers,expression:"inputConfig.huffShowNumbers"}],attrs:{type:"checkbox",id:"chkNumbers"},domProps:{checked:Array.isArray(e.inputConfig.huffShowNumbers)?e._i(e.inputConfig.huffShowNumbers,null)>-1:e.inputConfig.huffShowNumbers},on:{change:function(t){var n=e.inputConfig.huffShowNumbers,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowNumbers",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowNumbers",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowNumbers",a)}}}),e._v(" "),n("label",{attrs:{for:"chkNumbers","data-i18n":""}},[e._v("Show numbers // Zeige Nummern")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffShowColors,expression:"inputConfig.huffShowColors"}],attrs:{type:"checkbox",id:"chkColors"},domProps:{checked:Array.isArray(e.inputConfig.huffShowColors)?e._i(e.inputConfig.huffShowColors,null)>-1:e.inputConfig.huffShowColors},on:{change:function(t){var n=e.inputConfig.huffShowColors,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffShowColors",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffShowColors",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffShowColors",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColors","data-i18n":""}},[e._v("Show colors // Zeige Farben")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColorWholeElement,expression:"inputConfig.huffColorWholeElement"}],attrs:{type:"checkbox",id:"chkColorWholeElement"},domProps:{checked:Array.isArray(e.inputConfig.huffColorWholeElement)?e._i(e.inputConfig.huffColorWholeElement,null)>-1:e.inputConfig.huffColorWholeElement},on:{change:function(t){var n=e.inputConfig.huffColorWholeElement,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffColorWholeElement",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffColorWholeElement",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffColorWholeElement",a)}}}),e._v(" "),n("label",{attrs:{for:"chkColorWholeElement","data-i18n":""}},[e._v("Color whole element // Färbe ganzes Element")])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffMarkInactive,expression:"inputConfig.huffMarkInactive"}],attrs:{type:"checkbox",id:"chkMarkInactive"},domProps:{checked:Array.isArray(e.inputConfig.huffMarkInactive)?e._i(e.inputConfig.huffMarkInactive,null)>-1:e.inputConfig.huffMarkInactive},on:{change:function(t){var n=e.inputConfig.huffMarkInactive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"huffMarkInactive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"huffMarkInactive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"huffMarkInactive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkMarkInactive","data-i18n":""}},[e._v("Mark inactive elements // Markiere inaktive Elemente")])])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inTimeout","data-i18n":""}},[e._v("Timeout in ms (0 means disabled) // Timeout in ms (0 ist deaktiviert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"range",id:"inTimeout",min:"0",max:"10000",step:"100"},domProps:{value:e.inputConfig.huffTimeout},on:{__r:function(t){e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffTimeout,expression:"inputConfig.huffTimeout",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"10000",step:"200"},domProps:{value:e.inputConfig.huffTimeout},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffTimeout",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"four columns",attrs:{for:"inElementCount","data-i18n":""}},[e._v("Number of elements (0 means automatic) // Anzahl der Elemente (0 ist automatisch)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"range",min:"0",max:"300",id:"inElementCount"},domProps:{value:e.inputConfig.huffElementCount},on:{__r:function(t){e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}}),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.inputConfig.huffElementCount,expression:"inputConfig.huffElementCount",modifiers:{number:!0}}],attrs:{type:"number",min:"0",max:"300",id:"inElementCount2"},domProps:{value:e.inputConfig.huffElementCount},on:{input:function(t){t.target.composing||e.$set(e.inputConfig,"huffElementCount",e._n(t.target.value))},blur:function(t){return e.$forceUpdate()}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},e._l(e.inputConfig.huffInputs.length,(function(t){return n("div",[n("label",{staticStyle:{"margin-right":"1em"},attrs:{for:"colorInput"+t}},[n("span",{attrs:{"data-i18n":""}},[e._v("Color // Farbe")]),e._v(" "+e._s(t))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.huffColors[t-1],expression:"inputConfig.huffColors[i-1]"}],attrs:{id:"colorInput"+t,type:"color"},domProps:{value:e.inputConfig.huffColors[t-1]},on:{input:function(n){n.target.composing||e.$set(e.inputConfig.huffColors,t-1,n.target.value)}}})])})),0),e._v(" "),n("button",{staticClass:"four columns",staticStyle:{"margin-top":"1em"},attrs:{"data-i18n":""},on:{click:function(t){e.inputConfig.huffColors=JSON.parse(JSON.stringify(e.InputConfig.DEFAULT_HUFF_COLORS))}}},[e._v("Reset colors // Farben zurücksetzen")])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};yr._withStripped=!0;var br={props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,error:"",errorInputs:[],huffInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.validateInputs()&&(this.inputConfig.huffElementCount=this.inputConfig.huffElementCount||0,this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},validateInputs:function(){return this.errorInputs=[],this.error="",!this.inputConfig.huffEnabled||(this.inputConfig.huffInputs.length<2&&this.errorInputs.push(I.GENERAL_INPUT),!(this.errorInputs.length>0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"huffInputs",JSON.parse(JSON.stringify(I.DEFAULT_HUFF_INPUTS))),this.inputChanged()},initTest:function(){var e=this;setTimeout((function(){var t=e;t.stopTest(),t.inputConfig.huffEnabled&&(e.huffInput=Ka.getInstanceFromConfig(e.inputConfig,".area-element-inner","active","inactive",(function(t){e.selectedTestElement=t})),e.huffInput.start())}),100)},stopTest:function(){this.huffInput&&this.huffInput.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#huffman-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},Er=(n(109),_n(br,yr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Huffman Input // Huffman-Eingabe")])])}],!1,null,"fff4292a",null));Er.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var Cr=Er.exports,wr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keydown:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.cancel():null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save()}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),e.inputConfig?n("div",{staticClass:"modal-body"},[n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Sequential input method: 2 input events // Sequentielle Eingabe: 2 Eingabekanäle")]),e._v(" "),n("a",{attrs:{"aria-label":"Help",href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas blue fa-question-circle"})])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}],attrs:{type:"checkbox",id:"enableSeqinput"},domProps:{checked:Array.isArray(e.inputConfig.seqEnabled)?e._i(e.inputConfig.seqEnabled,null)>-1:e.inputConfig.seqEnabled},on:{change:function(t){var n=e.inputConfig.seqEnabled,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"seqEnabled",n.concat([null])):r>-1&&e.$set(e.inputConfig,"seqEnabled",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"seqEnabled",a)}}}),e._v(" "),n("label",{staticClass:"inline",attrs:{for:"enableSeqinput","data-i18n":""}},[e._v("Enable sequential input // Sequentielle Eingabe aktivieren")])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputConfig.seqEnabled,expression:"inputConfig.seqEnabled"}]},[n("accordion",{staticClass:"row",attrs:{"acc-label":"Input // Eingabe","acc-open":"true","acc-label-type":"h2","acc-background-color":"white"}},[n("input-event-list",{attrs:{"input-labels":[e.InputConfig.NEXT_ELEMENT,e.InputConfig.PREVIOUS_ELEMENT,e.InputConfig.SELECT],"error-inputs":e.errorInputs},on:{input:e.inputChanged},model:{value:e.inputConfig.seqInputs,callback:function(t){e.$set(e.inputConfig,"seqInputs",t)},expression:"inputConfig.seqInputs"}}),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"twelve columns",attrs:{"data-i18n":""},on:{click:e.resetInput}},[e._v("Reset to default input configuration // Auf Standard Eingabe-Konfiguration zurücksetzen")])])],1),e._v(" "),n("accordion",{attrs:{"acc-label":"ADVANCED_SETTINGS","acc-label-type":"h2","acc-background-color":"white"}},[n("div",{staticClass:"row",staticStyle:{"margin-top":"0"}},[n("div",{staticClass:"twelve columns"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.inputConfig.globalReadActive,expression:"inputConfig.globalReadActive"}],attrs:{type:"checkbox",id:"chkReadActive"},domProps:{checked:Array.isArray(e.inputConfig.globalReadActive)?e._i(e.inputConfig.globalReadActive,null)>-1:e.inputConfig.globalReadActive},on:{change:function(t){var n=e.inputConfig.globalReadActive,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):r>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,r).concat(n.slice(r+1)))}else e.$set(e.inputConfig,"globalReadActive",a)}}}),e._v(" "),n("label",{attrs:{for:"chkReadActive","data-i18n":""}},[e._v("Read out active element // Aktives Element vorlesen")])])])]),e._v(" "),n("accordion",{attrs:{"acc-label":"TEST_CONFIGURATION","acc-label-type":"h2","acc-background-color":"white"},on:{open:function(t){e.testOpen=!0,e.initTest()},close:function(t){e.testOpen=!1,e.stopTest()}}},[n("test-area",{attrs:{"selected-element":e.selectedTestElement}})],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.error,expression:"error"}],staticClass:"warn"},[n("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.error)+"\n ")])],1)]):e._e(),e._v(" "),n("div",{staticClass:"modal-footer"},[n("div",{staticClass:"button-container row"},[n("button",{staticClass:"four columns offset-by-four",on:{click:function(t){return e.cancel()}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Cancel // Abbrechen")])]),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){return e.save()}}},[n("i",{staticClass:"fas fa-check"}),e._v(" "),n("span",[e._v("OK")])])])])])])])])};wr._withStripped=!0;var Tr={props:[],components:{Accordion:Dn,InputEventList:ar,TestArea:lr},data:function(){return{inputConfig:null,metadata:null,InputConfig:I,error:"",errorInputs:[],seqInput:null,testOpen:!1,selectedTestElement:null}},watch:{inputConfig:{handler:function(e){this.testOpen&&this.initTest(e)},deep:!0}},methods:{save:function(){var e=this;this.validateInputs()&&(this.metadata.inputConfig=this.inputConfig,Wt.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){Kt.openHelp()},validateInputs:function(){return this.errorInputs=[],this.error="",!this.inputConfig.seqEnabled||(0===this.inputConfig.seqInputs.filter((function(e){return e.label===I.NEXT_ELEMENT})).length&&this.errorInputs.push(I.NEXT_ELEMENT),0===this.inputConfig.seqInputs.filter((function(e){return e.label===I.SELECT})).length&&this.errorInputs.push(I.SELECT),!(this.errorInputs.length>0)||(this.error=U.translate("Please specify input modalities // Bitte Eingabemodalitäten definieren"),!1))},inputChanged:function(){this.error&&this.validateInputs()},resetInput:function(){this.$set(this.inputConfig,"seqInputs",JSON.parse(JSON.stringify(I.DEFAULT_SEQ_INPUTS))),this.inputChanged()},initTest:function(){var e=this;setTimeout((function(){var t=e;t.stopTest(),t.inputConfig.seqEnabled&&(t.seqInput=Za.getInstanceFromConfig(t.inputConfig,".area-element-inner",{selectionListener:function(e){t.selectedTestElement=e}}),t.seqInput.start())}),100)},stopTest:function(){this.seqInput&&this.seqInput.destroy()}},mounted:function(){var e=this;un.pauseAll(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),Kt.setHelpLocation("04_input_options","#sequential-input")},updated:function(){U.initDomI18n()},beforeDestroy:function(){Kt.revertToLastLocation(),this.stopTest(),un.resumeAll()}},Ar=(n(111),_n(Tr,wr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("Sequential Input // Sequentielle Eingabe")])])}],!1,null,"071e6452",null));Ar.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var Sr=Ar.exports,Nr=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body"},[n("div",{staticClass:"number-row",staticStyle:{"text-align":"center","margin-bottom":"1em"}},[n("span",{attrs:{"data-i18n":""}},[e._v("Input passcode // PIN eingeben")]),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("(use buttons or keyboard) // (verwenden Sie Buttons oder Tastatur)")]),n("br"),e._v(" "),n("span",{staticStyle:{"font-size":"3em"},attrs:{"aria-hidden":"true"}},[e._l(e.inputPasscode.length,(function(t){return n("span",[e._v("●")])})),e._v(" "),e._l(Math.max(0,e.passcode.length-e.inputPasscode.length),(function(t){return n("span",[e._v("_")])}))],2)]),e._v(" "),n("div",{staticClass:"number-row"},e._l([1,2,3],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([4,5,6],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},e._l([7,8,9],(function(t){return n("button",{on:{click:function(n){return e.inputDigit(t)}}},[e._v(e._s(t))])})),0),e._v(" "),n("div",{staticClass:"number-row"},[n("button",{staticStyle:{"margin-left":"33%"},on:{click:function(t){return e.inputDigit(0)}}},[e._v("0")])])]),e._v(" "),n("div",{staticClass:"modal-footer"})])])])])};Nr._withStripped=!0;var Ir={props:[],data:function(){return{passcode:D.getUnlockPasscode(),inputPasscode:"",timeoutHandler:null,masterkeyPossible:!0,timeoutMasterkeyHandler:null,keyHandler:null}},methods:{inputDigit:function(e){this.resetTimeout(),this.inputPasscode=this.inputPasscode+e,this.inputPasscode===this.passcode?(this.$emit("unlock"),this.$emit("close")):!this.masterkeyPossible&&this.inputPasscode.length>=this.passcode.length?this.$emit("close"):this.masterkeyPossible&&10===this.inputPasscode.length&&(this.$emit("unlock"),this.$emit("close"))},resetTimeout:function(){var e=this;clearTimeout(this.timeoutHandler),clearTimeout(this.timeoutMasterkeyHandler),this.timeoutHandler=setTimeout((function(){e.$emit("close")}),5e3),this.timeoutMasterkeyHandler=setTimeout((function(){e.masterkeyPossible=!1}),500)}},mounted:function(){var e=this;this.keyHandler=un.instance(),this.keyHandler.onAnyKey((function(t){var n=t-48;n>=0&&n<=9&&e.inputDigit(n)})),this.keyHandler.startListening(),U.initDomI18n(),this.resetTimeout()},beforeDestroy:function(){this.keyHandler.destroy()}},kr=(n(113),_n(Ir,Nr,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"modal-header"},[t("h1",{attrs:{name:"header","data-i18n":""}},[this._v("\n Unlock application // Anwendung entsperren\n ")])])}],!1,null,"1e4b04a9",null));kr.options.__file="src/vue-components/modals/unlockModal.vue";var Or=kr.exports,Lr=null,xr=null,Dr={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL",MODAL_UNLOCK:"MODAL_UNLOCK"};function Rr(){Lr&&window.removeEventListener("resize",Lr.resizeListener,!0),Lr&&a()(document).off(s.EVENT_GRID_RESIZE,Lr.resizeListener),Lr&&Lr.scanner&&Lr.scanner.destroy(),Lr&&Lr.hover&&Lr.hover.destroy(),Lr&&Lr.clicker&&Lr.clicker.destroy(),Lr&&Lr.directionInput&&Lr.directionInput.destroy(),Lr&&Lr.huffmanInput&&Lr.huffmanInput.destroy(),Lr&&Lr.seqInput&&Lr.seqInput.destroy()}function Mr(){a.a.contextMenu("destroy");function e(e,t){return e?t?" (aktiv)":" (active)":""}function t(t,n,i){return"".concat(t).concat(e(i)," // ").concat(n).concat(e(i,!0))}var n=Lr.metadata.inputConfig,i=n.mouseclickEnabled||n.hoverEnabled,r={CONTEXT_MOUSE:{name:t("Mouse/Touch input","Maus-/Toucheingabe",i),icon:"fas fa-mouse-pointer",className:i?"boldFont":""},CONTEXT_SCANNING:{name:t("Scanning","Scanning",n.scanEnabled),icon:"fas fa-sort-amount-down",className:n.scanEnabled?"boldFont":""},CONTEXT_DIRECTION:{name:t("Direction input","Richtungs-Eingabe",n.dirEnabled),icon:"fas fa-arrows-alt",className:n.dirEnabled?"boldFont":""},CONTEXT_HUFFMAN:{name:t("Huffman input","Huffman-Eingabe",n.huffEnabled),icon:"fas fa-ellipsis-h",className:n.huffEnabled?"boldFont":""},CONTEXT_SEQUENTIAL:{name:t("Sequential input","Sequentielle Eingabe",n.seqEnabled),icon:"fas fa-arrow-right",className:n.seqEnabled?"boldFont":""}};a.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":Lr.openModal(Dr.MODAL_MOUSE);break;case"CONTEXT_SCANNING":Lr.openModal(Dr.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":Lr.openModal(Dr.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":Lr.openModal(Dr.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":Lr.openModal(Dr.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:r,zIndex:10})}var Pr=_n({props:["gridId"],data:function(){return{gridData:{},globalGridData:null,metadata:null,updatedMetadataDoc:null,scanner:null,hover:null,clicker:null,directionInput:null,seqInput:null,huffmanInput:null,showModal:null,modalTypes:Dr,viewInitialized:!1,unlockCount:8,unlockCounter:8}},components:{UnlockModal:Or,SequentialInputModal:Sr,HuffmanInputModal:Cr,DirectionInputModal:_r,MouseModal:hr,ScanningModal:dr,HeaderIcon:kn},methods:{openModal:function(e){this.showModal=e,Rr()},lock:function(){this.metadata.locked=!0,this.unlockCounter=8,Wt.saveMetadata(this.metadata).then((function(){a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)}))},unlock:function(e){var t=this;e||!D.getUnlockPasscode()?(t.unlockCounter--,Dt.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,Wt.saveMetadata(t.metadata).then((function(){a()(document).trigger(s.EVENT_SIDEBAR_OPEN)})))):t.showModal=Dr.MODAL_UNLOCK},applyFullscreen:function(e){Dt.openFullscreen(),this.metadata.fullscreen=!0;var t=Promise.resolve();e||(t=Wt.saveMetadata(this.metadata)),t.then((function(){a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)}))},initInputMethods:function(){var e=this;if(xr){var t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),a()(document).on(s.EVENT_GRID_RESIZE,e.resizeListener);var n=function(t){Fa.removeAddClass(t,"selected"),ca.doAction(e.gridData.id,t.id)},i=function(n){t.globalReadActive&&ri.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=Za.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',{selectionListener:n,activeListener:i}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=Xa.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=Ka.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=Va.getInstanceFromConfig(t,'.grid-item-content:not([data-empty="true"])',"scanFocus","scanInactive"),e.scanner.setSelectionListener(n),xr.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),xr.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=Ba.getInstanceFromConfig(t,".grid-item-content",{activeListener:i,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):a()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new Ha(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())}},reinitInputMethods:function(){var e=this;Rr(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),Mr(),e.initInputMethods()}))},reload:function(e){var t=this;xr.reinit(e).then((function(){e&&(t.gridData=JSON.parse(JSON.stringify(e))),t.reinitInputMethods()}))},reloadOnLangChange:function(){this.reload()},toEditGrid:function(){Fo.toEditGrid(this.gridData.id)},toManageGrids:function(){Fo.toManageGrids()},toLogin:function(){Fo.toLogin()},reloadFn:function(e,t,n){var i=this;if(Lr&&xr&&xr.isInitialized()){log.debug("got update event, ids updated:"+t);var r=n.filter((function(e){return Lr.gridData&&e.id===Lr.gridData.id}))[0];this.updatedMetadataDoc=n.filter((function(e){return Lr.metadata&&e.id===Lr.metadata.id}))[0]||this.updatedMetadataDoc,r&&Lr.reload(new He(r)),D.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==Lr.gridData.id?Wt.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then((function(e){e.hasOutdatedThumbnail()||Fo.toLastOpenedGrid()})):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==Lr.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?Lr.applyFullscreen(!0):a()(document).trigger(s.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==Lr.metadata.locked&&(this.updatedMetadataDoc.locked?Lr.lock():Lr.unlock(!0))))}else setTimeout((function(){i.reloadFn(e,t,n)}),500)},onSidebarOpen:function(){Lr&&Lr.metadata&&(Lr.metadata.fullscreen=!1,a()(document).trigger(s.EVENT_GRID_RESIZE))},resizeListener:function(){var e=this;Dt.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created:function(){a()(document).on(s.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).on(s.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).on(s.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){var e=this,t=this;Lr=t,Wt.getGlobalGrid().then((function(e){return t.globalGridData=e,Wt.getGrid(t.gridId)})).then((function(n){if(!n)return log.warn("grid not found! gridId: "+e.gridId),Wt.getGrids(!1,!0).then((function(e){return e[0]?Fo.toGrid(e[0].id):Fo.toManageGrids(),Promise.reject()}));if(n.hasAREModel()){var i=n.getAREModel();an.uploadAndStartModel(i.dataBase64,n.getAREURL(),i.fileName)}return t.gridData=JSON.parse(JSON.stringify(n)),Fo.addToGridHistory(t.gridData.id),Promise.resolve()})).then((function(){return Wt.getMetadata()})).then((function(n){var i=JSON.parse(JSON.stringify(n||new O));return i.lastOpenedGridId=e.gridId,i.locked=void 0===i.locked?We.isDemoMode()&&Wt.getCurrentUser()===s.LOCAL_DEMO_USERNAME:i.locked,i.fullscreen=void 0===i.fullscreen?We.isDemoMode()&&Wt.getCurrentUser()===s.LOCAL_DEMO_USERNAME:i.fullscreen,i.inputConfig.scanEnabled=!!We.isScanningEnabled()||i.inputConfig.scanEnabled,i.inputConfig.dirEnabled=!!We.isDirectionEnabled()||i.inputConfig.dirEnabled,i.inputConfig.huffEnabled=!!We.isHuffmanEnabled()||i.inputConfig.huffEnabled,Wt.saveMetadata(i).then((function(){i.locked&&a()(document).trigger(s.EVENT_SIDEBAR_CLOSE)})),t.metadata=i,Promise.resolve()})).then((function(){return e=t.gridData.id,xr=new Mi("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:e,globalGridHeightPercentage:Lr.metadata.globalGridHeightPercentage}),Fn.setGridInstance(xr),xr.getInitPromise();var e})).then((function(){Mr(),t.viewInitialized=!0,a()(document).trigger(s.EVENT_GRID_LOADED);var e=new He(t.gridData);e.hasOutdatedThumbnail()&&ie.getScreenshot("#grid-container").then((function(n){var i={data:n,hash:e.getHash()};t.gridData.thumbnail=i,Wt.saveGrid(t.gridData)})),t.initInputMethods()})).catch((function(e){e&&log.warn(e)}))},updated:function(){U.initDomI18n()},beforeDestroy:function(){a()(document).off(s.EVENT_DB_PULL_UPDATED,this.reloadFn),a()(document).off(s.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),a()(document).off(s.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),Rr(),a.a.contextMenu("destroy"),Lr=null,xr&&(xr.destroy(),xr=null,Fn.setGridInstance(null))}},Ua,[],!1,null,"cc4f17d6",null);Pr.options.__file="src/vue-components/views/gridView.vue";var Gr=Pr.exports,Ur=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced",on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginPlain(e.user,e.password)}}},[e._m(0),e._v(" "),n("div",{staticClass:"eleven columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"eleven columns"},e._l(e.allUsersList,(function(t){return n("div",{staticClass:"row saved-user",staticStyle:{"margin-bottom":"0"}},[n("div",{class:t===e.activeUser?"loggedIn":""},[n("div",{staticClass:"four columns",staticStyle:{"margin-bottom":"0.5em"}},[n("span",{staticStyle:{"margin-right":"0.6em"}},[e.savedLocalUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_LOCAL")}},[n("i",{staticClass:"fas fa-user fa-2x"})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)?n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_CLOUD")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-cloud fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})]):e._e(),e._v(" "),e.savedOnlineUsers.includes(t)||e.savedLocalUsers.includes(t)?e._e():n("span",{staticClass:"fa-stack",attrs:{title:e._f("translate")("LABEL_USER_ONLINE")}},[n("i",{staticClass:"fas fa-user fa-stack-2x"}),e._v(" "),n("i",{staticClass:"fas fa-globe fa-1x",staticStyle:{position:"absolute",top:"20px",left:"20px",color:"dodgerblue"}})])]),e._v(" "),n("strong",[e._v(e._s(t))]),e._v(" "),n("em",{directives:[{name:"show",rawName:"v-show",value:t===e.activeUser,expression:"username === activeUser"}],attrs:{"data-i18n":""}},[e._v("(active) // (aktiv)")])]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.loginStored(t)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.loginTryUser!==t,expression:"loginTryUser !== username"}],staticClass:"fas fa-sign-in-alt"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:null==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == undefined && loginTryUser === username"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == false && loginTryUser === username"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===t,expression:"loginSuccess == true && loginTryUser === username"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})]),e._v(" "),n("button",{directives:[{name:"show",rawName:"v-show",value:e.hasValidMajorModelVersion(t),expression:"hasValidMajorModelVersion(username)"}],staticClass:"four columns",on:{click:function(n){return e.removeStoredUser(t)}}},[n("span",{directives:[{name:"show",rawName:"v-show",value:!e.savedLocalUsers.includes(t),expression:"!savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logout // Ausloggen")]),e._v(" "),n("i",{staticClass:"fas fa-user-times"})]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.savedLocalUsers.includes(t),expression:"savedLocalUsers.includes(username)"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Delete // Löschen")]),e._v(" "),n("i",{staticClass:"fas fa-trash"})])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hasValidMajorModelVersion(t),expression:"!hasValidMajorModelVersion(username)"}],staticClass:"eight columns"},[e._m(1,!0),e._v(" "),e._m(2,!0)])])])})),0)]),e._v(" "),n("div",{staticClass:"row"},[n("form",{staticClass:"eleven columns saved-user",attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[e._m(3),e._v(" "),n("div",{staticClass:"row"},[e._m(4),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),e.savedUsers.includes(e.user)&&e.hasValidMajorModelVersion(e.user)?n("button",{staticClass:"four columns",attrs:{type:"button"},on:{click:function(t){return e.loginStored(e.user)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Open // Öffnen")]),e._v(" "),n("i",{staticClass:"fas fa-sign-in-alt"})]):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[e._m(5),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.savedUsers.includes(e.user),expression:"!savedUsers.includes(user)"}],staticClass:"row"},[n("div",{staticClass:"four columns offset-by-two",staticStyle:{"margin-bottom":"1.0em"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(6)]),e._v(" "),n("button",{staticClass:"five columns offset-by-one",attrs:{type:"button",disabled:!e.user||!e.password},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[n("span",{attrs:{"data-i18n":""}},[e._v("Login // Einloggen")]),e._v(" "),n("span",[n("i",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess === undefined && loginTryUser === user"}],staticClass:"fas fa-spinner fa-spin"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:0==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == false && loginTryUser === user"}],staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:1==e.loginSuccess&&e.loginTryUser===e.user,expression:"loginSuccess == true && loginTryUser === user"}],staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])])])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.allUsersList.length,expression:"allUsersList.length == 0"}]},[n("form",{attrs:{autocomplete:"on",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(7),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"}],staticClass:"four columns",attrs:{type:"text",name:"username",id:"inputUser2",autocomplete:"username"},domProps:{value:e.user},on:{input:function(t){t.target.composing||(e.user=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(8),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"four columns",attrs:{type:"password",id:"inputPassword2",autocomplete:"current-password"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember2"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(9),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check for a one-time login on a foreign device. // Für einmaliges Einloggen auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"four columns offset-by-one",attrs:{disabled:!e.user||!e.password,"data-i18n":""},on:{click:function(t){return e.loginPlain(e.user,e.password)}}},[e._v("Login // Einloggen")])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"four columns offset-by-one"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.loginSuccess,expression:"loginSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Logging in // Einloggen")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!1===e.loginSuccess,expression:"loginSuccess === false"}]},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v(e._s(e._f("translate")(e.loginErrorCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.loginSuccess,expression:"loginSuccess === true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Login successful // Login erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"twelve columns"},[n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}],attrs:{"data-i18n":""}},[e._v("No account? // Kein Account?")]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.allUsersList.length>0,expression:"allUsersList.length > 0"}],attrs:{"data-i18n":""}},[e._v("Add new account? // Weiteren Account hinzufügen?")]),e._v(" "),n("a",{attrs:{href:"#register","data-i18n":""}},[e._v("Register now // Jetzt registrieren")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0===e.allUsersList.length,expression:"allUsersList.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("AsTeRICS Grid is free and all you need is to register is a username and a password. // AsTeRICS Grid ist kostenlos und Sie benötigen nur einen Usernamen und ein Passwort.")])])])]),e._v(" "),e._m(10)])])],1)};Ur._withStripped=!0;var Fr,$r=n(14),Vr=n.n($r),jr={},Br=null,Yr=null,Hr=null,Wr=null,zr=!1,Kr=null,Jr=null,Xr=s.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function qr(e,t,n){return Hr!==e?Promise.reject():(Wr=e,Kr=t,Jr=n,e=e.trim(),Vr.a.login({username:e,password:t}).then((function(i){return log.info("login success!"),jr.stopAutoRetryLogin(),Br=i,Yr=e,D.setLastActiveUser(e),D.setAutologinUser(n?e:""),n&&D.saveUserPassword(e,t),Promise.resolve()})))}function Zr(e,t,n){return qr(e,t,n).then((function(){return Gt.initForUser(e,t,jr.getLoggedInUserDatabase(),!n).then((function(){return Promise.resolve(!0)}))}),(function(i){return Hr!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),D.isDatabaseSynced(e)?(log.info("using offline local database..."),D.setLastActiveUser(e),D.setAutologinUser(n?e:""),Qr(i)!==jr.ERROR_CODE_UNAUTHORIZED&&eo(e,t,n),Gt.initForUser(e,t).then((function(){return Promise.resolve(!1)}))):Promise.reject(Qr(i)))}))}function Qr(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?jr.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?jr.ERROR_CODE_NETWORK_ERROR:void 0}function eo(e,t,n){jr.stopAutoRetryLogin(),Fr=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),Zr(e,t,n)}),1e4)}jr.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",jr.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",jr.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",Vr.a.configure({serverUrl:Xr,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),jr.getLoggedInUsername=function(){return Yr},jr.getLoggedInUserDatabase=function(){if(!Br||!Br.userDBs)return null;var e=Object.keys(Br.userDBs);return Br.userDBs[e[0]]},jr.loginPlainPassword=function(e,t,n){Hr=e;var i=Ue.getUserPasswordHash(t);return jr.loginHashedPassword(e,i,n)},jr.loginHashedPassword=function(e,t,n){return Hr=e,Zr(e,t,n)},jr.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if(zr)return log.warn("login currently in progress - aborting..."),Promise.reject();Hr=e,zr=!0;var n=D.getSavedOnlineUsers(),i=D.getSavedLocalUsers(),a=new Promise((function(t,a){if(jr.getLoggedInUsername()===e)return t();if(jr.logout(),n.includes(e)&&D.isDatabaseSynced(e)){var r=D.getUserPassword(e);Gt.initForUser(e,r).then((function(){jr.loginHashedPassword(e,r,!0),t()}))}else if(n.includes(e)){log.info("waiting for successful login because user wasn't completely synced before...");var o=D.getUserPassword(e);jr.loginHashedPassword(e,o,!0).then((function(){t()})).catch((function(e){a(e)}))}else i.includes(e)&&(D.setAutologinUser(e),Gt.initForUser(e,e).then((function(){t()})))}));return a.then((function(){t||Fo.toMain()})),a.finally((function(){zr=!1})),a},jr.logout=function(){jr.stopAutoRetryLogin(),Yr&&(log.debug("logging out user: "+Yr),Gt.closeCurrentDatabase(),Vr.a.logout(Yr),Yr=null,Br=null)},jr.register=function(e,t,n){Hr=e,jr.stopAutoRetryLogin(),e=e.trim();var i=Ue.getUserPasswordHash(t);return log.debug("password hash: "+i),Vr.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then((function(t){return qr(e,i,n)})).then((function(){return log.info("registration successful!"),Gt.registerForUser(Yr,i,jr.getLoggedInUserDatabase(),!n)})).then((function(){return Wt.importDefaultGridset()})).catch((function(e){return log.info("registration failed!"),log.info(e),Promise.reject(e)}))},jr.registerOffline=function(e,t){return jr.logout(),D.saveLocalUser(e),D.setAutologinUser(e),Gt.registerForUser(e,t).then((function(){return Wt.importDefaultGridset()}))},jr.validateUsername=function(e){return new Promise((function(t,n){e&&s.USERNAME_REGEX.test(e)?D.isSavedLocalUser(e)||e===s.LOCAL_DEMO_USERNAME?t(s.VALIDATION_ERROR_EXISTING):Vr.a.validateUsername(e).then((function(){t(s.VALIDATION_VALID)}),(function(e){log.debug(e),t(s.VALIDATION_ERROR_EXISTING)})):t(s.VALIDATION_ERROR_REGEX)}))},jr.stopAutoRetryLogin=function(){Fr&&(window.clearInterval(Fr),Fr=null)},jr.ping=function(){a.a.get(Xr+"/ping")},a()(document).on(s.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),Wr&&Kr&&eo(Wr,Kr,Jr)})),a()(document).on(s.EVENT_DB_DATAMODEL_UPDATE,(function(){jr.logout(),D.setAutologinUser(""),Fo.toLogin()}));var to={components:{HeaderIcon:kn},props:[],data:function(){return{user:null,password:null,remember:!0,loginTryUser:null,loginSuccess:null,loginErrorCode:null,savedUsers:[],savedOnlineUsers:[],savedLocalUsers:[],allUsersList:[],activeUser:null}},methods:{toMain:function(){Fo.toMain()},loginPlain:function(e,t){var n=this;this.savedUsers.includes(e)?n.loginStored(e):e&&t&&(n.loginTryUser=e,n.loginSuccess=void 0,n.loginErrorCode="",jr.loginPlainPassword(e,t,this.remember).then((function(){n.loginSuccess=!0,Fo.toMain()})).catch((function(e){n.loginSuccess=!1,n.loginErrorCode=e})))},loginStored:function(e){var t=this;e&&(t.savedUsers.includes(e)||jr.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",jr.loginStoredUser(e).then((function(){t.loginSuccess=!0})).catch((function(e){t.loginSuccess=!1,t.loginErrorCode=e})))},removeStoredUser:function(e){if(this.savedOnlineUsers.includes(e)||this.savedLocalUsers.includes(e)){var t=this.savedOnlineUsers.includes(e)?"CONFIRM_REMOVE_USER":"CONFIRM_REMOVE_USER_LOCAL";if(!confirm(U.translate(t,e)))return;D.unmarkSyncedDatabase(e),D.removeUserPassword(e),jr.getLoggedInUsername()===e&&jr.logout(),Gt.deleteDatabase(e)}else jr.logout();this.allUsersList=D.getSavedUsers(this.activeUser),this.savedUsers=D.getSavedUsers(this.activeUser),this.savedOnlineUsers=D.getSavedOnlineUsers(),this.savedLocalUsers=D.getSavedLocalUsers()},hasValidMajorModelVersion:function(e){return D.getUserMajorModelVersion(e)<=_.getLatestModelVersion().major}},mounted:function(){var e=jr.getLoggedInUsername();this.activeUser=D.getAutologinUser()||e,this.savedUsers=D.getSavedUsers(this.activeUser),this.allUsersList=D.getSavedUsers(this.activeUser),this.savedOnlineUsers=D.getSavedOnlineUsers(),this.savedLocalUsers=D.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:D.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),U.initDomI18n()},updated:function(){U.initDomI18n()}},no=(n(141),_n(to,Ur,[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",[t("span",{staticClass:"show-mobile"},[this._v("AsTeRICS Grid - ")]),t("span",{attrs:{"data-i18n":""}},[this._v("Login // Einloggen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("i",{staticClass:"fas fa-exclamation-triangle"}),this._v(" "),t("span",{attrs:{"data-i18n":""}},[this._v("Incompatible data model version! // Inkompatible Version des Datenmodells!")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{"data-i18n":""}},[t("span",[this._v("Change to "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" to open this user.")]),this._v(" "),t("span",[this._v("Wechseln sie zu "),t("a",{attrs:{href:"https://grid.asterics.eu/latest/#login"}},[this._v("grid.asterics.eu/latest")]),this._v(" um diesen User zu verwenden.")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("strong",{attrs:{"data-i18n":""}},[this._v("Login with other user // Login mit anderem User")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputUser"}},[t("span",[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"two columns",attrs:{for:"inputPassword"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputUser2"}},[t("span",{staticClass:"desktop-right"},[this._v("Username")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"one column",attrs:{for:"inputPassword2"}},[t("span",{staticClass:"desktop-right",attrs:{"data-i18n":""}},[this._v("Password // Passwort")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{attrs:{for:"inputRemember2"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Remember this user and make it available for offline use // Diesen User speichern und offline verfügbar machen")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("div",{staticClass:"twelve columns"},[t("span",{attrs:{"data-i18n":""}},[this._v("Want to create an offline-only user? // Möchten Sie einen Offline-User erstellen?")]),this._v(" "),t("a",{attrs:{href:"#add","data-i18n":""}},[this._v("Add offline user // Offline‑User hinzufügen")])])])}],!1,null,"906058d8",null));no.options.__file="src/vue-components/views/loginView.vue";var io=no.exports,ao=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),n("div",{staticClass:"row content spaced"},[e._m(0),e._v(" "),n("form",{attrs:{autocomplete:"off",onsubmit:"event.preventDefault()"}},[n("div",{staticClass:"row"},[e._m(1),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.user,expression:"user"},{name:"debounce",rawName:"v-debounce",value:300,expression:"300"},{name:"focus",rawName:"v-focus"}],staticClass:"six columns",attrs:{type:"text",name:"username",id:"inputUser"},domProps:{value:e.user},on:{change:e.validateUsername,input:function(t){t.target.composing||(e.user=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&0==e.usernameValid,expression:"user != null && usernameValid == false"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",[e._v(e._s(e._f("translate")(e.usernameValidationCode)))])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:null!=e.user&&1==e.usernameValid,expression:"user != null && usernameValid == true"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Valid username // Username OK")])])]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"six columns",attrs:{type:"password",id:"inputPassword"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.password2,expression:"password2"}],staticClass:"six columns",attrs:{type:"password",id:"inputConfirmPassword"},domProps:{value:e.password2},on:{input:function(t){t.target.composing||(e.password2=t.target.value)}}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password!==e.password2,expression:"!!password && password2 !== null && password !== password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords do not match // Passwörter stimmen nicht überein")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"three columns"},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Passwords match // Passwörter stimmen überein")])])])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("i",{staticClass:"fas fa-2x fa-info-circle",staticStyle:{color:"blue"}}),e._v(" "),e._m(4)])]),e._v(" "),n("div",{staticClass:"row"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!!e.password&&null!==e.password2&&e.password===e.password2,expression:"!!password && password2 !== null && password === password2"}],staticClass:"six columns offset-by-two"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.remember,expression:"remember"}],attrs:{type:"checkbox",checked:"",id:"inputRemember"},domProps:{checked:Array.isArray(e.remember)?e._i(e.remember,null)>-1:e.remember},on:{change:function(t){var n=e.remember,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.remember=n.concat([null])):r>-1&&(e.remember=n.slice(0,r).concat(n.slice(r+1)))}else e.remember=a}}}),e._v(" "),e._m(5),e._v(" "),n("br"),e._v(" "),n("span",{staticClass:"fa fa-info-circle"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Do not check if you are using a foreign device. // Auf einem fremden Gerät sollte der User nicht gespeichert werden.")])])]),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"six columns offset-by-two",attrs:{disabled:!(e.user&&e.password&&e.password2&&e.password===e.password2&&e.usernameValid),"data-i18n":""},on:{click:e.register}},[e._v("Register // Registrieren")])]),e._v(" "),e._m(6),e._v(" "),e._m(7),e._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"six columns offset-by-two"},[n("div",{directives:[{name:"show",rawName:"v-show",value:void 0===e.registerSuccess,expression:"registerSuccess === undefined"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering // Registriere")]),e._v(" "),n("i",{staticClass:"fas fa-spinner fa-spin"})]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:0==e.registerSuccess,expression:"registerSuccess == false"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Registering failed // Registrierung fehlgeschlagen")]),e._v(" "),n("i",{staticClass:"fas fa-times",staticStyle:{color:"red"}}),e._v(" "),n("ul",e._l(e.validationErrors,(function(t){return n("li",[e._v(e._s(t))])})),0)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:1==e.registerSuccess,expression:"registerSuccess == true"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("Successfully registered // Registrierung erfolgreich")]),e._v(" "),n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}})])])]),e._v(" "),n("comparison-component")],1)],1)};ao._withStripped=!0;var ro=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("accordion",{staticClass:"six columns offset-by-two",attrs:{"acc-label":"HEADER_COMPARE_ONLINE_OFFLINE"}},[n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Offline user // Offline-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline // alle Grids werden offline gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all functions available // voller Funktionsumfang")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("ideal for using on a single device // optimal für Nutzung auf einem einzelnen Gerät")])])])]),e._v(" "),n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Online user // Online-User")]),e._v(" "),n("ul",{staticClass:"fa-ul"},[n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all grids are saved offline and online // alle Grids werden offline und online gespeichert")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("automatic synchronization across multiple devices (e.g. PC, tablet, smartphone) // automatische Synchronisierung zwischen verschiedenen Geräten (z.B. PC, Tablet, Smartphone)")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("all data is end-to-end encrypted and only you are able to access it // alle Daten werden verschlüsselt und es kann niemand außer Sie darauf zugreifen")])]),e._v(" "),n("li",[n("span",{staticClass:"fa-li"},[n("i",{staticClass:"fas fa-check"})]),n("span",{attrs:{"data-i18n":""}},[e._v("for registration only a username and a password is needed // für die Registrierung wird nur ein Username und ein Passwort benötigt")])])])])])],1)};ro._withStripped=!0;var oo={props:[],components:{Accordion:Dn},data:function(){return{showInfo:!1}},methods:{},mounted:function(){U.initDomI18n()}},so=(n(143),_n(oo,ro,[],!1,null,"2a375b84",null));so.options.__file="src/vue-components/components/comparisonComponent.vue";var lo=so.exports,co={components:{ComparisonComponent:lo,HeaderIcon:kn},props:[],data:function(){return{user:null,usernameValid:null,usernameValidationCode:null,password:null,password2:null,remember:!0,registerSuccess:null,creationTime:(new Date).getTime(),spamTime:1e4,validationErrors:[]}},methods:{toMain:function(){Fo.toMain()},register:function(){var e=this,t=(new Date).getTime()-e.creationTime;if(t0,expression:"dicts && dicts.length > 0"}],attrs:{id:"dictList"}},[e._m(0),e._v(" "),e._l(e.dicts,(function(t){return n("li",{staticClass:"dict-table-elem"},[n("div",{staticClass:"row"},[n("div",{staticClass:"four columns"},[e.editModeId!==t.id?n("div",[e._v("\n "+e._s(t.dictionaryKey)+"\n "),n("button",{staticClass:"small-button",on:{click:function(n){return e.enableEditName(t)}}},[n("i",{staticClass:"far fa-edit"})])]):e._e(),e._v(" "),e.editModeId===t.id?n("div",[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:t.dictionaryKey,expression:"dict.dictionaryKey"}],attrs:{type:"text"},domProps:{value:t.dictionaryKey},on:{input:function(n){n.target.composing||e.$set(t,"dictionaryKey",n.target.value)}}}),e._v(" "),n("div",{staticClass:"inline"},[e.originalLabel?n("button",{staticClass:"small-button",on:{click:function(t){return e.cancelEditName()}}},[n("i",{staticClass:"fas fa-times"})]):e._e(),e._v(" "),n("button",{staticClass:"small-button",attrs:{disabled:e.isLabelDuplicate(t.dictionaryKey)},on:{click:function(n){return e.finishEditName(t)}}},[n("i",{staticClass:"fas fa-check"})])])]):e._e()]),e._v(" "),n("div",{staticClass:"eight columns actionbuttons",staticStyle:{display:"flex"}},[n("div",{staticClass:"four columns show-mobile",staticStyle:{margin:"0.5em 0 0 0.2em"},attrs:{"data-i18n":""}},[e._v("Actions\n // Aktionen\n ")]),e._v(" "),n("button",{on:{click:function(n){return e.edit(t)}}},[n("i",{staticClass:"far fa-edit"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Edit // Bearbeiten")])]),e._v(" "),n("button",{on:{click:function(n){return e.clone(t.id)}}},[n("i",{staticClass:"far fa-clone"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Clone // Duplizieren")])]),e._v(" "),n("button",{on:{click:function(n){return e.deleteDict(t.id,t.dictionaryKey)}}},[n("i",{staticClass:"far fa-trash-alt"}),e._v(" "),n("span",{staticClass:"hide-mobile",attrs:{"data-i18n":""}},[e._v("Delete // Löschen")])])])]),e._v(" "),e.editId===t.id?n("div",{staticClass:"edit-container"},[n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchWord,expression:"searchWord"}],staticClass:"four columns",attrs:{type:"text",placeholder:"Search word"},domProps:{value:e.searchWord},on:{input:[function(t){t.target.composing||(e.searchWord=t.target.value)},function(t){return e.inputSearchWord()}]}}),e._v(" "),n("button",{staticClass:"four columns",on:{click:function(t){e.showImportModal=!0}}},[n("i",{staticClass:"fas fa-file-import"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Import words // Wörter importieren")])])]),e._v(" "),n("div",{staticClass:"row"},[n("span",{attrs:{"data-i18n":""}},[e._v("Words: // Wörter:")]),e._v(" "),n("ul",{staticStyle:{"margin-left":"0"}},e._l(e.wordlist,(function(i){return n("li",[n("button",{staticClass:"small-button",staticStyle:{"margin-right":"0.5em"},on:{click:function(n){return e.deleteWord(i,t)}}},[n("i",{staticClass:"far fa-trash-alt"})]),e._v(e._s(i)+"\n ")])})),0),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.totalWords>e.wordlist.length&&""===e.searchWord,expression:"totalWords > wordlist.length && searchWord === ''"}]},[e._v("\n "+e._s(e.totalWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) available. Type in search field to filter. // mehr Wörter verfügbar. Tippe in Suchfeld um zu filtern.")])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.filterWords>e.wordlist.length&&""!==e.searchWord,expression:"filterWords > wordlist.length && searchWord !== ''"}]},[e._v("\n "+e._s(e.filterWords-e.wordlist.length)+"\n "),n("span",{attrs:{"data-i18n":""}},[e._v("more word(s) for this filter. Refine search to show more. // mehr Wörter für diese Suche. Verfeinere die Suche um mehr anzuzeigen.")])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.searchWord&&e.totalWords>0&&0===e.wordlist.length,expression:"searchWord && totalWords > 0 && wordlist.length === 0"}]},[n("span",{attrs:{"data-i18n":""}},[e._v("No words for this filter. Clear search field to show elements. // Keine Wörter für diese Suche. Lösche Suchfeld um Elemente anzuzeigen.")]),e._v(" "),n("button",{on:{click:function(t){return e.inputSearchWord("")}}},[n("i",{staticClass:"fas fa-times"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Clear // Löschen")])])]),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:0===e.totalWords,expression:"totalWords === 0"}],attrs:{"data-i18n":""}},[e._v("This dictionary contains no words. // Dieses Wörterbuch enthält keine Wörter.")])])]):e._e(),e._v(" "),n("div",[e.showImportModal?n("import-dictionary-modal",{attrs:{"dict-data":t},on:{close:function(t){e.showImportModal=!1},reload:e.reload}}):e._e()],1)])}))],2),e._v(" "),e.dicts&&0!==e.dicts.length?e._e():n("p",{attrs:{"data-i18n":""}},[e._v("\n No dictionaries found! // Keine Ergebnisse gefunden!\n ")])])])])};Ao._withStripped=!0;var So=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modal"},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container",on:{keyup:[function(t){return t.type.indexOf("key")||27===t.keyCode?e.$emit("close"):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:t.ctrlKey?e.save():null}]}},[n("a",{staticClass:"inline close-button",attrs:{href:"javascript:void(0);"},on:{click:function(t){return e.$emit("close")}}},[n("i",{staticClass:"fas fa-times"})]),e._v(" "),n("a",{staticClass:"close-button",attrs:{href:"javascript:;"},on:{click:function(t){return e.openHelp()}}},[n("i",{staticClass:"fas fa-question-circle"})]),e._v(" "),e._m(0),e._v(" "),n("div",{staticClass:"modal-body container"},[e._m(1),e._v(" "),n("div",{staticClass:"row"},[n("button",{staticClass:"nine columns offset-by-three btn-accordion",staticStyle:{"margin-bottom":"0"},on:{click:function(){e.showAdvanced=!e.showAdvanced}}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!e.showAdvanced,expression:"!showAdvanced"}],staticClass:"fas fa-chevron-down"}),e._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:e.showAdvanced,expression:"showAdvanced"}],staticClass:"fas fa-chevron-up"}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Advanced options // Erweiterte Einstellungen")])])]),e._v(" "),e.showAdvanced?n("div",{staticClass:"row"},[n("div",{staticClass:"nine columns offset-by-three",staticStyle:{"background-color":"whitesmoke"}},[n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElementSeparator","data-i18n":""}},[e._v("Element separator // Trennzeichen Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.elementSeparator,expression:"elementSeparator"}],attrs:{id:"inputElementSeparator",type:"text"},domProps:{value:e.elementSeparator},on:{input:[function(t){t.target.composing||(e.elementSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankSeparator","data-i18n":""}},[e._v("In-element separator // Trennzeichen innerhalb Element")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankSeparator,expression:"rankSeparator"}],attrs:{id:"inputRankSeparator",type:"text"},domProps:{value:e.rankSeparator},on:{input:[function(t){t.target.composing||(e.rankSeparator=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputElIndex","data-i18n":""}},[e._v("Word index (0-based) // Index Wort (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.wordPosition,expression:"wordPosition"}],attrs:{id:"inputElIndex",type:"number"},domProps:{value:e.wordPosition},on:{input:[function(t){t.target.composing||(e.wordPosition=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"five columns",attrs:{for:"inputRankIndex","data-i18n":""}},[e._v("Rank index (0-based) // Index Rank (0-basiert)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.rankPosition,expression:"rankPosition"}],attrs:{id:"inputRankIndex",type:"number"},domProps:{value:e.rankPosition},on:{input:[function(t){t.target.composing||(e.rankPosition=t.target.value)},e.textChanged]}})])])]):e._e(),e._v(" "),n("div",{staticClass:"row"},[n("textarea",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.inputText,expression:"inputText"}],staticClass:"twelve columns",staticStyle:{resize:"vertical","min-height":"70px"},attrs:{id:"inputText",placeholder:"Word1 Word2 Word3..."},domProps:{value:e.inputText},on:{input:[function(t){t.target.composing||(e.inputText=t.target.value)},e.textChanged]}})]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{"data-i18n":""}},[e._v("Recognized Words // Erkannte Wörter")]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.parsedElems.length>0,expression:"parsedElems.length > 0"}],staticClass:"nine columns"},[n("span",[e._v(e._s(e.elementCount))]),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("Word(s) // Wörter")]),e._v(" "),n("span",{staticClass:"break-word"},[e._v(e._s(JSON.stringify(e.parsedElems)))]),e._v(" "),e.parsedElems.length1},show:function(e){},edit:function(e){this.cancelEditName(),this.editId!==e.id?(this.editId=e.id,this.predictionary=Tt.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),Kt.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished:function(){this.editId=null,this.searchWord="",Kt.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord:function(e){var t=this,n=void 0===e?200:0;Dt.debounce((function(){t.searchWord=void 0===e?t.searchWord:e;var n=t.predictionary.predict(t.searchWord,{maxPredicitons:1e4});t.filterWords=n.length,t.wordlist=n.slice(0,9)}),n,Dt.DEFAULT_KEY2)},clone:function(e){var t=this;Wt.getDictionary(e).then((function(e){Wt.saveDictionary(e.clone()).then((function(){t.reload()}))}))},deleteWord:function(e,t){var n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,Dt.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),Wt.saveDictionary(t)}),2e3,Dt.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){var t=this,n=this;Wt.getDictionaries().then((function(i){t.dicts=JSON.parse(JSON.stringify(i)),n.editId&&e&&e.data&&(n.editFinished(),n.edit(e))}))},updatedHandler:function(e,t,n){n[0].modelName===mt.getModelName()&&this.reload(n[0])}},created:function(){var e=this;a()(document).on(s.EVENT_DB_PULL_UPDATED,e.updatedHandler),Wt.getDictionaries().then((function(t){log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1}))},mounted:function(){this,U.initDomI18n()},updated:function(){U.initDomI18n()},beforeDestroy:function(){At.init(),a()(document).off(s.EVENT_DB_PULL_UPDATED,this.updatedHandler),a.a.contextMenu("destroy")}},xo=(n(155),_n(Lo,Ao,[function(){var e=this.$createElement,t=this._self._c||e;return t("li",{staticClass:"hide-mobile table-headers"},[t("span",{staticClass:"four columns"},[this._v("Dictionary Name")]),this._v(" "),t("span",{staticClass:"four columns",attrs:{"data-i18n":""}},[this._v("Actions // Aktionen")]),t("br")])}],!1,null,"594606fa",null));xo.options.__file="src/vue-components/views/dictionariesView.vue";var Do=xo.exports,Ro=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"overflow-content"},[n("header-icon",{attrs:{"full-header":"true"}}),e._v(" "),e.show?n("div",{staticClass:"row content spaced"},[n("div",{staticClass:"row"},[n("h2",{staticClass:"six columns",attrs:{"data-i18n":""}},[e._v("General settings // Allgemeine Einstellungen")]),e._v(" "),e.saveSuccess?n("div",{staticStyle:{"padding-top":"1.7em"}},[n("i",{staticClass:"fas fa-check",staticStyle:{color:"green"}}),e._v(" "),n("span",{attrs:{"data-i18n":""}},[e._v("All changes saved! // Alle Änderungen gespeichert!")])]):e._e()]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Application Language // Anwendungs-Sprache")]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"inLanguage","data-i18n":""}},[e._v("Select language // Sprache wählen")]),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.langCode,expression:"langCode"}],staticClass:"five columns",attrs:{id:"inLanguage"},on:{input:function(t){return e.saveLangCode()},change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.langCode=t.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.allLanguages.filter((function(t){return-1!==["de","en"].indexOf(t.code)||-1!==e.gridLanguages.indexOf(t.code)})),(function(t){return n("option",{domProps:{value:t.code}},[e._v(e._s(e._f("extractTranslation")(t))+" ("+e._s(t.code)+")")])}))],2)]),e._v(" "),e._m(0),e._v(" "),e._m(1)]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Voice // Stimme")]),e._v(" "),n("div",{staticClass:"row"},[e._m(2),e._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedVoiceName,expression:"selectedVoiceName"}],staticClass:"five columns",attrs:{id:"inVoice"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedVoiceName=t.target.multiple?n:n[0]},function(t){return e.saveVoice()}]}},[n("option",{attrs:{value:"","data-i18n":""}},[e._v("automatic // automatisch")]),e._v(" "),e._l(e.voices,(function(t){return n("option",{domProps:{value:t.name}},[e._v(e._s(t.name))])}))],2)]),e._v(" "),n("div",{staticClass:"row"},[e._m(3),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.testText,expression:"testText"}],staticClass:"five columns",attrs:{type:"text"},domProps:{value:e.testText},on:{input:function(t){t.target.composing||(e.testText=t.target.value)}}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{id:"testVoice","data-i18n":""},on:{click:e.testSpeak}},[e._v("Test // Testen")])])]),e._v(" "),n("div",{staticClass:"ten columns"},[n("h3",{attrs:{"data-i18n":""}},[e._v("Miscellaneous // Diverses")]),e._v(" "),n("div",{staticClass:"row"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.syncNavigation,expression:"syncNavigation"}],attrs:{id:"chkSyncNavigation",type:"checkbox"},domProps:{checked:Array.isArray(e.syncNavigation)?e._i(e.syncNavigation,null)>-1:e.syncNavigation},on:{change:[function(t){var n=e.syncNavigation,i=t.target,a=!!i.checked;if(Array.isArray(n)){var r=e._i(n,null);i.checked?r<0&&(e.syncNavigation=n.concat([null])):r>-1&&(e.syncNavigation=n.slice(0,r).concat(n.slice(r+1)))}else e.syncNavigation=a},function(t){return e.saveSyncNavigation()}]}}),e._v(" "),n("label",{attrs:{for:"chkSyncNavigation","data-i18n":""}},[e._v("Synchronize navigation and locked/fullscreen state for online users // Navigation und Sperr- bzw. Vollbildstatus für online User synchronisieren")])]),e._v(" "),n("div",{staticClass:"row"},[n("label",{staticClass:"three columns",attrs:{for:"unlockPass","data-i18n":""}},[e._v("Passcode for unlocking user interface (only numbers) // PIN um Oberfläche zu entsperren (nur Ziffern)")]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.unlockPasscode,expression:"unlockPasscode"}],staticClass:"five columns",attrs:{id:"unlockPass",type:"number",placeholder:e.i18nService.translate("(no passcode) // (kein PIN)")},domProps:{value:e.unlockPasscode},on:{input:[function(t){t.target.composing||(e.unlockPasscode=t.target.value)},function(t){e.unlockPasscode=e.unlockPasscode.substring(0,6),e.savePasscode()}]}}),e._v(" "),n("button",{staticClass:"three columns",attrs:{"data-i18n":""},on:{click:function(t){e.unlockPasscode=null,e.savePasscode()}}},[e._v("Reset // Löschen")])])])]):e._e()],1)};Ro._withStripped=!0;var Mo={components:{HeaderIcon:kn},props:[],data:function(){return{metadata:null,show:!1,langCode:"",gridLanguages:[],allLanguages:U.getAllLanguages(),currentLang:U.getBrowserLang(),saveSuccess:null,speechService:ri,syncNavigation:D.shouldSyncNavigation(),unlockPasscode:D.getUnlockPasscode(),voices:ri.getVoices(),selectedVoiceName:ri.getPreferredVoiceName(),testText:U.translate("This is an english sentence. // Das ist ein deutscher Satz."),i18nService:U}},methods:{saveLangCode:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){U.setLanguage(e.langCode),U.initDomI18n(),e.saveSuccess=!0}),300,"SAVE_LANG")},saveVoice:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){ri.setPreferredVoiceName(e.selectedVoiceName),e.saveSuccess=!0}),300,"SAVE_VOICE")},saveSyncNavigation:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){D.setShouldSyncNavigation(e.syncNavigation),e.saveSuccess=!0}),300,"SAVE_NAV")},savePasscode:function(){var e=this;this.saveSuccess=void 0,Dt.debounce((function(){D.setUnlockPasscode(e.unlockPasscode),e.saveSuccess=!0}),500,"SAVE_UNLOCK")},testSpeak:function(){ri.speak(this.testText,null,this.selectedVoiceName)}},mounted:function(){var e=this;U.initDomI18n(),Wt.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0})),Wt.getGrids(!1,!0).then((function(t){e.gridLanguages=t[0]?Object.keys(t[0].label):[]})),e.langCode=U.getCustomLanguage()},updated:function(){U.initDomI18n()}},Po=(n(157),_n(Mo,Ro,[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row"},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word"},[t("span",{attrs:{"data-i18n":""}},[t("span",[this._v('Grids can be translated to every language. To add or edit a translation use "Edit grid -> More -> Translate Grid".')]),this._v(" "),t("span",[this._v('Grids können in alle Sprachen übersetzt werden. Um eine Übersetzung zu bearbeiten oder hinzuzufügen, verwenden Sie "Grid bearbeiten -> Mehr -> Grid übersetzen".')])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row",staticStyle:{"margin-bottom":"0.5em"}},[t("span",{staticClass:"fa fa-info-circle"}),this._v(" "),t("span",{staticClass:"break-word",attrs:{"data-i18n":""}},[t("span",[this._v("For user interface only English (en) and German (de) are available. For all other languages English will be used.")]),this._v(" "),t("span",[this._v("Das User-Interface ist nur in Englisch (en) and Deutsch (de) verfügbar. Für andere Sprachen wird Englisch verwendet.")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Preferred voice // Bevorzugte Stimme")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("label",{staticClass:"three columns",attrs:{for:"inVoice"}},[t("span",{attrs:{"data-i18n":""}},[this._v("Test text // Test-Text")])])}],!1,null,"747d2ef2",null));Po.options.__file="src/vue-components/views/settingsView.vue";var Go=Po.exports,Uo=["#login","#register","#welcome","#add","#about"],Fo={},$o=null,Vo=null,jo=!1,Bo=null,Yo=[];function Ho(){var e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function Wo(e,t){Vo=t?null:location.hash,location.hash=e}function zo(e,t,n){var i;Bo=e,e!==Gr&&a()("#touchElement").hide(),i=n||Ho(),a()("nav button").removeClass("selected"),a()("nav a[href='".concat(i,"'] button")).addClass("selected"),log.debug("loading view: "+e.__file),Sn.setViewComponent(e,t)}function Ko(){Wt.getMetadata().then((function(e){var t=e?e.lastOpenedGridId:null;zo(Gr,{gridId:t})}))}Fo.init=function(e,t){jo=!0,e,($o=new G.a(null,!0)).on({main:function(){Kt.setHelpLocation("02_navigation","#main-view"),Ko()},"grids/":function(){Kt.setHelpLocation("02_navigation","#manage-grids-view"),zo(ei)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),Kt.setHelpLocation("02_navigation","#main-view"),zo(Gr,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),Kt.setHelpLocation("02_navigation","#main-view"),Wt.getGrids().then((function(t){var n=t.filter((function(t){return U.getTranslation(t.label)===e.gridName})),i=n[0]?n[0].id:null;i?zo(Gr,{gridId:i},"#main"):(log.warn("no grid with name ".concat(e.gridName," found!")),Ko())}))},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),Kt.setHelpLocation("02_navigation","#edit-view"),zo(Ga,{gridId:e.gridId})},login:function(){Kt.setHelpLocation("02_navigation","#change-user-view"),zo(io)},register:function(){Kt.setHelpLocation("06_users","#online-users"),zo(fo)},add:function(){Kt.setHelpLocation("06_users","#offline-users"),zo(mo)},welcome:function(){Kt.setHelpLocationIndex(),zo(bo)},about:function(){Kt.setHelpLocationIndex(),zo(To)},dictionaries:function(){Kt.setHelpLocation("02_navigation","#manage-dictionaries-view"),zo(Do)},settings:function(){zo(Go)},"*":function(){Kt.setHelpLocation("02_navigation","#main-view"),Fo.toMain()}}),$o.hooks({before:function(e,t){Bo&&Bo.destroy&&(Bo.destroy(),Bo=null);var n=function(){var e=location.hash;if(!Gt.getCurrentUsedDatabase()){var t=D.getLastActiveUser()||D.getSavedUsers().length>0;e=(e=Uo.includes(e)?e:null)||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),Wo(n)):e(),fi.destroy()},after:function(e){},leave:function(e){}}),t&&Wo(t),$o.resolve()},Fo.isInitialized=function(){return jo},Fo.toMain=function(){0===Ho().indexOf("#main")?Wo("#main?date="+(new Date).getTime()):Wo("#main")},Fo.toRegister=function(){Wo("#register")},Fo.toAddOffline=function(){Wo("#add")},Fo.toAbout=function(){Wo("#about")},Fo.toLogin=function(){Wo("#login")},Fo.toLastOpenedGrid=function(){Wt.getMetadata().then((function(e){Fo.toGrid(e.lastOpenedGridId)}))},Fo.toGrid=function(e){e&&Wo("#grid/"+e+"?date="+(new Date).getTime())},Fo.toEditGrid=function(e){e&&Wo("#grid/edit/"+e)},Fo.toManageGrids=function(){Wo("#grids")},Fo.back=function(){Vo&&Vo!==location.hash?Wo(Vo,!0):this.toMain()},Fo.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},Fo.getCurrentView=function(){return Bo},Fo.addToGridHistory=function(e){Yo.length>0&&Yo[Yo.length-1]===e||(-1===Yo.indexOf(e)?Yo.push(e):Yo=[e])},Fo.toLastGrid=function(){if(1!==Yo.length){Yo.pop();var e=Yo.pop();Fo.toGrid(e)}};var Jo={},Xo=null;Jo.init=function(){nn.a.directive("focus",{inserted:function(e,t){(t.value||void 0===t.value)&&(e.focus&&e.focus(),e.select&&e.select())},updated:function(e,t){t.value&&(e.focus&&e.focus(),e.select&&e.select())}}),nn.a.directive("debounce",{inserted:function(e,t){e.oninput=function(n){clearTimeout(Xo),Xo=setTimeout((function(){e.dispatchEvent(new Event("change"))}),parseInt(t.value)||500)}}}),nn.a.filter("translate",(function(e){return U.translate(e)})),nn.a.filter("extractTranslation",(function(e){return U.getTranslation(e)}))};n(159),n(161),n(163);var qo={init:function(){un.global.onAnyKey((function(e,t,n){if(n.ctrlKey&&n.shiftKey&&39===e){var i=D.getSavedUsers(),a=Wt.getCurrentUser(),r=i.indexOf(a),o=i[r=r+1_.getLatestModelVersion().major&&(log.info('data model version of user "'.concat(n,'" is newer than version of running AsTeRICS Grid -> prevent autologin.')),n=null,D.setAutologinUser("")),log.info("autologin user: "+n),We.isDemoMode()?(e.push(jr.registerOffline(s.LOCAL_DEMO_USERNAME,s.LOCAL_DEMO_USERNAME)),D.setAutologinUser("")):e.push(jr.loginStoredUser(n,!0)),Promise.all(e).finally((function(){Sn.init();var e=n||We.isDemoMode(),i=t||D.getSavedUsers().length>0;D.setLastActiveUser(n||t||"");var a=location.hash||(e?"#main":i?"#login":"#welcome");Fo.isInitialized()||Fo.init("#injectView",a)}))}()}]); \ No newline at end of file diff --git a/serviceWorker.js b/serviceWorker.js index 42ba69dfe..ca4599144 100644 --- a/serviceWorker.js +++ b/serviceWorker.js @@ -23,7 +23,7 @@ self.addEventListener('activate', event => { self.clients.matchAll().then(clients => { clients.forEach(client => client.postMessage({activated: true})); }); - console.log('Service Worker active! Version: https://github.com/asterics/AsTeRICS-Grid/releases/tag/#ASTERICS_GRID_VERSION#'); + console.log('Service Worker active! Version: https://github.com/asterics/AsTeRICS-Grid/releases/tag/release-2021-02-05-14.44/+0100'); }); workbox.routing.registerRoute(({url, request, event}) => {