diff --git a/app/build/asterics-grid.bundle.js b/app/build/asterics-grid.bundle.js index d690fd4cc..66d157900 100644 --- a/app/build/asterics-grid.bundle.js +++ b/app/build/asterics-grid.bundle.js @@ -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=[],h=t.length,p=t[i],m=t[i+1];if(i===h&&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(137);"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={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_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"};i.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===i.ENVIRONMENT,i.IS_ENVIRONMENT_PROD=!i.IS_ENVIRONMENT_DEV,i.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),i.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var a={},r=100;let s=JSON.parse(i.MODEL_VERSION),o={major:null,minor:null,patch:null};a.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+r++},a.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},a.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},a.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},a.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)},a.getModelVersionString=function(){return i.MODEL_VERSION},a.getModelVersionObject=function(e){if(!e)return o;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:o},a.getLatestModelVersion=function(){return s};let l=window.Model;class c extends(l({id:String,modelName:String,modelVersion:String,label:[String],keyCode:[Number],keyName:[String],repeat:[Number],timeout:[Number],holdDuration:[Number]})){constructor(e,t){super(e=a.setDefaults(e,t,c)),this.id=this.id||a.generateId("input-event-key")}isValid(){return this.modelName&&this.label&&this.keyCode}static getModelName(){return"InputEventKey"}}c.defaults({id:"",modelName:c.getModelName(),modelVersion:i.MODEL_VERSION,repeat:1,timeout:0,holdDuration:0});class d extends(l({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[l.Array(String)],areURL:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,d)),this.id=this.id||a.generateId("input-event-are")}isValid(){return this.modelName&&this.label&&this.eventNames.length>0}static getModelName(){return"InputEventARE"}}d.defaults({id:"",modelName:d.getModelName(),modelVersion:i.MODEL_VERSION,eventNames:[]});class u extends(l({id:String,modelName:String,modelVersion:String,globalReadActive:[Boolean],scanEnabled:[Boolean],scanAuto:[Boolean],scanTimeoutMs:[Number],scanTimeoutFirstElementFactor:[Number],scanVertical:[Boolean],scanBinary:[Boolean],scanInputs:[l.Array(Object)],hoverEnabled:[Boolean],hoverTimeoutMs:Number,hoverHideCursor:[Boolean],hoverDisableHoverpane:[Boolean],mouseclickEnabled:[Boolean],dirEnabled:[Boolean],dirInputs:[l.Array(Object)],dirWrapAround:[Boolean],dirResetToStart:[Boolean],seqEnabled:[Boolean],seqInputs:[l.Array(Object)],huffEnabled:[Boolean],huffElementCount:[Number],huffInputs:[l.Array(Object)],huffColors:[l.Array(String)],huffShowColors:[Boolean],huffShowNumbers:[Boolean],huffColorWholeElement:[Boolean],huffTimeout:[Number],huffMarkInactive:[Boolean]})){constructor(e,t){super(e=a.setDefaults(e,t,u)),this.id=this.id||a.generateId("input-config")}static getModelName(){return"InputConfig"}static getInputEventTypes(){return[c,d]}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)}}u.UP="UP",u.DOWN="DOWN",u.LEFT="LEFT",u.RIGHT="RIGHT",u.SELECT="SELECT",u.NEXT="NEXT",u.NEXT_ELEMENT="NEXT_ELEMENT",u.GENERAL_INPUT="GENERAL_INPUT",u.getNumConst=e=>"NUM"+e,u.DEFAULT_SCAN_INPUTS=[new c({label:u.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new c({label:u.NEXT,keyCode:32,keyName:"Space"})],u.DEFAULT_SEQ_INPUTS=[new c({label:u.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new c({label:u.NEXT_ELEMENT,keyCode:32,keyName:"Space"})],u.DEFAULT_DIR_INPUTS=[new c({label:u.SELECT,keyCode:32,keyName:"Space"}),new c({label:u.LEFT,keyCode:37,keyName:"ArrowLeft"}),new c({label:u.RIGHT,keyCode:39,keyName:"ArrowRight"}),new c({label:u.UP,keyCode:38,keyName:"ArrowUp"}),new c({label:u.DOWN,keyCode:40,keyName:"ArrowDown"})],u.DEFAULT_HUFF_INPUTS=[new c({label:u.GENERAL_INPUT,keyCode:49,keyName:"Digit1"}),new c({label:u.GENERAL_INPUT,keyCode:50,keyName:"Digit2"}),new c({label:u.GENERAL_INPUT,keyCode:51,keyName:"Digit3"}),new c({label:u.GENERAL_INPUT,keyCode:52,keyName:"Digit4"})],u.DEFAULT_HUFF_COLORS=["#D55E00","#F0E442","#009E73","#0072B2","#CC79A7","#E69F00","#56B4E9","#000000","#016619"],u.defaults({id:"",modelName:u.getModelName(),modelVersion:i.MODEL_VERSION,scanAuto:!1,scanTimeoutMs:1e3,scanTimeoutFirstElementFactor:1,scanBinary:!0,hoverTimeoutMs:1e3,mouseclickEnabled:!0,scanInputs:u.DEFAULT_SCAN_INPUTS,dirInputs:u.DEFAULT_DIR_INPUTS,seqInputs:u.DEFAULT_SEQ_INPUTS,dirWrapAround:!0,huffInputs:u.DEFAULT_HUFF_INPUTS,huffColors:u.DEFAULT_HUFF_COLORS,huffShowColors:!0,huffShowNumbers:!0,huffElementCount:0,huffTimeout:4e3,huffMarkInactive:!0});class f extends(l({id:String,modelName:String,modelVersion:String,lastOpenedGridId:[String],globalGridId:[String],globalGridActive:[Boolean],globalGridHeightPercentage:[Number],locked:[Boolean],fullscreen:[Boolean],hashCodes:[Object],inputConfig:u})){constructor(e,t){super(e=a.setDefaults(e,t,f)||{}),this.id=this.id||a.generateId(f.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"}}f.defaults({id:"",modelName:f.getModelName(),modelVersion:i.MODEL_VERSION,locked:void 0,fullscreen:void 0,hashCodes:{},inputConfig:new u,globalGridActive:!1,globalGridHeightPercentage:15});var h="could not access local storage, maybe disabled by user? Error: ",p=null;if("undefined"!=typeof Storage)try{p=window.localStorage}catch(e){log.error(h+e)}var m={save:function(e,t){if(p)try{return p.setItem(e,t)}catch(e){log.error(h+e)}},get:function(e){if(p)try{return p.getItem(e)}catch(e){log.error(h+e)}},remove:function(e){if(p)try{return p.removeItem(e)}catch(e){log.error(h+e)}},getUserPassword:e=>e?v("USER_PASSWORDS_KEY")[e]:null,saveLocalUser(e){let t=v("USER_PASSWORDS_KEY");t[e]="",m.save("USER_PASSWORDS_KEY",JSON.stringify(t))},isSavedLocalUser:e=>""===v("USER_PASSWORDS_KEY")[e],isLastActiveUserLocal:()=>""===v("USER_PASSWORDS_KEY")[m.getLastActiveUser()],saveUserPassword(e,t){let n=v("USER_PASSWORDS_KEY");n[e]=t,m.save("USER_PASSWORDS_KEY",JSON.stringify(n))},removeUserPassword(e){let t=v("USER_PASSWORDS_KEY");delete t[e],m.save("USER_PASSWORDS_KEY",JSON.stringify(t)),m.getAutologinUser()===e&&m.setAutologinUser("")},getSavedUsers(e){let t=m.getSavedLocalUsers(),n=m.getSavedOnlineUsers().concat(t);return e&&n.includes(e)&&(n=n.filter(t=>t!==e),n.unshift(e)),n},getSavedLocalUsers(){let e=v("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""===e[t]).sort((e,t)=>e===i.LOCAL_DEMO_USERNAME?1:t===i.LOCAL_DEMO_USERNAME?-1:e.localeCompare(t))},getSavedOnlineUsers(){let e=v("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""!==e[t]).sort()},setLastActiveUser(e){m.save("LAST_ACTIVEUSER_KEY",e)},getLastActiveUser:()=>m.get("LAST_ACTIVEUSER_KEY"),setAutologinUser(e){e!==i.LOCAL_DEMO_USERNAME&&m.save("AUTOLOGIN_USER_KEY",e)},getAutologinUser:()=>m.get("AUTOLOGIN_USER_KEY"),markSyncedDatabase(e){let t=g();t.includes(e)||t.push(e),m.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},isDatabaseSynced:e=>g().includes(e),unmarkSyncedDatabase(e){let t=g();t=t.filter(t=>t!==e),m.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},getUserMajorModelVersion(e){let t=v("USER_MODELVERSION_KEY");return t[e]?parseInt(JSON.parse(t[e]).major):1},setUserModelVersion(e,t){if(m.getUserMajorModelVersion(e)m.save("AG_GRID_DIMENSIONS_KEY",JSON.stringify(e)),getLastGridDimensions(){let e=m.get("AG_GRID_DIMENSIONS_KEY");return e?JSON.parse(e):{}},addUsedLocales(e){let t=m.get("AG_USED_LOCALES_KEY"),n=t?JSON.parse(t):[];n=[...new Set(n.concat(e))],m.save("AG_USED_LOCALES_KEY",JSON.stringify(n))},getUsedLocales(){let e=m.get("AG_USED_LOCALES_KEY");return e?JSON.parse(e):[]}};function v(e){let t=m.get(e),n=JSON.parse(t),i=n instanceof Object;if("AG_LOCAL_METADATA_KEY"===e&&n&&n.modelName===f.getModelName()){let t={};return t[m.getAutologinUser()||m.getLastActiveUser()]=n,m.save(e,JSON.stringify(t)),t}return t&&i?n:(m.save(e,JSON.stringify({})),{})}function g(){let e=m.get("SYNCED_DBS_LIST_KEY");return e?JSON.parse(e):(m.save("SYNCED_DBS_LIST_KEY",JSON.stringify([])),[])}var _=n(0),b=n.n(_),y=n(44),E=n.n(y);let C={},w=m.get("CUSTOM_LANGUAGE_KEY")||"",T=null,S=["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"}]'),A="de";C.initDomI18n=function(){T||(T=window.domI18n({selector:"[data-i18n]",separator:" // ",languages:S,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===A||(N.sort((t,n)=>t[e].toLowerCase()>n[e].toLowerCase()?1:-1),A=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=S.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),m.save("CUSTOM_LANGUAGE_KEY",w),b()(document).trigger(i.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",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",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",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event"},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",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",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",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event"};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 H.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 H.ELEMENT_TYPE_PREDICTION:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    ${t}
    \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)}};class M extends(l({id:String,modelName:String,modelVersion:String,data:[String],author:[String],authorURL:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,M)),this.id=this.id||a.generateId(M.getIdPrefix())}static getModelName(){return"GridImage"}static getIdPrefix(){return"grid-image"}}M.defaults({id:"",modelName:M.getModelName(),modelVersion:i.MODEL_VERSION,data:null,author:null,authorURL:null});class P extends(l({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0]})){constructor(e,t){super(e=a.setDefaults(e,t,P)),this.id=this.id||a.generateId("grid-action-speak")}static getModelName(){return"GridActionSpeak"}}P.defaults({id:"",modelName:P.getModelName(),modelVersion:i.MODEL_VERSION});class U extends(l({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0],speakText:[Object,String]})){constructor(e,t){super(e=a.setDefaults(e,t,U)),this.id=this.id||a.generateId("grid-action-speak-custom")}static getModelName(){return"GridActionSpeakCustom"}}U.defaults({id:"",modelName:U.getModelName(),modelVersion:i.MODEL_VERSION,speakText:{}});class G extends(l({id:String,modelName:String,modelVersion:String,areURL:[String],areModelGridFileName:[String],componentId:[String],dataPortId:[String],dataPortSendData:[String],eventPortId:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,G)),this.id=this.id||a.generateId("grid-action-are")}static getModelName(){return"GridActionARE"}}G.defaults({id:"",modelName:G.getModelName(),modelVersion:i.MODEL_VERSION});class F extends(l({id:String,modelName:String,modelVersion:String,dictionaryKey:[String,void 0,null],suggestOnChange:[Boolean]})){constructor(e,t){super(e=a.setDefaults(e,t,F)),this.id=this.id||a.generateId("grid-action-predict")}static getModelName(){return"GridActionPredict"}}F.defaults({id:"",modelName:F.getModelName(),modelVersion:i.MODEL_VERSION,dictionaryKey:null,suggestOnChange:!1});class j extends(l({id:String,modelName:String,modelVersion:String,action:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,j)),this.id=this.id||a.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_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.defaults({id:"",modelName:j.getModelName(),modelVersion:i.MODEL_VERSION});class B extends(l({id:String,modelName:String,modelVersion:String,action:[String],radioId:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,B)),this.id=this.id||a.generateId("grid-action-webradio")}static getModelName(){return"GridActionWebradio"}static getActions(){return[B.WEBRADIO_ACTION_START,B.WEBRADIO_ACTION_TOGGLE,B.WEBRADIO_ACTION_STOP,B.WEBRADIO_ACTION_NEXT,B.WEBRADIO_ACTION_PREV,B.WEBRADIO_ACTION_VOLUP,B.WEBRADIO_ACTION_VOLDOWN]}}B.WEBRADIO_ACTION_START="WEBRADIO_ACTION_START",B.WEBRADIO_ACTION_TOGGLE="WEBRADIO_ACTION_TOGGLE",B.WEBRADIO_ACTION_STOP="WEBRADIO_ACTION_STOP",B.WEBRADIO_ACTION_NEXT="WEBRADIO_ACTION_NEXT",B.WEBRADIO_ACTION_PREV="WEBRADIO_ACTION_PREV",B.WEBRADIO_ACTION_VOLUP="WEBRADIO_ACTION_VOLUP",B.WEBRADIO_ACTION_VOLDOWN="WEBRADIO_ACTION_VOLDOWN",B.defaults({id:"",modelName:B.getModelName(),modelVersion:i.MODEL_VERSION,radioId:"",action:B.WEBRADIO_ACTION_START});class V extends(l({id:String,modelName:String,language:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,V)),this.id=this.id||a.generateId("grid-action-change-lang")}static getModelName(){return"GridActionChangeLang"}}V.defaults({id:"",modelName:V.getModelName()});class H extends(l({id:String,modelName:String,modelVersion:String,width:Number,height:Number,x:[Number],y:[Number],label:[Object,String,void 0],backgroundColor:[String],hidden:[Boolean],image:[M],actions:[Object],type:String})){constructor(e,t){let n={id:"",modelName:H.getModelName(),modelVersion:i.MODEL_VERSION,label:{},width:1,height:1,type:H.ELEMENT_TYPE_NORMAL};(e=a.setDefaults(e,t,H)||{}).actions=e.actions||[new P],super(Object.assign(n,e)),this.id=this.id||a.generateId("grid-element")}duplicate(){var e=new H(JSON.parse(JSON.stringify(this)));return e.id=a.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}static getActionTypes(){return[P,x,U,F,j,G,B,V]}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"}}H.ELEMENT_TYPE_NORMAL="ELEMENT_TYPE_NORMAL",H.ELEMENT_TYPE_COLLECT="ELEMENT_TYPE_COLLECT",H.ELEMENT_TYPE_PREDICTION="ELEMENT_TYPE_PREDICTION";class z extends(l({id:String,modelName:String,modelVersion:String,fileName:[String],dataBase64:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,z)),this.id=this.id||a.generateId(z.getModelName().toLowerCase())}static getModelName(){return"AdditionalGridFile"}}z.defaults({id:"",modelName:z.getModelName(),modelVersion:i.MODEL_VERSION});class W extends(l({id:String,modelName:String,modelVersion:String,radioId:[String],radioUUID:[String],radioName:[String],radioUrl:[String],faviconUrl:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,W)),this.id=this.id||a.generateId("webradio")}static getModelName(){return"Webradio"}}W.defaults({id:"",modelName:W.getModelName(),modelVersion:i.MODEL_VERSION});let K={};K.regenerateIDs=function(e){let t={},n=[];return e.forEach(e=>{let n=a.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}},K.sortGridElements=function(e){return e?e.sort((e,t)=>e.y!==t.y?e.y-t.y:e.x-t.x):e},K.generateGlobalGrid=function(e,t){let n=new H({width:1,height:1,x:0,y:0,label:C.getTranslationObject("Home // Start",t),image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMjgwLjM3IDE0OC4yNkw5NiAzMDAuMTFWNDY0YTE2IDE2IDAgMCAwIDE2IDE2bDExMi4wNi0uMjlhMTYgMTYgMCAwIDAgMTUuOTItMTZWMzY4YTE2IDE2IDAgMCAxIDE2LTE2aDY0YTE2IDE2IDAgMCAxIDE2IDE2djk1LjY0YTE2IDE2IDAgMCAwIDE2IDE2LjA1TDQ2NCA0ODBhMTYgMTYgMCAwIDAgMTYtMTZWMzAwTDI5NS42NyAxNDguMjZhMTIuMTkgMTIuMTkgMCAwIDAtMTUuMyAwek01NzEuNiAyNTEuNDdMNDg4IDE4Mi41NlY0NC4wNWExMiAxMiAwIDAgMC0xMi0xMmgtNTZhMTIgMTIgMCAwIDAtMTIgMTJ2NzIuNjFMMzE4LjQ3IDQzYTQ4IDQ4IDAgMCAwLTYxIDBMNC4zNCAyNTEuNDdhMTIgMTIgMCAwIDAtMS42IDE2LjlsMjUuNSAzMUExMiAxMiAwIDAgMCA0NS4xNSAzMDFsMjM1LjIyLTE5My43NGExMi4xOSAxMi4xOSAwIDAgMSAxNS4zIDBMNTMwLjkgMzAxYTEyIDEyIDAgMCAwIDE2LjktMS42bDI1LjUtMzFhMTIgMTIgMCAwIDAtMS43LTE2LjkzeiIvPjwvc3ZnPg"}),actions:[new x({toGridId:e})]}),i=new H({width:1,height:1,x:1,y:0,label:C.getTranslationObject("Back // Zurück",t),image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDUwNEMxMTkgNTA0IDggMzkzIDggMjU2UzExOSA4IDI1NiA4czI0OCAxMTEgMjQ4IDI0OC0xMTEgMjQ4LTI0OCAyNDh6bTExNi0yOTJIMjU2di03MC45YzAtMTAuNy0xMy0xNi4xLTIwLjUtOC41TDEyMS4yIDI0Ny41Yy00LjcgNC43LTQuNyAxMi4yIDAgMTYuOWwxMTQuMyAxMTQuOWM3LjYgNy42IDIwLjUgMi4yIDIwLjUtOC41VjMwMGgxMTZjNi42IDAgMTItNS40IDEyLTEydi02NGMwLTYuNi01LjQtMTItMTItMTJ6Ii8+PC9zdmc+"}),actions:[new x({toLastGrid:!0})]}),a=new P;t&&(a.speakLanguage=t);let r=new H({width:Math.max(4,-4),height:1,x:2,y:0,type:H.ELEMENT_TYPE_COLLECT,actions:[a]}),s=new H({label:C.getTranslationObject("Delete Word // Wort löschen",t),width:1,height:1,x:2+r.width,y:0,image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48cGF0aCBkPSJNNTc2IDY0SDIwNS4yNkE2My45NyA2My45NyAwIDAgMCAxNjAgODIuNzVMOS4zNyAyMzMuMzdjLTEyLjUgMTIuNS0xMi41IDMyLjc2IDAgNDUuMjVMMTYwIDQyOS4yNWMxMiAxMiAyOC4yOCAxOC43NSA0NS4yNSAxOC43NUg1NzZjMzUuMzUgMCA2NC0yOC42NSA2NC02NFYxMjhjMC0zNS4zNS0yOC42NS02NC02NC02NHptLTg0LjY5IDI1NC4wNmM2LjI1IDYuMjUgNi4yNSAxNi4zOCAwIDIyLjYzbC0yMi42MiAyMi42MmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMEwzODQgMzAxLjI1bC02Mi4wNiA2Mi4wNmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMGwtMjIuNjItMjIuNjJjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNMMzM4Ljc1IDI1NmwtNjIuMDYtNjIuMDZjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNsMjIuNjItMjIuNjJjNi4yNS02LjI1IDE2LjM4LTYuMjUgMjIuNjMgMEwzODQgMjEwLjc1bDYyLjA2LTYyLjA2YzYuMjUtNi4yNSAxNi4zOC02LjI1IDIyLjYzIDBsMjIuNjIgMjIuNjJjNi4yNSA2LjI1IDYuMjUgMTYuMzggMCAyMi42M0w0MjkuMjUgMjU2bDYyLjA2IDYyLjA2eiIvPjwvc3ZnPg"}),actions:[new j({action:j.COLLECT_ACTION_REMOVE_WORD})]}),o=new H({label:C.getTranslationObject("Clear // Leeren",t),width:1,height:1,x:3+r.width,y:0,image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDhDMTE5IDggOCAxMTkgOCAyNTZzMTExIDI0OCAyNDggMjQ4IDI0OC0xMTEgMjQ4LTI0OFMzOTMgOCAyNTYgOHptMTIxLjYgMzEzLjFjNC43IDQuNyA0LjcgMTIuMyAwIDE3TDMzOCAzNzcuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDI1NiAzMTJsLTY1LjEgNjUuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDEzNC40IDMzOGMtNC43LTQuNy00LjctMTIuMyAwLTE3bDY1LjYtNjUtNjUuNi02NS4xYy00LjctNC43LTQuNy0xMi4zIDAtMTdsMzkuNi0zOS42YzQuNy00LjcgMTIuMy00LjcgMTcgMGw2NSA2NS43IDY1LjEtNjUuNmM0LjctNC43IDEyLjMtNC43IDE3IDBsMzkuNiAzOS42YzQuNyA0LjcgNC43IDEyLjMgMCAxN0wzMTIgMjU2bDY1LjYgNjUuMXoiLz48L3N2Zz4"}),actions:[new j({action:j.COLLECT_ACTION_CLEAR})]});return new se({label:C.getTranslationObject("Global Grid",t),gridElements:[n,i,r,s,o],rowCount:3})},K.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()}},K.getFreeCoordinates=function(e){let t=new se({},e),n={};for(let e=0;e{for(let t=e.x;t({x:n[e].x,y:n[e].y}))},K.getFillElements=function(e){return K.getFreeCoordinates(e).map(e=>new H({x:e.x,y:e.y}))},K.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},K.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};class Y extends(l({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,Y)),this.id=this.id||a.generateId(Y.getModelName().toLowerCase())}static getModelName(){return"EncryptedObject"}}Y.defaults({modelVersion:i.MODEL_VERSION});let J={},X=["thumbnail"];J.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===X.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===X.indexOf(a)&&(t[a]=e(t[a],n,i))});return t}(i[e],t,n))}),i},J.getDefaultRemovedPlaceholder=function(){return"_removed_"};let q=window.sjcl,Z=window.log;function Q(){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?Z.warn("object type has to be a constructor function or empty, aborting."):r&&r.isShortVersion?Z.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],a&&(n[e]=a)):Z.warn("cache-values has to be set, aborting."):Z.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"!=typeof e)return void Z.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?(Z.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 ee={},te=null,ne=null,ie=!1,ae=new Q;function re(){if(!ne||!te){let e="using encryptionService uninitialized is not possible, aborting...";throw Z.error(e),e}}ee.encryptObject=function(e,t){if(re(),!e)return e;t=t||{};let n=new Y({id:e.id,modelName:e.modelName});n._id=e.id,e._rev&&(n._rev=e._rev);let i=JSON.stringify(e),a=JSON.stringify(J.removeLongPropertyValues(e)),r=i!==a;return n.encryptedDataBase64=ee.encryptString(i,t.encryptionKey),n.encryptedDataBase64Short=r?ee.encryptString(a,t.encryptionKey):null,n},ee.decryptObjects=function(e,t){if(re(),!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=ee.decryptString(n,t.encryptionKey),r=JSON.parse(a),r.isShortVersion=!0}else a=ee.decryptString(e.encryptedDataBase64,t.encryptionKey),r=JSON.parse(a);r._id=e._id,r._rev=e._rev,i.push(r)}catch(t){throw Z.error("error decrypting object: "+e.modelName+", id: "+e.id),Z.error(t),t}}),i.length>1?i:i[0]},ee.encryptString=function(e,t){t||re();let n=null;return n=(t=t||ne)&&!ie?q.encrypt(t,e,{iter:1e3}):e,n},ee.decryptString=function(e,t){if(t||re(),ae.has(e))return Z.debug("using decryption cache..."),ae.get(e);t=t||ne;let n=null;(new Date).getTime();if(t&&!ie)n=q.decrypt(t,e);else try{n=e;let i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=q.decrypt(t,e))}catch(i){n=q.decrypt(t,e)}return ae.set(e,n),n},ee.getStringHash=function(e){let t=q.hash.sha256.hash(e);return q.codec.hex.fromBits(t)},ee.getUserPasswordHash=function(e){return ee.getStringHash("STATIC_USER_PW_SALT"+e)},ee.setEncryptionProperties=function(e,t,n){e=e||"",te=t,ne=ee.getStringHash(""+te+e),ie=n,ae.clearAll(),Z.debug("new encryption key is: "+ne)},ee.resetEncryptionProperties=function(){Z.debug("reset encryption properties..."),te=null,ne=null,ie=!1};class se extends(l({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:l.Array(H),additionalFiles:[l.Array(z)],webRadios:[l.Array(W)],thumbnail:[Object]})){constructor(e,t){(e=a.setDefaults(e,t,se))&&(e.id=e.id?e.id:a.generateId(se.getIdPrefix())),super(e),this.minColumnCount=e.minColumnCount||this.getWidth()||m.getLastGridDimensions().minColumnCount||4,this.rowCount=e.rowCount||this.getHeight()||m.getLastGridDimensions().rowCount||3,this.id=this.id||a.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))}),ee.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=K.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}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===H.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===G.getModelName())[0]}getAREURL(){let e=this.getAREFirstAction();return e?e.areURL:null}clone(){let e=new se(this);return delete e._id,delete e._rev,e.id=a.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"}}se.defaults({id:"",modelName:se.getModelName(),modelVersion:i.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:C.getBrowserLang()});let oe={},le=!1,ce=!1;function de(e){return new URLSearchParams(window.location.search).has(e)}function ue(e){return new URLSearchParams(window.location.search).get(e)}function fe(e){return"false"===ue(e)}oe.isDemoMode=function(){return le=le||de("demo"),function(e){if(!de(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)}}("demo"),le},oe.isScanningEnabled=function(){return de("scanning")&&!fe("scanning")},oe.isDirectionEnabled=function(){return de("direction")&&!fe("direction")},oe.isHuffmanEnabled=function(){return de("huffman")&&!fe("huffman")},oe.shouldResetDatabase=function(){let e=!ce&&(oe.isDemoMode()||"true"===ue("reset"));return ce=!0,e},oe.getDefaultGridsetName=function(){return ue("default")};var he=n(8),pe=n.n(he);let me={};function ve(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 ge(e){let t=be(e);return t.push(ee.encryptObject),t}function _e(e){let t=be(e);return e.major&&t.unshift(ee.decryptObjects),t}function be(e){if(e.major===a.getLatestModelVersion().major)return[];let t=[];switch(e.major){case 1:t.push((function(e,t){if(e.modelName===f.getModelName()){Z.info("converting model version from V1 to V2: "+e.modelName);let t=e.inputConfig;t.dirInputs=u.DEFAULT_DIR_INPUTS,t.huffInputs=u.DEFAULT_HUFF_INPUTS,t.scanInputs=u.DEFAULT_SCAN_INPUTS,t.scanKey&&(t.scanInputs=[],t.scanInputs.push(new c({label:u.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=a.getModelVersionString(),e}));case 2:t.push((function(e,t){if(e.modelName===se.getModelName()){if(Z.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===U.getModelName()){let n=t.speakText;t.speakText={},t.speakText[e.locale]=n,t.speakLanguage=void 0}else t.modelName===P.getModelName()&&(t.speakLanguage=void 0)})})}return e.modelVersion=a.getModelVersionString(),e}))}return t}function ye(e,t,n,a,r){let s=this,o=null,l=null,c=null,d=!0,u=i.DB_SYNC_STATE_FAIL,f=!1,h=null,p={};function v(e,t){let n=new pe.a(e,{auto_compaction:!0});return n.info().then((function(t){return log.debug(e+" info:"),log.debug(t),Promise.resolve(n)}))}function g(){return l&&o?new Promise(t=>{let n=(new Date).getTime();function r(){m.markSyncedDatabase(e),c=o.sync(l,{live:!0,retry:!1}).on("paused",(function(e){log.debug("sync paused"),log.debug(e),_(i.DB_SYNC_STATE_SYNCED)})).on("active",(function(e){log.debug("sync active"),log.debug(e),_(i.DB_SYNC_STATE_SYNCINC)})).on("change",(function(e){E(e)})).on("error",(function(e){log.info("couchdb error"),log.info(e),y()}))}s.wasCurrentDatabaseSynced()||a?(r(),t()):(log.debug("database wasn't synced before, so temporarily use remote db until sync is done..."),d=!1,c=o.sync(l,{live:!1,retry:!1}).on("active",(function(e){_(i.DB_SYNC_STATE_SYNCINC)})).on("paused",(function(){_(i.DB_SYNC_STATE_SYNCED)})).on("error",(function(e){log.info("couchdb error"),log.error(e),y()})).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"),d=!0,r())})),t())}):(log.error("trying to setupSync() but remoteDb or db is not specified! Aborting..."),Promise.reject())}function _(e){if(!f)try{u=e,b()(document).trigger(i.EVENT_DB_SYNC_STATE_CHANGE,e)}catch(e){log.error(e)}}function y(){f||(s.cancelSync(),l&&(l.close(),l=null),b()(document).trigger(i.EVENT_DB_CONNECTION_LOST),_(i.DB_SYNC_STATE_FAIL))}function E(e){if(r)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 p[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)),!f&&(t.length>0||n.length>0)&&r(t,n)}catch(e){log.error(e)}}function C(e){e&&e.length>0&&e.forEach(e=>{let t=T(e),n=w(e);(!p[t]||p[t](o=e,Promise.resolve())),a.push(h)),t&&a.push(v(t,!0).then(e=>(l=e,n?(l.changes({since:"now",live:!0,include_docs:!0}).on("change",(function(e){E(e)})),Promise.resolve()):h.then(()=>g()))));let r=Promise.all(a);return r.then(()=>{b()(document).trigger(i.EVENT_DB_INITIALIZED)}),r},s.put=function(e){let t=s.getDbToUse().put(e);return t.then(e=>{C([e])}),t},s.bulkDocs=function(e){let t=s.getDbToUse().bulkDocs(e);return t.then(e=>{C([e])}),t},s.startSync=function(e){if(!l&&h)return h.then(()=>v(e,!0)).then(e=>(l=e,g()));log.warn("startSync() is not possible if remote database is already open, or local database not opened")},s.getDbToUse=function(){let e=d&&!n?o:l;if(!e||f)throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase().";return e},s.close=function(){if(f)return Promise.resolve();let e=[];f=!0,ee.resetEncryptionProperties(),s.cancelSync(),o&&e.push(o.close()),l&&e.push(l.close()),o=null,l=null;let t=Promise.all(e);return t.then(()=>{b()(document).trigger(i.EVENT_DB_CLOSED)}),t},s.destroyDb=function(e){return s.close().then(()=>new pe.a(e).destroy())},s.getOpenedDatabaseName=function(){return e},s.wasCurrentDatabaseSynced=function(){return m.isDatabaseSynced(e)},s.isUsingLocalDb=function(){return d},s.getSyncState=function(){return u},s.isSyncEnabled=function(){return!!c},s.cancelSync=function(){c&&(log.debug("canceling sync ..."),_(i.DB_SYNC_STATE_STOPPED),c.cancel(),c=null)},s.resumeSync=function(){if(!n&&!c&&l)return log.debug("resuming sync..."),g()}}me.convertLiveToDatabaseObjects=function(e,t){Z.trace("conversion to database - before filters:",e);let n=ve(e,t,ge);return Z.trace("conversion to database - after filters:",n),n},me.convertDatabaseToLiveObjects=function(e,t){Z.trace("conversion to live - before filters:",e);let n=ve(e,t,_e);return Z.trace("conversion to live - after filters:",n),n},me.updateDataModel=function(e){return ve(e,null,be)};let Ee={},Ce=null,we=new Q,Te=null;function Se(){return Ne().getDbToUse()}function Ne(){if(!Ce||!Ce.getDbToUse())throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase() or pouchDbService.createDatabase().";return Ce}function Ae(){Te&&(clearTimeout(Te),Te=null),Ne().isUsingLocalDb()&&Ne().getSyncState()!==i.DB_SYNC_STATE_SYNCINC||Ne().cancelSync()}function Ie(){let e=Ne().wasCurrentDatabaseSynced()?0:2e3;Te=setTimeout(()=>{Ne().resumeSync()},e)}function ke(e,t){t.forEach(e=>{e._deleted?we.clearAll():(we.set(e.id,e),we.clear(f.getIdPrefix()),we.clear(se.getIdPrefix()))}),e=(t=t.filter(e=>!e._deleted)).map(e=>e.id);let n=t.map(e=>me.convertDatabaseToLiveObjects(e)),a=Ee.getOpenedDatabaseName(),r=m.getUserMajorModelVersion(a);n.forEach(e=>{m.setUserModelVersion(a,e.modelVersion)}),r===m.getUserMajorModelVersion(a)?b()(document).trigger(i.EVENT_DB_PULL_UPDATED,[e,n]):b()(document).trigger(i.EVENT_DB_DATAMODEL_UPDATE,[e,n])}Ee.initDatabase=function(e,t,n){return Ce&&Ce.getOpenedDatabaseName()===e&&t?Ce.startSync(t):(we.clearAll(),Ee.closeCurrentDatabase(),Ce=new ye(e,t,n,!1,ke),Ce.init())},Ee.createDatabase=function(e,t,n){return we.clearAll(),Ee.closeCurrentDatabase(),Ce=new ye(e,t,n,!0,ke),Ce.init()},Ee.all=function(e,t){if(t&&we.has(t))return log.debug("using cache for retrieving id: "+t),we.getAsPromise(t);if(!t&&e&&we.has(e))return log.debug("using cache for retrieving bulk with id-prefix: "+e),we.getAsPromise(e);let n=Se();return Ae(),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?we.set(t,a):!t&&e&&a&&we.set(e,a),i(a)})).catch((function(e){log.error(e),a()})).finally(()=>{Ie()})})},Ee.save=function(e,t){return log.debug("saving "+e+"..."),Ae(),t.id&&(we.clear(t.id,t),we.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();Ce.put(t).then(i=>{t._rev=i.rev,we.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()}).catch((function(e){t.id&&we.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(()=>{Ie()})})},Ee.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();Ae(),we.clearAll();let t=Ce.bulkDocs(e);return t.finally(()=>{Ie()}),t},Ee.remove=function(e){let t=Se();return Ee.all(null,e).then(e=>(we.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)))},Ee.resetDatabase=function(e){return Ee.isUsingLocalDb()&&Ee.getOpenedDatabaseName()===i.LOCAL_DEMO_USERNAME?(we.clearAll(),new Promise(t=>{Ce.destroyDb(e).then((function(){Ce=null,Ee.initDatabase(e).then(()=>t())})).catch((function(e){log.error("error destroying database: "+e)}))})):Promise.reject("do not destroy!")},Ee.deleteDatabase=function(e){if(Ee.getOpenedDatabaseName()===e&&!Ee.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();we.clearAll();let t=[];return Ee.getOpenedDatabaseName()===e&&t.push(Ee.closeCurrentDatabase()),Promise.all(t).then(()=>new pe.a(e).destroy())},Ee.closeCurrentDatabase=function(){if(!Ce)return Promise.resolve();Ae();let e=Ce.close();return Ce=null,e},Ee.getOpenedDatabaseName=function(){return Ce?Ce.getOpenedDatabaseName():null},Ee.isUsingLocalDb=function(){return Ce?Ce.isUsingLocalDb():null},Ee.getSyncState=function(){return Ce?Ce.getSyncState():null},Ee.isSyncEnabled=function(){return Ce?Ce.isSyncEnabled():null};class Oe extends(l({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]})){constructor(e,t){super(e=a.setDefaults(e,t,Oe)),this.id=this.id||a.generateId(Oe.getIdPrefix())}clone(){let e=new Oe(this);return delete e._id,delete e._rev,e.id=a.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}static getModelName(){return"Dictionary"}static getIdPrefix(){return"dictionary"}}Oe.defaults({id:"",modelName:Oe.getModelName(),modelVersion:i.MODEL_VERSION,data:JSON.stringify({})});let Le={};Le.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 xe=Le;var De=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]=xe.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 Re(){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||(Pe(n)?s.predictNextWord:s.predictCompleteWord),r=r.concat(e(Me(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 De,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(Ue(n)):n.word&&"string"==typeof n.word&&a.addWord(Ue(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=Me(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:!Pe(t),s=i.dontLearn,o=Me(t),l=Me(t,2),c=r?t.substring(0,t.lastIndexOf(o)):t;return c.length>0&&(!Pe(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=Ue(n),i=Ue(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(Pe(t)){let a=Me(t,2),r=Me(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 Me(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 Pe(e){return new RegExp("[\\s\\.\\?!,]").test(e[e.length-1])}function Ue(e){return(e=e||"").replace(/[^a-z0-9áéíóúñüäöß'`´’]/gim,"")}Re.instance=function(){return new Re};var Ge=Re;let $e={},Fe=null,je=[],Be=[],Ve=!1,He=[],ze=null;function We(){Ve&&(Ve=!1,He.forEach(e=>{let t=Be.filter(t=>t.dictionaryKey===e)[0]||new Oe({dictionaryKey:e});t.data=Fe.dictionaryToJSON(e),ut.saveDictionary(t)}))}$e.predict=function(e,t){if(void 0===e||0===je.length)return;t?(Fe.useDictionary(t),-1===He.indexOf(t)&&He.push(t)):(Fe.useAllDictionaries(),He=Fe.getDictionaryKeys());let n=Fe.predict(e,{maxPredicitons:je.length});for(let e=0;e{e&&e.type===H.ELEMENT_TYPE_PREDICTION&&je.push(JSON.parse(JSON.stringify(e)))}),je=je.sort((e,t)=>e.y!==t.y?e.yt.id===e)[0];if(t){let e=b()(`#${t.id} .text-container span`).text();Fe.learn(e),Ve=!0}},$e.getDictionaryKeys=function(){return Fe.getDictionaryKeys()},$e.init=function(e){clearInterval(ze),je=e||[],Ve=!1,Fe=Ge.instance(),ut.getDictionaries().then(e=>{Be=e,e.forEach(e=>{Fe.loadDictionary(e.data,e.dictionaryKey)}),ze=setInterval(We,6e5)})},b()(document).on(i.EVENT_DB_PULL_UPDATED,(e,t,n)=>{n.map(e=>e.modelName).indexOf(Oe.getModelName())>-1&&$e.init(je)});let Ke={},Ye={},Je={},Xe="";Ke.DEFAULT_KEY="DEFAULT_KEY",Ke.DEFAULT_KEY2="DEFAULT_KEY2",Ke.debounce=function(e,t,n){n=n||Ke.DEFAULT_KEY,e||t?(Ye[n]&&clearTimeout(Ye[n]),Ye[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},Ke.clearDebounce=function(e){e=e||Ke.DEFAULT_KEY,Ye[e]&&clearTimeout(Ye[e])},Ke.throttle=function(e,t,n,i){if(!e||!e.apply)return;n=n||500;let a=i||e,r=Je[a];(!r||(new Date).getTime()-r>n)&&(e.apply(null,t),Je[a]=(new Date).getTime())},Ke.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";Xe=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},Ke.appendToClipboard=function(e){Ke.copyToClipboard(Xe+e)},Ke.getClipboardContent=function(){return navigator.clipboard.readText().then(e=>Promise.resolve(e)).catch(e=>(log.warn("failed to read clipboard."),Promise.resolve(null)))},Ke.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},Ke.splitInChunks=function(e,t){let n=[];for(let i=0,a=e.length;i{let e=[];return oe.shouldResetDatabase()&&e.push(Ee.resetDatabase(t)),Promise.all(e)}).then(()=>Ee.all(f.getIdPrefix())).then(t=>{let a=[];return t&&0!==t.length?(i=t instanceof Array?t[0]:t,ee.setEncryptionProperties(e,i.id,n),t.length&&t.length>1&&a.push(function(e,t){log.warn("fixing duplicated metadata...");let n=null;return Ee.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 ee.decryptObjects(n)}catch(i){if(0===a.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return ee.setEncryptionProperties(e,a.pop()),t(n,a)}}(t,n))});let s=n.pop();return ee.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=it(e.modelName,e);r.push(t)}),Promise.all(r)}).then(()=>{let e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach(t=>{e.push(Ee.remove(t))}),Promise.all(e)}).then(()=>(log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()))}(e,t))):(i=new f,ee.setEncryptionProperties(e,i.id,n),a.push(it(f.getIdPrefix(),i))),Promise.all(a)}).then(()=>Ee.all(Oe.getIdPrefix()).then(e=>e?Promise.resolve():new Promise(e=>{log.info("importing dictionary: "+et),b.a.get(et).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 Oe({dictionaryKey:tt,data:e,isDefault:!0});return it(Oe.getIdPrefix(),t)})),Ze.then(()=>{Qe=null,$e.init()}),Ze}function it(e,t){return new Promise((n,i)=>{let a=me.convertLiveToDatabaseObjects(t);Ee.save(e,a).then(()=>{log.debug("saved "+e+", id: "+t.id),n()}).catch((function(e){i(e)}))})}qe.getObject=function(e,t,n){return new Promise((i,a)=>{Ze.then(()=>{if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),a();Ee.all(e.getIdPrefix(),t).then(t=>{let a={objectType:e,onlyShortVersion:n},r=me.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&&Qe!==s&&(Qe=s,m.setUserModelVersion(Ee.getOpenedDatabaseName(),s)),i(r)}).catch(e=>{a(e)})})})},qe.getSingleObject=function(e,t,n){return qe.getObject(e,t,n).then(e=>Promise.resolve(e instanceof Array?e[0]:e))},qe.saveObject=function(e,t,n){return Ze.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()+"..."),qe.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,it(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,it(e.getIdPrefix(),n)}})},qe.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(me.convertLiveToDatabaseObjects(e).forEach(e=>{e._id=e.id}),t>1e3){let t=Math.floor(1e3/n);i=Ke.splitInChunks(e,t)}else i=[e];return function e(t){let n=JSON.parse(JSON.stringify(t.shift()));return Ee.bulkDocs(n).then(()=>t.length>0?e(t):Promise.resolve())}(i)},qe.bulkDelete=function(e){return e.forEach(e=>{e._deleted=!0,e._id=e.id}),Ee.bulkDocs(JSON.parse(JSON.stringify(e)))},qe.removeObject=function(e){return Ee.remove(e)},qe.initForUser=function(e,t,n,i){let a=n&&!i||!1,r=Ee.getOpenedDatabaseName()===e,s=-1!==m.getSavedLocalUsers().indexOf(e);return r&&a===Ee.isSyncEnabled()?Promise.resolve():Ee.initDatabase(e,n,i).then(()=>r?Promise.resolve():nt(t,e,s))},qe.registerForUser=function(e,t,n,i){let a=n&&!i,r=-1!==m.getSavedLocalUsers().indexOf(e);return Ee.getOpenedDatabaseName()===e&&a===Ee.isSyncEnabled()?Promise.resolve():Ee.createDatabase(e,n,i).then(()=>nt(t,e,r))},qe.deleteDatabase=function(e){if(e)return Ee.deleteDatabase(e)},qe.closeCurrentDatabase=function(){return Ee.closeCurrentDatabase()},qe.getCurrentUsedDatabase=function(){return Ee.getOpenedDatabaseName()};var at={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!"}},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])}})},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(at.getBase64FromImg(r,t,n))}catch(e){i(null)}},r.src=e})},urlToBase64:function(e){return new Promise((t,n)=>{if(e.lastIndexOf(".svg")===e.length-4)$.get(e,null,(function(e){try{e.documentElement.width.baseVal.value=e.documentElement.width.baseVal.value||500,e.documentElement.height.baseVal.value=e.documentElement.height.baseVal.value||500;let n=btoa((new XMLSerializer).serializeToString(e));t("data:image/svg+xml;base64,"+n)}catch(e){t(null)}})).fail((function(){t(null)}));else{let n=new Image;n.crossOrigin="anonymous",n.onload=function(){try{t(at.getBase64FromImg(n,1e3))}catch(e){t(null)}},n.onerror=function(){t(null)},n.src=e}})},getScreenshot:function(e){return n.e(3).then(n.t.bind(null,240,7)).then(t=>t.default(document.querySelector(e),{scale:.2,logging:!1,ignoreElements:e=>i.IS_FIREFOX&&-1!==e.style["background-image"].indexOf("image/svg")}).then(e=>Promise.resolve(e.toDataURL())))},getEmptyImage:function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}};let rt={};rt.gridDataToOBF=function(e){},rt.gridSetToOBZ=function(e){},rt.OBFToGridData=function(e,t){let n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():C.getBrowserLang(),a=new se({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 H({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!==P.getModelName()),e.actions.push(new U({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===P.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(at.urlToBase64(i.url).then(e=>(a=e,Promise.resolve())));return Promise.all(r).then(()=>a?Promise.resolve(new M({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))},rt.OBZToGridSet=function(e){let t=[],n=[];return Object.keys(e).forEach(i=>{-1!==i.indexOf(".obf")&&t.push(rt.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 st={readZip:function(e,t){let i={};return new Promise(a=>{Promise.all([n.e(2),n.e(0)]).then(n.t.bind(null,241,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)})})})})}},ot={},lt=null,ct=null,dt=[];ot.setProgress=function(e,t){lt=Math.round(100*t),ct=e,dt.forEach(e=>{e(ct,lt)})},ot.register=function(e){dt.push(e)},ot.clearHandlers=function(){dt=[]};let ut={},ft="app/examples/default.grd.json";oe.getDefaultGridsetName()&&(ft="app/examples/"+oe.getDefaultGridsetName()),ut.getGrid=function(e,t){return e?qe.getSingleObject(se,e,t).then(e=>Promise.resolve(e?new se(e):null)):Promise.resolve(null)},ut.getGlobalGrid=function(e){return ut.getMetadata().then(t=>t.globalGridId&&(e||t.globalGridActive)?ut.getGrid(t.globalGridId).then(e=>Promise.resolve(e)):Promise.resolve(null))},ut.getGrids=function(e,t){return new Promise(n=>{qe.getObject(se,null,!e).then(e=>{if(!e)return void n([]);let i=e instanceof Array?e:[e];t?ut.getMetadata().then(e=>{n(i.filter(t=>t.id!==e.globalGridId))}):n(i)})})},ut.saveGrid=function(e){return e.gridElements=K.sortGridElements(e.gridElements),qe.saveObject(se,e)},ut.saveGrids=function(e){return e.forEach(e=>{e.gridElements=K.sortGridElements(e.gridElements)}),qe.bulkSave(e)},ut.updateGrid=function(e,t){return t.id=e,t.gridElements=K.sortGridElements(t.gridElements),qe.saveObject(se,t,!0)},ut.deleteGrid=function(e){return qe.removeObject(e)},ut.deleteAllGrids=function(){return ut.getGrids().then(e=>e&&0!==e.length?qe.bulkDelete(e):Promise.resolve()).then(()=>{return e="",ut.getMetadata().then(t=>(t.globalGridId=e,t.globalGridActive=!!e,ut.saveMetadata(t)));var e})},ut.importDefaultGridset=function(){return Promise.resolve().then(()=>b.a.get(ft)).then(e=>{if(!e)return Promise.resolve();log.info("importing default grid set "+ft);try{e=JSON.parse(e)}catch(e){}return ut.importData(e,!1,!0)})},ut.saveAdditionalGridFiles=function(e,t){return new Promise(n=>{t||n(),ut.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)}),ut.saveGrid(e).then(()=>{n()})})})},ut.getGridElement=function(e,t){return new Promise(n=>{ut.getGrid(e).then(e=>{let i=e.gridElements.filter(e=>e.id===t)[0];i?n(i):ut.getGlobalGrid().then(e=>{n(e.gridElements.filter(e=>e.id===t)[0])})})})},ut.getGridsAttribute=function(e){return new Promise(t=>{ut.getGrids().then(n=>{let i={};n.forEach(t=>{i[t.id]=t[e]}),t(i)})})},ut.addGridElements=function(e,t){return new Promise(n=>{ut.getGrid(e).then(i=>{(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),ut.updateGrid(e,i).then(()=>{n()})})})},ut.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise(n=>{ut.getMetadata().then(i=>{if(i){let n=i instanceof Array?i[0].id:i.id;e.id=n,m.saveLocalMetadata(e),m.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():qe.saveObject(f,e).then(()=>{n()})})})},ut.getMetadata=function(){return new Promise(e=>{qe.getObject(f).then(t=>{let n=null;if(n=t?t instanceof Array?t[0]:t:new f,!m.shouldSyncNavigation()){let e=m.getLocalMetadata();e&&(n.locked=e.locked,n.fullscreen=e.fullscreen,n.lastOpenedGridId=e.lastOpenedGridId)}e(new f(n))})})},ut.saveImage=function(e){return function(e,t){let n=[];return new Promise((i,r)=>{ut.getMetadata().then(s=>{if(!s||!s.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void r();let o=null;s.hashCodes[e.getModelName()]?o=s.hashCodes[e.getModelName()]:(o={},s.hashCodes[e.getModelName()]=o);let l=a.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(qe.saveObject(e,t)),n.push(qe.saveObject(f,s))),Promise.all(n).then(()=>{i(t.id)})})})}(M,e)},ut.getImage=function(e){return qe.getObject(M,e)},ut.getDictionary=function(e){return e?qe.getSingleObject(Oe,e).then(e=>Promise.resolve(new Oe(e))):Promise.resolve(null)},ut.getDictionaries=function(){return new Promise(e=>{qe.getObject(Oe).then(t=>{if(!t)return void e([]);let n=t instanceof Array?t.map(e=>new Oe(e)):[new Oe(t)];e(n)})})},ut.saveDictionary=function(e){return e.isDefault=!1,qe.saveObject(Oe,e)},ut.deleteObject=function(e){return qe.removeObject(e)},ut.downloadSingleGrid=function(e){ut.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")}})},ut.downloadBackup=function(){let e={},t=[];t.push(ut.getMetadata().then(t=>(e.metadata=t,Promise.resolve()))),t.push(ut.getDictionaries().then(t=>(t.reduce((e,t)=>e&&t.isDefault,!0)||(e.dictionaries=t),Promise.resolve()))),t.push(ut.getGrids(!0).then(t=>(e.grids=t,Promise.resolve()))),Promise.all(t).then(()=>{let t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});k.a.saveAs(t,"my-backup.grd")})},ut.downloadAllGridsSimple=function(){ut.getGrids(!0).then(e=>{e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:J.removeLongPropertyValues(e)})))})},ut.importGridsFromFile=function(e,t){let n=e.name.substring(e.name.length-4),i=!1;return new Promise((a,r)=>{let s=new FileReader;s.onload=function(r){let s=r.target.result,o=[];t&&(ot.setProgress(C.translate("Deleting grids // Grids werden gelöscht")),o.push(ut.deleteAllGrids())),Promise.all(o).then(()=>{let r=null,o=[];if(ot.setProgress(C.translate("Reading grids from file // Grids werden aus Datei gelesen")),".grd"===n)r=JSON.parse(s);else if(".obf"===n)o.push(rt.OBFToGridData(JSON.parse(s)).then(e=>(r=e,Promise.resolve())));else if(".obz"===n){let n=st.readZip(e,!0).then(e=>rt.OBZToGridSet(e)).then(e=>(r=e,t&&(i=!0),Promise.resolve()));o.push(n)}Promise.all(o).then(()=>{ot.setProgress(C.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),ut.importData(r,i,t).then(()=>{a()})})})},s.readAsText(e)})},ut.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();let i=null,r=null,s=null,o=[],l=null;return e instanceof Array?s=me.updateDataModel(e):(i=n?me.updateDataModel(e.dictionaries):null,r=n?me.updateDataModel(e.metadata):null,s=me.updateDataModel(e.grids),i||r||s||!e.id||(s=[me.updateDataModel(e)])),l=r?Promise.resolve(r):ut.getMetadata(),l.then(e=>(s&&o.push(ut.getGrids().then(n=>{let i=n.map(e=>C.getTranslation(e.label)),o=null,l=K.regenerateIDs(s);s=l.grids,r&&(e.lastOpenedGridId=l.idMapping[e.lastOpenedGridId],e.globalGridId=l.idMapping[e.globalGridId]),s.forEach(e=>{let t=C.getTranslation(e.label);e.label[C.getBrowserLang()]=a.getNewName(t,i)});let c=s[0]?s[0].locale:null;if(t){let t=s[0].id;o=K.generateGlobalGrid(t,c),s.unshift(o),e.globalGridId=o.id,e.globalGridActive=!!e.globalGridId}return ut.saveGrids(s).then(()=>ut.saveMetadata(e,!0))})),i&&o.push(ut.getDictionaries().then(e=>qe.bulkDelete(e)).then(()=>(i=i.map(e=>(delete e.id,delete e._id,delete e._rev,new Oe(e))),qe.bulkSave(i).then(()=>($e.init(),Promise.resolve()))))),Promise.all(o)))},ut.getSyncState=function(){return Ee.getSyncState()},ut.getCurrentUser=function(){return qe.getCurrentUsedDatabase()};let ht={},pt="#asterics-grid-user-documentation",mt="",vt=pt,gt=mt,_t=vt;ht.setHelpLocation=function(e,t){gt=mt,_t=vt,mt=e,vt=t||""},ht.setHelpLocationIndex=function(){ht.setHelpLocation("",pt)},ht.revertToLastLocation=function(){ht.setHelpLocation(gt,_t)},ht.openHelp=function(){let e="https://www.asterics.eu/manuals/asterics-grid/"+(mt?mt+".html"+vt:vt);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(),ht.openHelp())}));var bt=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(" "),n("div",{staticStyle:{width:"100%","text-align":"center","font-size":"2em","margin-top":"1em"}},[e.progressText?n("span",[e._v(e._s(e.progressText)+" ...")]):e._e()])]),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._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()],1)])};bt._withStripped=!0;var yt=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.png",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()};yt._withStripped=!0;var Et=n(3),Ct={},wt={},Tt=null,St=!1;function Nt(e){null!==wt[e]&&(wt[e].close(),wt[e]=null,log.debug("SSE closed."))}function At(e){for(var t="",n=0;n{b.a.ajax({type:"PUT",beforeSend:function(e){e.setRequestHeader("Content-Type","text/plain")},url:Ct.getRestURL(i)+"runtime/model/components/"+At(e)+"/ports/"+At(t)+"/data",datatype:"text",crossDomain:!0,data:n,success:function(e,t,n){a(n.responseText,t)},error:function(e,t,n){r(n,e.responseText)}})})},Ct.triggerEvent=function(e,t,n){if(e&&t)return new Promise((i,a)=>{b.a.ajax({type:"PUT",url:Ct.getRestURL(n)+"runtime/model/components/"+At(e)+"/events/"+At(t),datatype:"text",crossDomain:!0,success:function(e,t,n){i(n.responseText,t)},error:function(e,t,n){a(n,e.responseText)}})})},Ct.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.uploadModelBase64=function(e,t){return new Promise((n,i)=>{e?b.a.ajax({type:"PUT",url:Ct.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()})},Ct.uploadAndStartModel=function(e,t,n){return new Promise((i,a)=>{Ct.getModelName(t).then(a=>{a!==n?Ct.uploadModelBase64(e,t).then(()=>{Ct.startModel(t).then(()=>{i()})}):Ct.startModel(t).then(()=>{i()})})})},Ct.downloadDeployedModelBase64=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.startModel=function(e){return new Promise((t,n)=>{b.a.ajax({type:"PUT",url:Ct.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)}})})},Ct.getModelName=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.getComponentInputPortIds=function(e,t){return new Promise((n,i)=>{e?b.a.ajax({type:"GET",url:Ct.getRestURL(t)+"runtime/model/components/"+At(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([])})},Ct.getComponentEventPortIds=function(e,t){return new Promise((n,i)=>{e?b.a.ajax({type:"GET",url:Ct.getRestURL(t)+"runtime/model/components/"+At(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([])})},Ct.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},Ct.getTypeId=function(e,t){let n=window.atob(t);return b()(n).find('components component[id="'+e+'"]').attr("type_id")},Ct.getComponentDescriptorsAsXml=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.getPossibleEvents=function(e,t,n){return new Promise(i=>{Ct.getComponentDescriptorsAsXml(n).then(n=>{let a=Ct.getTypeId(e,t),r=b()(n).find('componentType[id="'+a+'"] eventListenerPort').map((function(){return this.id})).get();i(r)})})},Ct.subscribeEvents=function(e,t,n){if("undefined"==typeof EventSource)return void log.warn("SSE not supported by browser");let i=Ct.getRestURL(e);wt[i]||(wt[i]=new EventSource(i+"runtime/model/channels/event/listener"),wt[i].onopen=function(e){log.debug("SSE opened."),St=!0},wt[i].onerror=function(a){Nt(i),n&&n(a),St&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),Tt=setTimeout((function(){Tt=null,Ct.subscribeEvents(e,t,n)}),3e3))}),wt[i].addEventListener("event",(function(e){t(e.data,200)}),!1)},Ct.unsubscribeEvents=function(e){Tt&&clearTimeout(Tt),St=!1,e?Nt(e):Object.keys(wt).forEach(e=>{Nt(e)})};let It={},kt=[],Ot={},Lt=0;function xt(){let e={},t=null,n=null,i=[],a=[],r=[],s=[],o=[],l=[],u=[],f=[],h=[],p=[],m={},v=document.body,g=!1,_={},b=Lt++;function y(e,t){Ct.subscribeEvents(e.areURL,n=>{e.eventNames.indexOf(n)>-1&&t()})}function E(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&&h.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 A(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(p)}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):Ke.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];y(t.inputEvent,t.fn)}),document.addEventListener("mousemove",C),document.addEventListener("keydown",N),document.addEventListener("keyup",A),document.addEventListener("fullscreenchange",I),v.addEventListener("touchmove",w,{passive:!1}),v.addEventListener("touchstart",S),v.addEventListener("touchend",T))},e.stopListening=function(){g=!1,Object.keys(_).forEach(e=>{let t=_[e];Ct.unsubscribeEvents(t.areURL)}),document.removeEventListener("mousemove",C),document.removeEventListener("keydown",N),document.removeEventListener("keyup",A),document.removeEventListener("fullscreenchange",I),v.removeEventListener("touchmove",w),v.removeEventListener("touchstart",S),v.removeEventListener("touchend",T)},e.destroy=function(){e.stopListening(),kt=kt.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 E(new c({keyCode:27}),e)},e.onAnyKey=function(e){return x(e,h)},e.onTouchMove=function(e){return x(e,l)},e.onTouchStart=function(e){return x(e,u)},e.onTouchEnd=function(e){return x(e,f)},e.onExitFullscreen=function(e){return x(e,p)},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),u=u.filter(t),f=f.filter(t),h=h.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case c.getModelName():return E(e,t);case d.getModelName():_[e.id]={inputEvent:e,fn:t},g&&y(e,t)}},e}It.instance=function(){let e=new xt;return kt.push(e),e},It.pauseAll=function(){kt.forEach(e=>{Ot[e.getID()]=e.isListening(),e.stopListening()})},It.resumeAll=function(){kt.forEach(e=>{Ot[e.getID()]&&e.startListening()})},It.global=It.instance();var Dt=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"}],attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],staticClass:"inline",attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),n("div",{staticClass:"inline",domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.actionLink?n("div",{staticClass:"inline"},[n("a",{staticStyle:{color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[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")])])};Dt._withStripped=!0;let Rt=null,Mt={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null};var Pt={props:["fullHeader"],data:()=>({tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:Mt}),methods:{setTooltip:function(e,t){let n=this;n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(Mt)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout(()=>{n.clearTooltip()},n.tooltipOptions.timeout)),this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink},clearTooltip:function(){let e=this;e.tooltipOptions.revertOnClose&&this.tooltipHTML?e.setTooltip(e.lastTooltipHTML,e.lastTooltipOptions):(this.tooltipHTML=null,this.actionLink=null,this.tooltipImageUrl=null),e.lastTooltipOptions={},e.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=m.get(m.get("WINDOW_SIZE_KEY"));m.save("WINDOW_SIZE_KEY",n),i&&n!==i&&s();let a=m.get("NOTIFICATION_BAR_STYLE_KEY"),r=m.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");a&&(e.setAttribute("style",a),e.style.display="none");r&&t.setAttribute("style",r);function s(){let n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),m.save("NOTIFICATION_BAR_STYLE_KEY",""),m.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}b()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){Ke.debounce(()=>{m.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),b()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",m.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){Ke.debounce(()=>{m.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),window.addEventListener("resize",()=>{Ke.debounce((function(){s()}),300,"RESIZE_RESET_NOTIFICATIONBAR")})}(),Rt=this},beforeDestroy(){}};n(49);function Ut(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=Ut(Pt,Dt,[],!1,null,"7bec61b8",null);Gt.options.__file="src/vue-components/components/notificationBar.vue";var $t=Gt.exports;let Ft={},jt=null;Ft.setViewComponent=function(e,t){jt&&jt.$refs.notificationBar.tooltipOptions.closeOnNavigate&&Ft.clearTooltip(),jt.setComponent(e,t)},Ft.isSidebarOpen=function(){return jt.showSidebar},Ft.setTooltip=function(e,t){jt&&jt.$refs.notificationBar.setTooltip(e,t)},Ft.setTooltipI18n=function(e,t){let n=C.translate(e);Ft.setTooltip(n,t)},Ft.clearTooltip=function(){jt&&jt.$refs.notificationBar.clearTooltip()},Ft.init=function(){jt=new Et.a({el:"#app",components:{NotificationBar:$t},data:()=>({component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:qe.getCurrentUsedDatabase(),isLocalUser:m.isSavedLocalUser(qe.getCurrentUsedDatabase()),syncState:ut.getSyncState(),constants:i,tooltipHTML:null,actionLink:null}),methods:{setComponent(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar(){b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)},openSidebar(){b()(document).trigger(i.EVENT_SIDEBAR_OPEN)},openHelp(){ht.openHelp()},moreNavigation(){b.a.contextMenu("destroy"),b.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":Er.toRegister();break;case"CONTEXT_ADD_OFFLINE":Er.toAddOffline();break;case"CONTEXT_ABOUT":Er.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(),b()("#moreNavigation").contextMenu()}},mounted(){let e=this;function t(){!e.showSidebar&&qe.getCurrentUsedDatabase()&&(Ke.closeFullscreen(),ut.getMetadata().then(t=>{t.fullscreen&&(t.fullscreen=!1,ut.saveMetadata(t).then(()=>{e.openSidebar()}))}))}C.initDomI18n(),b()(document).on(i.EVENT_SIDEBAR_OPEN,()=>{if(!e.showSidebar)return qe.getCurrentUsedDatabase()?void ut.getMetadata().then(t=>{t.locked||t.fullscreen||(e.showSidebar=!0,this.$nextTick(()=>{b()(document).trigger(i.EVENT_SIDEBAR_OPENED),b()(document).trigger(i.EVENT_GRID_RESIZE)}))}):(e.showSidebar=!0,void this.$nextTick(()=>{b()(document).trigger(i.EVENT_SIDEBAR_OPENED),b()(document).trigger(i.EVENT_GRID_RESIZE)}))}),b()(document).on(i.EVENT_SIDEBAR_CLOSE,()=>{e.showSidebar=!1,this.$nextTick(()=>{b()(document).trigger(i.EVENT_GRID_RESIZE)})}),b()(document).on(i.EVENT_DB_INITIALIZED,()=>{e.currentUser=qe.getCurrentUsedDatabase(),e.isLocalUser=m.isSavedLocalUser(e.currentUser)}),b()(document).on(i.EVENT_DB_CLOSED,()=>{e.currentUser=qe.getCurrentUsedDatabase(),e.isLocalUser=m.isSavedLocalUser(e.currentUser)}),b()(document).on(i.EVENT_DB_SYNC_STATE_CHANGE,(t,n)=>{e.syncState=n}),e.syncState=ut.getSyncState(),window.addEventListener("resize",()=>{Ke.debounce((function(){b()(document).trigger(i.EVENT_GRID_RESIZE)}),300,i.EVENT_GRID_RESIZE)}),It.global.onSwipedDown(t).onEscape(t).onExitFullscreen(t),It.global.startListening(),e.openSidebar()},updated(){C.initDomI18n()}})};var Bt=Ut({props:["fullHeader"],data:()=>({show:!Ft.isSidebarOpen(),tag:"div"}),methods:{openSidebar(){b()(document).trigger(i.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn(){this.show=!1},onCloseFn(){this.show=!0}},mounted(){b()(document).on(i.EVENT_SIDEBAR_CLOSE,this.onCloseFn),b()(document).on(i.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy(){b()(document).off(i.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},yt,[],!1,null,"4ff1a546",null);Bt.options.__file="src/vue-components/components/headerIcon.vue";var Vt=Bt.exports,Ht=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)])};Ht._withStripped=!0;var zt={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()}},Wt=(n(53),Ut(zt,Ht,[],!1,null,"66ff21d8",null));Wt.options.__file="src/vue-components/components/accordion.vue";var Kt=Wt.exports,Yt=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")])])])])])])])])};Yt._withStripped=!0;n(4);var Jt={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:x,imageUtil:at,i18nService:C}},methods:{save(){this.saveInternal().then(()=>{this.$emit("reload"),this.$emit("close")})},saveInternal(){let e=this.selectedElement;if(!e){let t=new se(this.gridFrom).getNewXYPos();e=new H({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})),ut.saveGrid(this.gridFrom)}},mounted(){this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),ut.getGrid(this.gridFromProp.id).then(e=>{this.gridFrom=JSON.parse(JSON.stringify(e)),C.initDomI18n()})},updated(){C.initDomI18n()}},Xt=(n(56),Ut(Jt,Yt,[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));Xt.options.__file="src/vue-components/modals/gridLinkModal.vue";var qt=Xt.exports;let Zt=null;var Qt={components:{GridLinkModal:qt,Accordion:Kt,HeaderIcon:Vt},data:()=>({metadata:null,grids:null,graphList:[],selectedGraphElement:null,newLabel:{},showLoading:!0,progressText:"",selectValues:{CONNECTED_GRIDS:"CONNECTED_GRIDS",NOT_REACHABLE_GRIDS:"NOT_REACHABLE_GRIDS",ALL_GRIDS:"ALL_GRIDS"},selectValue:null,linkModal:{show:!1,gridFrom:null,gridTo:null},i18nService:C,currentLanguage:C.getBrowserLang(),imageUtil:at}),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,ut.saveMetadata(this.metadata),t||b()(".all-grids-view").animate({scrollTop:0},200))},reinitContextMenu(){var e;!function(){b.a.contextMenu("destroy");let e=Zt.selectedGraphElement?C.getTranslation(Zt.selectedGraphElement.grid.label):"",t={CONTEXT_CONNECT:{name:C.translate('Connect to grid "{?}" // Verknüpfen mit Grid "{?}"',e),icon:"fas fa-external-link-alt",visible:()=>Zt.selectValue!==Zt.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"}};b.a.contextMenu({selector:".gridOptions",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_CONNECT":Zt.linkModal.gridFrom=Zt.selectedGraphElement.grid,Zt.linkModal.gridTo=Zt.grids.filter(e=>e.id===t)[0],Zt.linkModal.show=!0;break;case"CONTEXT_SHOW":Zt.show(t);break;case"CONTEXT_EDIT":Zt.edit(t);break;case"CONTEXT_DUPLICATE":Zt.clone(t);break;case"CONTEXT_DELETE":Zt.deleteGrid(t);break;case"CONTEXT_EXPORT":Zt.exportToFile(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_DELETE_ALL:{name:"Delete all grids // Alle Grids löschen",icon:"fas fa-trash-alt",disabled:()=>0===Zt.grids.length},CONTEXT_RESET:{name:"Reset to default configuration // Auf Standardkonfiguration zurücksetzen",icon:"fas fa-minus-circle"}},b.a.contextMenu({selector:"#moreButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_NEW":Zt.addGrid();break;case"CONTEXT_IMPORT":document.getElementById("inputFile").click();break;case"CONTEXT_IMPORT_BACKUP":document.getElementById("inputFileBackup").click();break;case"CONTEXT_EXPORT":Zt.exportToFile();break;case"CONTEXT_DELETE_ALL":Zt.deleteAll();break;case"CONTEXT_RESET":Zt.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))&&ut.deleteGrid(e).then(()=>{this.reload()})},addGrid:function(){var e=this.grids.map(e=>C.getTranslation(e.label)),t=new se({label:C.getTranslationObject(a.getNewName("newGrid",e)),gridElements:[]});ut.saveGrid(t).then(()=>this.reload(t.id)).then(()=>{b()("#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)),ut.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show(e){Er.toGrid(e)},edit(e){Er.toEditGrid(e)},clone(e){var t=this;ut.getGrid(e).then(e=>{let n=e.clone();ut.saveGrid(n).then(()=>{t.reload(n.id)})})},exportToFile(e){e?ut.downloadSingleGrid(e):ut.downloadBackup()},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 ut.getMetadata().then(e=>(t.metadata=JSON.parse(JSON.stringify(e)),ut.getGrids())).then(n=>{t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=K.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,ut.deleteAllGrids().then(()=>ut.importDefaultGridset()).then(()=>{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,ut.deleteAllGrids().then(()=>{this.reload()}))},setGlobalGridActive(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,ut.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?")))&&ut.getGlobalGrid(!0).then(e=>e?ut.deleteGrid(e.id):Promise.resolve()).then(()=>{let e=K.generateGlobalGrid(this.grids[0].id);return this.metadata.globalGridId=e.id,this.metadata.globalGridActive=!0,ut.saveGrid(e)}).then(()=>ut.saveMetadata(this.metadata)).then(()=>{this.reload()})},importFromFileInternal(e,t){let n=e.target.files[0];n&&n.name&&(this.showLoading=!0,ut.importGridsFromFile(n,t).then(()=>{this.resetFileInput(e),this.reload()}))},resetFileInput(e){var t=b()(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(){let e=this;b()(document).on(i.EVENT_DB_PULL_UPDATED,e.onPullUpdate),ot.register(t=>{e.progressText=t})},mounted:function(){Zt=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then(()=>{this.reinitContextMenu(),C.initDomI18n()})},updated(){C.initDomI18n()},beforeDestroy(){b()(document).off(i.EVENT_DB_PULL_UPDATED,this.onPullUpdate),b.a.contextMenu("destroy"),ot.clearHandlers()}},en=(n(58),Ut(Qt,bt,[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));en.options.__file="src/vue-components/views/allGridsView.vue";var tn=en.exports,nn=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()};nn._withStripped=!0;let an={},rn={},sn={};an.setState=function(e,t){rn[e]!==t&&(rn[e]=t,sn[e]=sn[e]||[],sn[e].forEach(e=>{e(t)}))},an.getState=function(e){return rn[e]},an.onStateChanged=function(e,t){sn[e]=sn[e]||[],sn[e].push(t)},an.clearListeners=function(e){e?sn[e]=[]:sn={}};let on={};on.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",on.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";var ln=[];let cn=m.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",dn=[],un=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 fn(e){let t=dn.filter(t=>t.name===e);return t.length>0?t:null}function hn(e,t,n,i){-1===dn.map(e=>e.name).indexOf(e)&&dn.push({name:e,lang:t,type:n,ref:i})}function pn(){dn.sort((e,t)=>e.type===on.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===on.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name))}on.speak=function(e,t,n){if(!e)return;on.stopSpeaking(),t=t||C.getBrowserLang();let a=fn(n)||fn(cn)||function(e){return dn.filter(t=>t.lang.substring(0,2)===e)}(t),r=a.filter(e=>e.type===on.VOICE_TYPE_NATIVE),s=a.filter(e=>e.type===on.VOICE_TYPE_RESPONSIVEVOICE);if(on.nativeSpeechSupported()&&r.length>0){var o=new SpeechSynthesisUtterance(e);o.voice=r[0].ref,log.debug("used voice: "+o.voice.name),window.speechSynthesis.speak(o)}else s.length>0&&responsiveVoice.speak(e,s[0].name);function l(){on.isSpeaking()&&an.setState(i.STATE_ACTIVATED_TTS,!0)}l(),setTimeout(()=>{l()},700)},on.speakLabel=function(e,t){e&&t&&ut.getGridElement(e,t).then(e=>{on.speak(C.getTranslation(e.label))})},on.stopSpeaking=function(){on.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},on.isSpeaking=function(){return window.speechSynthesis.speaking||responsiveVoice.isPlaying()},on.getVoicesLangs=function(){let e=dn.map(e=>e.lang.substring(0,2));return C.getAllLanguages().filter(t=>-1!==e.indexOf(t.code))},on.getVoices=function(){return dn},on.setPreferredVoiceName=function(e){cn=e,m.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},on.getPreferredVoiceName=function(){return cn},on.nativeSpeechSupported=function(){if("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis)return!1;let e=ln.length>0?ln:window.speechSynthesis.getVoices();return e=e.length>0?e:window.speechSynthesis.getVoices(),e.length>0},window.speechSynthesis&&window.speechSynthesis.getVoices&&(ln=window.speechSynthesis.getVoices(),setTimeout((function(){(ln=window.speechSynthesis.getVoices()).forEach(e=>{hn(e.name,e.lang,on.VOICE_TYPE_NATIVE,e)}),pn()}),100)),un.forEach(e=>{hn(e.name,e.lang,on.VOICE_TYPE_RESPONSIVEVOICE)}),pn();var mn={},vn=[],gn="";let _n=0,bn=null;function yn(e){gn=e=void 0===e?gn:e,$e.learnFromInput(gn,bn),$('.item[data-type="ELEMENT_TYPE_COLLECT"] .collect-text').text(gn),O.adaptFontSize($('.item[data-type="ELEMENT_TYPE_COLLECT"]'))}function En(e,t){if(!e)return null;let n=e.actions.map(e=>e.modelName).indexOf(t);return-1===n?null:e.actions[n]}function Cn(){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=>{ut.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=[],ut.saveGrid(n).then(()=>{i(!0)}))})})},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return ut.getGrid(n.id).then(e=>{t.push(JSON.parse(JSON.stringify(e))),ut.saveGrid(n)}),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return ut.getGrid(n.id).then(t=>{e.push(JSON.parse(JSON.stringify(t))),ut.saveGrid(n)}),n}}}function wn(e,t,n){var a=this,r=(e=e,t=t,!1),s=!1,o=null,l=null,c=null,d=null,u=null,f=null,h=null,p=null,m=null,v=new Cn;let g=!1;function _(e){return g=!1,(m=new Promise(t=>{e?(y(n,e),E(f).then(()=>{t()})):ut.getGrid(n.gridId).then(e=>{y(n,e),E(f).then(()=>{t()})})})).then(()=>{g=!0}),m}function y(e,t){e&&(o=e.gridId||o,r=null!=e.enableResizing?e.enableResizing:r,s=e.dragAndDrop),h=(f=t).rowCount,p=f.minColumnCount}function E(o){let d=[];return n.dragAndDrop||(o.gridElements=o.gridElements.filter(e=>!e.hidden),d.push(ut.getGlobalGrid().then(e=>{if(e){let t=!0,i=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,a=1,r=1;1===e.getHeight()&&(r=i*f.rowCount/(1-i),a=1/(f.rowCount*i)-1/f.rowCount,r>=1?(a=1,r=Math.round(r)):(r=1,a=Math.round(a)));let s=K.getOffset(e),o=t?e.getWidth()-s.x:1,l=t?f.getWidthWithBounds():1;e.gridElements.forEach(e=>{e.width*=l,e.x*=l,0===e.y&&(e.height*=r)}),f.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}),f.rowCount*=a,f.rowCount+=s.y*r,h=f.rowCount,f.gridElements=e.gridElements.concat(f.gridElements)}return Promise.resolve()}))),Promise.all(d).then(()=>(mn.initWithElements(f.gridElements,s),$e.initWithElements(f.gridElements),b()(e).empty(),b()(e).append(D.getGridBase(o.id)),c=b()("#"+o.id),o.gridElements.forEach((function(e){c.append(e.toHTML(f.locale))})),c.gridList({lanes:h,minColumns:p,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:s},{start:w,stop:S}),l=c.data("_gridList"),o.hasSetPositions()||(c.gridList("resize",h),a.toGridData().then(e=>{f=e,ut.updateGrid(f.id,f)})),function(){let e=[];r&&e.push(b()(t).resizable(C()));return b()(document).on(i.EVENT_GRID_RESIZE,()=>{a.autosize()}),Promise.all(e)}().then(()=>{a.autosize(200)}),Promise.resolve()))}function C(){var e=l._cellHeight,t=l._cellWidth;return{autoHide:!1,handles:"se",disabled:!r,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?ut.getImage(t).then(t=>{if(t){var a=b()("#"+i)[0].getBoundingClientRect().width;at.convertBase64(t.data,a).then(t=>{n.attr("data-img",t),n.children().children()[0].style.backgroundImage='url("'+t+'")',e()})}else e()}):e()}).then(()=>{S()})},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),c.gridList("resizeItem",i.element.parent(),{w:r,h:s}),i.element.css("height",""),i.element.css("width","")}}}function w(){b.a.isFunction(d)&&d(f)}function T(){b.a.isFunction(u)&&setTimeout((function(){u(f)}),200)}function S(){return new Promise(e=>{a.toGridData().then(t=>{v.updateGrid(t).then(n=>{n&&(f=t,a.autosize(),T()),e()})})})}a.autosize=function(e){e=e||0,O.adaptFontSizeForGridElements(),setTimeout((function(){c.gridList("autosize"),setTimeout((function(){if(b()("#grid-layout-background-vertical")[0]){var e=l._cellWidth,t=l._cellHeight;b()("#grid-layout-background-vertical").css("margin-left",e-5+"px"),b()("#grid-layout-background-vertical").css("background-size",`${e}px ${e}px`),b()("#grid-layout-background-horizontal").css("margin-top",t-5+"px"),b()("#grid-layout-background-horizontal").css("background-size",`${t}px ${t}px`),b()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){O.adaptFontSizeForGridElements()}),200),r&&b()(t).resizable(C())}),e)},a.enableElementResizing=function(){b()(t).resizable("enable")},a.disableElementResizing=function(){b()(t).resizable("disable")},a.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(h=e,p=t,c.gridList("resize",h,t)),S()},a.removeElement=function(e){return w(),f.gridElements=f.gridElements.filter(t=>t.id!==e),_(f).then(()=>S()).then(()=>Promise.resolve(f))},a.duplicateElement=function(e){w();let t=f.gridElements.filter(t=>t.id===e)[0].duplicate();f.gridElements.push(t),_(f).then(()=>{l.resolveCollisions(t.id),S()})},a.reinit=function(e){return w(),_(e).then(()=>{T()}),m},a.fillGaps=function(){w(),c.gridList("fillGaps"),S()},a.undo=function(){if(v.canUndo()){var e=v.doUndo();_(f=new se(e)).then(()=>{T()})}},a.redo=function(){if(v.canRedo()){var e=v.doRedo();_(f=new se(e)).then(()=>{T()})}},a.updateGridWithUndo=function(e){return new Promise(t=>{v.updateGrid(e).then(e=>{e?(w(),_().then(()=>{t(!0),T()})):t(!1)})})},a.canUndo=()=>v.canUndo(),a.canRedo=()=>v.canRedo(),a.setLayoutChangedStartListener=function(e){d=e},a.setLayoutChangedEndListener=function(e){u=e},a.getCurrentGridId=function(){return f.id},a.toGridData=function(){return new Promise(e=>{var t=[];f.rowCount=h,f.minColumnCount=p,l.items.forEach((function(e){var n=e.$element.attr("data-id"),i=f.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)})),f.gridElements=t,e(f)})},a.getInitPromise=function(){return m},a.isInitialized=function(){return g},a.destroy=function(){b()(document).off(i.EVENT_GRID_RESIZE),a.setLayoutChangedEndListener(null),a.setLayoutChangedStartListener(null)},_()}mn.initWithElements=function(e,t){vn=[];let n=0,i=0;if(bn=null,e.forEach(e=>{if(e&&e.type===H.ELEMENT_TYPE_NORMAL){i++;let t=C.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===H.ELEMENT_TYPE_COLLECT){let t=JSON.parse(JSON.stringify(e));bn=bn||t.actions.reduce((e,t)=>{let n=F.getModelName()?t.dictionaryKey:null;return e||n},null),vn.push(t)}}),_n=n/i,vn.length>0){let e=setInterval(()=>{$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(e),yn(),t||$e.predict(gn,bn))},100)}},mn.doAction=function(e){En(e,"GridActionPredict")&&$e.predict(gn,bn);let t=e.actions.filter(e=>e.modelName===P.getModelName())[0],n=t&&t.speakLanguage?t.speakLanguage:C.getBrowserLang();on.speak(gn,n)},mn.doCollectElementActions=function(e){if(e){switch(e){case j.COLLECT_ACTION_CLEAR:yn("");break;case j.COLLECT_ACTION_REMOVE_WORD:let e=gn.trim().split(" ");e.pop();let t=e.join(" ");yn(""===t?"":t+" ");break;case j.COLLECT_ACTION_REMOVE_CHAR:yn(gn.substring(0,gn.length-1));break;case j.COLLECT_ACTION_COPY_CLIPBOARD:Ke.copyToClipboard(gn);break;case j.COLLECT_ACTION_APPEND_CLIPBOARD:Ke.appendToClipboard(gn);break;case j.COLLECT_ACTION_CLEAR_CLIPBOARD:Ke.copyToClipboard("")}$e.predict(gn,bn)}},$(window).on(i.ELEMENT_EVENT_ID,(function(e,t){if(0!==vn.length&&!En(t,j.getModelName())&&!En(t,x.getModelName())){if(!t.type||t.type===H.ELEMENT_TYPE_NORMAL){if(!C.getTranslation(t.label))return;let e=C.getTranslation(t.label),n=1===e.length&&_n>.5?e.toLowerCase():e+" ";yn(gn+n),vn.forEach(e=>{let t=En(e,"GridActionPredict");t&&t.suggestOnChange&&$e.predict(gn,bn)})}if(t.type&&t.type===H.ELEMENT_TYPE_PREDICTION){let e=$(`#${t.id} .text-container span`).text();if(e){yn($e.applyPrediction(gn||"",e,bn)),vn.forEach(e=>{let t=En(e,"GridActionPredict");t&&t.suggestOnChange&&$e.predict(gn,bn)})}}}}));var Tn=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()])])])])])};Tn._withStripped=!0;let Sn={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},Nn=10,An=1,In=null,kn=null,On=!1;function Ln(e,t,n){n=n||Nn,t=t||1;let i=[];return new Promise(a=>{if(!e)return a([]);function r(r){r&&r.length&&0!==r.length||(r=[]);let s=t*n-n,o=s+n-1;On=r.length>o+1;for(let e=s;e<=o;e++)if(r[e]){let t=JSON.parse(JSON.stringify(r[e])),n=at.urlToBase64(t[Sn.PROP_IMAGE_URL]);t.promise=n,n.then(e=>{e?t.base64=e:t.failed=!0}),i.push(t)}In=e,a(i)}In!==e?b.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){kn=e,r(e)})):r(kn)})}Sn.query=function(e,t,n){return An=t=t||1,Nn=n||Nn,Ln(e,t,n)},Sn.nextChunk=function(){return An++,Ln(In,An,Nn)},Sn.hasNextChunk=function(){return On};var xn={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(),at.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");at.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 se(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=K.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then(e=>{t(e)})}else t(!1)}e.gridElement.image||(e.gridElement.image=new M),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,at.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then(e=>{let t=new M({data:e});return ut.saveImage(t)}).then(t=>(e.gridElement.image.id=t,at.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 M)),ut.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 M(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 H({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)}}),ut.getMetadata().then(t=>{e.metadata=t})},resetInternal(){this.gridElement=this.metadata=this.originalGridElementJSON=this.elementW=null},preventDefault(e){e.preventDefault()},openHelp(){ht.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,Ke.debounce((function(){Sn.query(n.searchText).then(e=>{n.processSearchResults(e)})}),e)},searchMore(){let e=this;Sn.nextChunk().then(t=>{e.processSearchResults(t)})},clearSearch(){this.searchLoading=!1,this.searchResults=null,this.searchText=""},processSearchResults(e){let t=this;t.hasNextChunk=Sn.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(),ht.setHelpLocation("03_appearance_layout","#edit-modal")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation()}},Dn=(n(60),Ut(xn,Tn,[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));Dn.options.__file="src/vue-components/modals/editGridModal.vue";var Rn=Dn.exports,Mn=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")])])])])])])])])};Mn._withStripped=!0;var Pn={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 se(this.gridData);this.parsedElems.forEach(t=>{var n=new H({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(),ht.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy(){ht.revertToLastLocation()}},Un=(n(62),Ut(Pn,Mn,[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));Un.options.__file="src/vue-components/modals/addMultipleModal.vue";var Gn=Un.exports,$n=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",[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),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 elements // Aktion für Sammelelemente 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.webRadios,callback:function(t){e.$set(e.gridData,"webRadios",t)},expression:"gridData.webRadios"}})],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(" "),"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()])])])};$n._withStripped=!0;let Fn="https://www.radio-browser.info/webservice/json/",jn=["name","country","state","language","tag","tagList","order"],Bn={},Vn=document.getElementById("audioPlayer"),Hn=m.get("WEBRADIO_LAST_PLAYED_ID_KEY"),zn=parseFloat(m.get("WEBRADIO_LAST_VOLUME_KEY")||1),Wn=!1;function Kn(){Ft.setTooltip(C.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*zn)),{revertOnClose:!0,timeout:5e3})}function Yn(e,t){return new Promise((n,i)=>{if(e.radioUrl)return n(e);function a(e,i){i.radioUrl=e[0].url,i.radioUrl.lastIndexOf("/")===i.radioUrl.length-1&&(i.radioUrl=i.radioUrl+";");let a=i.radioUrl.lastIndexOf(":");if(a>-1){let e=i.radioUrl.substring(a+1);parseInt(e)+""===e&&(i.radioUrl=i.radioUrl+"/;")}t&&ut.getGrid(t).then(e=>{let t=(e.webRadios||[]).filter(e=>i.radioId===e.radioId)[0];t&&(t.radioUrl=i.radioUrl,ut.saveGrid(e))}),n(i)}b.a.ajax({type:"GET",url:Fn+"url/"+e.radioId,dataType:"json"}).then(t=>{a(t,e)},(t,n)=>{if("parsererror"===n){let n=t.responseText.substring(t.responseText.indexOf('"name":')+8,t.responseText.indexOf('"url":')-2),i=n.replace(new RegExp('"',"g"),"'"),r=t.responseText.replace(n,i);a(JSON.parse(r),e)}else Ft.setTooltip(C.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName)),i(t)})})}Bn.doAction=function(e,t){ut.getGrid(e).then(n=>{let i=n.webRadios||[],a=t.radioId||Hn,r=i.filter(e=>a===e.radioId)[0]||i[0];if(r)switch(t.action){case B.WEBRADIO_ACTION_START:Yn(r,e).then(e=>{Bn.play(e)});break;case B.WEBRADIO_ACTION_TOGGLE:Yn(r,e).then(e=>{Bn.toggle(e)});break;case B.WEBRADIO_ACTION_STOP:Bn.stop();break;case B.WEBRADIO_ACTION_NEXT:let t=i.map(e=>e.radioId).indexOf(r.radioId);if(t<0||i.length<2)return;t=t+1{Bn.play(e)});break;case B.WEBRADIO_ACTION_PREV:if(t=i.map(e=>e.radioId).indexOf(r.radioId),t<0||i.length<2)return;t=t-1>=0?t-1:i.length-1,Yn(i[t],e).then(e=>{Bn.play(e)});break;case B.WEBRADIO_ACTION_VOLUP:Bn.volumeUp();break;case B.WEBRADIO_ACTION_VOLDOWN:Bn.volumeDown()}else log.info("no radio station to play found.")})},Bn.play=function(e){e&&(Vn.paused||Hn!==e.radioId)&&(Vn.paused||Bn.stop(),Hn=e.radioId||Hn,m.save("WEBRADIO_LAST_PLAYED_ID_KEY",Hn),Yn(e).then(t=>{log.debug("playing: "+t.radioUrl),Vn.src=t.radioUrl,Vn.volume=zn;let n=Vn.play(),i=C.translate("playing: {?} // Wiedergabe: {?}",t.radioName);Ft.setTooltip(i,{closeOnNavigate:!1,actionLink:C.translate("Stop // Stopp"),actionLinkFn:Bn.stop,imageUrl:t.faviconUrl}),n&&n.then&&n.catch(()=>{Hn===e.radioId&&Ft.setTooltip(C.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName))})}))},Bn.stop=function(e){e&&e!==Hn||(Vn.pause(),Ft.clearTooltip())},Bn.toggle=function(e){Vn.paused?Bn.play(e):Bn.stop()},Bn.volumeUp=function(){zn=zn+.15<=1?zn+.15:1,zn=Math.round(100*zn)/100,m.save("WEBRADIO_LAST_VOLUME_KEY",zn),Kn(),Vn.volume=zn},Bn.volumeDown=function(){zn=zn-.15>=0?zn-.15:0,zn=Math.round(100*zn)/100,m.save("WEBRADIO_LAST_VOLUME_KEY",zn),Kn(),Vn.volume=zn},Bn.search=function(e,t,n){if(!e)return Promise.resolve([]);let i={},a=[];jn.forEach(t=>{let n=e.indexOf(t+":");n>-1&&a.push({param:t,position:n})}),a.sort((e,t)=>e.position-t.position),a.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 r=t||20;return r++,i.limit=r,n&&(i.offset=n),new Promise((e,t)=>{b.a.ajax({type:"POST",url:Fn+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then(t=>{Wn=t.length===r;let n=t.filter(e=>"0"!==e.lastcheckok);n=n.slice(0,r-1),e(n.map(e=>({radioId:e.id,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon})))},e=>{t(e)})})},Bn.hasMoreSearchResults=function(){return Wn};let Jn={};function Xn(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak");let a=C.getTranslation(e.label,null,!0);on.speak(a.text,t.speakLanguage||a.lang);break;case"GridActionSpeakCustom":if(log.debug("action speak custom"),t.speakText){let e=C.getTranslation(t.speakText,null,!0);on.speak(e.text,t.speakLanguage||e.lang)}break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?Er.toLastGrid():Er.isOnEditPage()?Er.toEditGrid(t.toGridId):Er.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?qn(t,i):ut.getGrid(n).then(e=>{qn(t,e)});break;case"GridActionPredict":log.debug("action predict"),$e.predict(C.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),mn.doCollectElementActions(t.action);break;case"GridActionWebradio":Bn.doAction(n,t);break;case"GridActionChangeLang":C.setLanguage(t.language),C.initDomI18n()}}function qn(e,t){if(!e.componentId)return;let n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;Ct.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then(()=>{e.dataPortId&&e.dataPortSendData&&Ct.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&Ct.triggerEvent(e.componentId,e.eventPortId,e.areURL)})}Jn.doAction=function(e,t){e&&t&&ut.getGridElement(e,t).then(n=>{switch(log.debug("do actions for: "+C.getTranslation(n.label)+", "+t),n.type){case H.ELEMENT_TYPE_COLLECT:mn.doAction(n);break;case H.ELEMENT_TYPE_PREDICTION:$e.doAction(n.id)}!function(e,t){e.actions.forEach(n=>{Xn(e,n,t)})}(n,e),$(window).trigger(i.ELEMENT_EVENT_ID,[n])})},Jn.testAction=function(e,t,n){Xn(e,t,n.id,n)};var Zn=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")])])])])};Zn._withStripped=!0;var Qn={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]}:{};Jn.testAction(null,e,new se(t,this.gridData))},reloadAREModel(e){var t=this;t.loading=!0,Ct.downloadDeployedModelBase64(e.areURL).then(n=>{Ct.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;Ct.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then(()=>{t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0})},reloadComponentIds(e){var t=this;Ct.getRuntimeComponentIds(e.areURL).then(e=>{t.areComponentIds=e})},reloadPorts(e){var t=this;Ct.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then(e=>{t.areComponentEventPorts=e}),Ct.getComponentInputPortIds(e.componentId,e.areURL).then(e=>{t.areComponentPorts=e})},testAREUrl(e){var t=this;e.areURL=Ct.getRestURL(e.areURL),t.areConnected=void 0,Ct.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=Ct.getRestURL(this.action.areURL)}},mounted(){this.action.areURL=this.action.areURL||Ct.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new se(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new z),ht.setHelpLocation("05_actions","#asterics-action")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation()}},ei=(n(64),Ut(Qn,Zn,[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));ei.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var ti=ei.exports,ni=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),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"})])])])])};ni._withStripped=!0;var ii={props:{value:Array},data:()=>({selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:Bn,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}),methods:{modelChanged(){this.$emit("input",JSON.parse(JSON.stringify(this.selectedRadioList)))},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,Ke.debounce(()=>{Bn.search(e.webradioSearch,10,e.webradioStartIndex).then(t=>{e.hasMoreWebradios=Bn.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){Bn.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter(t=>t.radioId!==e.radioId),this.modelChanged()}},mounted(){this.selectedRadioList=JSON.parse(JSON.stringify(this.value)),C.initDomI18n()},updated(){C.initDomI18n()}},ai=(n(66),Ut(ii,ni,[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));ai.options.__file="src/vue-components/components/radioListSelector.vue";var ri={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:H,editActionId:null,selectedNewAction:H.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:H.getActionTypes(),voiceLangs:on.getVoicesLangs(),dictionaryKeys:$e.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:j.getActions(),webradioActions:B.getActions(),currentLang:C.getBrowserLang(),allLanguages:C.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1}},components:{RadioListSelector:ai.exports,Accordion:Kt,EditAreAction:ti},methods:{selectedRadioChanged(e){let t=this.gridData.webRadios.filter(t=>t.radioId===e)[0].faviconUrl;t&&at.urlToBase64(t).then(e=>{e&&(this.gridElement.image=new M({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]]}:{};Jn.testAction(this.gridElement,e,new se(t,this.gridData))},addAction(){let e=JSON.parse(JSON.stringify(H.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(){ht.openHelp()},editNext(e){var t=this;t.saveInternal().then(()=>{t.editElementId=new se(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)}),ut.saveGrid(e.gridData).then(()=>ut.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then(()=>(e.$emit("reload"),Promise.resolve())))},initInternal(){let e=this;ut.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]}),ut.getGridsAttribute("label").then(t=>{e.gridLabels=t})}},mounted(){this.editElementId=this.editElementIdParam,this.initInternal(),ht.setHelpLocation("05_actions","#edit-actions-modal")},updated(){C.initDomI18n()},beforeDestroy(){ht.setHelpLocation("02_navigation","#edit-view")}},si=(n(68),Ut(ri,$n,[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));si.options.__file="src/vue-components/modals/editActionsModal.vue";var oi=si.exports,li=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")])])])])])])])])};li._withStripped=!0;var ci={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new se(this.gridDataParam).getHeight(),metadata:null}},methods:{save(){m.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});let e=[];this.metadata&&e.push(ut.saveMetadata(this.metadata)),Promise.all(e).then(()=>{this.$emit("save",this.gridData.rowCount,this.gridData.minColumnCount),this.$emit("close")})}},mounted(){this.isGlobalGrid&&ut.getMetadata().then(e=>{this.metadata=JSON.parse(JSON.stringify(e)),setTimeout(()=>C.initDomI18n(),10)}),C.initDomI18n()}},di=(n(70),Ut(ci,li,[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));di.options.__file="src/vue-components/modals/gridDimensionModal.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(" "),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")])])])])])])])])};fi._withStripped=!0;var hi={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:C,imageUtil:at}},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 ut.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(ut.saveGrid(this.gridData)),t.push(ut.saveGrid(e)),Promise.all(t)})}},mounted(){ut.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()}),ut.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()}},pi=(n(72),Ut(hi,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 Move grid element // Grid-Element verschieben\n ")])])}],!1,null,"0fc126e0",null));pi.options.__file="src/vue-components/modals/elementMoveModal.vue";var mi=pi.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",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")])])])])])])])])};vi._withStripped=!0,window.hideKeyboardTranslations=!1;var gi={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:C.getBrowserLang(),chosenLocale:C.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:U,allLanguages:C.getAllLanguages(),usedLocales:m.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];m.addUsedLocales(Object.keys(t.label)),ut.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=b()(`#translationList input[lang='${e}']`).toArray().reduce((e,t)=>e+t.value+"\n","");Ke.copyToClipboard(t)},paste(e){Ke.getClipboardContent().then(t=>{if(!t)return;this.changedGrid(this.gridData);let n=t.trim().split("\n");b()(`#translationList input[lang='${e}']`).toArray().forEach((e,t)=>{n[t]&&(b()(e).val(n[t]),b()(e)[0].dispatchEvent(new Event("input")))})})},showGridElements:e=>!window.hideKeyboardTranslations||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))},mounted(){ut.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()}},_i=(n(74),Ut(gi,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 Translate Grids // Grids übersetzen\n ")])])}],!1,null,"7d6c5d35",null));_i.options.__file="src/vue-components/modals/gridTranslateModal.vue";var bi=_i.exports;let yi=null,Ei=null;var Ci=Ut({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:i,markedElement:null}),components:{GridTranslateModal:bi,ElementMoveModal:mi,GridDimensionModal:ui,EditGridModal:Rn,AddMultipleModal:Gn,EditActionsModal:oi,HeaderIcon:Vt},methods:{setDimensions:function(e,t){Ei.setDimensions(e,t)},fillGaps:function(){Ei.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ei.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ei.redo()}),10)},reload(e){Ei.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back(){Er.toMain()},editElement(e){this.editElementId=e,this.showEditModal=!0},removeElement(e){let t=this;Ei.removeElement(e).then(e=>{t.gridData=e})},newElement(e){switch(e){case H.ELEMENT_TYPE_PREDICTION:case H.ELEMENT_TYPE_COLLECT:var t=new se(this.gridData).getNewXYPos(),n=new H({type:e,x:t.x,y:t.y});this.gridData.gridElements.push(n),Ei.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=[],Ei.updateGridWithUndo(this.gridData))},fillElements(){let e=K.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),Ei.updateGridWithUndo(this.gridData)},reloadFn(e,t,n){if(yi&&t.includes(yi.gridData.id)&&Ei&&Ei.isInitialized()){let e=new se(n.filter(e=>e.id===yi.gridData.id)[0]);e.isEqual(yi.gridData)||(log.debug("reloading on remote update..."),yi.reload(e))}},markElement(e){b()(".grid-item-content").removeClass("marked"),e&&setTimeout(()=>{Ke.throttle(()=>{this.markedElement&&this.markedElement.id===e?this.markedElement=null:(this.markedElement=e?this.gridData.gridElements.filter(t=>t.id===e)[0]:null,b()("#"+e).addClass("marked"))},null,200)},10)},getGridInstance:()=>Ei},created(){b()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){let e=this;yi=e,It.global.stopListening(),ut.getGrid(this.gridId).then(t=>t?(e.gridData=JSON.parse(JSON.stringify(t)),Promise.resolve()):(log.warn("grid not found! gridId: "+this.gridId),Er.toMain(),Promise.reject())).then(()=>ut.getMetadata().then(t=>(e.metadata=JSON.parse(JSON.stringify(t)),e.metadata.globalGridId===e.gridData.id?Promise.resolve():(e.metadata.lastOpenedGridId=e.gridData.id,ut.saveMetadata(e.metadata))))).then(()=>{return t=e.gridData,Ei=new wn("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:t.id}),Ei.getInitPromise();var t}).then(()=>{Ei.setLayoutChangedEndListener(t=>{e.canUndo=Ei.canUndo(),e.canRedo=Ei.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"}}}},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=()=>!!yi.markedElement;var a={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:()=>yi.markedElement&&yi.markedElement.type===H.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 se({},yi.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:!!yi.metadata.globalGridId&&yi.metadata.globalGridActive&&yi.metadata.globalGridId!==yi.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:yi.metadata.globalGridId===yi.gridData.id}};function r(e,t){switch(e){case"CONTEXT_EDIT":yi.editElement(t);break;case"CONTEXT_DUPLICATE":Ei.duplicateElement(t);break;case"CONTEXT_DO_ACTION":Jn.doAction(yi.gridData.id,t);break;case"CONTEXT_ACTIONS":yi.editActions(t);break;case"CONTEXT_DELETE":yi.removeElement(t);break;case"CONTEXT_NEW_SINGLE":yi.newElement();break;case"CONTEXT_NEW_MASS":yi.newElements();break;case"CONTEXT_NEW_COLLECT":yi.newElement(H.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":yi.newElement(H.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_DELETE_ALL":yi.clearElements();break;case"CONTEXT_FILL_EMPTY":yi.fillElements();break;case"CONTEXT_LAYOUT_FILL":yi.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":yi.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":yi.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":yi.editElement(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":yi.editActions(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_DELETE":yi.removeElement(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":Ei.duplicateElement(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":Jn.doAction(yi.gridData.id,yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_MOVE_TO":yi.editElementId=t||yi.markedElement.id,yi.markElement(null),yi.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":Er.toEditGrid(yi.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":Er.toEditGrid(yi.metadata.lastOpenedGridId)}}b()(".grid-container").on("click",(function(e){if(yi){let t=null,n=e.target;for(;!t&&n.parentNode;)t=b()(n).attr("data-id"),n=n.parentNode;yi.markElement(t)}})),b.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){r(e,b()(this).attr("data-id"))},items:t,zIndex:10}),b.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){r(e,b()(this).attr("data-id"))},items:n,zIndex:10}),b.a.contextMenu({selector:".grid-container",callback:function(e,t){r(e)},items:e,zIndex:10}),b.a.contextMenu({selector:"#moreButton",callback:function(e,t){r(e)},trigger:"left",items:a,zIndex:10})}(),C.initDomI18n(),e.showGrid=!0})},updated(){C.initDomI18n()},beforeDestroy(){b()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),yi=null,It.global.startListening(),Ei&&(Ei.destroy(),Ei=null),b.a.contextMenu("destroy")}},nn,[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);Ci.options.__file="src/vue-components/views/gridEditView.vue";var wi=Ci.exports,Ti=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(" "),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)};Ti._withStripped=!0;var Si=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 Ni(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},Si.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},Si.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},Si.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;nArray.isArray(t)?e.concat(Si.flattenArrayDeep(t)):e.concat(t),[])},Si.convertToKeyCode=function(e){return/^[a-zA-Z0-9]$/.test(e)?e.toUpperCase().charCodeAt(0):null},Si.getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},window.L=Si;let Ai={};function Ii(e,t,n){var i=this,a=(e=e,t=t,""),r=1e3,s=!1,o=3,l=3,d=!1,u=!0,f=1,h=!0,p=null,m=!1,v=null,g=null,_=null,b=!1,y=null,E=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,d=null!=e.scanBinary?e.scanBinary:d,u=null!=e.touchScanning?e.touchScanning:u,f=null!=e.scanTimeoutFirstElementFactor?e.scanTimeoutFirstElementFactor:f,h=void 0===e.autoScan||e.autoScan),u&&i.enableTouchScanning(),C=It.instance(),e.inputEventSelect?C.onInputEvent(e.inputEventSelect,i.select):C.onInputEvent(new c({keyCode:32}),i.select),e.inputEventNext&&C.onInputEvent(e.inputEventNext,i.next)}function S(e,t){for(var n=t?L:k,i=t?x:O,a=t?k:L,r=I(A(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(A(a),A(n)),o=(e=e.sort(r)).slice(),l=[],c=0;o.length>0&&c<1e3;){c++;var u=N(o,e,t);l.push(u),o=o.filter(e=>!u.includes(e))}return d&&(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 A(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(Si.removeClass(e,t),Si.addClass(e,a),m&&(Si.addClass(n[l],t),Si.removeClass(n,a),v=n[l],w=()=>{D(n,!0,l+1,c+1)},h)){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;d&&e.length>l&&(n=Math.ceil(e.length/2));for(var i=0,a=e.length;i1?D(R(v),!0):Si.flattenArray(v).length>1?D(R(Si.flattenArray(v)),!0):(p&&p(Si.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){w&&(clearTimeout(g),w())},i.enableTouchScanning=function(){y||(y=function(){i.select()},(E=Si(".area")[0]?Si(".area")[0]:Si("#grid-container")).addEventListener("click",y))},i.disableTouchScanning=function(){y&&(E.removeEventListener("click",y),y=null)},T(n)}Ai.getInstanceFromConfig=function(e,t,n,i){return new Ii(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===u.SELECT)[0],inputEventNext:e.scanInputs.filter(e=>e.label===u.NEXT)[0]})};let ki={};function Oi(e,t){var n=e,a=void 0!==t.timeoutMs?t.timeoutMs:1e3;let r=t.demoMode,s=t.selectionListener,o=t.activeListener;var l={};let c=[],d=null,u=null,f=!1,h=null;function p(e,t){var n=t||this;e.preventDefault(),T(n),d=n,u=e}function m(e,t){if(f){var n=t||this;e.preventDefault(),S(n)}}function v(e){f||A(!1),Ke.debounce(()=>{A(!0)},a+300,"hovering-mouseMove")}function g(){S(d)}function _(e){let t=N(e);T(t),d=t}function y(e){S(d)}function E(e){r||e.preventDefault(),Ke.throttle(()=>{let t=N(e);T(t),d=t,u=e},[],50,"hovering-touchmove")}function w(e){on.speak(C.translate("speech output activated // Sprachausgabe aktiviert")),Ft.clearTooltip(),an.setState(i.STATE_ACTIVATED_TTS,!0),A(!0),c.forEach((function(e){e.removeEventListener("click",w)}))}function T(e){d&&d!==e&&S(d),e&&!l[e]&&(Si.addClass(e,"mouseentered"),o&&e!==d&&o(e),0!==a&&(l[e]=setTimeout((function(){s&&s(e)}),a)))}function S(e){e&&(Si.removeClass(e,"mouseentered"),clearTimeout(l[e]),l[e]=null,d=null)}function N(e){if(e.touches&&0===e.touches.length&&(e=u),!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 Ke.getElement(c,t,n)}function A(e){f=!e,r||(e?b()("#touchElement").show():b()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(b()(n).css("cursor","none"),b()("#touchElement").css("cursor","none"),t.containerClass&&b()(t.containerClass).css("cursor","none")),c=Si.selectAsList(n);let e=an.getState(i.STATE_ACTIVATED_TTS);!on.nativeSpeechSupported()||e||r?A(!0):(Ft.setTooltip(C.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),an.onStateChanged(i.STATE_ACTIVATED_TTS,e=>{e&&Ft.clearTooltip()}),c.forEach((function(e){e.addEventListener("click",w)}))),c.forEach((function(e){e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",m),e.addEventListener("mouseup",g)})),h=It.instance(),h.onTouchStart(_),h.onTouchEnd(y),h.onTouchMove(E),h.startListening(),document.addEventListener("mousemove",v)},this.destroy=function(){t.hideCursor&&(b()(n).css("cursor","default"),b()("#touchElement").css("cursor","default"),t.containerClass&&b()(t.containerClass).css("cursor","default")),Ke.clearDebounce("hovering-mouseMove"),c.forEach((function(e){e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",m),e.removeEventListener("mouseup",g),e.removeEventListener("click",w)})),h.destroy(),document.removeEventListener("mousemove",v),Object.keys(l).forEach(e=>{clearTimeout(l[e])}),an.clearListeners(i.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){a=e},this.setSelectionListener=function(e){s=e}}function Li(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=Si.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}}ki.getInstanceFromConfig=function(e,t,n){return new Oi(t,{selectionListener:(n=n||{}).selectionListener,activeListener:n.activeListener,containerClass:n.containerClass,inputEventSelect:e.seqInputs.filter(e=>e.label===u.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===u.NEXT)[0],timeoutMs:e.hoverTimeoutMs,demoMode:n.demoMode||e.hoverDisableHoverpane,hideCursor:e.hoverHideCursor})};var xi=n(45),Di=n.n(xi);let Ri={};function Mi(e,t,n,i){let a=this,r=e,s=t,o=n,l=!1,c=!0,d=!1,u=0,f=1e3,h=!0,p=[],m=null,v=null,g=null,_=null,y="",E=null,C="",w=!1,T=null;function S(){if(E=It.instance(),C="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");b.a.isFunction(e.selectionListener)&&(m=e.selectionListener);l=void 0!==e.printCodes&&e.printCodes,c=void 0===e.printColors||e.printColors,d=void 0!==e.colorWholeElement&&e.colorWholeElement,h=void 0===e.markInactive||e.markInactive,p=e.colors||p,u=e.elementCount||0,f=e.timeout||1e3,e.inputEvents.forEach((e,t)=>{C+=t+1,E.onInputEvent(e,()=>{a.input(t+1)})})}(i),v=b()(r),0===v.length)return;let e=v.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),c||l)){let t="";e.codeWord.split("").forEach(e=>{let i=c?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+=`${l?e:" "}`});let i=l?"10px":"3px",a=b()(e.element).width()+"px";b()(e.element).append(`
    ${t}
    `)}})),_=_.filter(e=>e.name),N()}function N(){d&&_.forEach(e=>{if(0===e.codeWord.indexOf(y)){let t=e.codeWord.substring(y.length)[0];e.element.style.background=I(t)}})}function A(e){v.removeClass(o);let t=e.map(e=>e.id),n=v.toArray().filter(e=>-1===t.indexOf(e.id));b()(n).addClass(o)}function I(e){let t=parseInt(e)-1;return p[t]}a.start=function(){w=!0,d&&b()(v).addClass("noanimation"),E.startListening()},a.stop=function(){w=!1,b()(v).find(".huffman-code-visualization").remove(),d&&(b()(v).removeClass("noanimation"),b()(v).css("background","")),E.stopListening()},a.destroy=function(){a.stop(),E.destroy()},a.reinit=function(){w&&(a.stop(),S(),a.start())},a.input=function(e){if(e+="",clearTimeout(T),1!==e.length)return;y+=e,N();let t=_.filter(e=>e.codeWord===y).map(e=>e.element),n=_.filter(e=>0===e.codeWord.indexOf(y)).map(e=>e.element);var i;v.removeClass(s),t[0]?(i=t[0],g=i||g,v.removeClass(s),b()(g).addClass(s),A(v.toArray()),m&&m(t[0])):h&&A(n),(t[0]||0===n.length)&&(A(v.toArray()),y="",N()),f>0&&(T=setTimeout(()=>{A(v.toArray()),y="",N()},f))},a.getCurrentInput=function(){return y},S()}Ri.getInstanceFromConfig=function(e,t,n,i,a){return new Mi(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 Pi={};function Ui(e,t,n){let i=this,a=e,r=t,s=!0,o=!1,l=null,c=null,d=null,u={},f=It.instance();function h(e){u[d.id]&&p(u[d.id][e])}function p(e){d=e||d,c.removeClass(r),b()(d).addClass(r)}i.start=function(){p(c[0]),f.startListening()},i.destroy=function(){c.removeClass(r),f.destroy()},i.left=function(){h("left")},i.right=function(){h("right")},i.up=function(){h("up")},i.down=function(){h("down")},i.select=function(){l&&l(d),o&&p(c[0])},c=b()(a),0!==c.length&&(setTimeout(()=>{c.toArray().forEach(e=>{let t=c.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,h=Math.min(Math.abs(r),Math.abs(s),Math.abs(o),Math.abs(l)),p=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:h,absDiffY:p,absDiff:h+p}});function o(e,t,n,i,a){let r=e.filter(e=>e[t]);if(r.length>0)return r[0].element;if(s){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=o(r,"left","right","absDiffX","absDiffY"),d=o(r,"right","left","absDiffX","absDiffY"),f=o(r,"up","down","absDiffY","absDiffX"),h=o(r,"down","up","absDiffY","absDiffX");u[e.id]={element:e,left:l,right:d,up:f,down:h}})},200),function(e){e&&(b.a.isFunction(e.selectionListener)&&(l=e.selectionListener),s=void 0!==e.wrapAround&&e.wrapAround,o=void 0!==e.resetToStart&&e.resetToStart,f.onInputEvent(e.inputEventLeft,i.left),f.onInputEvent(e.inputEventRight,i.right),f.onInputEvent(e.inputEventUp,i.up),f.onInputEvent(e.inputEventDown,i.down),f.onInputEvent(e.inputEventSelect,i.select))}(n))}Pi.getInstanceFromConfig=function(e,t,n,i){return new Ui(t,n,{inputEventLeft:e.dirInputs.filter(e=>e.label===u.LEFT)[0],inputEventRight:e.dirInputs.filter(e=>e.label===u.RIGHT)[0],inputEventUp:e.dirInputs.filter(e=>e.label===u.UP)[0],inputEventDown:e.dirInputs.filter(e=>e.label===u.DOWN)[0],inputEventSelect:e.dirInputs.filter(e=>e.label===u.SELECT)[0],wrapAround:e.dirWrapAround,resetToStart:e.dirResetToStart,selectionListener:i})};let Gi={};function $i(e,t){let n=this,i=e,a=null,r=null,s=null,o=null,l=null,c=0;function d(e){o.removeClass(a),b()(e).addClass(a),s&&s(e)}n.start=function(){l.startListening(),d(o[0]),c=0},n.destroy=function(){l.destroy(),o.removeClass(a)},n.next=function(){c++,c>o.length-1&&(c=0),d(o[c])},n.select=function(){r&&r(o[c])},l=It.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(b.a.isFunction(e.selectionListener)&&(r=e.selectionListener),b.a.isFunction(e.activeListener)&&(s=e.activeListener),a=e.activeClass||"scanFocus",l.onInputEvent(e.inputEventSelect,()=>{n.select()}),l.onInputEvent(e.inputEventNext,()=>{n.next()}))}(t),o=b()(i)}Gi.getInstanceFromConfig=function(e,t,n){return new $i(t,{selectionListener:n.selectionListener,activeListener:n.activeListener,inputEventSelect:e.seqInputs.filter(e=>e.label===u.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===u.NEXT_ELEMENT)[0]})};var 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:{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")])])])])])])])])};Fi._withStripped=!0;var ji=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)])};ji._withStripped=!0;var Bi={components:{Accordion:Kt},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:u.getInputEventTypes(),InputEventKey:c,InputEventARE:d,InputConfig:u,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:It.instance(),lastInitTime:null,areService:Ct}),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=u.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),Ct.unsubscribeEvents();let a=null;function r(){Et.a.set(n.keyRecording,i,!1),Ct.unsubscribeEvents()}Ct.subscribeEvents(e.areURL,t=>{a||(a=setTimeout(()=>{Et.a.set(n.keyRecording,i,!1),Ct.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=Ct.getRestURL(e.areURL))},modelChanged(){let e=this.inputs.filter(e=>{if(!e.modelName)return!1;return u.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 d({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(){}},Ki=(n(78),Ut(Wi,zi,[],!1,null,"2f9b4098",null));Ki.options.__file="src/vue-components/modals/input/testArea.vue";var Yi=Ki.exports,Ji={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,touchScanning:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.scanEnabled||(0===this.inputConfig.scanInputs.filter(e=>e.label===u.SELECT).length&&this.errorInputs.push(u.SELECT),0!==this.inputConfig.scanInputs.filter(e=>e.label===u.NEXT).length||this.inputConfig.scanAuto||this.errorInputs.push(u.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(u.DEFAULT_SCAN_INPUTS))),this.inputChanged()},changeTouchScanning(){this.inputConfig.mouseclickEnabled=!this.touchScanning},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.scanEnabled&&(this.scanner=Ai.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled}),ht.setHelpLocation("04_input_options","#scanning")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},Xi=(n(80),Ut(Ji,Fi,[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));Xi.options.__file="src/vue-components/modals/input/scanningModal.vue";var qi=Xi.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:{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")])])])])])])])])};Zi._withStripped=!0;var Qi=Ut({props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")})},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},initTest(){setTimeout(()=>{let e=this;this.stopTest(),e.inputConfig.hoverEnabled&&(e.hover=ki.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 Li(".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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#mousetouch-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},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("Mouse/Touch input // Maus-/Toucheingabe")])])}],!1,null,"33ee2cbd",null);Qi.options.__file="src/vue-components/modals/input/mouseModal.vue";var ea=Qi.exports,ta=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")])])])])])])])])};ta._withStripped=!0;var na={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.dirEnabled||(0===this.inputConfig.dirInputs.filter(e=>e.label===u.SELECT).length&&this.errorInputs.push(u.SELECT),this.inputConfig.dirInputs.length<2&&this.errorInputs.push(u.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(u.DEFAULT_DIR_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.dirEnabled&&(e.dirInput=Pi.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#direction-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},ia=(n(82),Ut(na,ta,[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));ia.options.__file="src/vue-components/modals/input/directionInputModal.vue";var aa=ia.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("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")])])])])])])])])};ra._withStripped=!0;var sa={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.huffEnabled||(this.inputConfig.huffInputs.length<2&&this.errorInputs.push(u.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(u.DEFAULT_HUFF_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.huffEnabled&&(this.huffInput=Ri.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#huffman-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},oa=(n(84),Ut(sa,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("Huffman Input // Huffman-Eingabe")])])}],!1,null,"fff4292a",null));oa.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var la=oa.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",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.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")])])])])])])])])};ca._withStripped=!0;var da={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.seqEnabled||(0===this.inputConfig.seqInputs.filter(e=>e.label===u.NEXT_ELEMENT).length&&this.errorInputs.push(u.NEXT_ELEMENT),0===this.inputConfig.seqInputs.filter(e=>e.label===u.SELECT).length&&this.errorInputs.push(u.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(u.DEFAULT_SEQ_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.seqEnabled&&(e.seqInput=Gi.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#sequential-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},ua=(n(86),Ut(da,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("Sequential Input // Sequentielle Eingabe")])])}],!1,null,"071e6452",null));ua.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var fa=ua.exports;let ha=null,pa=null,ma={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL"};function va(){ha&&window.removeEventListener("resize",ha.resizeListener,!0),ha&&b()(document).off(i.EVENT_GRID_RESIZE,ha.resizeListener),ha&&ha.scanner&&ha.scanner.destroy(),ha&&ha.hover&&ha.hover.destroy(),ha&&ha.clicker&&ha.clicker.destroy(),ha&&ha.directionInput&&ha.directionInput.destroy(),ha&&ha.huffmanInput&&ha.huffmanInput.destroy(),ha&&ha.seqInput&&ha.seqInput.destroy()}function ga(){b.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=ha.metadata.inputConfig,i=n.mouseclickEnabled||n.hoverEnabled,a={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":""}};b.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":ha.openModal(ma.MODAL_MOUSE);break;case"CONTEXT_SCANNING":ha.openModal(ma.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":ha.openModal(ma.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":ha.openModal(ma.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":ha.openModal(ma.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:a,zIndex:10})}var _a=Ut({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:ma,viewInitialized:!1,unlockCount:8,unlockCounter:8}),components:{SequentialInputModal:fa,HuffmanInputModal:la,DirectionInputModal:aa,MouseModal:ea,ScanningModal:qi,HeaderIcon:Vt},methods:{openModal(e){this.showModal=e,va()},lock(){this.metadata.locked=!0,this.unlockCounter=8,ut.saveMetadata(this.metadata).then(()=>{b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)})},unlock(e){let t=this;t.unlockCounter--,Ke.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,ut.saveMetadata(t.metadata).then(()=>{b()(document).trigger(i.EVENT_SIDEBAR_OPEN)}))},applyFullscreen(e){Ke.openFullscreen(),this.metadata.fullscreen=!0;let t=Promise.resolve();e||(t=ut.saveMetadata(this.metadata)),t.then(()=>{b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)})},initInputMethods(){let e=this;if(!pa)return;let t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),b()(document).on(i.EVENT_GRID_RESIZE,e.resizeListener);let n=t=>{Si.removeAddClass(t,"selected"),Jn.doAction(e.gridData.id,t.id)},a=n=>{t.globalReadActive&&on.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=Gi.getInstanceFromConfig(t,".grid-item-content",{selectionListener:n,activeListener:a}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=Pi.getInstanceFromConfig(t,".grid-item-content","scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=Ri.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=Ai.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive"),e.scanner.setSelectionListener(n),pa.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),pa.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=ki.getInstanceFromConfig(t,".grid-item-content",{activeListener:a,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):b()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new Li(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())},reinitInputMethods(){let e=this;va(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),ga(),e.initInputMethods()})},reload(e){pa.reinit(e).then(()=>{e&&(this.gridData=JSON.parse(JSON.stringify(e))),this.reinitInputMethods()})},reloadOnLangChange(){this.reload()},toEditGrid(){Er.toEditGrid(this.gridData.id)},toManageGrids(){Er.toManageGrids()},toLogin(){Er.toLogin()},reloadFn(e,t,n){let a=this;if(!ha||!pa||!pa.isInitialized())return void setTimeout(()=>{a.reloadFn(e,t,n)},500);log.debug("got update event, ids updated:"+t);let r=n.filter(e=>ha.gridData&&e.id===ha.gridData.id)[0];this.updatedMetadataDoc=n.filter(e=>ha.metadata&&e.id===ha.metadata.id)[0]||this.updatedMetadataDoc,r&&ha.reload(new se(r)),m.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==ha.gridData.id?ut.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then(e=>{e.hasOutdatedThumbnail()||Er.toLastOpenedGrid()}):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==ha.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?ha.applyFullscreen(!0):b()(document).trigger(i.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==ha.metadata.locked&&(this.updatedMetadataDoc.locked?ha.lock():ha.unlock(!0))))},onSidebarOpen(){ha&&ha.metadata&&(ha.metadata.fullscreen=!1,b()(document).trigger(i.EVENT_GRID_RESIZE))},resizeListener(){let e=this;Ke.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created(){b()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn),b()(document).on(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),b()(document).on(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){let e=this;ha=e,ut.getGlobalGrid().then(t=>(e.globalGridData=t,ut.getGrid(e.gridId))).then(t=>{if(!t)return log.warn("grid not found! gridId: "+this.gridId),ut.getGrids(!1,!0).then(e=>(e[0]?Er.toGrid(e[0].id):Er.toManageGrids(),Promise.reject()));if(t.hasAREModel()){let e=t.getAREModel();Ct.uploadAndStartModel(e.dataBase64,t.getAREURL(),e.fileName)}return e.gridData=JSON.parse(JSON.stringify(t)),Er.addToGridHistory(e.gridData.id),Promise.resolve()}).then(()=>ut.getMetadata()).then(t=>{let n=JSON.parse(JSON.stringify(t||new f));return n.lastOpenedGridId=this.gridId,n.locked=void 0===n.locked?oe.isDemoMode()&&ut.getCurrentUser()===i.LOCAL_DEMO_USERNAME:n.locked,n.fullscreen=void 0===n.fullscreen?oe.isDemoMode()&&ut.getCurrentUser()===i.LOCAL_DEMO_USERNAME:n.fullscreen,n.inputConfig.scanEnabled=!!oe.isScanningEnabled()||n.inputConfig.scanEnabled,n.inputConfig.dirEnabled=!!oe.isDirectionEnabled()||n.inputConfig.dirEnabled,n.inputConfig.huffEnabled=!!oe.isHuffmanEnabled()||n.inputConfig.huffEnabled,ut.saveMetadata(n).then(()=>{n.locked&&b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)}),e.metadata=n,Promise.resolve()}).then(()=>{return t=e.gridData.id,pa=new wn("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:t,globalGridHeightPercentage:ha.metadata.globalGridHeightPercentage}),pa.getInitPromise();var t}).then(()=>{ga(),e.viewInitialized=!0;let t=new se(e.gridData);t.hasOutdatedThumbnail()&&at.getScreenshot("#grid-container").then(n=>{let i={data:n,hash:t.getHash()};e.gridData.thumbnail=i,ut.saveGrid(e.gridData)}),e.initInputMethods()}).catch(e=>{e&&log.warn(e)})},updated(){C.initDomI18n()},beforeDestroy(){b()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),b()(document).off(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),b()(document).off(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),va(),b.a.contextMenu("destroy"),ha=null,pa&&(pa.destroy(),pa=null)}},Ti,[],!1,null,"cc4f17d6",null);_a.options.__file="src/vue-components/views/gridView.vue";var ba=_a.exports,ya=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)};ya._withStripped=!0;var Ea=n(6),Ca=n.n(Ea);let wa,Ta={},Sa=null,Na=null,Aa=null,Ia=null,ka=!1,Oa=null,La=null,xa=i.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function Da(e,t,n){return Aa!==e?Promise.reject():(Ia=e,Oa=t,La=n,e=e.trim(),Ca.a.login({username:e,password:t}).then(i=>(log.info("login success!"),Ta.stopAutoRetryLogin(),Sa=i,Na=e,m.setLastActiveUser(e),m.setAutologinUser(n?e:""),n&&m.saveUserPassword(e,t),Promise.resolve())))}function Ra(e,t,n){return Da(e,t,n).then(()=>qe.initForUser(e,t,Ta.getLoggedInUserDatabase(),!n).then(()=>Promise.resolve(!0)),i=>Aa!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),m.isDatabaseSynced(e)?(log.info("using offline local database..."),m.setLastActiveUser(e),m.setAutologinUser(n?e:""),Ma(i)!==Ta.ERROR_CODE_UNAUTHORIZED&&Pa(e,t,n),qe.initForUser(e,t).then(()=>Promise.resolve(!1))):Promise.reject(Ma(i))))}function Ma(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?Ta.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?Ta.ERROR_CODE_NETWORK_ERROR:void 0}function Pa(e,t,n){Ta.stopAutoRetryLogin(),wa=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),Ra(e,t,n)}),1e4)}Ta.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",Ta.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",Ta.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",Ca.a.configure({serverUrl:xa,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),Ta.getLoggedInUsername=function(){return Na},Ta.getLoggedInUserDatabase=function(){if(!Sa||!Sa.userDBs)return null;let e=Object.keys(Sa.userDBs);return Sa.userDBs[e[0]]},Ta.loginPlainPassword=function(e,t,n){Aa=e;let i=ee.getUserPasswordHash(t);return Ta.loginHashedPassword(e,i,n)},Ta.loginHashedPassword=function(e,t,n){return Aa=e,Ra(e,t,n)},Ta.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if(ka)return log.warn("login currently in progress - aborting..."),Promise.reject();Aa=e,ka=!0;let n=m.getSavedOnlineUsers(),i=m.getSavedLocalUsers(),a=new Promise((t,a)=>{if(Ta.getLoggedInUsername()===e)return t();if(Ta.logout(),n.includes(e)&&m.isDatabaseSynced(e)){let n=m.getUserPassword(e);qe.initForUser(e,n).then(()=>{Ta.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=m.getUserPassword(e);Ta.loginHashedPassword(e,n,!0).then(()=>{t()}).catch(e=>{a(e)})}else i.includes(e)&&(m.setAutologinUser(e),qe.initForUser(e,e).then(()=>{t()}))});return a.then(()=>{t||Er.toMain()}),a.finally(()=>{ka=!1}),a},Ta.logout=function(){Ta.stopAutoRetryLogin(),Na&&(log.debug("logging out user: "+Na),qe.closeCurrentDatabase(),Ca.a.logout(Na),Na=null,Sa=null)},Ta.register=function(e,t,n){Aa=e,Ta.stopAutoRetryLogin(),e=e.trim();let i=ee.getUserPasswordHash(t);return log.debug("password hash: "+i),Ca.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then(t=>Da(e,i,n)).then(()=>(log.info("registration successful!"),qe.registerForUser(Na,i,Ta.getLoggedInUserDatabase(),!n))).then(()=>ut.importDefaultGridset()).catch(e=>(log.info("registration failed!"),log.info(e),Promise.reject(e)))},Ta.registerOffline=function(e,t){return Ta.logout(),m.saveLocalUser(e),m.setAutologinUser(e),qe.registerForUser(e,t).then(()=>ut.importDefaultGridset())},Ta.validateUsername=function(e){return new Promise((t,n)=>{e&&i.USERNAME_REGEX.test(e)?m.isSavedLocalUser(e)||e===i.LOCAL_DEMO_USERNAME?t(i.VALIDATION_ERROR_EXISTING):Ca.a.validateUsername(e).then(()=>{t(i.VALIDATION_VALID)},e=>{log.debug(e),t(i.VALIDATION_ERROR_EXISTING)}):t(i.VALIDATION_ERROR_REGEX)})},Ta.stopAutoRetryLogin=function(){wa&&(window.clearInterval(wa),wa=null)},Ta.ping=function(){b.a.get(xa+"/ping")},b()(document).on(i.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),Ia&&Oa&&Pa(Ia,Oa,La)})),b()(document).on(i.EVENT_DB_DATAMODEL_UPDATE,(function(){Ta.logout(),m.setAutologinUser(""),Er.toLogin()}));var Ua={components:{HeaderIcon:Vt},props:[],data:()=>({user:null,password:null,remember:!0,loginTryUser:null,loginSuccess:null,loginErrorCode:null,savedUsers:[],savedOnlineUsers:[],savedLocalUsers:[],allUsersList:[],activeUser:null}),methods:{toMain(){Er.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="",Ta.loginPlainPassword(e,t,this.remember).then(()=>{n.loginSuccess=!0,Er.toMain()}).catch(e=>{n.loginSuccess=!1,n.loginErrorCode=e}))},loginStored(e){let t=this;e&&(t.savedUsers.includes(e)||Ta.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",Ta.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;m.unmarkSyncedDatabase(e),m.removeUserPassword(e),Ta.getLoggedInUsername()===e&&Ta.logout(),qe.deleteDatabase(e)}else Ta.logout();this.allUsersList=m.getSavedUsers(this.activeUser),this.savedUsers=m.getSavedUsers(this.activeUser),this.savedOnlineUsers=m.getSavedOnlineUsers(),this.savedLocalUsers=m.getSavedLocalUsers()},hasValidMajorModelVersion:e=>m.getUserMajorModelVersion(e)<=a.getLatestModelVersion().major},mounted(){let e=Ta.getLoggedInUsername();this.activeUser=m.getAutologinUser()||e,this.savedUsers=m.getSavedUsers(this.activeUser),this.allUsersList=m.getSavedUsers(this.activeUser),this.savedOnlineUsers=m.getSavedOnlineUsers(),this.savedLocalUsers=m.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:m.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),C.initDomI18n()},updated(){C.initDomI18n()}},Ga=(n(114),Ut(Ua,ya,[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));Ga.options.__file="src/vue-components/views/loginView.vue";var $a=Ga.exports,Fa=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)};Fa._withStripped=!0;var ja=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)};ja._withStripped=!0;var Ba={props:[],components:{Accordion:Kt},data:()=>({showInfo:!1}),methods:{},mounted(){C.initDomI18n()}},Va=(n(116),Ut(Ba,ja,[],!1,null,"2a375b84",null));Va.options.__file="src/vue-components/components/comparisonComponent.vue";var Ha=Va.exports,za={components:{ComparisonComponent:Ha,HeaderIcon:Vt},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(){Er.toMain()},register(){let e=this,t=(new Date).getTime()-e.creationTime;if(t{log.info("successfully registered!"),e.registerSuccess=!0,Er.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;Ta.validateUsername(e.user).then(t=>{e.usernameValid=t===i.VALIDATION_VALID,e.usernameValidationCode=t})}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Wa=(n(118),Ut(za,Fa,[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));Wa.options.__file="src/vue-components/views/registerView.vue";var Ka=Wa.exports,Ya=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)};Ya._withStripped=!0;var Ja={components:{ComparisonComponent:Ha,HeaderIcon:Vt},props:[],data:()=>({user:null,validationError:void 0,showInfo:!1,savedUsers:m.getSavedUsers(),loading:!1}),methods:{toMain(){Er.toMain()},addUser(){this.loading=!0,null==this.validationError&&Ta.registerOffline(this.user,this.user).then(()=>{Er.toMain()})},validateUsername(){this.validationError=void 0,i.USERNAME_REGEX.test(this.user)?this.savedUsers.includes(this.user)||Ta.getLoggedInUsername()===this.user?this.validationError=i.VALIDATION_ERROR_EXISTING:this.validationError=null:this.validationError=i.VALIDATION_ERROR_REGEX}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Xa=(n(120),Ut(Ja,Ya,[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));Xa.options.__file="src/vue-components/views/addOfflineView.vue";var qa=Xa.exports,Za=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)};Za._withStripped=!0;var Qa={components:{HeaderIcon:Vt},props:[],data:()=>({loading:!1}),methods:{toMain(){Er.toMain()},toRegister(){Er.toRegister()},useDefaultUser(){this.loading=!0,Ta.registerOffline(i.LOCAL_NOLOGIN_USERNAME,i.LOCAL_NOLOGIN_USERNAME).then(()=>{Er.toMain()})},openHelp(){ht.openHelp()}},mounted(){C.initDomI18n()}},er=(n(122),Ut(Qa,Za,[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));er.options.__file="src/vue-components/views/welcomeView.vue";var tr=er.exports,nr=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)};nr._withStripped=!0;var ir={components:{HeaderIcon:Vt},props:[],data:()=>({}),methods:{toMain(){Er.toMain()},toRegister(){Er.toRegister()}},mounted(){C.initDomI18n()}},ar=(n(124),Ut(ir,nr,[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-2020-09-11-11.36/+0200"}},[e._v("release-2020-09-11-11.36/+0200")]),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-2020-09-11-11.36/+0200"}},[e._v("release-2020-09-11-11.36/+0200")]),e._v(".\n ")])])])])])}],!1,null,"af4ab890",null));ar.options.__file="src/vue-components/views/aboutView.vue";var rr=ar.exports,sr=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 ")])])])])};sr._withStripped=!0;var or=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(){ht.openHelp()}},mounted(){C.initDomI18n(),this.originalPredictionary=Ge.instance(),this.originalPredictionary.loadDictionary(this.dictData.data,this.dictData.dictionaryKey),ht.setHelpLocation("07_dictionaries","#add-words")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation()}},dr=(n(126),Ut(cr,or,[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));dr.options.__file="src/vue-components/modals/importDictionaryModal.vue";var ur=dr.exports;let fr=null;var hr={data:()=>({dicts:null,editModeId:"",editId:null,originalLabel:"",showLoading:!0,predictionary:null,wordlist:[],searchWord:"",showImportModal:!1,totalWords:0,filterWords:0}),components:{ImportDictionaryModal:ur,HeaderIcon:Vt},methods:{deleteDict:function(e,t){let n=this;confirm(C.translate("CONFIRM_DELETE_DICT",t))&&ut.deleteObject(e).then(()=>{n.reload()})},addDictionary:function(){log.debug("add dictionary!");let e=this.dicts.map(e=>e.dictionaryKey),t=new Oe({dictionaryKey:a.getNewName("newDictionary",e)});ut.saveDictionary(t).then(()=>{this.editModeId=t.id,this.reload()})},finishEditName:function(e){ut.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=Ge.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),ht.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished(){this.editId=null,this.searchWord="",ht.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord(e){let t=this,n=void 0===e?200:0;Ke.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,Ke.DEFAULT_KEY2)},clone(e){let t=this;ut.getDictionary(e).then(e=>{ut.saveDictionary(e.clone()).then(()=>{t.reload()})})},deleteWord(e,t){let n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,Ke.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),ut.saveDictionary(t)}),2e3,Ke.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){let t=this;ut.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===Oe.getModelName()&&this.reload(n[0])}},created(){let e=this;b()(document).on(i.EVENT_DB_PULL_UPDATED,e.updatedHandler),ut.getDictionaries().then(t=>{log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1})},mounted:function(){fr=this,C.initDomI18n()},updated(){C.initDomI18n()},beforeDestroy(){$e.init(),b()(document).off(i.EVENT_DB_PULL_UPDATED,this.updatedHandler),b.a.contextMenu("destroy")}},pr=(n(128),Ut(hr,sr,[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));pr.options.__file="src/vue-components/views/dictionariesView.vue";var mr=pr.exports,vr=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("Language // Sprache")]),e._v(" "),e.gridLanguages?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!==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._e(),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._e()],1)};vr._withStripped=!0;var gr={components:{HeaderIcon:Vt},props:[],data:()=>({metadata:null,show:!1,langCode:"",gridLanguages:null,allLanguages:C.getAllLanguages(),currentLang:C.getBrowserLang(),saveSuccess:null,speechService:on,syncNavigation:m.shouldSyncNavigation(),voices:on.getVoices(),selectedVoiceName:on.getPreferredVoiceName(),testText:C.translate("This is an english sentence. // Das ist ein deutscher Satz.")}),methods:{saveLangCode(){this.saveSuccess=void 0,Ke.debounce(()=>{C.setLanguage(this.langCode),C.initDomI18n(),this.saveSuccess=!0},300,"SAVE_LANG")},saveVoice(){this.saveSuccess=void 0,Ke.debounce(()=>{on.setPreferredVoiceName(this.selectedVoiceName),this.saveSuccess=!0},300,"SAVE_VOICE")},saveSyncNavigation(){this.saveSuccess=void 0,Ke.debounce(()=>{m.setShouldSyncNavigation(this.syncNavigation),this.saveSuccess=!0},300,"SAVE_NAV")},testSpeak(){on.speak(this.testText,null,this.selectedVoiceName)}},mounted(){let e=this;C.initDomI18n(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0}),ut.getGrids(!1,!0).then(t=>{e.gridLanguages=Object.keys(t[0].label)}),e.langCode=C.getCustomLanguage()},updated(){C.initDomI18n()}},_r=(n(130),Ut(gr,vr,[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));_r.options.__file="src/vue-components/views/settingsView.vue";var br=_r.exports;let yr=["#login","#register","#welcome","#add","#about"],Er={},Cr=null,wr=null,Tr=null,Sr=!1,Nr=null,Ar=[];function Ir(){let e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function kr(e,t){Tr=t?null:location.hash,location.hash=e}function Or(e,t,n){var i;Nr=e,e!==ba&&b()("#touchElement").hide(),i=n||Ir(),b()("nav button").removeClass("selected"),b()(`nav a[href='${i}'] button`).addClass("selected"),log.debug("loading view: "+e.__file),Ft.setViewComponent(e,t)}function Lr(){ut.getMetadata().then(e=>{let t=e?e.lastOpenedGridId:null;Or(ba,{gridId:t})})}Er.init=function(e,t){Sr=!0,wr=e,Cr=new E.a(null,!0),Cr.on({main:function(){ht.setHelpLocation("02_navigation","#main-view"),Lr()},"grids/":function(){ht.setHelpLocation("02_navigation","#manage-grids-view"),Or(tn)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),ht.setHelpLocation("02_navigation","#main-view"),Or(ba,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),ht.setHelpLocation("02_navigation","#main-view"),ut.getGrids().then(t=>{let n=t.filter(t=>C.getTranslation(t.label)===e.gridName),i=n[0]?n[0].id:null;i?Or(ba,{gridId:i},"#main"):(log.warn(`no grid with name ${e.gridName} found!`),Lr())})},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),ht.setHelpLocation("02_navigation","#edit-view"),Or(wi,{gridId:e.gridId})},login:function(){ht.setHelpLocation("02_navigation","#change-user-view"),Or($a)},register:function(){ht.setHelpLocation("06_users","#online-users"),Or(Ka)},add:function(){ht.setHelpLocation("06_users","#offline-users"),Or(qa)},welcome:function(){ht.setHelpLocationIndex(),Or(tr)},about:function(){ht.setHelpLocationIndex(),Or(rr)},dictionaries:function(){ht.setHelpLocation("02_navigation","#manage-dictionaries-view"),Or(mr)},settings:function(){Or(br)},"*":function(){ht.setHelpLocation("02_navigation","#main-view"),Er.toMain()}}),Cr.hooks({before:function(e,t){Nr&&Nr.destroy&&(Nr.destroy(),Nr=null);let n=function(){let e=location.hash;if(!qe.getCurrentUsedDatabase()){let t=m.getLastActiveUser()||m.getSavedUsers().length>0;e=yr.includes(e)?e:null,e=e||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),kr(n)):e()},after:function(e){},leave:function(e){}}),t&&kr(t),Cr.resolve()},Er.isInitialized=function(){return Sr},Er.toMain=function(){0===Ir().indexOf("#main")?kr("#main?date="+(new Date).getTime()):kr("#main")},Er.toRegister=function(){kr("#register")},Er.toAddOffline=function(){kr("#add")},Er.toAbout=function(){kr("#about")},Er.toLogin=function(){kr("#login")},Er.toLastOpenedGrid=function(){ut.getMetadata().then(e=>{Er.toGrid(e.lastOpenedGridId)})},Er.toGrid=function(e){e&&kr("#grid/"+e+"?date="+(new Date).getTime())},Er.toEditGrid=function(e){e&&kr("#grid/edit/"+e)},Er.toManageGrids=function(){kr("#grids")},Er.back=function(){Tr&&Tr!==location.hash?kr(Tr,!0):this.toMain()},Er.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},Er.getCurrentView=function(){return Nr},Er.addToGridHistory=function(e){Ar.length>0&&Ar[Ar.length-1]===e||(-1===Ar.indexOf(e)?Ar.push(e):Ar=[e])},Er.toLastGrid=function(){if(1===Ar.length)return;Ar.pop();let e=Ar.pop();Er.toGrid(e)};let xr={},Dr=null;xr.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(Dr),Dr=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(132),n(134),n(136);let Rr={init:function(){It.global.onAnyKey((e,t,n)=>{if(n.ctrlKey&&n.shiftKey&&39===e){let e=m.getSavedUsers(),t=ut.getCurrentUser(),n=e.indexOf(t);n=n+1{e()}));function e(){navigator.serviceWorker.register("./serviceWorker.js").then(e=>{let t=!1;setInterval(()=>{log.info("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&&Ft.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()}})})})}}(),Ta.ping(),xr.init(),Rr.init();let t=m.getLastActiveUser(),n=m.getAutologinUser();m.getUserMajorModelVersion(n)>a.getLatestModelVersion().major&&(log.info(`data model version of user "${n}" is newer than version of running AsTeRICS Grid -> prevent autologin.`),n=null,m.setAutologinUser("")),log.info("autologin user: "+n),oe.isDemoMode()?(e.push(Ta.registerOffline(i.LOCAL_DEMO_USERNAME,i.LOCAL_DEMO_USERNAME)),m.setAutologinUser("")):e.push(Ta.loginStoredUser(n,!0)),Promise.all(e).finally(()=>{Ft.init();let e=n||oe.isDemoMode(),i=t||m.getSavedUsers().length>0;m.setLastActiveUser(n||t||"");let a=location.hash||(e?"#main":i?"#login":"#welcome");Er.isInitialized()||Er.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=[],h=t.length,p=t[i],m=t[i+1];if(i===h&&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(137);"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={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_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"};i.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===i.ENVIRONMENT,i.IS_ENVIRONMENT_PROD=!i.IS_ENVIRONMENT_DEV,i.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),i.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var a={},r=100;let s=JSON.parse(i.MODEL_VERSION),o={major:null,minor:null,patch:null};a.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+r++},a.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},a.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},a.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},a.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)},a.getModelVersionString=function(){return i.MODEL_VERSION},a.getModelVersionObject=function(e){if(!e)return o;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:o},a.getLatestModelVersion=function(){return s};let l=window.Model;class c extends(l({id:String,modelName:String,modelVersion:String,label:[String],keyCode:[Number],keyName:[String],repeat:[Number],timeout:[Number],holdDuration:[Number]})){constructor(e,t){super(e=a.setDefaults(e,t,c)),this.id=this.id||a.generateId("input-event-key")}isValid(){return this.modelName&&this.label&&this.keyCode}static getModelName(){return"InputEventKey"}}c.defaults({id:"",modelName:c.getModelName(),modelVersion:i.MODEL_VERSION,repeat:1,timeout:0,holdDuration:0});class d extends(l({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[l.Array(String)],areURL:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,d)),this.id=this.id||a.generateId("input-event-are")}isValid(){return this.modelName&&this.label&&this.eventNames.length>0}static getModelName(){return"InputEventARE"}}d.defaults({id:"",modelName:d.getModelName(),modelVersion:i.MODEL_VERSION,eventNames:[]});class u extends(l({id:String,modelName:String,modelVersion:String,globalReadActive:[Boolean],scanEnabled:[Boolean],scanAuto:[Boolean],scanTimeoutMs:[Number],scanTimeoutFirstElementFactor:[Number],scanVertical:[Boolean],scanBinary:[Boolean],scanInputs:[l.Array(Object)],hoverEnabled:[Boolean],hoverTimeoutMs:Number,hoverHideCursor:[Boolean],hoverDisableHoverpane:[Boolean],mouseclickEnabled:[Boolean],dirEnabled:[Boolean],dirInputs:[l.Array(Object)],dirWrapAround:[Boolean],dirResetToStart:[Boolean],seqEnabled:[Boolean],seqInputs:[l.Array(Object)],huffEnabled:[Boolean],huffElementCount:[Number],huffInputs:[l.Array(Object)],huffColors:[l.Array(String)],huffShowColors:[Boolean],huffShowNumbers:[Boolean],huffColorWholeElement:[Boolean],huffTimeout:[Number],huffMarkInactive:[Boolean]})){constructor(e,t){super(e=a.setDefaults(e,t,u)),this.id=this.id||a.generateId("input-config")}static getModelName(){return"InputConfig"}static getInputEventTypes(){return[c,d]}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)}}u.UP="UP",u.DOWN="DOWN",u.LEFT="LEFT",u.RIGHT="RIGHT",u.SELECT="SELECT",u.NEXT="NEXT",u.NEXT_ELEMENT="NEXT_ELEMENT",u.GENERAL_INPUT="GENERAL_INPUT",u.getNumConst=e=>"NUM"+e,u.DEFAULT_SCAN_INPUTS=[new c({label:u.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new c({label:u.NEXT,keyCode:32,keyName:"Space"})],u.DEFAULT_SEQ_INPUTS=[new c({label:u.SELECT,keyCode:32,keyName:"Space",holdDuration:400}),new c({label:u.NEXT_ELEMENT,keyCode:32,keyName:"Space"})],u.DEFAULT_DIR_INPUTS=[new c({label:u.SELECT,keyCode:32,keyName:"Space"}),new c({label:u.LEFT,keyCode:37,keyName:"ArrowLeft"}),new c({label:u.RIGHT,keyCode:39,keyName:"ArrowRight"}),new c({label:u.UP,keyCode:38,keyName:"ArrowUp"}),new c({label:u.DOWN,keyCode:40,keyName:"ArrowDown"})],u.DEFAULT_HUFF_INPUTS=[new c({label:u.GENERAL_INPUT,keyCode:49,keyName:"Digit1"}),new c({label:u.GENERAL_INPUT,keyCode:50,keyName:"Digit2"}),new c({label:u.GENERAL_INPUT,keyCode:51,keyName:"Digit3"}),new c({label:u.GENERAL_INPUT,keyCode:52,keyName:"Digit4"})],u.DEFAULT_HUFF_COLORS=["#D55E00","#F0E442","#009E73","#0072B2","#CC79A7","#E69F00","#56B4E9","#000000","#016619"],u.defaults({id:"",modelName:u.getModelName(),modelVersion:i.MODEL_VERSION,scanAuto:!1,scanTimeoutMs:1e3,scanTimeoutFirstElementFactor:1,scanBinary:!0,hoverTimeoutMs:1e3,mouseclickEnabled:!0,scanInputs:u.DEFAULT_SCAN_INPUTS,dirInputs:u.DEFAULT_DIR_INPUTS,seqInputs:u.DEFAULT_SEQ_INPUTS,dirWrapAround:!0,huffInputs:u.DEFAULT_HUFF_INPUTS,huffColors:u.DEFAULT_HUFF_COLORS,huffShowColors:!0,huffShowNumbers:!0,huffElementCount:0,huffTimeout:4e3,huffMarkInactive:!0});class f extends(l({id:String,modelName:String,modelVersion:String,lastOpenedGridId:[String],globalGridId:[String],globalGridActive:[Boolean],globalGridHeightPercentage:[Number],locked:[Boolean],fullscreen:[Boolean],hashCodes:[Object],inputConfig:u})){constructor(e,t){super(e=a.setDefaults(e,t,f)||{}),this.id=this.id||a.generateId(f.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"}}f.defaults({id:"",modelName:f.getModelName(),modelVersion:i.MODEL_VERSION,locked:void 0,fullscreen:void 0,hashCodes:{},inputConfig:new u,globalGridActive:!1,globalGridHeightPercentage:15});var h="could not access local storage, maybe disabled by user? Error: ",p=null;if("undefined"!=typeof Storage)try{p=window.localStorage}catch(e){log.error(h+e)}var m={save:function(e,t){if(p)try{return p.setItem(e,t)}catch(e){log.error(h+e)}},get:function(e){if(p)try{return p.getItem(e)}catch(e){log.error(h+e)}},remove:function(e){if(p)try{return p.removeItem(e)}catch(e){log.error(h+e)}},getUserPassword:e=>e?v("USER_PASSWORDS_KEY")[e]:null,saveLocalUser(e){let t=v("USER_PASSWORDS_KEY");t[e]="",m.save("USER_PASSWORDS_KEY",JSON.stringify(t))},isSavedLocalUser:e=>""===v("USER_PASSWORDS_KEY")[e],isLastActiveUserLocal:()=>""===v("USER_PASSWORDS_KEY")[m.getLastActiveUser()],saveUserPassword(e,t){let n=v("USER_PASSWORDS_KEY");n[e]=t,m.save("USER_PASSWORDS_KEY",JSON.stringify(n))},removeUserPassword(e){let t=v("USER_PASSWORDS_KEY");delete t[e],m.save("USER_PASSWORDS_KEY",JSON.stringify(t)),m.getAutologinUser()===e&&m.setAutologinUser("")},getSavedUsers(e){let t=m.getSavedLocalUsers(),n=m.getSavedOnlineUsers().concat(t);return e&&n.includes(e)&&(n=n.filter(t=>t!==e),n.unshift(e)),n},getSavedLocalUsers(){let e=v("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""===e[t]).sort((e,t)=>e===i.LOCAL_DEMO_USERNAME?1:t===i.LOCAL_DEMO_USERNAME?-1:e.localeCompare(t))},getSavedOnlineUsers(){let e=v("USER_PASSWORDS_KEY");return(Object.keys(e)||[]).filter(t=>""!==e[t]).sort()},setLastActiveUser(e){m.save("LAST_ACTIVEUSER_KEY",e)},getLastActiveUser:()=>m.get("LAST_ACTIVEUSER_KEY"),setAutologinUser(e){e!==i.LOCAL_DEMO_USERNAME&&m.save("AUTOLOGIN_USER_KEY",e)},getAutologinUser:()=>m.get("AUTOLOGIN_USER_KEY"),markSyncedDatabase(e){let t=g();t.includes(e)||t.push(e),m.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},isDatabaseSynced:e=>g().includes(e),unmarkSyncedDatabase(e){let t=g();t=t.filter(t=>t!==e),m.save("SYNCED_DBS_LIST_KEY",JSON.stringify(t))},getUserMajorModelVersion(e){let t=v("USER_MODELVERSION_KEY");return t[e]?parseInt(JSON.parse(t[e]).major):1},setUserModelVersion(e,t){if(m.getUserMajorModelVersion(e)m.save("AG_GRID_DIMENSIONS_KEY",JSON.stringify(e)),getLastGridDimensions(){let e=m.get("AG_GRID_DIMENSIONS_KEY");return e?JSON.parse(e):{}},addUsedLocales(e){let t=m.get("AG_USED_LOCALES_KEY"),n=t?JSON.parse(t):[];n=[...new Set(n.concat(e))],m.save("AG_USED_LOCALES_KEY",JSON.stringify(n))},getUsedLocales(){let e=m.get("AG_USED_LOCALES_KEY");return e?JSON.parse(e):[]}};function v(e){let t=m.get(e),n=JSON.parse(t),i=n instanceof Object;if("AG_LOCAL_METADATA_KEY"===e&&n&&n.modelName===f.getModelName()){let t={};return t[m.getAutologinUser()||m.getLastActiveUser()]=n,m.save(e,JSON.stringify(t)),t}return t&&i?n:(m.save(e,JSON.stringify({})),{})}function g(){let e=m.get("SYNCED_DBS_LIST_KEY");return e?JSON.parse(e):(m.save("SYNCED_DBS_LIST_KEY",JSON.stringify([])),[])}var _=n(0),b=n.n(_),y=n(44),E=n.n(y);let C={},w=m.get("CUSTOM_LANGUAGE_KEY")||"",T=null,S=["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"}]'),A="de";C.initDomI18n=function(){T||(T=window.domI18n({selector:"[data-i18n]",separator:" // ",languages:S,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===A||(N.sort((t,n)=>t[e].toLowerCase()>n[e].toLowerCase()?1:-1),A=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=S.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),m.save("CUSTOM_LANGUAGE_KEY",w),b()(document).trigger(i.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",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",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",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event"},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",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",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",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event"};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 H.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 H.ELEMENT_TYPE_PREDICTION:return function(e){e=R(e);let t=C.getTranslation(e.label);return`\n
  • \n
    \n
    ${t}
    \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)}};class M extends(l({id:String,modelName:String,modelVersion:String,data:[String],author:[String],authorURL:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,M)),this.id=this.id||a.generateId(M.getIdPrefix())}static getModelName(){return"GridImage"}static getIdPrefix(){return"grid-image"}}M.defaults({id:"",modelName:M.getModelName(),modelVersion:i.MODEL_VERSION,data:null,author:null,authorURL:null});class P extends(l({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0]})){constructor(e,t){super(e=a.setDefaults(e,t,P)),this.id=this.id||a.generateId("grid-action-speak")}static getModelName(){return"GridActionSpeak"}}P.defaults({id:"",modelName:P.getModelName(),modelVersion:i.MODEL_VERSION});class U extends(l({id:String,modelName:String,modelVersion:String,speakLanguage:[String,null,void 0],speakText:[Object,String]})){constructor(e,t){super(e=a.setDefaults(e,t,U)),this.id=this.id||a.generateId("grid-action-speak-custom")}static getModelName(){return"GridActionSpeakCustom"}}U.defaults({id:"",modelName:U.getModelName(),modelVersion:i.MODEL_VERSION,speakText:{}});class G extends(l({id:String,modelName:String,modelVersion:String,areURL:[String],areModelGridFileName:[String],componentId:[String],dataPortId:[String],dataPortSendData:[String],eventPortId:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,G)),this.id=this.id||a.generateId("grid-action-are")}static getModelName(){return"GridActionARE"}}G.defaults({id:"",modelName:G.getModelName(),modelVersion:i.MODEL_VERSION});class F extends(l({id:String,modelName:String,modelVersion:String,dictionaryKey:[String,void 0,null],suggestOnChange:[Boolean]})){constructor(e,t){super(e=a.setDefaults(e,t,F)),this.id=this.id||a.generateId("grid-action-predict")}static getModelName(){return"GridActionPredict"}}F.defaults({id:"",modelName:F.getModelName(),modelVersion:i.MODEL_VERSION,dictionaryKey:null,suggestOnChange:!1});class j extends(l({id:String,modelName:String,modelVersion:String,action:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,j)),this.id=this.id||a.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_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.defaults({id:"",modelName:j.getModelName(),modelVersion:i.MODEL_VERSION});class B extends(l({id:String,modelName:String,modelVersion:String,action:[String],radioId:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,B)),this.id=this.id||a.generateId("grid-action-webradio")}static getModelName(){return"GridActionWebradio"}static getActions(){return[B.WEBRADIO_ACTION_START,B.WEBRADIO_ACTION_TOGGLE,B.WEBRADIO_ACTION_STOP,B.WEBRADIO_ACTION_NEXT,B.WEBRADIO_ACTION_PREV,B.WEBRADIO_ACTION_VOLUP,B.WEBRADIO_ACTION_VOLDOWN]}}B.WEBRADIO_ACTION_START="WEBRADIO_ACTION_START",B.WEBRADIO_ACTION_TOGGLE="WEBRADIO_ACTION_TOGGLE",B.WEBRADIO_ACTION_STOP="WEBRADIO_ACTION_STOP",B.WEBRADIO_ACTION_NEXT="WEBRADIO_ACTION_NEXT",B.WEBRADIO_ACTION_PREV="WEBRADIO_ACTION_PREV",B.WEBRADIO_ACTION_VOLUP="WEBRADIO_ACTION_VOLUP",B.WEBRADIO_ACTION_VOLDOWN="WEBRADIO_ACTION_VOLDOWN",B.defaults({id:"",modelName:B.getModelName(),modelVersion:i.MODEL_VERSION,radioId:"",action:B.WEBRADIO_ACTION_START});class V extends(l({id:String,modelName:String,language:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,V)),this.id=this.id||a.generateId("grid-action-change-lang")}static getModelName(){return"GridActionChangeLang"}}V.defaults({id:"",modelName:V.getModelName()});class H extends(l({id:String,modelName:String,modelVersion:String,width:Number,height:Number,x:[Number],y:[Number],label:[Object,String,void 0],backgroundColor:[String],hidden:[Boolean],image:[M],actions:[Object],type:String})){constructor(e,t){let n={id:"",modelName:H.getModelName(),modelVersion:i.MODEL_VERSION,label:{},width:1,height:1,type:H.ELEMENT_TYPE_NORMAL};(e=a.setDefaults(e,t,H)||{}).actions=e.actions||[new P],super(Object.assign(n,e)),this.id=this.id||a.generateId("grid-element")}duplicate(){var e=new H(JSON.parse(JSON.stringify(this)));return e.id=a.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}static getActionTypes(){return[P,x,U,F,j,G,B,V]}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"}}H.ELEMENT_TYPE_NORMAL="ELEMENT_TYPE_NORMAL",H.ELEMENT_TYPE_COLLECT="ELEMENT_TYPE_COLLECT",H.ELEMENT_TYPE_PREDICTION="ELEMENT_TYPE_PREDICTION";class z extends(l({id:String,modelName:String,modelVersion:String,fileName:[String],dataBase64:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,z)),this.id=this.id||a.generateId(z.getModelName().toLowerCase())}static getModelName(){return"AdditionalGridFile"}}z.defaults({id:"",modelName:z.getModelName(),modelVersion:i.MODEL_VERSION});class W extends(l({id:String,modelName:String,modelVersion:String,radioId:[String],radioUUID:[String],radioName:[String],radioUrl:[String],faviconUrl:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,W)),this.id=this.id||a.generateId("webradio")}static getModelName(){return"Webradio"}}W.defaults({id:"",modelName:W.getModelName(),modelVersion:i.MODEL_VERSION});let K={};K.regenerateIDs=function(e){let t={},n=[];return e.forEach(e=>{let n=a.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}},K.sortGridElements=function(e){return e?e.sort((e,t)=>e.y!==t.y?e.y-t.y:e.x-t.x):e},K.generateGlobalGrid=function(e,t){let n=new H({width:1,height:1,x:0,y:0,label:C.getTranslationObject("Home // Start",t),image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJNMjgwLjM3IDE0OC4yNkw5NiAzMDAuMTFWNDY0YTE2IDE2IDAgMCAwIDE2IDE2bDExMi4wNi0uMjlhMTYgMTYgMCAwIDAgMTUuOTItMTZWMzY4YTE2IDE2IDAgMCAxIDE2LTE2aDY0YTE2IDE2IDAgMCAxIDE2IDE2djk1LjY0YTE2IDE2IDAgMCAwIDE2IDE2LjA1TDQ2NCA0ODBhMTYgMTYgMCAwIDAgMTYtMTZWMzAwTDI5NS42NyAxNDguMjZhMTIuMTkgMTIuMTkgMCAwIDAtMTUuMyAwek01NzEuNiAyNTEuNDdMNDg4IDE4Mi41NlY0NC4wNWExMiAxMiAwIDAgMC0xMi0xMmgtNTZhMTIgMTIgMCAwIDAtMTIgMTJ2NzIuNjFMMzE4LjQ3IDQzYTQ4IDQ4IDAgMCAwLTYxIDBMNC4zNCAyNTEuNDdhMTIgMTIgMCAwIDAtMS42IDE2LjlsMjUuNSAzMUExMiAxMiAwIDAgMCA0NS4xNSAzMDFsMjM1LjIyLTE5My43NGExMi4xOSAxMi4xOSAwIDAgMSAxNS4zIDBMNTMwLjkgMzAxYTEyIDEyIDAgMCAwIDE2LjktMS42bDI1LjUtMzFhMTIgMTIgMCAwIDAtMS43LTE2LjkzeiIvPjwvc3ZnPg"}),actions:[new x({toGridId:e})]}),i=new H({width:1,height:1,x:1,y:0,label:C.getTranslationObject("Back // Zurück",t),image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDUwNEMxMTkgNTA0IDggMzkzIDggMjU2UzExOSA4IDI1NiA4czI0OCAxMTEgMjQ4IDI0OC0xMTEgMjQ4LTI0OCAyNDh6bTExNi0yOTJIMjU2di03MC45YzAtMTAuNy0xMy0xNi4xLTIwLjUtOC41TDEyMS4yIDI0Ny41Yy00LjcgNC43LTQuNyAxMi4yIDAgMTYuOWwxMTQuMyAxMTQuOWM3LjYgNy42IDIwLjUgMi4yIDIwLjUtOC41VjMwMGgxMTZjNi42IDAgMTItNS40IDEyLTEydi02NGMwLTYuNi01LjQtMTItMTItMTJ6Ii8+PC9zdmc+"}),actions:[new x({toLastGrid:!0})]}),a=new P;t&&(a.speakLanguage=t);let r=new H({width:Math.max(4,-4),height:1,x:2,y:0,type:H.ELEMENT_TYPE_COLLECT,actions:[a]}),s=new H({label:C.getTranslationObject("Delete Word // Wort löschen",t),width:1,height:1,x:2+r.width,y:0,image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNTEyIj48cGF0aCBkPSJNNTc2IDY0SDIwNS4yNkE2My45NyA2My45NyAwIDAgMCAxNjAgODIuNzVMOS4zNyAyMzMuMzdjLTEyLjUgMTIuNS0xMi41IDMyLjc2IDAgNDUuMjVMMTYwIDQyOS4yNWMxMiAxMiAyOC4yOCAxOC43NSA0NS4yNSAxOC43NUg1NzZjMzUuMzUgMCA2NC0yOC42NSA2NC02NFYxMjhjMC0zNS4zNS0yOC42NS02NC02NC02NHptLTg0LjY5IDI1NC4wNmM2LjI1IDYuMjUgNi4yNSAxNi4zOCAwIDIyLjYzbC0yMi42MiAyMi42MmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMEwzODQgMzAxLjI1bC02Mi4wNiA2Mi4wNmMtNi4yNSA2LjI1LTE2LjM4IDYuMjUtMjIuNjMgMGwtMjIuNjItMjIuNjJjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNMMzM4Ljc1IDI1NmwtNjIuMDYtNjIuMDZjLTYuMjUtNi4yNS02LjI1LTE2LjM4IDAtMjIuNjNsMjIuNjItMjIuNjJjNi4yNS02LjI1IDE2LjM4LTYuMjUgMjIuNjMgMEwzODQgMjEwLjc1bDYyLjA2LTYyLjA2YzYuMjUtNi4yNSAxNi4zOC02LjI1IDIyLjYzIDBsMjIuNjIgMjIuNjJjNi4yNSA2LjI1IDYuMjUgMTYuMzggMCAyMi42M0w0MjkuMjUgMjU2bDYyLjA2IDYyLjA2eiIvPjwvc3ZnPg"}),actions:[new j({action:j.COLLECT_ACTION_REMOVE_WORD})]}),o=new H({label:C.getTranslationObject("Clear // Leeren",t),width:1,height:1,x:3+r.width,y:0,image:new M({data:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBkPSJNMjU2IDhDMTE5IDggOCAxMTkgOCAyNTZzMTExIDI0OCAyNDggMjQ4IDI0OC0xMTEgMjQ4LTI0OFMzOTMgOCAyNTYgOHptMTIxLjYgMzEzLjFjNC43IDQuNyA0LjcgMTIuMyAwIDE3TDMzOCAzNzcuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDI1NiAzMTJsLTY1LjEgNjUuNmMtNC43IDQuNy0xMi4zIDQuNy0xNyAwTDEzNC40IDMzOGMtNC43LTQuNy00LjctMTIuMyAwLTE3bDY1LjYtNjUtNjUuNi02NS4xYy00LjctNC43LTQuNy0xMi4zIDAtMTdsMzkuNi0zOS42YzQuNy00LjcgMTIuMy00LjcgMTcgMGw2NSA2NS43IDY1LjEtNjUuNmM0LjctNC43IDEyLjMtNC43IDE3IDBsMzkuNiAzOS42YzQuNyA0LjcgNC43IDEyLjMgMCAxN0wzMTIgMjU2bDY1LjYgNjUuMXoiLz48L3N2Zz4"}),actions:[new j({action:j.COLLECT_ACTION_CLEAR})]});return new se({label:C.getTranslationObject("Global Grid",t),gridElements:[n,i,r,s,o],rowCount:3})},K.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()}},K.getFreeCoordinates=function(e){let t=new se({},e),n={};for(let e=0;e{for(let t=e.x;t({x:n[e].x,y:n[e].y}))},K.getFillElements=function(e){return K.getFreeCoordinates(e).map(e=>new H({x:e.x,y:e.y}))},K.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},K.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};class Y extends(l({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]})){constructor(e,t){super(e=a.setDefaults(e,t,Y)),this.id=this.id||a.generateId(Y.getModelName().toLowerCase())}static getModelName(){return"EncryptedObject"}}Y.defaults({modelVersion:i.MODEL_VERSION});let J={},X=["thumbnail"];J.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===X.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===X.indexOf(a)&&(t[a]=e(t[a],n,i))});return t}(i[e],t,n))}),i},J.getDefaultRemovedPlaceholder=function(){return"_removed_"};let q=window.sjcl,Z=window.log;function Q(){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?Z.warn("object type has to be a constructor function or empty, aborting."):r&&r.isShortVersion?Z.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],a&&(n[e]=a)):Z.warn("cache-values has to be set, aborting."):Z.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"!=typeof e)return void Z.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?(Z.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 ee={},te=null,ne=null,ie=!1,ae=new Q;function re(){if(!ne||!te){let e="using encryptionService uninitialized is not possible, aborting...";throw Z.error(e),e}}ee.encryptObject=function(e,t){if(re(),!e)return e;t=t||{};let n=new Y({id:e.id,modelName:e.modelName});n._id=e.id,e._rev&&(n._rev=e._rev);let i=JSON.stringify(e),a=JSON.stringify(J.removeLongPropertyValues(e)),r=i!==a;return n.encryptedDataBase64=ee.encryptString(i,t.encryptionKey),n.encryptedDataBase64Short=r?ee.encryptString(a,t.encryptionKey):null,n},ee.decryptObjects=function(e,t){if(re(),!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=ee.decryptString(n,t.encryptionKey),r=JSON.parse(a),r.isShortVersion=!0}else a=ee.decryptString(e.encryptedDataBase64,t.encryptionKey),r=JSON.parse(a);r._id=e._id,r._rev=e._rev,i.push(r)}catch(t){throw Z.error("error decrypting object: "+e.modelName+", id: "+e.id),Z.error(t),t}}),i.length>1?i:i[0]},ee.encryptString=function(e,t){t||re();let n=null;return n=(t=t||ne)&&!ie?q.encrypt(t,e,{iter:1e3}):e,n},ee.decryptString=function(e,t){if(t||re(),ae.has(e))return Z.debug("using decryption cache..."),ae.get(e);t=t||ne;let n=null;(new Date).getTime();if(t&&!ie)n=q.decrypt(t,e);else try{n=e;let i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=q.decrypt(t,e))}catch(i){n=q.decrypt(t,e)}return ae.set(e,n),n},ee.getStringHash=function(e){let t=q.hash.sha256.hash(e);return q.codec.hex.fromBits(t)},ee.getUserPasswordHash=function(e){return ee.getStringHash("STATIC_USER_PW_SALT"+e)},ee.setEncryptionProperties=function(e,t,n){e=e||"",te=t,ne=ee.getStringHash(""+te+e),ie=n,ae.clearAll(),Z.debug("new encryption key is: "+ne)},ee.resetEncryptionProperties=function(){Z.debug("reset encryption properties..."),te=null,ne=null,ie=!1};class se extends(l({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:l.Array(H),additionalFiles:[l.Array(z)],webRadios:[l.Array(W)],thumbnail:[Object]})){constructor(e,t){(e=a.setDefaults(e,t,se))&&(e.id=e.id?e.id:a.generateId(se.getIdPrefix())),super(e),this.minColumnCount=e.minColumnCount||this.getWidth()||m.getLastGridDimensions().minColumnCount||4,this.rowCount=e.rowCount||this.getHeight()||m.getLastGridDimensions().rowCount||3,this.id=this.id||a.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))}),ee.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=K.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}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===H.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===G.getModelName())[0]}getAREURL(){let e=this.getAREFirstAction();return e?e.areURL:null}clone(){let e=new se(this);return delete e._id,delete e._rev,e.id=a.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"}}se.defaults({id:"",modelName:se.getModelName(),modelVersion:i.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:C.getBrowserLang()});let oe={},le=!1,ce=!1;function de(e){return new URLSearchParams(window.location.search).has(e)}function ue(e){return new URLSearchParams(window.location.search).get(e)}function fe(e){return"false"===ue(e)}oe.isDemoMode=function(){return le=le||de("demo"),function(e){if(!de(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)}}("demo"),le},oe.isScanningEnabled=function(){return de("scanning")&&!fe("scanning")},oe.isDirectionEnabled=function(){return de("direction")&&!fe("direction")},oe.isHuffmanEnabled=function(){return de("huffman")&&!fe("huffman")},oe.shouldResetDatabase=function(){let e=!ce&&(oe.isDemoMode()||"true"===ue("reset"));return ce=!0,e},oe.getDefaultGridsetName=function(){return ue("default")};var he=n(8),pe=n.n(he);let me={};function ve(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 ge(e){let t=be(e);return t.push(ee.encryptObject),t}function _e(e){let t=be(e);return e.major&&t.unshift(ee.decryptObjects),t}function be(e){if(e.major===a.getLatestModelVersion().major)return[];let t=[];switch(e.major){case 1:t.push((function(e,t){if(e.modelName===f.getModelName()){Z.info("converting model version from V1 to V2: "+e.modelName);let t=e.inputConfig;t.dirInputs=u.DEFAULT_DIR_INPUTS,t.huffInputs=u.DEFAULT_HUFF_INPUTS,t.scanInputs=u.DEFAULT_SCAN_INPUTS,t.scanKey&&(t.scanInputs=[],t.scanInputs.push(new c({label:u.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=a.getModelVersionString(),e}));case 2:t.push((function(e,t){if(e.modelName===se.getModelName()){if(Z.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===U.getModelName()){let n=t.speakText;t.speakText={},t.speakText[e.locale]=n,t.speakLanguage=void 0}else t.modelName===P.getModelName()&&(t.speakLanguage=void 0)})})}return e.modelVersion=a.getModelVersionString(),e}))}return t}function ye(e,t,n,a,r){let s=this,o=null,l=null,c=null,d=!0,u=i.DB_SYNC_STATE_FAIL,f=!1,h=null,p={};function v(e,t){let n=new pe.a(e,{auto_compaction:!0});return n.info().then((function(t){return log.debug(e+" info:"),log.debug(t),Promise.resolve(n)}))}function g(){return l&&o?new Promise(t=>{let n=(new Date).getTime();function r(){m.markSyncedDatabase(e),c=o.sync(l,{live:!0,retry:!1}).on("paused",(function(e){log.debug("sync paused"),log.debug(e),_(i.DB_SYNC_STATE_SYNCED)})).on("active",(function(e){log.debug("sync active"),log.debug(e),_(i.DB_SYNC_STATE_SYNCINC)})).on("change",(function(e){E(e)})).on("error",(function(e){log.info("couchdb error"),log.info(e),y()}))}s.wasCurrentDatabaseSynced()||a?(r(),t()):(log.debug("database wasn't synced before, so temporarily use remote db until sync is done..."),d=!1,c=o.sync(l,{live:!1,retry:!1}).on("active",(function(e){_(i.DB_SYNC_STATE_SYNCINC)})).on("paused",(function(){_(i.DB_SYNC_STATE_SYNCED)})).on("error",(function(e){log.info("couchdb error"),log.error(e),y()})).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"),d=!0,r())})),t())}):(log.error("trying to setupSync() but remoteDb or db is not specified! Aborting..."),Promise.reject())}function _(e){if(!f)try{u=e,b()(document).trigger(i.EVENT_DB_SYNC_STATE_CHANGE,e)}catch(e){log.error(e)}}function y(){f||(s.cancelSync(),l&&(l.close(),l=null),b()(document).trigger(i.EVENT_DB_CONNECTION_LOST),_(i.DB_SYNC_STATE_FAIL))}function E(e){if(r)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 p[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)),!f&&(t.length>0||n.length>0)&&r(t,n)}catch(e){log.error(e)}}function C(e){e&&e.length>0&&e.forEach(e=>{let t=T(e),n=w(e);(!p[t]||p[t](o=e,Promise.resolve())),a.push(h)),t&&a.push(v(t,!0).then(e=>(l=e,n?(l.changes({since:"now",live:!0,include_docs:!0}).on("change",(function(e){E(e)})),Promise.resolve()):h.then(()=>g()))));let r=Promise.all(a);return r.then(()=>{b()(document).trigger(i.EVENT_DB_INITIALIZED)}),r},s.put=function(e){let t=s.getDbToUse().put(e);return t.then(e=>{C([e])}),t},s.bulkDocs=function(e){let t=s.getDbToUse().bulkDocs(e);return t.then(e=>{C([e])}),t},s.startSync=function(e){if(!l&&h)return h.then(()=>v(e,!0)).then(e=>(l=e,g()));log.warn("startSync() is not possible if remote database is already open, or local database not opened")},s.getDbToUse=function(){let e=d&&!n?o:l;if(!e||f)throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase().";return e},s.close=function(){if(f)return Promise.resolve();let e=[];f=!0,ee.resetEncryptionProperties(),s.cancelSync(),o&&e.push(o.close()),l&&e.push(l.close()),o=null,l=null;let t=Promise.all(e);return t.then(()=>{b()(document).trigger(i.EVENT_DB_CLOSED)}),t},s.destroyDb=function(e){return s.close().then(()=>new pe.a(e).destroy())},s.getOpenedDatabaseName=function(){return e},s.wasCurrentDatabaseSynced=function(){return m.isDatabaseSynced(e)},s.isUsingLocalDb=function(){return d},s.getSyncState=function(){return u},s.isSyncEnabled=function(){return!!c},s.cancelSync=function(){c&&(log.debug("canceling sync ..."),_(i.DB_SYNC_STATE_STOPPED),c.cancel(),c=null)},s.resumeSync=function(){if(!n&&!c&&l)return log.debug("resuming sync..."),g()}}me.convertLiveToDatabaseObjects=function(e,t){Z.trace("conversion to database - before filters:",e);let n=ve(e,t,ge);return Z.trace("conversion to database - after filters:",n),n},me.convertDatabaseToLiveObjects=function(e,t){Z.trace("conversion to live - before filters:",e);let n=ve(e,t,_e);return Z.trace("conversion to live - after filters:",n),n},me.updateDataModel=function(e){return ve(e,null,be)};let Ee={},Ce=null,we=new Q,Te=null;function Se(){return Ne().getDbToUse()}function Ne(){if(!Ce||!Ce.getDbToUse())throw"Using pouchDbService uninitialized is not possible. First initialize a database by using pouchDbService.initDatabase() or pouchDbService.createDatabase().";return Ce}function Ae(){Te&&(clearTimeout(Te),Te=null),Ne().isUsingLocalDb()&&Ne().getSyncState()!==i.DB_SYNC_STATE_SYNCINC||Ne().cancelSync()}function Ie(){let e=Ne().wasCurrentDatabaseSynced()?0:2e3;Te=setTimeout(()=>{Ne().resumeSync()},e)}function ke(e,t){t.forEach(e=>{e._deleted?we.clearAll():(we.set(e.id,e),we.clear(f.getIdPrefix()),we.clear(se.getIdPrefix()))}),e=(t=t.filter(e=>!e._deleted)).map(e=>e.id);let n=t.map(e=>me.convertDatabaseToLiveObjects(e)),a=Ee.getOpenedDatabaseName(),r=m.getUserMajorModelVersion(a);n.forEach(e=>{m.setUserModelVersion(a,e.modelVersion)}),r===m.getUserMajorModelVersion(a)?b()(document).trigger(i.EVENT_DB_PULL_UPDATED,[e,n]):b()(document).trigger(i.EVENT_DB_DATAMODEL_UPDATE,[e,n])}Ee.initDatabase=function(e,t,n){return Ce&&Ce.getOpenedDatabaseName()===e&&t?Ce.startSync(t):(we.clearAll(),Ee.closeCurrentDatabase(),Ce=new ye(e,t,n,!1,ke),Ce.init())},Ee.createDatabase=function(e,t,n){return we.clearAll(),Ee.closeCurrentDatabase(),Ce=new ye(e,t,n,!0,ke),Ce.init()},Ee.all=function(e,t){if(t&&we.has(t))return log.debug("using cache for retrieving id: "+t),we.getAsPromise(t);if(!t&&e&&we.has(e))return log.debug("using cache for retrieving bulk with id-prefix: "+e),we.getAsPromise(e);let n=Se();return Ae(),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?we.set(t,a):!t&&e&&a&&we.set(e,a),i(a)})).catch((function(e){log.error(e),a()})).finally(()=>{Ie()})})},Ee.save=function(e,t){return log.debug("saving "+e+"..."),Ae(),t.id&&(we.clear(t.id,t),we.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();Ce.put(t).then(i=>{t._rev=i.rev,we.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()}).catch((function(e){t.id&&we.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(()=>{Ie()})})},Ee.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();Ae(),we.clearAll();let t=Ce.bulkDocs(e);return t.finally(()=>{Ie()}),t},Ee.remove=function(e){let t=Se();return Ee.all(null,e).then(e=>(we.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)))},Ee.resetDatabase=function(e){return Ee.isUsingLocalDb()&&Ee.getOpenedDatabaseName()===i.LOCAL_DEMO_USERNAME?(we.clearAll(),new Promise(t=>{Ce.destroyDb(e).then((function(){Ce=null,Ee.initDatabase(e).then(()=>t())})).catch((function(e){log.error("error destroying database: "+e)}))})):Promise.reject("do not destroy!")},Ee.deleteDatabase=function(e){if(Ee.getOpenedDatabaseName()===e&&!Ee.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();we.clearAll();let t=[];return Ee.getOpenedDatabaseName()===e&&t.push(Ee.closeCurrentDatabase()),Promise.all(t).then(()=>new pe.a(e).destroy())},Ee.closeCurrentDatabase=function(){if(!Ce)return Promise.resolve();Ae();let e=Ce.close();return Ce=null,e},Ee.getOpenedDatabaseName=function(){return Ce?Ce.getOpenedDatabaseName():null},Ee.isUsingLocalDb=function(){return Ce?Ce.isUsingLocalDb():null},Ee.getSyncState=function(){return Ce?Ce.getSyncState():null},Ee.isSyncEnabled=function(){return Ce?Ce.isSyncEnabled():null};class Oe extends(l({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]})){constructor(e,t){super(e=a.setDefaults(e,t,Oe)),this.id=this.id||a.generateId(Oe.getIdPrefix())}clone(){let e=new Oe(this);return delete e._id,delete e._rev,e.id=a.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}static getModelName(){return"Dictionary"}static getIdPrefix(){return"dictionary"}}Oe.defaults({id:"",modelName:Oe.getModelName(),modelVersion:i.MODEL_VERSION,data:JSON.stringify({})});let Le={};Le.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 xe=Le;var De=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]=xe.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 Re(){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||(Pe(n)?s.predictNextWord:s.predictCompleteWord),r=r.concat(e(Me(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 De,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(Ue(n)):n.word&&"string"==typeof n.word&&a.addWord(Ue(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=Me(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:!Pe(t),s=i.dontLearn,o=Me(t),l=Me(t,2),c=r?t.substring(0,t.lastIndexOf(o)):t;return c.length>0&&(!Pe(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=Ue(n),i=Ue(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(Pe(t)){let a=Me(t,2),r=Me(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 Me(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 Pe(e){return new RegExp("[\\s\\.\\?!,]").test(e[e.length-1])}function Ue(e){return(e=e||"").replace(/[^a-z0-9áéíóúñüäöß'`´’]/gim,"")}Re.instance=function(){return new Re};var Ge=Re;let $e={},Fe=null,je=[],Be=[],Ve=!1,He=[],ze=null;function We(){Ve&&(Ve=!1,He.forEach(e=>{let t=Be.filter(t=>t.dictionaryKey===e)[0]||new Oe({dictionaryKey:e});t.data=Fe.dictionaryToJSON(e),ut.saveDictionary(t)}))}$e.predict=function(e,t){if(void 0===e||0===je.length)return;t?(Fe.useDictionary(t),-1===He.indexOf(t)&&He.push(t)):(Fe.useAllDictionaries(),He=Fe.getDictionaryKeys());let n=Fe.predict(e,{maxPredicitons:je.length});for(let e=0;e{e&&e.type===H.ELEMENT_TYPE_PREDICTION&&je.push(JSON.parse(JSON.stringify(e)))}),je=je.sort((e,t)=>e.y!==t.y?e.yt.id===e)[0];if(t){let e=b()(`#${t.id} .text-container span`).text();Fe.learn(e),Ve=!0}},$e.getDictionaryKeys=function(){return Fe.getDictionaryKeys()},$e.init=function(e){clearInterval(ze),je=e||[],Ve=!1,Fe=Ge.instance(),ut.getDictionaries().then(e=>{Be=e,e.forEach(e=>{Fe.loadDictionary(e.data,e.dictionaryKey)}),ze=setInterval(We,6e5)})},b()(document).on(i.EVENT_DB_PULL_UPDATED,(e,t,n)=>{n.map(e=>e.modelName).indexOf(Oe.getModelName())>-1&&$e.init(je)});let Ke={},Ye={},Je={},Xe="";Ke.DEFAULT_KEY="DEFAULT_KEY",Ke.DEFAULT_KEY2="DEFAULT_KEY2",Ke.debounce=function(e,t,n){n=n||Ke.DEFAULT_KEY,e||t?(Ye[n]&&clearTimeout(Ye[n]),Ye[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},Ke.clearDebounce=function(e){e=e||Ke.DEFAULT_KEY,Ye[e]&&clearTimeout(Ye[e])},Ke.throttle=function(e,t,n,i){if(!e||!e.apply)return;n=n||500;let a=i||e,r=Je[a];(!r||(new Date).getTime()-r>n)&&(e.apply(null,t),Je[a]=(new Date).getTime())},Ke.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";Xe=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},Ke.appendToClipboard=function(e){Ke.copyToClipboard(Xe+e)},Ke.getClipboardContent=function(){return navigator.clipboard.readText().then(e=>Promise.resolve(e)).catch(e=>(log.warn("failed to read clipboard."),Promise.resolve(null)))},Ke.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},Ke.splitInChunks=function(e,t){let n=[];for(let i=0,a=e.length;i{let e=[];return oe.shouldResetDatabase()&&e.push(Ee.resetDatabase(t)),Promise.all(e)}).then(()=>Ee.all(f.getIdPrefix())).then(t=>{let a=[];return t&&0!==t.length?(i=t instanceof Array?t[0]:t,ee.setEncryptionProperties(e,i.id,n),t.length&&t.length>1&&a.push(function(e,t){log.warn("fixing duplicated metadata...");let n=null;return Ee.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 ee.decryptObjects(n)}catch(i){if(0===a.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return ee.setEncryptionProperties(e,a.pop()),t(n,a)}}(t,n))});let s=n.pop();return ee.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=it(e.modelName,e);r.push(t)}),Promise.all(r)}).then(()=>{let e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach(t=>{e.push(Ee.remove(t))}),Promise.all(e)}).then(()=>(log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()))}(e,t))):(i=new f,ee.setEncryptionProperties(e,i.id,n),a.push(it(f.getIdPrefix(),i))),Promise.all(a)}).then(()=>Ee.all(Oe.getIdPrefix()).then(e=>e?Promise.resolve():new Promise(e=>{log.info("importing dictionary: "+et),b.a.get(et).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 Oe({dictionaryKey:tt,data:e,isDefault:!0});return it(Oe.getIdPrefix(),t)})),Ze.then(()=>{Qe=null,$e.init()}),Ze}function it(e,t){return new Promise((n,i)=>{let a=me.convertLiveToDatabaseObjects(t);Ee.save(e,a).then(()=>{log.debug("saved "+e+", id: "+t.id),n()}).catch((function(e){i(e)}))})}qe.getObject=function(e,t,n){return new Promise((i,a)=>{Ze.then(()=>{if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),a();Ee.all(e.getIdPrefix(),t).then(t=>{let a={objectType:e,onlyShortVersion:n},r=me.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&&Qe!==s&&(Qe=s,m.setUserModelVersion(Ee.getOpenedDatabaseName(),s)),i(r)}).catch(e=>{a(e)})})})},qe.getSingleObject=function(e,t,n){return qe.getObject(e,t,n).then(e=>Promise.resolve(e instanceof Array?e[0]:e))},qe.saveObject=function(e,t,n){return Ze.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()+"..."),qe.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,it(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,it(e.getIdPrefix(),n)}})},qe.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(me.convertLiveToDatabaseObjects(e).forEach(e=>{e._id=e.id}),t>1e3){let t=Math.floor(1e3/n);i=Ke.splitInChunks(e,t)}else i=[e];return function e(t){let n=JSON.parse(JSON.stringify(t.shift()));return Ee.bulkDocs(n).then(()=>t.length>0?e(t):Promise.resolve())}(i)},qe.bulkDelete=function(e){return e.forEach(e=>{e._deleted=!0,e._id=e.id}),Ee.bulkDocs(JSON.parse(JSON.stringify(e)))},qe.removeObject=function(e){return Ee.remove(e)},qe.initForUser=function(e,t,n,i){let a=n&&!i||!1,r=Ee.getOpenedDatabaseName()===e,s=-1!==m.getSavedLocalUsers().indexOf(e);return r&&a===Ee.isSyncEnabled()?Promise.resolve():Ee.initDatabase(e,n,i).then(()=>r?Promise.resolve():nt(t,e,s))},qe.registerForUser=function(e,t,n,i){let a=n&&!i,r=-1!==m.getSavedLocalUsers().indexOf(e);return Ee.getOpenedDatabaseName()===e&&a===Ee.isSyncEnabled()?Promise.resolve():Ee.createDatabase(e,n,i).then(()=>nt(t,e,r))},qe.deleteDatabase=function(e){if(e)return Ee.deleteDatabase(e)},qe.closeCurrentDatabase=function(){return Ee.closeCurrentDatabase()},qe.getCurrentUsedDatabase=function(){return Ee.getOpenedDatabaseName()};var at={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!"}},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])}})},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(at.getBase64FromImg(r,t,n))}catch(e){i(null)}},r.src=e})},urlToBase64:function(e){return new Promise((t,n)=>{if(e.lastIndexOf(".svg")===e.length-4)$.get(e,null,(function(e){try{e.documentElement.width.baseVal.value=e.documentElement.width.baseVal.value||500,e.documentElement.height.baseVal.value=e.documentElement.height.baseVal.value||500;let n=btoa((new XMLSerializer).serializeToString(e));t("data:image/svg+xml;base64,"+n)}catch(e){t(null)}})).fail((function(){t(null)}));else{let n=new Image;n.crossOrigin="anonymous",n.onload=function(){try{t(at.getBase64FromImg(n,1e3))}catch(e){t(null)}},n.onerror=function(){t(null)},n.src=e}})},getScreenshot:function(e){return n.e(3).then(n.t.bind(null,240,7)).then(t=>t.default(document.querySelector(e),{scale:.2,logging:!1,ignoreElements:e=>i.IS_FIREFOX&&-1!==e.style["background-image"].indexOf("image/svg")}).then(e=>Promise.resolve(e.toDataURL())))},getEmptyImage:function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}};let rt={};rt.gridDataToOBF=function(e){},rt.gridSetToOBZ=function(e){},rt.OBFToGridData=function(e,t){let n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():C.getBrowserLang(),a=new se({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 H({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!==P.getModelName()),e.actions.push(new U({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===P.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(at.urlToBase64(i.url).then(e=>(a=e,Promise.resolve())));return Promise.all(r).then(()=>a?Promise.resolve(new M({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))},rt.OBZToGridSet=function(e){let t=[],n=[];return Object.keys(e).forEach(i=>{-1!==i.indexOf(".obf")&&t.push(rt.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 st={readZip:function(e,t){let i={};return new Promise(a=>{Promise.all([n.e(2),n.e(0)]).then(n.t.bind(null,241,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)})})})})}},ot={},lt=null,ct=null,dt=[];ot.setProgress=function(e,t){lt=Math.round(100*t),ct=e,dt.forEach(e=>{e(ct,lt)})},ot.register=function(e){dt.push(e)},ot.clearHandlers=function(){dt=[]};let ut={},ft="app/examples/default.grd.json";oe.getDefaultGridsetName()&&(ft="app/examples/"+oe.getDefaultGridsetName()),ut.getGrid=function(e,t){return e?qe.getSingleObject(se,e,t).then(e=>Promise.resolve(e?new se(e):null)):Promise.resolve(null)},ut.getGlobalGrid=function(e){return ut.getMetadata().then(t=>t.globalGridId&&(e||t.globalGridActive)?ut.getGrid(t.globalGridId).then(e=>Promise.resolve(e)):Promise.resolve(null))},ut.getGrids=function(e,t){return new Promise(n=>{qe.getObject(se,null,!e).then(e=>{if(!e)return void n([]);let i=e instanceof Array?e:[e];t?ut.getMetadata().then(e=>{n(i.filter(t=>t.id!==e.globalGridId))}):n(i)})})},ut.saveGrid=function(e){return e.gridElements=K.sortGridElements(e.gridElements),qe.saveObject(se,e)},ut.saveGrids=function(e){return e.forEach(e=>{e.gridElements=K.sortGridElements(e.gridElements)}),qe.bulkSave(e)},ut.updateGrid=function(e,t){return t.id=e,t.gridElements=K.sortGridElements(t.gridElements),qe.saveObject(se,t,!0)},ut.deleteGrid=function(e){return qe.removeObject(e)},ut.deleteAllGrids=function(){return ut.getGrids().then(e=>e&&0!==e.length?qe.bulkDelete(e):Promise.resolve()).then(()=>{return e="",ut.getMetadata().then(t=>(t.globalGridId=e,t.globalGridActive=!!e,ut.saveMetadata(t)));var e})},ut.importDefaultGridset=function(){return Promise.resolve().then(()=>b.a.get(ft)).then(e=>{if(!e)return Promise.resolve();log.info("importing default grid set "+ft);try{e=JSON.parse(e)}catch(e){}return ut.importData(e,!1,!0)})},ut.saveAdditionalGridFiles=function(e,t){return new Promise(n=>{t||n(),ut.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)}),ut.saveGrid(e).then(()=>{n()})})})},ut.getGridElement=function(e,t){return new Promise(n=>{ut.getGrid(e).then(e=>{let i=e.gridElements.filter(e=>e.id===t)[0];i?n(i):ut.getGlobalGrid().then(e=>{n(e.gridElements.filter(e=>e.id===t)[0])})})})},ut.getGridsAttribute=function(e){return new Promise(t=>{ut.getGrids().then(n=>{let i={};n.forEach(t=>{i[t.id]=t[e]}),t(i)})})},ut.addGridElements=function(e,t){return new Promise(n=>{ut.getGrid(e).then(i=>{(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),ut.updateGrid(e,i).then(()=>{n()})})})},ut.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise(n=>{ut.getMetadata().then(i=>{if(i){let n=i instanceof Array?i[0].id:i.id;e.id=n,m.saveLocalMetadata(e),m.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():qe.saveObject(f,e).then(()=>{n()})})})},ut.getMetadata=function(){return new Promise(e=>{qe.getObject(f).then(t=>{let n=null;if(n=t?t instanceof Array?t[0]:t:new f,!m.shouldSyncNavigation()){let e=m.getLocalMetadata();e&&(n.locked=e.locked,n.fullscreen=e.fullscreen,n.lastOpenedGridId=e.lastOpenedGridId)}e(new f(n))})})},ut.saveImage=function(e){return function(e,t){let n=[];return new Promise((i,r)=>{ut.getMetadata().then(s=>{if(!s||!s.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void r();let o=null;s.hashCodes[e.getModelName()]?o=s.hashCodes[e.getModelName()]:(o={},s.hashCodes[e.getModelName()]=o);let l=a.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(qe.saveObject(e,t)),n.push(qe.saveObject(f,s))),Promise.all(n).then(()=>{i(t.id)})})})}(M,e)},ut.getImage=function(e){return qe.getObject(M,e)},ut.getDictionary=function(e){return e?qe.getSingleObject(Oe,e).then(e=>Promise.resolve(new Oe(e))):Promise.resolve(null)},ut.getDictionaries=function(){return new Promise(e=>{qe.getObject(Oe).then(t=>{if(!t)return void e([]);let n=t instanceof Array?t.map(e=>new Oe(e)):[new Oe(t)];e(n)})})},ut.saveDictionary=function(e){return e.isDefault=!1,qe.saveObject(Oe,e)},ut.deleteObject=function(e){return qe.removeObject(e)},ut.downloadSingleGrid=function(e){ut.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")}})},ut.downloadBackup=function(){let e={},t=[];t.push(ut.getMetadata().then(t=>(e.metadata=t,Promise.resolve()))),t.push(ut.getDictionaries().then(t=>(t.reduce((e,t)=>e&&t.isDefault,!0)||(e.dictionaries=t),Promise.resolve()))),t.push(ut.getGrids(!0).then(t=>(e.grids=t,Promise.resolve()))),Promise.all(t).then(()=>{let t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});k.a.saveAs(t,"my-backup.grd")})},ut.downloadAllGridsSimple=function(){ut.getGrids(!0).then(e=>{e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:J.removeLongPropertyValues(e)})))})},ut.importGridsFromFile=function(e,t){let n=e.name.substring(e.name.length-4),i=!1;return new Promise((a,r)=>{let s=new FileReader;s.onload=function(r){let s=r.target.result,o=[];t&&(ot.setProgress(C.translate("Deleting grids // Grids werden gelöscht")),o.push(ut.deleteAllGrids())),Promise.all(o).then(()=>{let r=null,o=[];if(ot.setProgress(C.translate("Reading grids from file // Grids werden aus Datei gelesen")),".grd"===n)r=JSON.parse(s);else if(".obf"===n)o.push(rt.OBFToGridData(JSON.parse(s)).then(e=>(r=e,Promise.resolve())));else if(".obz"===n){let n=st.readZip(e,!0).then(e=>rt.OBZToGridSet(e)).then(e=>(r=e,t&&(i=!0),Promise.resolve()));o.push(n)}Promise.all(o).then(()=>{ot.setProgress(C.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),ut.importData(r,i,t).then(()=>{a()})})})},s.readAsText(e)})},ut.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();let i=null,r=null,s=null,o=[],l=null;return e instanceof Array?s=me.updateDataModel(e):(i=n?me.updateDataModel(e.dictionaries):null,r=n?me.updateDataModel(e.metadata):null,s=me.updateDataModel(e.grids),i||r||s||!e.id||(s=[me.updateDataModel(e)])),l=r?Promise.resolve(r):ut.getMetadata(),l.then(e=>(s&&o.push(ut.getGrids().then(n=>{let i=n.map(e=>C.getTranslation(e.label)),o=null,l=K.regenerateIDs(s);s=l.grids,r&&(e.lastOpenedGridId=l.idMapping[e.lastOpenedGridId],e.globalGridId=l.idMapping[e.globalGridId]),s.forEach(e=>{let t=C.getTranslation(e.label);e.label[C.getBrowserLang()]=a.getNewName(t,i)});let c=s[0]?s[0].locale:null;if(t){let t=s[0].id;o=K.generateGlobalGrid(t,c),s.unshift(o),e.globalGridId=o.id,e.globalGridActive=!!e.globalGridId}return ut.saveGrids(s).then(()=>ut.saveMetadata(e,!0))})),i&&o.push(ut.getDictionaries().then(e=>qe.bulkDelete(e)).then(()=>(i=i.map(e=>(delete e.id,delete e._id,delete e._rev,new Oe(e))),qe.bulkSave(i).then(()=>($e.init(),Promise.resolve()))))),Promise.all(o)))},ut.getSyncState=function(){return Ee.getSyncState()},ut.getCurrentUser=function(){return qe.getCurrentUsedDatabase()};let ht={},pt="#asterics-grid-user-documentation",mt="",vt=pt,gt=mt,_t=vt;ht.setHelpLocation=function(e,t){gt=mt,_t=vt,mt=e,vt=t||""},ht.setHelpLocationIndex=function(){ht.setHelpLocation("",pt)},ht.revertToLastLocation=function(){ht.setHelpLocation(gt,_t)},ht.openHelp=function(){let e="https://www.asterics.eu/manuals/asterics-grid/"+(mt?mt+".html"+vt:vt);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(),ht.openHelp())}));var bt=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(" "),n("div",{staticStyle:{width:"100%","text-align":"center","font-size":"2em","margin-top":"1em"}},[e.progressText?n("span",[e._v(e._s(e.progressText)+" ...")]):e._e()])]),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._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()],1)])};bt._withStripped=!0;var yt=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.png",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()};yt._withStripped=!0;var Et=n(3),Ct={},wt={},Tt=null,St=!1;function Nt(e){null!==wt[e]&&(wt[e].close(),wt[e]=null,log.debug("SSE closed."))}function At(e){for(var t="",n=0;n{b.a.ajax({type:"PUT",beforeSend:function(e){e.setRequestHeader("Content-Type","text/plain")},url:Ct.getRestURL(i)+"runtime/model/components/"+At(e)+"/ports/"+At(t)+"/data",datatype:"text",crossDomain:!0,data:n,success:function(e,t,n){a(n.responseText,t)},error:function(e,t,n){r(n,e.responseText)}})})},Ct.triggerEvent=function(e,t,n){if(e&&t)return new Promise((i,a)=>{b.a.ajax({type:"PUT",url:Ct.getRestURL(n)+"runtime/model/components/"+At(e)+"/events/"+At(t),datatype:"text",crossDomain:!0,success:function(e,t,n){i(n.responseText,t)},error:function(e,t,n){a(n,e.responseText)}})})},Ct.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.uploadModelBase64=function(e,t){return new Promise((n,i)=>{e?b.a.ajax({type:"PUT",url:Ct.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()})},Ct.uploadAndStartModel=function(e,t,n){return new Promise((i,a)=>{Ct.getModelName(t).then(a=>{a!==n?Ct.uploadModelBase64(e,t).then(()=>{Ct.startModel(t).then(()=>{i()})}):Ct.startModel(t).then(()=>{i()})})})},Ct.downloadDeployedModelBase64=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.startModel=function(e){return new Promise((t,n)=>{b.a.ajax({type:"PUT",url:Ct.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)}})})},Ct.getModelName=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.getRuntimeComponentIds=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.getComponentInputPortIds=function(e,t){return new Promise((n,i)=>{e?b.a.ajax({type:"GET",url:Ct.getRestURL(t)+"runtime/model/components/"+At(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([])})},Ct.getComponentEventPortIds=function(e,t){return new Promise((n,i)=>{e?b.a.ajax({type:"GET",url:Ct.getRestURL(t)+"runtime/model/components/"+At(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([])})},Ct.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},Ct.getTypeId=function(e,t){let n=window.atob(t);return b()(n).find('components component[id="'+e+'"]').attr("type_id")},Ct.getComponentDescriptorsAsXml=function(e){return new Promise((t,n)=>{b.a.ajax({type:"GET",url:Ct.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)}})})},Ct.getPossibleEvents=function(e,t,n){return new Promise(i=>{Ct.getComponentDescriptorsAsXml(n).then(n=>{let a=Ct.getTypeId(e,t),r=b()(n).find('componentType[id="'+a+'"] eventListenerPort').map((function(){return this.id})).get();i(r)})})},Ct.subscribeEvents=function(e,t,n){if("undefined"==typeof EventSource)return void log.warn("SSE not supported by browser");let i=Ct.getRestURL(e);wt[i]||(wt[i]=new EventSource(i+"runtime/model/channels/event/listener"),wt[i].onopen=function(e){log.debug("SSE opened."),St=!0},wt[i].onerror=function(a){Nt(i),n&&n(a),St&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),Tt=setTimeout((function(){Tt=null,Ct.subscribeEvents(e,t,n)}),3e3))}),wt[i].addEventListener("event",(function(e){t(e.data,200)}),!1)},Ct.unsubscribeEvents=function(e){Tt&&clearTimeout(Tt),St=!1,e?Nt(e):Object.keys(wt).forEach(e=>{Nt(e)})};let It={},kt=[],Ot={},Lt=0;function xt(){let e={},t=null,n=null,i=[],a=[],r=[],s=[],o=[],l=[],u=[],f=[],h=[],p=[],m={},v=document.body,g=!1,_={},b=Lt++;function y(e,t){Ct.subscribeEvents(e.areURL,n=>{e.eventNames.indexOf(n)>-1&&t()})}function E(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&&h.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 A(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(p)}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):Ke.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];y(t.inputEvent,t.fn)}),document.addEventListener("mousemove",C),document.addEventListener("keydown",N),document.addEventListener("keyup",A),document.addEventListener("fullscreenchange",I),v.addEventListener("touchmove",w,{passive:!1}),v.addEventListener("touchstart",S),v.addEventListener("touchend",T))},e.stopListening=function(){g=!1,Object.keys(_).forEach(e=>{let t=_[e];Ct.unsubscribeEvents(t.areURL)}),document.removeEventListener("mousemove",C),document.removeEventListener("keydown",N),document.removeEventListener("keyup",A),document.removeEventListener("fullscreenchange",I),v.removeEventListener("touchmove",w),v.removeEventListener("touchstart",S),v.removeEventListener("touchend",T)},e.destroy=function(){e.stopListening(),kt=kt.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 E(new c({keyCode:27}),e)},e.onAnyKey=function(e){return x(e,h)},e.onTouchMove=function(e){return x(e,l)},e.onTouchStart=function(e){return x(e,u)},e.onTouchEnd=function(e){return x(e,f)},e.onExitFullscreen=function(e){return x(e,p)},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),u=u.filter(t),f=f.filter(t),h=h.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case c.getModelName():return E(e,t);case d.getModelName():_[e.id]={inputEvent:e,fn:t},g&&y(e,t)}},e}It.instance=function(){let e=new xt;return kt.push(e),e},It.pauseAll=function(){kt.forEach(e=>{Ot[e.getID()]=e.isListening(),e.stopListening()})},It.resumeAll=function(){kt.forEach(e=>{Ot[e.getID()]&&e.startListening()})},It.global=It.instance();var Dt=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"}],attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],staticClass:"inline",attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),n("div",{staticClass:"inline",domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.actionLink?n("div",{staticClass:"inline"},[n("a",{staticStyle:{color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[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")])])};Dt._withStripped=!0;let Rt=null,Mt={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null};var Pt={props:["fullHeader"],data:()=>({tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:Mt}),methods:{setTooltip:function(e,t){let n=this;n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(Mt)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout(()=>{n.clearTooltip()},n.tooltipOptions.timeout)),this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink},clearTooltip:function(){let e=this;e.tooltipOptions.revertOnClose&&this.tooltipHTML?e.setTooltip(e.lastTooltipHTML,e.lastTooltipOptions):(this.tooltipHTML=null,this.actionLink=null,this.tooltipImageUrl=null),e.lastTooltipOptions={},e.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=m.get(m.get("WINDOW_SIZE_KEY"));m.save("WINDOW_SIZE_KEY",n),i&&n!==i&&s();let a=m.get("NOTIFICATION_BAR_STYLE_KEY"),r=m.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");a&&(e.setAttribute("style",a),e.style.display="none");r&&t.setAttribute("style",r);function s(){let n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),m.save("NOTIFICATION_BAR_STYLE_KEY",""),m.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}b()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){Ke.debounce(()=>{m.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),b()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",m.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){Ke.debounce(()=>{m.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))},300)}}),window.addEventListener("resize",()=>{Ke.debounce((function(){s()}),300,"RESIZE_RESET_NOTIFICATIONBAR")})}(),Rt=this},beforeDestroy(){}};n(49);function Ut(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=Ut(Pt,Dt,[],!1,null,"7bec61b8",null);Gt.options.__file="src/vue-components/components/notificationBar.vue";var $t=Gt.exports;let Ft={},jt=null;Ft.setViewComponent=function(e,t){jt&&jt.$refs.notificationBar.tooltipOptions.closeOnNavigate&&Ft.clearTooltip(),jt.setComponent(e,t)},Ft.isSidebarOpen=function(){return jt.showSidebar},Ft.setTooltip=function(e,t){jt&&jt.$refs.notificationBar.setTooltip(e,t)},Ft.setTooltipI18n=function(e,t){let n=C.translate(e);Ft.setTooltip(n,t)},Ft.clearTooltip=function(){jt&&jt.$refs.notificationBar.clearTooltip()},Ft.init=function(){jt=new Et.a({el:"#app",components:{NotificationBar:$t},data:()=>({component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:qe.getCurrentUsedDatabase(),isLocalUser:m.isSavedLocalUser(qe.getCurrentUsedDatabase()),syncState:ut.getSyncState(),constants:i,tooltipHTML:null,actionLink:null}),methods:{setComponent(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar(){b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)},openSidebar(){b()(document).trigger(i.EVENT_SIDEBAR_OPEN)},openHelp(){ht.openHelp()},moreNavigation(){b.a.contextMenu("destroy"),b.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":Er.toRegister();break;case"CONTEXT_ADD_OFFLINE":Er.toAddOffline();break;case"CONTEXT_ABOUT":Er.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(),b()("#moreNavigation").contextMenu()}},mounted(){let e=this;function t(){!e.showSidebar&&qe.getCurrentUsedDatabase()&&(Ke.closeFullscreen(),ut.getMetadata().then(t=>{t.fullscreen&&(t.fullscreen=!1,ut.saveMetadata(t).then(()=>{e.openSidebar()}))}))}C.initDomI18n(),b()(document).on(i.EVENT_SIDEBAR_OPEN,()=>{if(!e.showSidebar)return qe.getCurrentUsedDatabase()?void ut.getMetadata().then(t=>{t.locked||t.fullscreen||(e.showSidebar=!0,this.$nextTick(()=>{b()(document).trigger(i.EVENT_SIDEBAR_OPENED),b()(document).trigger(i.EVENT_GRID_RESIZE)}))}):(e.showSidebar=!0,void this.$nextTick(()=>{b()(document).trigger(i.EVENT_SIDEBAR_OPENED),b()(document).trigger(i.EVENT_GRID_RESIZE)}))}),b()(document).on(i.EVENT_SIDEBAR_CLOSE,()=>{e.showSidebar=!1,this.$nextTick(()=>{b()(document).trigger(i.EVENT_GRID_RESIZE)})}),b()(document).on(i.EVENT_DB_INITIALIZED,()=>{e.currentUser=qe.getCurrentUsedDatabase(),e.isLocalUser=m.isSavedLocalUser(e.currentUser)}),b()(document).on(i.EVENT_DB_CLOSED,()=>{e.currentUser=qe.getCurrentUsedDatabase(),e.isLocalUser=m.isSavedLocalUser(e.currentUser)}),b()(document).on(i.EVENT_DB_SYNC_STATE_CHANGE,(t,n)=>{e.syncState=n}),e.syncState=ut.getSyncState(),window.addEventListener("resize",()=>{Ke.debounce((function(){b()(document).trigger(i.EVENT_GRID_RESIZE)}),300,i.EVENT_GRID_RESIZE)}),It.global.onSwipedDown(t).onEscape(t).onExitFullscreen(t),It.global.startListening(),e.openSidebar()},updated(){C.initDomI18n()}})};var Bt=Ut({props:["fullHeader"],data:()=>({show:!Ft.isSidebarOpen(),tag:"div"}),methods:{openSidebar(){b()(document).trigger(i.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn(){this.show=!1},onCloseFn(){this.show=!0}},mounted(){b()(document).on(i.EVENT_SIDEBAR_CLOSE,this.onCloseFn),b()(document).on(i.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy(){b()(document).off(i.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},yt,[],!1,null,"4ff1a546",null);Bt.options.__file="src/vue-components/components/headerIcon.vue";var Vt=Bt.exports,Ht=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)])};Ht._withStripped=!0;var zt={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()}},Wt=(n(53),Ut(zt,Ht,[],!1,null,"66ff21d8",null));Wt.options.__file="src/vue-components/components/accordion.vue";var Kt=Wt.exports,Yt=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")])])])])])])])])};Yt._withStripped=!0;n(4);var Jt={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:x,imageUtil:at,i18nService:C}},methods:{save(){this.saveInternal().then(()=>{this.$emit("reload"),this.$emit("close")})},saveInternal(){let e=this.selectedElement;if(!e){let t=new se(this.gridFrom).getNewXYPos();e=new H({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})),ut.saveGrid(this.gridFrom)}},mounted(){this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),ut.getGrid(this.gridFromProp.id).then(e=>{this.gridFrom=JSON.parse(JSON.stringify(e)),C.initDomI18n()})},updated(){C.initDomI18n()}},Xt=(n(56),Ut(Jt,Yt,[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));Xt.options.__file="src/vue-components/modals/gridLinkModal.vue";var qt=Xt.exports;let Zt=null;var Qt={components:{GridLinkModal:qt,Accordion:Kt,HeaderIcon:Vt},data:()=>({metadata:null,grids:null,graphList:[],selectedGraphElement:null,newLabel:{},showLoading:!0,progressText:"",selectValues:{CONNECTED_GRIDS:"CONNECTED_GRIDS",NOT_REACHABLE_GRIDS:"NOT_REACHABLE_GRIDS",ALL_GRIDS:"ALL_GRIDS"},selectValue:null,linkModal:{show:!1,gridFrom:null,gridTo:null},i18nService:C,currentLanguage:C.getBrowserLang(),imageUtil:at}),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,ut.saveMetadata(this.metadata),t||b()(".all-grids-view").animate({scrollTop:0},200))},reinitContextMenu(){var e;!function(){b.a.contextMenu("destroy");let e=Zt.selectedGraphElement?C.getTranslation(Zt.selectedGraphElement.grid.label):"",t={CONTEXT_CONNECT:{name:C.translate('Connect to grid "{?}" // Verknüpfen mit Grid "{?}"',e),icon:"fas fa-external-link-alt",visible:()=>Zt.selectValue!==Zt.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"}};b.a.contextMenu({selector:".gridOptions",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_CONNECT":Zt.linkModal.gridFrom=Zt.selectedGraphElement.grid,Zt.linkModal.gridTo=Zt.grids.filter(e=>e.id===t)[0],Zt.linkModal.show=!0;break;case"CONTEXT_SHOW":Zt.show(t);break;case"CONTEXT_EDIT":Zt.edit(t);break;case"CONTEXT_DUPLICATE":Zt.clone(t);break;case"CONTEXT_DELETE":Zt.deleteGrid(t);break;case"CONTEXT_EXPORT":Zt.exportToFile(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_DELETE_ALL:{name:"Delete all grids // Alle Grids löschen",icon:"fas fa-trash-alt",disabled:()=>0===Zt.grids.length},CONTEXT_RESET:{name:"Reset to default configuration // Auf Standardkonfiguration zurücksetzen",icon:"fas fa-minus-circle"}},b.a.contextMenu({selector:"#moreButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_NEW":Zt.addGrid();break;case"CONTEXT_IMPORT":document.getElementById("inputFile").click();break;case"CONTEXT_IMPORT_BACKUP":document.getElementById("inputFileBackup").click();break;case"CONTEXT_EXPORT":Zt.exportToFile();break;case"CONTEXT_DELETE_ALL":Zt.deleteAll();break;case"CONTEXT_RESET":Zt.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))&&ut.deleteGrid(e).then(()=>{this.reload()})},addGrid:function(){var e=this.grids.map(e=>C.getTranslation(e.label)),t=new se({label:C.getTranslationObject(a.getNewName("newGrid",e)),gridElements:[]});ut.saveGrid(t).then(()=>this.reload(t.id)).then(()=>{b()("#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)),ut.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show(e){Er.toGrid(e)},edit(e){Er.toEditGrid(e)},clone(e){var t=this;ut.getGrid(e).then(e=>{let n=e.clone();ut.saveGrid(n).then(()=>{t.reload(n.id)})})},exportToFile(e){e?ut.downloadSingleGrid(e):ut.downloadBackup()},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 ut.getMetadata().then(e=>(t.metadata=JSON.parse(JSON.stringify(e)),ut.getGrids())).then(n=>{t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=K.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,ut.deleteAllGrids().then(()=>ut.importDefaultGridset()).then(()=>{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,ut.deleteAllGrids().then(()=>{this.reload()}))},setGlobalGridActive(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,ut.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?")))&&ut.getGlobalGrid(!0).then(e=>e?ut.deleteGrid(e.id):Promise.resolve()).then(()=>{let e=K.generateGlobalGrid(this.grids[0].id);return this.metadata.globalGridId=e.id,this.metadata.globalGridActive=!0,ut.saveGrid(e)}).then(()=>ut.saveMetadata(this.metadata)).then(()=>{this.reload()})},importFromFileInternal(e,t){let n=e.target.files[0];n&&n.name&&(this.showLoading=!0,ut.importGridsFromFile(n,t).then(()=>{this.resetFileInput(e),this.reload()}))},resetFileInput(e){var t=b()(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(){let e=this;b()(document).on(i.EVENT_DB_PULL_UPDATED,e.onPullUpdate),ot.register(t=>{e.progressText=t})},mounted:function(){Zt=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then(()=>{this.reinitContextMenu(),C.initDomI18n()})},updated(){C.initDomI18n()},beforeDestroy(){b()(document).off(i.EVENT_DB_PULL_UPDATED,this.onPullUpdate),b.a.contextMenu("destroy"),ot.clearHandlers()}},en=(n(58),Ut(Qt,bt,[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));en.options.__file="src/vue-components/views/allGridsView.vue";var tn=en.exports,nn=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()};nn._withStripped=!0;let an={},rn={},sn={};an.setState=function(e,t){rn[e]!==t&&(rn[e]=t,sn[e]=sn[e]||[],sn[e].forEach(e=>{e(t)}))},an.getState=function(e){return rn[e]},an.onStateChanged=function(e,t){sn[e]=sn[e]||[],sn[e].push(t)},an.clearListeners=function(e){e?sn[e]=[]:sn={}};let on={};on.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",on.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";var ln=[];let cn=m.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",dn=[],un=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 fn(e){let t=dn.filter(t=>t.name===e);return t.length>0?t:null}function hn(e,t,n,i){-1===dn.map(e=>e.name).indexOf(e)&&dn.push({name:e,lang:t,type:n,ref:i})}function pn(){dn.sort((e,t)=>e.type===on.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===on.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name))}on.speak=function(e,t,n){if(!e)return;on.stopSpeaking(),t=t||C.getBrowserLang();let a=fn(n)||fn(cn)||function(e){return dn.filter(t=>t.lang.substring(0,2)===e)}(t),r=a.filter(e=>e.type===on.VOICE_TYPE_NATIVE),s=a.filter(e=>e.type===on.VOICE_TYPE_RESPONSIVEVOICE);if(on.nativeSpeechSupported()&&r.length>0){var o=new SpeechSynthesisUtterance(e);o.voice=r[0].ref,log.debug("used voice: "+o.voice.name),window.speechSynthesis.speak(o)}else s.length>0&&responsiveVoice.speak(e,s[0].name);function l(){on.isSpeaking()&&an.setState(i.STATE_ACTIVATED_TTS,!0)}l(),setTimeout(()=>{l()},700)},on.speakLabel=function(e,t){e&&t&&ut.getGridElement(e,t).then(e=>{on.speak(C.getTranslation(e.label))})},on.stopSpeaking=function(){on.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},on.isSpeaking=function(){return window.speechSynthesis.speaking||responsiveVoice.isPlaying()},on.getVoicesLangs=function(){let e=dn.map(e=>e.lang.substring(0,2));return C.getAllLanguages().filter(t=>-1!==e.indexOf(t.code))},on.getVoices=function(){return dn},on.setPreferredVoiceName=function(e){cn=e,m.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},on.getPreferredVoiceName=function(){return cn},on.nativeSpeechSupported=function(){if("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis)return!1;let e=ln.length>0?ln:window.speechSynthesis.getVoices();return e=e.length>0?e:window.speechSynthesis.getVoices(),e.length>0},window.speechSynthesis&&window.speechSynthesis.getVoices&&(ln=window.speechSynthesis.getVoices(),setTimeout((function(){(ln=window.speechSynthesis.getVoices()).forEach(e=>{hn(e.name,e.lang,on.VOICE_TYPE_NATIVE,e)}),pn()}),100)),un.forEach(e=>{hn(e.name,e.lang,on.VOICE_TYPE_RESPONSIVEVOICE)}),pn();var mn={},vn=[],gn="";let _n=0,bn=null;function yn(e){gn=e=void 0===e?gn:e,$e.learnFromInput(gn,bn),$('.item[data-type="ELEMENT_TYPE_COLLECT"] .collect-text').text(gn),O.adaptFontSize($('.item[data-type="ELEMENT_TYPE_COLLECT"]'))}function En(e,t){if(!e)return null;let n=e.actions.map(e=>e.modelName).indexOf(t);return-1===n?null:e.actions[n]}function Cn(){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=>{ut.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=[],ut.saveGrid(n).then(()=>{i(!0)}))})})},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return ut.getGrid(n.id).then(e=>{t.push(JSON.parse(JSON.stringify(e))),ut.saveGrid(n)}),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return ut.getGrid(n.id).then(t=>{e.push(JSON.parse(JSON.stringify(t))),ut.saveGrid(n)}),n}}}function wn(e,t,n){var a=this,r=(e=e,t=t,!1),s=!1,o=null,l=null,c=null,d=null,u=null,f=null,h=null,p=null,m=null,v=new Cn;let g=!1;function _(e){return g=!1,(m=new Promise(t=>{e?(y(n,e),E(f).then(()=>{t()})):ut.getGrid(n.gridId).then(e=>{y(n,e),E(f).then(()=>{t()})})})).then(()=>{g=!0}),m}function y(e,t){e&&(o=e.gridId||o,r=null!=e.enableResizing?e.enableResizing:r,s=e.dragAndDrop),h=(f=t).rowCount,p=f.minColumnCount}function E(o){let d=[];return n.dragAndDrop||(o.gridElements=o.gridElements.filter(e=>!e.hidden),d.push(ut.getGlobalGrid().then(e=>{if(e){let t=!0,i=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,a=1,r=1;1===e.getHeight()&&(r=i*f.rowCount/(1-i),a=1/(f.rowCount*i)-1/f.rowCount,r>=1?(a=1,r=Math.round(r)):(r=1,a=Math.round(a)));let s=K.getOffset(e),o=t?e.getWidth()-s.x:1,l=t?f.getWidthWithBounds():1;e.gridElements.forEach(e=>{e.width*=l,e.x*=l,0===e.y&&(e.height*=r)}),f.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}),f.rowCount*=a,f.rowCount+=s.y*r,h=f.rowCount,f.gridElements=e.gridElements.concat(f.gridElements)}return Promise.resolve()}))),Promise.all(d).then(()=>(mn.initWithElements(f.gridElements,s),$e.initWithElements(f.gridElements),b()(e).empty(),b()(e).append(D.getGridBase(o.id)),c=b()("#"+o.id),o.gridElements.forEach((function(e){c.append(e.toHTML(f.locale))})),c.gridList({lanes:h,minColumns:p,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:s},{start:w,stop:S}),l=c.data("_gridList"),o.hasSetPositions()||(c.gridList("resize",h),a.toGridData().then(e=>{f=e,ut.updateGrid(f.id,f)})),function(){let e=[];r&&e.push(b()(t).resizable(C()));return b()(document).on(i.EVENT_GRID_RESIZE,()=>{a.autosize()}),Promise.all(e)}().then(()=>{a.autosize(200)}),Promise.resolve()))}function C(){var e=l._cellHeight,t=l._cellWidth;return{autoHide:!1,handles:"se",disabled:!r,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?ut.getImage(t).then(t=>{if(t){var a=b()("#"+i)[0].getBoundingClientRect().width;at.convertBase64(t.data,a).then(t=>{n.attr("data-img",t),n.children().children()[0].style.backgroundImage='url("'+t+'")',e()})}else e()}):e()}).then(()=>{S()})},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),c.gridList("resizeItem",i.element.parent(),{w:r,h:s}),i.element.css("height",""),i.element.css("width","")}}}function w(){b.a.isFunction(d)&&d(f)}function T(){b.a.isFunction(u)&&setTimeout((function(){u(f)}),200)}function S(){return new Promise(e=>{a.toGridData().then(t=>{v.updateGrid(t).then(n=>{n&&(f=t,a.autosize(),T()),e()})})})}a.autosize=function(e){e=e||0,O.adaptFontSizeForGridElements(),setTimeout((function(){c.gridList("autosize"),setTimeout((function(){if(b()("#grid-layout-background-vertical")[0]){var e=l._cellWidth,t=l._cellHeight;b()("#grid-layout-background-vertical").css("margin-left",e-5+"px"),b()("#grid-layout-background-vertical").css("background-size",`${e}px ${e}px`),b()("#grid-layout-background-horizontal").css("margin-top",t-5+"px"),b()("#grid-layout-background-horizontal").css("background-size",`${t}px ${t}px`),b()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){O.adaptFontSizeForGridElements()}),200),r&&b()(t).resizable(C())}),e)},a.enableElementResizing=function(){b()(t).resizable("enable")},a.disableElementResizing=function(){b()(t).resizable("disable")},a.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(h=e,p=t,c.gridList("resize",h,t)),S()},a.removeElement=function(e){return w(),f.gridElements=f.gridElements.filter(t=>t.id!==e),_(f).then(()=>S()).then(()=>Promise.resolve(f))},a.duplicateElement=function(e){w();let t=f.gridElements.filter(t=>t.id===e)[0].duplicate();f.gridElements.push(t),_(f).then(()=>{l.resolveCollisions(t.id),S()})},a.reinit=function(e){return w(),_(e).then(()=>{T()}),m},a.fillGaps=function(){w(),c.gridList("fillGaps"),S()},a.undo=function(){if(v.canUndo()){var e=v.doUndo();_(f=new se(e)).then(()=>{T()})}},a.redo=function(){if(v.canRedo()){var e=v.doRedo();_(f=new se(e)).then(()=>{T()})}},a.updateGridWithUndo=function(e){return new Promise(t=>{v.updateGrid(e).then(e=>{e?(w(),_().then(()=>{t(!0),T()})):t(!1)})})},a.canUndo=()=>v.canUndo(),a.canRedo=()=>v.canRedo(),a.setLayoutChangedStartListener=function(e){d=e},a.setLayoutChangedEndListener=function(e){u=e},a.getCurrentGridId=function(){return f.id},a.toGridData=function(){return new Promise(e=>{var t=[];f.rowCount=h,f.minColumnCount=p,l.items.forEach((function(e){var n=e.$element.attr("data-id"),i=f.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)})),f.gridElements=t,e(f)})},a.getInitPromise=function(){return m},a.isInitialized=function(){return g},a.destroy=function(){b()(document).off(i.EVENT_GRID_RESIZE),a.setLayoutChangedEndListener(null),a.setLayoutChangedStartListener(null)},_()}mn.initWithElements=function(e,t){vn=[];let n=0,i=0;if(bn=null,e.forEach(e=>{if(e&&e.type===H.ELEMENT_TYPE_NORMAL){i++;let t=C.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===H.ELEMENT_TYPE_COLLECT){let t=JSON.parse(JSON.stringify(e));bn=bn||t.actions.reduce((e,t)=>{let n=F.getModelName()?t.dictionaryKey:null;return e||n},null),vn.push(t)}}),_n=n/i,vn.length>0){let e=setInterval(()=>{$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(e),yn(),t||$e.predict(gn,bn))},100)}},mn.doAction=function(e){En(e,"GridActionPredict")&&$e.predict(gn,bn);let t=e.actions.filter(e=>e.modelName===P.getModelName())[0],n=t&&t.speakLanguage?t.speakLanguage:C.getBrowserLang();on.speak(gn,n)},mn.doCollectElementActions=function(e){if(e){switch(e){case j.COLLECT_ACTION_CLEAR:yn("");break;case j.COLLECT_ACTION_REMOVE_WORD:let e=gn.trim().split(" ");e.pop();let t=e.join(" ");yn(""===t?"":t+" ");break;case j.COLLECT_ACTION_REMOVE_CHAR:yn(gn.substring(0,gn.length-1));break;case j.COLLECT_ACTION_COPY_CLIPBOARD:Ke.copyToClipboard(gn);break;case j.COLLECT_ACTION_APPEND_CLIPBOARD:Ke.appendToClipboard(gn);break;case j.COLLECT_ACTION_CLEAR_CLIPBOARD:Ke.copyToClipboard("")}$e.predict(gn,bn)}},$(window).on(i.ELEMENT_EVENT_ID,(function(e,t){if(0!==vn.length&&!En(t,j.getModelName())&&!En(t,x.getModelName())){if(!t.type||t.type===H.ELEMENT_TYPE_NORMAL){if(!C.getTranslation(t.label))return;let e=C.getTranslation(t.label),n=1===e.length&&_n>.5?e.toLowerCase():e+" ";yn(gn+n),vn.forEach(e=>{let t=En(e,"GridActionPredict");t&&t.suggestOnChange&&$e.predict(gn,bn)})}if(t.type&&t.type===H.ELEMENT_TYPE_PREDICTION){let e=$(`#${t.id} .text-container span`).text();if(e){yn($e.applyPrediction(gn||"",e,bn)),vn.forEach(e=>{let t=En(e,"GridActionPredict");t&&t.suggestOnChange&&$e.predict(gn,bn)})}}}}));var Tn=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()])])])])])};Tn._withStripped=!0;let Sn={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},Nn=10,An=1,In=null,kn=null,On=!1;function Ln(e,t,n){n=n||Nn,t=t||1;let i=[];return new Promise(a=>{if(!e)return a([]);function r(r){r&&r.length&&0!==r.length||(r=[]);let s=t*n-n,o=s+n-1;On=r.length>o+1;for(let e=s;e<=o;e++)if(r[e]){let t=JSON.parse(JSON.stringify(r[e])),n=at.urlToBase64(t[Sn.PROP_IMAGE_URL]);t.promise=n,n.then(e=>{e?t.base64=e:t.failed=!0}),i.push(t)}In=e,a(i)}In!==e?b.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){kn=e,r(e)})):r(kn)})}Sn.query=function(e,t,n){return An=t=t||1,Nn=n||Nn,Ln(e,t,n)},Sn.nextChunk=function(){return An++,Ln(In,An,Nn)},Sn.hasNextChunk=function(){return On};var xn={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(),at.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");at.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 se(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=K.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then(e=>{t(e)})}else t(!1)}e.gridElement.image||(e.gridElement.image=new M),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,at.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then(e=>{let t=new M({data:e});return ut.saveImage(t)}).then(t=>(e.gridElement.image.id=t,at.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 M)),ut.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 M(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 H({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)}}),ut.getMetadata().then(t=>{e.metadata=t})},resetInternal(){this.gridElement=this.metadata=this.originalGridElementJSON=this.elementW=null},preventDefault(e){e.preventDefault()},openHelp(){ht.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,Ke.debounce((function(){Sn.query(n.searchText).then(e=>{n.processSearchResults(e)})}),e)},searchMore(){let e=this;Sn.nextChunk().then(t=>{e.processSearchResults(t)})},clearSearch(){this.searchLoading=!1,this.searchResults=null,this.searchText=""},processSearchResults(e){let t=this;t.hasNextChunk=Sn.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(),ht.setHelpLocation("03_appearance_layout","#edit-modal")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation()}},Dn=(n(60),Ut(xn,Tn,[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));Dn.options.__file="src/vue-components/modals/editGridModal.vue";var Rn=Dn.exports,Mn=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")])])])])])])])])};Mn._withStripped=!0;var Pn={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 se(this.gridData);this.parsedElems.forEach(t=>{var n=new H({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(),ht.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy(){ht.revertToLastLocation()}},Un=(n(62),Ut(Pn,Mn,[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));Un.options.__file="src/vue-components/modals/addMultipleModal.vue";var Gn=Un.exports,$n=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",[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),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 elements // Aktion für Sammelelemente 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.webRadios,callback:function(t){e.$set(e.gridData,"webRadios",t)},expression:"gridData.webRadios"}})],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(" "),"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()])])])};$n._withStripped=!0;let Fn="https://de1.api.radio-browser.info/json/",jn=["name","country","state","language","tag","tagList","order"],Bn={},Vn=document.getElementById("audioPlayer"),Hn=m.get("WEBRADIO_LAST_PLAYED_ID_KEY"),zn=parseFloat(m.get("WEBRADIO_LAST_VOLUME_KEY")||1),Wn=!1;function Kn(){Ft.setTooltip(C.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*zn)),{revertOnClose:!0,timeout:5e3})}function Yn(e,t){return new Promise((n,i)=>{if(e.radioUrl)return n(e);function a(e,i){i.radioUrl=e.url,i.radioUrl.lastIndexOf("/")===i.radioUrl.length-1&&(i.radioUrl=i.radioUrl+";");let a=i.radioUrl.lastIndexOf(":");if(a>-1){let e=i.radioUrl.substring(a+1);parseInt(e)+""===e&&(i.radioUrl=i.radioUrl+"/;")}t&&ut.getGrid(t).then(e=>{let t=(e.webRadios||[]).filter(e=>i.radioId===e.radioId)[0];t&&(t.radioUrl=i.radioUrl,ut.saveGrid(e))}),n(i)}b.a.ajax({type:"GET",url:Fn+"url/"+e.radioId,dataType:"json"}).then(t=>{a(t,e)},(t,n)=>{if("parsererror"===n){let n=t.responseText.substring(t.responseText.indexOf('"name":')+8,t.responseText.indexOf('"url":')-2),i=n.replace(new RegExp('"',"g"),"'"),r=t.responseText.replace(n,i);a(JSON.parse(r),e)}else Ft.setTooltip(C.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName)),i(t)})})}Bn.doAction=function(e,t){ut.getGrid(e).then(n=>{let i=n.webRadios||[],a=t.radioId||Hn,r=i.filter(e=>a===e.radioId)[0]||i[0];if(r)switch(t.action){case B.WEBRADIO_ACTION_START:Yn(r,e).then(e=>{Bn.play(e)});break;case B.WEBRADIO_ACTION_TOGGLE:Yn(r,e).then(e=>{Bn.toggle(e)});break;case B.WEBRADIO_ACTION_STOP:Bn.stop();break;case B.WEBRADIO_ACTION_NEXT:let t=i.map(e=>e.radioId).indexOf(r.radioId);if(t<0||i.length<2)return;t=t+1{Bn.play(e)});break;case B.WEBRADIO_ACTION_PREV:if(t=i.map(e=>e.radioId).indexOf(r.radioId),t<0||i.length<2)return;t=t-1>=0?t-1:i.length-1,Yn(i[t],e).then(e=>{Bn.play(e)});break;case B.WEBRADIO_ACTION_VOLUP:Bn.volumeUp();break;case B.WEBRADIO_ACTION_VOLDOWN:Bn.volumeDown()}else log.info("no radio station to play found.")})},Bn.play=function(e){e&&(Vn.paused||Hn!==e.radioId)&&(Vn.paused||Bn.stop(),Hn=e.radioId||Hn,m.save("WEBRADIO_LAST_PLAYED_ID_KEY",Hn),Yn(e).then(t=>{log.debug("playing: "+t.radioUrl),Vn.src=t.radioUrl,Vn.volume=zn;let n=Vn.play(),i=C.translate("playing: {?} // Wiedergabe: {?}",t.radioName);Ft.setTooltip(i,{closeOnNavigate:!1,actionLink:C.translate("Stop // Stopp"),actionLinkFn:Bn.stop,imageUrl:t.faviconUrl}),n&&n.then&&n.catch(()=>{Hn===e.radioId&&Ft.setTooltip(C.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName))})}))},Bn.stop=function(e){e&&e!==Hn||(Vn.pause(),Ft.clearTooltip())},Bn.toggle=function(e){Vn.paused?Bn.play(e):Bn.stop()},Bn.volumeUp=function(){zn=zn+.15<=1?zn+.15:1,zn=Math.round(100*zn)/100,m.save("WEBRADIO_LAST_VOLUME_KEY",zn),Kn(),Vn.volume=zn},Bn.volumeDown=function(){zn=zn-.15>=0?zn-.15:0,zn=Math.round(100*zn)/100,m.save("WEBRADIO_LAST_VOLUME_KEY",zn),Kn(),Vn.volume=zn},Bn.search=function(e,t,n){if(!e)return Promise.resolve([]);let i={},a=[];jn.forEach(t=>{let n=e.indexOf(t+":");n>-1&&a.push({param:t,position:n})}),a.sort((e,t)=>e.position-t.position),a.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 r=t||20;return r++,i.limit=r,n&&(i.offset=n),new Promise((e,t)=>{b.a.ajax({type:"POST",url:Fn+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then(t=>{Wn=t.length===r;let n=t.filter(e=>"0"!==e.lastcheckok);n=n.slice(0,r-1),e(n.map(e=>({radioId:e.stationuuid,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon})))},e=>{t(e)})})},Bn.hasMoreSearchResults=function(){return Wn};let Jn={};function Xn(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak");let a=C.getTranslation(e.label,null,!0);on.speak(a.text,t.speakLanguage||a.lang);break;case"GridActionSpeakCustom":if(log.debug("action speak custom"),t.speakText){let e=C.getTranslation(t.speakText,null,!0);on.speak(e.text,t.speakLanguage||e.lang)}break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?Er.toLastGrid():Er.isOnEditPage()?Er.toEditGrid(t.toGridId):Er.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?qn(t,i):ut.getGrid(n).then(e=>{qn(t,e)});break;case"GridActionPredict":log.debug("action predict"),$e.predict(C.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),mn.doCollectElementActions(t.action);break;case"GridActionWebradio":Bn.doAction(n,t);break;case"GridActionChangeLang":C.setLanguage(t.language),C.initDomI18n()}}function qn(e,t){if(!e.componentId)return;let n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;Ct.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then(()=>{e.dataPortId&&e.dataPortSendData&&Ct.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&Ct.triggerEvent(e.componentId,e.eventPortId,e.areURL)})}Jn.doAction=function(e,t){e&&t&&ut.getGridElement(e,t).then(n=>{switch(log.debug("do actions for: "+C.getTranslation(n.label)+", "+t),n.type){case H.ELEMENT_TYPE_COLLECT:mn.doAction(n);break;case H.ELEMENT_TYPE_PREDICTION:$e.doAction(n.id)}!function(e,t){e.actions.forEach(n=>{Xn(e,n,t)})}(n,e),$(window).trigger(i.ELEMENT_EVENT_ID,[n])})},Jn.testAction=function(e,t,n){Xn(e,t,n.id,n)};var Zn=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")])])])])};Zn._withStripped=!0;var Qn={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]}:{};Jn.testAction(null,e,new se(t,this.gridData))},reloadAREModel(e){var t=this;t.loading=!0,Ct.downloadDeployedModelBase64(e.areURL).then(n=>{Ct.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;Ct.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then(()=>{t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0})},reloadComponentIds(e){var t=this;Ct.getRuntimeComponentIds(e.areURL).then(e=>{t.areComponentIds=e})},reloadPorts(e){var t=this;Ct.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then(e=>{t.areComponentEventPorts=e}),Ct.getComponentInputPortIds(e.componentId,e.areURL).then(e=>{t.areComponentPorts=e})},testAREUrl(e){var t=this;e.areURL=Ct.getRestURL(e.areURL),t.areConnected=void 0,Ct.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=Ct.getRestURL(this.action.areURL)}},mounted(){this.action.areURL=this.action.areURL||Ct.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new se(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new z),ht.setHelpLocation("05_actions","#asterics-action")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation()}},ei=(n(64),Ut(Qn,Zn,[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));ei.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var ti=ei.exports,ni=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),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"})])])])])};ni._withStripped=!0;var ii={props:{value:Array},data:()=>({selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:Bn,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}),methods:{modelChanged(){this.$emit("input",JSON.parse(JSON.stringify(this.selectedRadioList)))},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,Ke.debounce(()=>{Bn.search(e.webradioSearch,10,e.webradioStartIndex).then(t=>{e.hasMoreWebradios=Bn.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){Bn.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter(t=>t.radioId!==e.radioId),this.modelChanged()}},mounted(){this.selectedRadioList=JSON.parse(JSON.stringify(this.value)),C.initDomI18n()},updated(){C.initDomI18n()}},ai=(n(66),Ut(ii,ni,[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));ai.options.__file="src/vue-components/components/radioListSelector.vue";var ri={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:H,editActionId:null,selectedNewAction:H.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:H.getActionTypes(),voiceLangs:on.getVoicesLangs(),dictionaryKeys:$e.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:j.getActions(),webradioActions:B.getActions(),currentLang:C.getBrowserLang(),allLanguages:C.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1}},components:{RadioListSelector:ai.exports,Accordion:Kt,EditAreAction:ti},methods:{selectedRadioChanged(e){let t=this.gridData.webRadios.filter(t=>t.radioId===e)[0].faviconUrl;t&&at.urlToBase64(t).then(e=>{e&&(this.gridElement.image=new M({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]]}:{};Jn.testAction(this.gridElement,e,new se(t,this.gridData))},addAction(){let e=JSON.parse(JSON.stringify(H.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(){ht.openHelp()},editNext(e){var t=this;t.saveInternal().then(()=>{t.editElementId=new se(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)}),ut.saveGrid(e.gridData).then(()=>ut.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then(()=>(e.$emit("reload"),Promise.resolve())))},initInternal(){let e=this;ut.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]}),ut.getGridsAttribute("label").then(t=>{e.gridLabels=t})}},mounted(){this.editElementId=this.editElementIdParam,this.initInternal(),ht.setHelpLocation("05_actions","#edit-actions-modal")},updated(){C.initDomI18n()},beforeDestroy(){ht.setHelpLocation("02_navigation","#edit-view")}},si=(n(68),Ut(ri,$n,[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));si.options.__file="src/vue-components/modals/editActionsModal.vue";var oi=si.exports,li=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")])])])])])])])])};li._withStripped=!0;var ci={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new se(this.gridDataParam).getHeight(),metadata:null}},methods:{save(){m.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});let e=[];this.metadata&&e.push(ut.saveMetadata(this.metadata)),Promise.all(e).then(()=>{this.$emit("save",this.gridData.rowCount,this.gridData.minColumnCount),this.$emit("close")})}},mounted(){this.isGlobalGrid&&ut.getMetadata().then(e=>{this.metadata=JSON.parse(JSON.stringify(e)),setTimeout(()=>C.initDomI18n(),10)}),C.initDomI18n()}},di=(n(70),Ut(ci,li,[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));di.options.__file="src/vue-components/modals/gridDimensionModal.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(" "),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")])])])])])])])])};fi._withStripped=!0;var hi={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:C,imageUtil:at}},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 ut.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(ut.saveGrid(this.gridData)),t.push(ut.saveGrid(e)),Promise.all(t)})}},mounted(){ut.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()}),ut.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()}},pi=(n(72),Ut(hi,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 Move grid element // Grid-Element verschieben\n ")])])}],!1,null,"0fc126e0",null));pi.options.__file="src/vue-components/modals/elementMoveModal.vue";var mi=pi.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",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")])])])])])])])])};vi._withStripped=!0,window.hideKeyboardTranslations=!1;var gi={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:C.getBrowserLang(),chosenLocale:C.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:U,allLanguages:C.getAllLanguages(),usedLocales:m.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];m.addUsedLocales(Object.keys(t.label)),ut.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=b()(`#translationList input[lang='${e}']`).toArray().reduce((e,t)=>e+t.value+"\n","");Ke.copyToClipboard(t)},paste(e){Ke.getClipboardContent().then(t=>{if(!t)return;this.changedGrid(this.gridData);let n=t.trim().split("\n");b()(`#translationList input[lang='${e}']`).toArray().forEach((e,t)=>{n[t]&&(b()(e).val(n[t]),b()(e)[0].dispatchEvent(new Event("input")))})})},showGridElements:e=>!window.hideKeyboardTranslations||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))},mounted(){ut.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()}},_i=(n(74),Ut(gi,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 Translate Grids // Grids übersetzen\n ")])])}],!1,null,"7d6c5d35",null));_i.options.__file="src/vue-components/modals/gridTranslateModal.vue";var bi=_i.exports;let yi=null,Ei=null;var Ci=Ut({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:i,markedElement:null}),components:{GridTranslateModal:bi,ElementMoveModal:mi,GridDimensionModal:ui,EditGridModal:Rn,AddMultipleModal:Gn,EditActionsModal:oi,HeaderIcon:Vt},methods:{setDimensions:function(e,t){Ei.setDimensions(e,t)},fillGaps:function(){Ei.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ei.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){Ei.redo()}),10)},reload(e){Ei.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back(){Er.toMain()},editElement(e){this.editElementId=e,this.showEditModal=!0},removeElement(e){let t=this;Ei.removeElement(e).then(e=>{t.gridData=e})},newElement(e){switch(e){case H.ELEMENT_TYPE_PREDICTION:case H.ELEMENT_TYPE_COLLECT:var t=new se(this.gridData).getNewXYPos(),n=new H({type:e,x:t.x,y:t.y});this.gridData.gridElements.push(n),Ei.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=[],Ei.updateGridWithUndo(this.gridData))},fillElements(){let e=K.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),Ei.updateGridWithUndo(this.gridData)},reloadFn(e,t,n){if(yi&&t.includes(yi.gridData.id)&&Ei&&Ei.isInitialized()){let e=new se(n.filter(e=>e.id===yi.gridData.id)[0]);e.isEqual(yi.gridData)||(log.debug("reloading on remote update..."),yi.reload(e))}},markElement(e){b()(".grid-item-content").removeClass("marked"),e&&setTimeout(()=>{Ke.throttle(()=>{this.markedElement&&this.markedElement.id===e?this.markedElement=null:(this.markedElement=e?this.gridData.gridElements.filter(t=>t.id===e)[0]:null,b()("#"+e).addClass("marked"))},null,200)},10)},getGridInstance:()=>Ei},created(){b()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){let e=this;yi=e,It.global.stopListening(),ut.getGrid(this.gridId).then(t=>t?(e.gridData=JSON.parse(JSON.stringify(t)),Promise.resolve()):(log.warn("grid not found! gridId: "+this.gridId),Er.toMain(),Promise.reject())).then(()=>ut.getMetadata().then(t=>(e.metadata=JSON.parse(JSON.stringify(t)),e.metadata.globalGridId===e.gridData.id?Promise.resolve():(e.metadata.lastOpenedGridId=e.gridData.id,ut.saveMetadata(e.metadata))))).then(()=>{return t=e.gridData,Ei=new wn("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:t.id}),Ei.getInitPromise();var t}).then(()=>{Ei.setLayoutChangedEndListener(t=>{e.canUndo=Ei.canUndo(),e.canRedo=Ei.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"}}}},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=()=>!!yi.markedElement;var a={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:()=>yi.markedElement&&yi.markedElement.type===H.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 se({},yi.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:!!yi.metadata.globalGridId&&yi.metadata.globalGridActive&&yi.metadata.globalGridId!==yi.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:yi.metadata.globalGridId===yi.gridData.id}};function r(e,t){switch(e){case"CONTEXT_EDIT":yi.editElement(t);break;case"CONTEXT_DUPLICATE":Ei.duplicateElement(t);break;case"CONTEXT_DO_ACTION":Jn.doAction(yi.gridData.id,t);break;case"CONTEXT_ACTIONS":yi.editActions(t);break;case"CONTEXT_DELETE":yi.removeElement(t);break;case"CONTEXT_NEW_SINGLE":yi.newElement();break;case"CONTEXT_NEW_MASS":yi.newElements();break;case"CONTEXT_NEW_COLLECT":yi.newElement(H.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":yi.newElement(H.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_DELETE_ALL":yi.clearElements();break;case"CONTEXT_FILL_EMPTY":yi.fillElements();break;case"CONTEXT_LAYOUT_FILL":yi.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":yi.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":yi.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":yi.editElement(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":yi.editActions(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_DELETE":yi.removeElement(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":Ei.duplicateElement(yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":Jn.doAction(yi.gridData.id,yi.markedElement.id),yi.markElement(null);break;case"CONTEXT_MOVE_TO":yi.editElementId=t||yi.markedElement.id,yi.markElement(null),yi.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":Er.toEditGrid(yi.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":Er.toEditGrid(yi.metadata.lastOpenedGridId)}}b()(".grid-container").on("click",(function(e){if(yi){let t=null,n=e.target;for(;!t&&n.parentNode;)t=b()(n).attr("data-id"),n=n.parentNode;yi.markElement(t)}})),b.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){r(e,b()(this).attr("data-id"))},items:t,zIndex:10}),b.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){r(e,b()(this).attr("data-id"))},items:n,zIndex:10}),b.a.contextMenu({selector:".grid-container",callback:function(e,t){r(e)},items:e,zIndex:10}),b.a.contextMenu({selector:"#moreButton",callback:function(e,t){r(e)},trigger:"left",items:a,zIndex:10})}(),C.initDomI18n(),e.showGrid=!0})},updated(){C.initDomI18n()},beforeDestroy(){b()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),yi=null,It.global.startListening(),Ei&&(Ei.destroy(),Ei=null),b.a.contextMenu("destroy")}},nn,[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);Ci.options.__file="src/vue-components/views/gridEditView.vue";var wi=Ci.exports,Ti=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(" "),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)};Ti._withStripped=!0;var Si=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 Ni(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},Si.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},Si.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},Si.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;nArray.isArray(t)?e.concat(Si.flattenArrayDeep(t)):e.concat(t),[])},Si.convertToKeyCode=function(e){return/^[a-zA-Z0-9]$/.test(e)?e.toUpperCase().charCodeAt(0):null},Si.getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},window.L=Si;let Ai={};function Ii(e,t,n){var i=this,a=(e=e,t=t,""),r=1e3,s=!1,o=3,l=3,d=!1,u=!0,f=1,h=!0,p=null,m=!1,v=null,g=null,_=null,b=!1,y=null,E=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,d=null!=e.scanBinary?e.scanBinary:d,u=null!=e.touchScanning?e.touchScanning:u,f=null!=e.scanTimeoutFirstElementFactor?e.scanTimeoutFirstElementFactor:f,h=void 0===e.autoScan||e.autoScan),u&&i.enableTouchScanning(),C=It.instance(),e.inputEventSelect?C.onInputEvent(e.inputEventSelect,i.select):C.onInputEvent(new c({keyCode:32}),i.select),e.inputEventNext&&C.onInputEvent(e.inputEventNext,i.next)}function S(e,t){for(var n=t?L:k,i=t?x:O,a=t?k:L,r=I(A(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(A(a),A(n)),o=(e=e.sort(r)).slice(),l=[],c=0;o.length>0&&c<1e3;){c++;var u=N(o,e,t);l.push(u),o=o.filter(e=>!u.includes(e))}return d&&(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 A(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(Si.removeClass(e,t),Si.addClass(e,a),m&&(Si.addClass(n[l],t),Si.removeClass(n,a),v=n[l],w=()=>{D(n,!0,l+1,c+1)},h)){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;d&&e.length>l&&(n=Math.ceil(e.length/2));for(var i=0,a=e.length;i1?D(R(v),!0):Si.flattenArray(v).length>1?D(R(Si.flattenArray(v)),!0):(p&&p(Si.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){w&&(clearTimeout(g),w())},i.enableTouchScanning=function(){y||(y=function(){i.select()},(E=Si(".area")[0]?Si(".area")[0]:Si("#grid-container")).addEventListener("click",y))},i.disableTouchScanning=function(){y&&(E.removeEventListener("click",y),y=null)},T(n)}Ai.getInstanceFromConfig=function(e,t,n,i){return new Ii(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===u.SELECT)[0],inputEventNext:e.scanInputs.filter(e=>e.label===u.NEXT)[0]})};let ki={};function Oi(e,t){var n=e,a=void 0!==t.timeoutMs?t.timeoutMs:1e3;let r=t.demoMode,s=t.selectionListener,o=t.activeListener;var l={};let c=[],d=null,u=null,f=!1,h=null;function p(e,t){var n=t||this;e.preventDefault(),T(n),d=n,u=e}function m(e,t){if(f){var n=t||this;e.preventDefault(),S(n)}}function v(e){f||A(!1),Ke.debounce(()=>{A(!0)},a+300,"hovering-mouseMove")}function g(){S(d)}function _(e){let t=N(e);T(t),d=t}function y(e){S(d)}function E(e){r||e.preventDefault(),Ke.throttle(()=>{let t=N(e);T(t),d=t,u=e},[],50,"hovering-touchmove")}function w(e){on.speak(C.translate("speech output activated // Sprachausgabe aktiviert")),Ft.clearTooltip(),an.setState(i.STATE_ACTIVATED_TTS,!0),A(!0),c.forEach((function(e){e.removeEventListener("click",w)}))}function T(e){d&&d!==e&&S(d),e&&!l[e]&&(Si.addClass(e,"mouseentered"),o&&e!==d&&o(e),0!==a&&(l[e]=setTimeout((function(){s&&s(e)}),a)))}function S(e){e&&(Si.removeClass(e,"mouseentered"),clearTimeout(l[e]),l[e]=null,d=null)}function N(e){if(e.touches&&0===e.touches.length&&(e=u),!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 Ke.getElement(c,t,n)}function A(e){f=!e,r||(e?b()("#touchElement").show():b()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(b()(n).css("cursor","none"),b()("#touchElement").css("cursor","none"),t.containerClass&&b()(t.containerClass).css("cursor","none")),c=Si.selectAsList(n);let e=an.getState(i.STATE_ACTIVATED_TTS);!on.nativeSpeechSupported()||e||r?A(!0):(Ft.setTooltip(C.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),an.onStateChanged(i.STATE_ACTIVATED_TTS,e=>{e&&Ft.clearTooltip()}),c.forEach((function(e){e.addEventListener("click",w)}))),c.forEach((function(e){e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",m),e.addEventListener("mouseup",g)})),h=It.instance(),h.onTouchStart(_),h.onTouchEnd(y),h.onTouchMove(E),h.startListening(),document.addEventListener("mousemove",v)},this.destroy=function(){t.hideCursor&&(b()(n).css("cursor","default"),b()("#touchElement").css("cursor","default"),t.containerClass&&b()(t.containerClass).css("cursor","default")),Ke.clearDebounce("hovering-mouseMove"),c.forEach((function(e){e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",m),e.removeEventListener("mouseup",g),e.removeEventListener("click",w)})),h.destroy(),document.removeEventListener("mousemove",v),Object.keys(l).forEach(e=>{clearTimeout(l[e])}),an.clearListeners(i.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){a=e},this.setSelectionListener=function(e){s=e}}function Li(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=Si.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}}ki.getInstanceFromConfig=function(e,t,n){return new Oi(t,{selectionListener:(n=n||{}).selectionListener,activeListener:n.activeListener,containerClass:n.containerClass,inputEventSelect:e.seqInputs.filter(e=>e.label===u.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===u.NEXT)[0],timeoutMs:e.hoverTimeoutMs,demoMode:n.demoMode||e.hoverDisableHoverpane,hideCursor:e.hoverHideCursor})};var xi=n(45),Di=n.n(xi);let Ri={};function Mi(e,t,n,i){let a=this,r=e,s=t,o=n,l=!1,c=!0,d=!1,u=0,f=1e3,h=!0,p=[],m=null,v=null,g=null,_=null,y="",E=null,C="",w=!1,T=null;function S(){if(E=It.instance(),C="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");b.a.isFunction(e.selectionListener)&&(m=e.selectionListener);l=void 0!==e.printCodes&&e.printCodes,c=void 0===e.printColors||e.printColors,d=void 0!==e.colorWholeElement&&e.colorWholeElement,h=void 0===e.markInactive||e.markInactive,p=e.colors||p,u=e.elementCount||0,f=e.timeout||1e3,e.inputEvents.forEach((e,t)=>{C+=t+1,E.onInputEvent(e,()=>{a.input(t+1)})})}(i),v=b()(r),0===v.length)return;let e=v.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),c||l)){let t="";e.codeWord.split("").forEach(e=>{let i=c?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+=`${l?e:" "}`});let i=l?"10px":"3px",a=b()(e.element).width()+"px";b()(e.element).append(`
    ${t}
    `)}})),_=_.filter(e=>e.name),N()}function N(){d&&_.forEach(e=>{if(0===e.codeWord.indexOf(y)){let t=e.codeWord.substring(y.length)[0];e.element.style.background=I(t)}})}function A(e){v.removeClass(o);let t=e.map(e=>e.id),n=v.toArray().filter(e=>-1===t.indexOf(e.id));b()(n).addClass(o)}function I(e){let t=parseInt(e)-1;return p[t]}a.start=function(){w=!0,d&&b()(v).addClass("noanimation"),E.startListening()},a.stop=function(){w=!1,b()(v).find(".huffman-code-visualization").remove(),d&&(b()(v).removeClass("noanimation"),b()(v).css("background","")),E.stopListening()},a.destroy=function(){a.stop(),E.destroy()},a.reinit=function(){w&&(a.stop(),S(),a.start())},a.input=function(e){if(e+="",clearTimeout(T),1!==e.length)return;y+=e,N();let t=_.filter(e=>e.codeWord===y).map(e=>e.element),n=_.filter(e=>0===e.codeWord.indexOf(y)).map(e=>e.element);var i;v.removeClass(s),t[0]?(i=t[0],g=i||g,v.removeClass(s),b()(g).addClass(s),A(v.toArray()),m&&m(t[0])):h&&A(n),(t[0]||0===n.length)&&(A(v.toArray()),y="",N()),f>0&&(T=setTimeout(()=>{A(v.toArray()),y="",N()},f))},a.getCurrentInput=function(){return y},S()}Ri.getInstanceFromConfig=function(e,t,n,i,a){return new Mi(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 Pi={};function Ui(e,t,n){let i=this,a=e,r=t,s=!0,o=!1,l=null,c=null,d=null,u={},f=It.instance();function h(e){u[d.id]&&p(u[d.id][e])}function p(e){d=e||d,c.removeClass(r),b()(d).addClass(r)}i.start=function(){p(c[0]),f.startListening()},i.destroy=function(){c.removeClass(r),f.destroy()},i.left=function(){h("left")},i.right=function(){h("right")},i.up=function(){h("up")},i.down=function(){h("down")},i.select=function(){l&&l(d),o&&p(c[0])},c=b()(a),0!==c.length&&(setTimeout(()=>{c.toArray().forEach(e=>{let t=c.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,h=Math.min(Math.abs(r),Math.abs(s),Math.abs(o),Math.abs(l)),p=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:h,absDiffY:p,absDiff:h+p}});function o(e,t,n,i,a){let r=e.filter(e=>e[t]);if(r.length>0)return r[0].element;if(s){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=o(r,"left","right","absDiffX","absDiffY"),d=o(r,"right","left","absDiffX","absDiffY"),f=o(r,"up","down","absDiffY","absDiffX"),h=o(r,"down","up","absDiffY","absDiffX");u[e.id]={element:e,left:l,right:d,up:f,down:h}})},200),function(e){e&&(b.a.isFunction(e.selectionListener)&&(l=e.selectionListener),s=void 0!==e.wrapAround&&e.wrapAround,o=void 0!==e.resetToStart&&e.resetToStart,f.onInputEvent(e.inputEventLeft,i.left),f.onInputEvent(e.inputEventRight,i.right),f.onInputEvent(e.inputEventUp,i.up),f.onInputEvent(e.inputEventDown,i.down),f.onInputEvent(e.inputEventSelect,i.select))}(n))}Pi.getInstanceFromConfig=function(e,t,n,i){return new Ui(t,n,{inputEventLeft:e.dirInputs.filter(e=>e.label===u.LEFT)[0],inputEventRight:e.dirInputs.filter(e=>e.label===u.RIGHT)[0],inputEventUp:e.dirInputs.filter(e=>e.label===u.UP)[0],inputEventDown:e.dirInputs.filter(e=>e.label===u.DOWN)[0],inputEventSelect:e.dirInputs.filter(e=>e.label===u.SELECT)[0],wrapAround:e.dirWrapAround,resetToStart:e.dirResetToStart,selectionListener:i})};let Gi={};function $i(e,t){let n=this,i=e,a=null,r=null,s=null,o=null,l=null,c=0;function d(e){o.removeClass(a),b()(e).addClass(a),s&&s(e)}n.start=function(){l.startListening(),d(o[0]),c=0},n.destroy=function(){l.destroy(),o.removeClass(a)},n.next=function(){c++,c>o.length-1&&(c=0),d(o[c])},n.select=function(){r&&r(o[c])},l=It.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(b.a.isFunction(e.selectionListener)&&(r=e.selectionListener),b.a.isFunction(e.activeListener)&&(s=e.activeListener),a=e.activeClass||"scanFocus",l.onInputEvent(e.inputEventSelect,()=>{n.select()}),l.onInputEvent(e.inputEventNext,()=>{n.next()}))}(t),o=b()(i)}Gi.getInstanceFromConfig=function(e,t,n){return new $i(t,{selectionListener:n.selectionListener,activeListener:n.activeListener,inputEventSelect:e.seqInputs.filter(e=>e.label===u.SELECT)[0],inputEventNext:e.seqInputs.filter(e=>e.label===u.NEXT_ELEMENT)[0]})};var 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:{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")])])])])])])])])};Fi._withStripped=!0;var ji=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)])};ji._withStripped=!0;var Bi={components:{Accordion:Kt},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:u.getInputEventTypes(),InputEventKey:c,InputEventARE:d,InputConfig:u,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:It.instance(),lastInitTime:null,areService:Ct}),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=u.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),Ct.unsubscribeEvents();let a=null;function r(){Et.a.set(n.keyRecording,i,!1),Ct.unsubscribeEvents()}Ct.subscribeEvents(e.areURL,t=>{a||(a=setTimeout(()=>{Et.a.set(n.keyRecording,i,!1),Ct.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=Ct.getRestURL(e.areURL))},modelChanged(){let e=this.inputs.filter(e=>{if(!e.modelName)return!1;return u.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 d({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(){}},Ki=(n(78),Ut(Wi,zi,[],!1,null,"2f9b4098",null));Ki.options.__file="src/vue-components/modals/input/testArea.vue";var Yi=Ki.exports,Ji={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,touchScanning:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.scanEnabled||(0===this.inputConfig.scanInputs.filter(e=>e.label===u.SELECT).length&&this.errorInputs.push(u.SELECT),0!==this.inputConfig.scanInputs.filter(e=>e.label===u.NEXT).length||this.inputConfig.scanAuto||this.errorInputs.push(u.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(u.DEFAULT_SCAN_INPUTS))),this.inputChanged()},changeTouchScanning(){this.inputConfig.mouseclickEnabled=!this.touchScanning},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.scanEnabled&&(this.scanner=Ai.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled}),ht.setHelpLocation("04_input_options","#scanning")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},Xi=(n(80),Ut(Ji,Fi,[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));Xi.options.__file="src/vue-components/modals/input/scanningModal.vue";var qi=Xi.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:{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")])])])])])])])])};Zi._withStripped=!0;var Qi=Ut({props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")})},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},initTest(){setTimeout(()=>{let e=this;this.stopTest(),e.inputConfig.hoverEnabled&&(e.hover=ki.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 Li(".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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#mousetouch-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},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("Mouse/Touch input // Maus-/Toucheingabe")])])}],!1,null,"33ee2cbd",null);Qi.options.__file="src/vue-components/modals/input/mouseModal.vue";var ea=Qi.exports,ta=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")])])])])])])])])};ta._withStripped=!0;var na={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.dirEnabled||(0===this.inputConfig.dirInputs.filter(e=>e.label===u.SELECT).length&&this.errorInputs.push(u.SELECT),this.inputConfig.dirInputs.length<2&&this.errorInputs.push(u.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(u.DEFAULT_DIR_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.dirEnabled&&(e.dirInput=Pi.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#direction-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},ia=(n(82),Ut(na,ta,[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));ia.options.__file="src/vue-components/modals/input/directionInputModal.vue";var aa=ia.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("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")])])])])])])])])};ra._withStripped=!0;var sa={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.huffEnabled||(this.inputConfig.huffInputs.length<2&&this.errorInputs.push(u.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(u.DEFAULT_HUFF_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{this.stopTest(),this.inputConfig.huffEnabled&&(this.huffInput=Ri.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#huffman-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},oa=(n(84),Ut(sa,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("Huffman Input // Huffman-Eingabe")])])}],!1,null,"fff4292a",null));oa.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var la=oa.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",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.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")])])])])])])])])};ca._withStripped=!0;var da={props:[],components:{Accordion:Kt,InputEventList:Hi,TestArea:Yi},data:function(){return{inputConfig:null,metadata:null,InputConfig:u,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,ut.saveMetadata(this.metadata).then(()=>{this.$emit("close")}))},cancel(){this.$emit("close")},openHelp(){ht.openHelp()},validateInputs(){return this.errorInputs=[],this.error="",!this.inputConfig.seqEnabled||(0===this.inputConfig.seqInputs.filter(e=>e.label===u.NEXT_ELEMENT).length&&this.errorInputs.push(u.NEXT_ELEMENT),0===this.inputConfig.seqInputs.filter(e=>e.label===u.SELECT).length&&this.errorInputs.push(u.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(u.DEFAULT_SEQ_INPUTS))),this.inputChanged()},initTest(){setTimeout(()=>{let e=this;e.stopTest(),e.inputConfig.seqEnabled&&(e.seqInput=Gi.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;It.pauseAll(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))}),ht.setHelpLocation("04_input_options","#sequential-input")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation(),this.stopTest(),It.resumeAll()}},ua=(n(86),Ut(da,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("Sequential Input // Sequentielle Eingabe")])])}],!1,null,"071e6452",null));ua.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var fa=ua.exports;let ha=null,pa=null,ma={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL"};function va(){ha&&window.removeEventListener("resize",ha.resizeListener,!0),ha&&b()(document).off(i.EVENT_GRID_RESIZE,ha.resizeListener),ha&&ha.scanner&&ha.scanner.destroy(),ha&&ha.hover&&ha.hover.destroy(),ha&&ha.clicker&&ha.clicker.destroy(),ha&&ha.directionInput&&ha.directionInput.destroy(),ha&&ha.huffmanInput&&ha.huffmanInput.destroy(),ha&&ha.seqInput&&ha.seqInput.destroy()}function ga(){b.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=ha.metadata.inputConfig,i=n.mouseclickEnabled||n.hoverEnabled,a={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":""}};b.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":ha.openModal(ma.MODAL_MOUSE);break;case"CONTEXT_SCANNING":ha.openModal(ma.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":ha.openModal(ma.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":ha.openModal(ma.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":ha.openModal(ma.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:a,zIndex:10})}var _a=Ut({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:ma,viewInitialized:!1,unlockCount:8,unlockCounter:8}),components:{SequentialInputModal:fa,HuffmanInputModal:la,DirectionInputModal:aa,MouseModal:ea,ScanningModal:qi,HeaderIcon:Vt},methods:{openModal(e){this.showModal=e,va()},lock(){this.metadata.locked=!0,this.unlockCounter=8,ut.saveMetadata(this.metadata).then(()=>{b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)})},unlock(e){let t=this;t.unlockCounter--,Ke.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,ut.saveMetadata(t.metadata).then(()=>{b()(document).trigger(i.EVENT_SIDEBAR_OPEN)}))},applyFullscreen(e){Ke.openFullscreen(),this.metadata.fullscreen=!0;let t=Promise.resolve();e||(t=ut.saveMetadata(this.metadata)),t.then(()=>{b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)})},initInputMethods(){let e=this;if(!pa)return;let t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),b()(document).on(i.EVENT_GRID_RESIZE,e.resizeListener);let n=t=>{Si.removeAddClass(t,"selected"),Jn.doAction(e.gridData.id,t.id)},a=n=>{t.globalReadActive&&on.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=Gi.getInstanceFromConfig(t,".grid-item-content",{selectionListener:n,activeListener:a}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=Pi.getInstanceFromConfig(t,".grid-item-content","scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=Ri.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=Ai.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive"),e.scanner.setSelectionListener(n),pa.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),pa.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=ki.getInstanceFromConfig(t,".grid-item-content",{activeListener:a,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):b()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new Li(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())},reinitInputMethods(){let e=this;va(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),ga(),e.initInputMethods()})},reload(e){pa.reinit(e).then(()=>{e&&(this.gridData=JSON.parse(JSON.stringify(e))),this.reinitInputMethods()})},reloadOnLangChange(){this.reload()},toEditGrid(){Er.toEditGrid(this.gridData.id)},toManageGrids(){Er.toManageGrids()},toLogin(){Er.toLogin()},reloadFn(e,t,n){let a=this;if(!ha||!pa||!pa.isInitialized())return void setTimeout(()=>{a.reloadFn(e,t,n)},500);log.debug("got update event, ids updated:"+t);let r=n.filter(e=>ha.gridData&&e.id===ha.gridData.id)[0];this.updatedMetadataDoc=n.filter(e=>ha.metadata&&e.id===ha.metadata.id)[0]||this.updatedMetadataDoc,r&&ha.reload(new se(r)),m.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==ha.gridData.id?ut.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then(e=>{e.hasOutdatedThumbnail()||Er.toLastOpenedGrid()}):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==ha.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?ha.applyFullscreen(!0):b()(document).trigger(i.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==ha.metadata.locked&&(this.updatedMetadataDoc.locked?ha.lock():ha.unlock(!0))))},onSidebarOpen(){ha&&ha.metadata&&(ha.metadata.fullscreen=!1,b()(document).trigger(i.EVENT_GRID_RESIZE))},resizeListener(){let e=this;Ke.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created(){b()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn),b()(document).on(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),b()(document).on(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){let e=this;ha=e,ut.getGlobalGrid().then(t=>(e.globalGridData=t,ut.getGrid(e.gridId))).then(t=>{if(!t)return log.warn("grid not found! gridId: "+this.gridId),ut.getGrids(!1,!0).then(e=>(e[0]?Er.toGrid(e[0].id):Er.toManageGrids(),Promise.reject()));if(t.hasAREModel()){let e=t.getAREModel();Ct.uploadAndStartModel(e.dataBase64,t.getAREURL(),e.fileName)}return e.gridData=JSON.parse(JSON.stringify(t)),Er.addToGridHistory(e.gridData.id),Promise.resolve()}).then(()=>ut.getMetadata()).then(t=>{let n=JSON.parse(JSON.stringify(t||new f));return n.lastOpenedGridId=this.gridId,n.locked=void 0===n.locked?oe.isDemoMode()&&ut.getCurrentUser()===i.LOCAL_DEMO_USERNAME:n.locked,n.fullscreen=void 0===n.fullscreen?oe.isDemoMode()&&ut.getCurrentUser()===i.LOCAL_DEMO_USERNAME:n.fullscreen,n.inputConfig.scanEnabled=!!oe.isScanningEnabled()||n.inputConfig.scanEnabled,n.inputConfig.dirEnabled=!!oe.isDirectionEnabled()||n.inputConfig.dirEnabled,n.inputConfig.huffEnabled=!!oe.isHuffmanEnabled()||n.inputConfig.huffEnabled,ut.saveMetadata(n).then(()=>{n.locked&&b()(document).trigger(i.EVENT_SIDEBAR_CLOSE)}),e.metadata=n,Promise.resolve()}).then(()=>{return t=e.gridData.id,pa=new wn("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:t,globalGridHeightPercentage:ha.metadata.globalGridHeightPercentage}),pa.getInitPromise();var t}).then(()=>{ga(),e.viewInitialized=!0;let t=new se(e.gridData);t.hasOutdatedThumbnail()&&at.getScreenshot("#grid-container").then(n=>{let i={data:n,hash:t.getHash()};e.gridData.thumbnail=i,ut.saveGrid(e.gridData)}),e.initInputMethods()}).catch(e=>{e&&log.warn(e)})},updated(){C.initDomI18n()},beforeDestroy(){b()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),b()(document).off(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),b()(document).off(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),va(),b.a.contextMenu("destroy"),ha=null,pa&&(pa.destroy(),pa=null)}},Ti,[],!1,null,"cc4f17d6",null);_a.options.__file="src/vue-components/views/gridView.vue";var ba=_a.exports,ya=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)};ya._withStripped=!0;var Ea=n(6),Ca=n.n(Ea);let wa,Ta={},Sa=null,Na=null,Aa=null,Ia=null,ka=!1,Oa=null,La=null,xa=i.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function Da(e,t,n){return Aa!==e?Promise.reject():(Ia=e,Oa=t,La=n,e=e.trim(),Ca.a.login({username:e,password:t}).then(i=>(log.info("login success!"),Ta.stopAutoRetryLogin(),Sa=i,Na=e,m.setLastActiveUser(e),m.setAutologinUser(n?e:""),n&&m.saveUserPassword(e,t),Promise.resolve())))}function Ra(e,t,n){return Da(e,t,n).then(()=>qe.initForUser(e,t,Ta.getLoggedInUserDatabase(),!n).then(()=>Promise.resolve(!0)),i=>Aa!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),m.isDatabaseSynced(e)?(log.info("using offline local database..."),m.setLastActiveUser(e),m.setAutologinUser(n?e:""),Ma(i)!==Ta.ERROR_CODE_UNAUTHORIZED&&Pa(e,t,n),qe.initForUser(e,t).then(()=>Promise.resolve(!1))):Promise.reject(Ma(i))))}function Ma(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?Ta.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?Ta.ERROR_CODE_NETWORK_ERROR:void 0}function Pa(e,t,n){Ta.stopAutoRetryLogin(),wa=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),Ra(e,t,n)}),1e4)}Ta.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",Ta.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",Ta.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",Ca.a.configure({serverUrl:xa,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),Ta.getLoggedInUsername=function(){return Na},Ta.getLoggedInUserDatabase=function(){if(!Sa||!Sa.userDBs)return null;let e=Object.keys(Sa.userDBs);return Sa.userDBs[e[0]]},Ta.loginPlainPassword=function(e,t,n){Aa=e;let i=ee.getUserPasswordHash(t);return Ta.loginHashedPassword(e,i,n)},Ta.loginHashedPassword=function(e,t,n){return Aa=e,Ra(e,t,n)},Ta.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if(ka)return log.warn("login currently in progress - aborting..."),Promise.reject();Aa=e,ka=!0;let n=m.getSavedOnlineUsers(),i=m.getSavedLocalUsers(),a=new Promise((t,a)=>{if(Ta.getLoggedInUsername()===e)return t();if(Ta.logout(),n.includes(e)&&m.isDatabaseSynced(e)){let n=m.getUserPassword(e);qe.initForUser(e,n).then(()=>{Ta.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=m.getUserPassword(e);Ta.loginHashedPassword(e,n,!0).then(()=>{t()}).catch(e=>{a(e)})}else i.includes(e)&&(m.setAutologinUser(e),qe.initForUser(e,e).then(()=>{t()}))});return a.then(()=>{t||Er.toMain()}),a.finally(()=>{ka=!1}),a},Ta.logout=function(){Ta.stopAutoRetryLogin(),Na&&(log.debug("logging out user: "+Na),qe.closeCurrentDatabase(),Ca.a.logout(Na),Na=null,Sa=null)},Ta.register=function(e,t,n){Aa=e,Ta.stopAutoRetryLogin(),e=e.trim();let i=ee.getUserPasswordHash(t);return log.debug("password hash: "+i),Ca.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then(t=>Da(e,i,n)).then(()=>(log.info("registration successful!"),qe.registerForUser(Na,i,Ta.getLoggedInUserDatabase(),!n))).then(()=>ut.importDefaultGridset()).catch(e=>(log.info("registration failed!"),log.info(e),Promise.reject(e)))},Ta.registerOffline=function(e,t){return Ta.logout(),m.saveLocalUser(e),m.setAutologinUser(e),qe.registerForUser(e,t).then(()=>ut.importDefaultGridset())},Ta.validateUsername=function(e){return new Promise((t,n)=>{e&&i.USERNAME_REGEX.test(e)?m.isSavedLocalUser(e)||e===i.LOCAL_DEMO_USERNAME?t(i.VALIDATION_ERROR_EXISTING):Ca.a.validateUsername(e).then(()=>{t(i.VALIDATION_VALID)},e=>{log.debug(e),t(i.VALIDATION_ERROR_EXISTING)}):t(i.VALIDATION_ERROR_REGEX)})},Ta.stopAutoRetryLogin=function(){wa&&(window.clearInterval(wa),wa=null)},Ta.ping=function(){b.a.get(xa+"/ping")},b()(document).on(i.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),Ia&&Oa&&Pa(Ia,Oa,La)})),b()(document).on(i.EVENT_DB_DATAMODEL_UPDATE,(function(){Ta.logout(),m.setAutologinUser(""),Er.toLogin()}));var Ua={components:{HeaderIcon:Vt},props:[],data:()=>({user:null,password:null,remember:!0,loginTryUser:null,loginSuccess:null,loginErrorCode:null,savedUsers:[],savedOnlineUsers:[],savedLocalUsers:[],allUsersList:[],activeUser:null}),methods:{toMain(){Er.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="",Ta.loginPlainPassword(e,t,this.remember).then(()=>{n.loginSuccess=!0,Er.toMain()}).catch(e=>{n.loginSuccess=!1,n.loginErrorCode=e}))},loginStored(e){let t=this;e&&(t.savedUsers.includes(e)||Ta.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",Ta.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;m.unmarkSyncedDatabase(e),m.removeUserPassword(e),Ta.getLoggedInUsername()===e&&Ta.logout(),qe.deleteDatabase(e)}else Ta.logout();this.allUsersList=m.getSavedUsers(this.activeUser),this.savedUsers=m.getSavedUsers(this.activeUser),this.savedOnlineUsers=m.getSavedOnlineUsers(),this.savedLocalUsers=m.getSavedLocalUsers()},hasValidMajorModelVersion:e=>m.getUserMajorModelVersion(e)<=a.getLatestModelVersion().major},mounted(){let e=Ta.getLoggedInUsername();this.activeUser=m.getAutologinUser()||e,this.savedUsers=m.getSavedUsers(this.activeUser),this.allUsersList=m.getSavedUsers(this.activeUser),this.savedOnlineUsers=m.getSavedOnlineUsers(),this.savedLocalUsers=m.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:m.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),C.initDomI18n()},updated(){C.initDomI18n()}},Ga=(n(114),Ut(Ua,ya,[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));Ga.options.__file="src/vue-components/views/loginView.vue";var $a=Ga.exports,Fa=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)};Fa._withStripped=!0;var ja=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)};ja._withStripped=!0;var Ba={props:[],components:{Accordion:Kt},data:()=>({showInfo:!1}),methods:{},mounted(){C.initDomI18n()}},Va=(n(116),Ut(Ba,ja,[],!1,null,"2a375b84",null));Va.options.__file="src/vue-components/components/comparisonComponent.vue";var Ha=Va.exports,za={components:{ComparisonComponent:Ha,HeaderIcon:Vt},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(){Er.toMain()},register(){let e=this,t=(new Date).getTime()-e.creationTime;if(t{log.info("successfully registered!"),e.registerSuccess=!0,Er.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;Ta.validateUsername(e.user).then(t=>{e.usernameValid=t===i.VALIDATION_VALID,e.usernameValidationCode=t})}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Wa=(n(118),Ut(za,Fa,[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));Wa.options.__file="src/vue-components/views/registerView.vue";var Ka=Wa.exports,Ya=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)};Ya._withStripped=!0;var Ja={components:{ComparisonComponent:Ha,HeaderIcon:Vt},props:[],data:()=>({user:null,validationError:void 0,showInfo:!1,savedUsers:m.getSavedUsers(),loading:!1}),methods:{toMain(){Er.toMain()},addUser(){this.loading=!0,null==this.validationError&&Ta.registerOffline(this.user,this.user).then(()=>{Er.toMain()})},validateUsername(){this.validationError=void 0,i.USERNAME_REGEX.test(this.user)?this.savedUsers.includes(this.user)||Ta.getLoggedInUsername()===this.user?this.validationError=i.VALIDATION_ERROR_EXISTING:this.validationError=null:this.validationError=i.VALIDATION_ERROR_REGEX}},mounted(){C.initDomI18n()},updated(){C.initDomI18n()}},Xa=(n(120),Ut(Ja,Ya,[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));Xa.options.__file="src/vue-components/views/addOfflineView.vue";var qa=Xa.exports,Za=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)};Za._withStripped=!0;var Qa={components:{HeaderIcon:Vt},props:[],data:()=>({loading:!1}),methods:{toMain(){Er.toMain()},toRegister(){Er.toRegister()},useDefaultUser(){this.loading=!0,Ta.registerOffline(i.LOCAL_NOLOGIN_USERNAME,i.LOCAL_NOLOGIN_USERNAME).then(()=>{Er.toMain()})},openHelp(){ht.openHelp()}},mounted(){C.initDomI18n()}},er=(n(122),Ut(Qa,Za,[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));er.options.__file="src/vue-components/views/welcomeView.vue";var tr=er.exports,nr=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)};nr._withStripped=!0;var ir={components:{HeaderIcon:Vt},props:[],data:()=>({}),methods:{toMain(){Er.toMain()},toRegister(){Er.toRegister()}},mounted(){C.initDomI18n()}},ar=(n(124),Ut(ir,nr,[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-2020-09-14-11.33/+0200"}},[e._v("release-2020-09-14-11.33/+0200")]),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-2020-09-14-11.33/+0200"}},[e._v("release-2020-09-14-11.33/+0200")]),e._v(".\n ")])])])])])}],!1,null,"af4ab890",null));ar.options.__file="src/vue-components/views/aboutView.vue";var rr=ar.exports,sr=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 ")])])])])};sr._withStripped=!0;var or=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(){ht.openHelp()}},mounted(){C.initDomI18n(),this.originalPredictionary=Ge.instance(),this.originalPredictionary.loadDictionary(this.dictData.data,this.dictData.dictionaryKey),ht.setHelpLocation("07_dictionaries","#add-words")},updated(){C.initDomI18n()},beforeDestroy(){ht.revertToLastLocation()}},dr=(n(126),Ut(cr,or,[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));dr.options.__file="src/vue-components/modals/importDictionaryModal.vue";var ur=dr.exports;let fr=null;var hr={data:()=>({dicts:null,editModeId:"",editId:null,originalLabel:"",showLoading:!0,predictionary:null,wordlist:[],searchWord:"",showImportModal:!1,totalWords:0,filterWords:0}),components:{ImportDictionaryModal:ur,HeaderIcon:Vt},methods:{deleteDict:function(e,t){let n=this;confirm(C.translate("CONFIRM_DELETE_DICT",t))&&ut.deleteObject(e).then(()=>{n.reload()})},addDictionary:function(){log.debug("add dictionary!");let e=this.dicts.map(e=>e.dictionaryKey),t=new Oe({dictionaryKey:a.getNewName("newDictionary",e)});ut.saveDictionary(t).then(()=>{this.editModeId=t.id,this.reload()})},finishEditName:function(e){ut.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=Ge.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),ht.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished(){this.editId=null,this.searchWord="",ht.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord(e){let t=this,n=void 0===e?200:0;Ke.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,Ke.DEFAULT_KEY2)},clone(e){let t=this;ut.getDictionary(e).then(e=>{ut.saveDictionary(e.clone()).then(()=>{t.reload()})})},deleteWord(e,t){let n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,Ke.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),ut.saveDictionary(t)}),2e3,Ke.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){let t=this;ut.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===Oe.getModelName()&&this.reload(n[0])}},created(){let e=this;b()(document).on(i.EVENT_DB_PULL_UPDATED,e.updatedHandler),ut.getDictionaries().then(t=>{log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1})},mounted:function(){fr=this,C.initDomI18n()},updated(){C.initDomI18n()},beforeDestroy(){$e.init(),b()(document).off(i.EVENT_DB_PULL_UPDATED,this.updatedHandler),b.a.contextMenu("destroy")}},pr=(n(128),Ut(hr,sr,[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));pr.options.__file="src/vue-components/views/dictionariesView.vue";var mr=pr.exports,vr=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("Language // 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._e()],1)};vr._withStripped=!0;var gr={components:{HeaderIcon:Vt},props:[],data:()=>({metadata:null,show:!1,langCode:"",gridLanguages:[],allLanguages:C.getAllLanguages(),currentLang:C.getBrowserLang(),saveSuccess:null,speechService:on,syncNavigation:m.shouldSyncNavigation(),voices:on.getVoices(),selectedVoiceName:on.getPreferredVoiceName(),testText:C.translate("This is an english sentence. // Das ist ein deutscher Satz.")}),methods:{saveLangCode(){this.saveSuccess=void 0,Ke.debounce(()=>{C.setLanguage(this.langCode),C.initDomI18n(),this.saveSuccess=!0},300,"SAVE_LANG")},saveVoice(){this.saveSuccess=void 0,Ke.debounce(()=>{on.setPreferredVoiceName(this.selectedVoiceName),this.saveSuccess=!0},300,"SAVE_VOICE")},saveSyncNavigation(){this.saveSuccess=void 0,Ke.debounce(()=>{m.setShouldSyncNavigation(this.syncNavigation),this.saveSuccess=!0},300,"SAVE_NAV")},testSpeak(){on.speak(this.testText,null,this.selectedVoiceName)}},mounted(){let e=this;C.initDomI18n(),ut.getMetadata().then(t=>{e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0}),ut.getGrids(!1,!0).then(t=>{e.gridLanguages=t[0]?Object.keys(t[0].label):[]}),e.langCode=C.getCustomLanguage()},updated(){C.initDomI18n()}},_r=(n(130),Ut(gr,vr,[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));_r.options.__file="src/vue-components/views/settingsView.vue";var br=_r.exports;let yr=["#login","#register","#welcome","#add","#about"],Er={},Cr=null,wr=null,Tr=null,Sr=!1,Nr=null,Ar=[];function Ir(){let e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function kr(e,t){Tr=t?null:location.hash,location.hash=e}function Or(e,t,n){var i;Nr=e,e!==ba&&b()("#touchElement").hide(),i=n||Ir(),b()("nav button").removeClass("selected"),b()(`nav a[href='${i}'] button`).addClass("selected"),log.debug("loading view: "+e.__file),Ft.setViewComponent(e,t)}function Lr(){ut.getMetadata().then(e=>{let t=e?e.lastOpenedGridId:null;Or(ba,{gridId:t})})}Er.init=function(e,t){Sr=!0,wr=e,Cr=new E.a(null,!0),Cr.on({main:function(){ht.setHelpLocation("02_navigation","#main-view"),Lr()},"grids/":function(){ht.setHelpLocation("02_navigation","#manage-grids-view"),Or(tn)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),ht.setHelpLocation("02_navigation","#main-view"),Or(ba,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),ht.setHelpLocation("02_navigation","#main-view"),ut.getGrids().then(t=>{let n=t.filter(t=>C.getTranslation(t.label)===e.gridName),i=n[0]?n[0].id:null;i?Or(ba,{gridId:i},"#main"):(log.warn(`no grid with name ${e.gridName} found!`),Lr())})},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),ht.setHelpLocation("02_navigation","#edit-view"),Or(wi,{gridId:e.gridId})},login:function(){ht.setHelpLocation("02_navigation","#change-user-view"),Or($a)},register:function(){ht.setHelpLocation("06_users","#online-users"),Or(Ka)},add:function(){ht.setHelpLocation("06_users","#offline-users"),Or(qa)},welcome:function(){ht.setHelpLocationIndex(),Or(tr)},about:function(){ht.setHelpLocationIndex(),Or(rr)},dictionaries:function(){ht.setHelpLocation("02_navigation","#manage-dictionaries-view"),Or(mr)},settings:function(){Or(br)},"*":function(){ht.setHelpLocation("02_navigation","#main-view"),Er.toMain()}}),Cr.hooks({before:function(e,t){Nr&&Nr.destroy&&(Nr.destroy(),Nr=null);let n=function(){let e=location.hash;if(!qe.getCurrentUsedDatabase()){let t=m.getLastActiveUser()||m.getSavedUsers().length>0;e=yr.includes(e)?e:null,e=e||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),kr(n)):e()},after:function(e){},leave:function(e){}}),t&&kr(t),Cr.resolve()},Er.isInitialized=function(){return Sr},Er.toMain=function(){0===Ir().indexOf("#main")?kr("#main?date="+(new Date).getTime()):kr("#main")},Er.toRegister=function(){kr("#register")},Er.toAddOffline=function(){kr("#add")},Er.toAbout=function(){kr("#about")},Er.toLogin=function(){kr("#login")},Er.toLastOpenedGrid=function(){ut.getMetadata().then(e=>{Er.toGrid(e.lastOpenedGridId)})},Er.toGrid=function(e){e&&kr("#grid/"+e+"?date="+(new Date).getTime())},Er.toEditGrid=function(e){e&&kr("#grid/edit/"+e)},Er.toManageGrids=function(){kr("#grids")},Er.back=function(){Tr&&Tr!==location.hash?kr(Tr,!0):this.toMain()},Er.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},Er.getCurrentView=function(){return Nr},Er.addToGridHistory=function(e){Ar.length>0&&Ar[Ar.length-1]===e||(-1===Ar.indexOf(e)?Ar.push(e):Ar=[e])},Er.toLastGrid=function(){if(1===Ar.length)return;Ar.pop();let e=Ar.pop();Er.toGrid(e)};let xr={},Dr=null;xr.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(Dr),Dr=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(132),n(134),n(136);let Rr={init:function(){It.global.onAnyKey((e,t,n)=>{if(n.ctrlKey&&n.shiftKey&&39===e){let e=m.getSavedUsers(),t=ut.getCurrentUser(),n=e.indexOf(t);n=n+1{e()}));function e(){navigator.serviceWorker.register("./serviceWorker.js").then(e=>{let t=!1;setInterval(()=>{log.info("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&&Ft.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()}})})})}}(),Ta.ping(),xr.init(),Rr.init();let t=m.getLastActiveUser(),n=m.getAutologinUser();m.getUserMajorModelVersion(n)>a.getLatestModelVersion().major&&(log.info(`data model version of user "${n}" is newer than version of running AsTeRICS Grid -> prevent autologin.`),n=null,m.setAutologinUser("")),log.info("autologin user: "+n),oe.isDemoMode()?(e.push(Ta.registerOffline(i.LOCAL_DEMO_USERNAME,i.LOCAL_DEMO_USERNAME)),m.setAutologinUser("")):e.push(Ta.loginStoredUser(n,!0)),Promise.all(e).finally(()=>{Ft.init();let e=n||oe.isDemoMode(),i=t||m.getSavedUsers().length>0;m.setLastActiveUser(n||t||"");let a=location.hash||(e?"#main":i?"#login":"#welcome");Er.isInitialized()||Er.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 f3ae4fa66..ff5b3262f 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 r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,i.emitWarning(r)}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 r,a,o,s,l,c,u,d=[],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(r=0,a=n._listeners.length;r0&&r._listeners.length>this._maxListeners&&(r._listeners.warned=!0,u.call(this,r._listeners.length,a))):r._listeners=t,!0;a=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 r=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function a(){return 0==--t&&r.off(e,a),n.apply(this,arguments)}return a._origin=n,this._on(e,a,i),r},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,r,a,o=arguments.length;if(this._all&&this._all.length){if(a=this._all.slice(),o>3)for(t=new Array(o),r=0;r3)for(t=new Array(o-1),r=1;r3)for(t=new Array(s),r=1;r3)for(t=new Array(s-1),r=1;r0&&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 r="string"==typeof e?e.split(this.delimiter):e.slice();i=f.call(this,null,r,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[r]),0===Object.keys(o).length&&delete t[r])}}}(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(137);"string"==typeof i&&(i=[[e.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,r);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={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_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"};i.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===i.ENVIRONMENT,i.IS_ENVIRONMENT_PROD=!i.IS_ENVIRONMENT_DEV,i.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),i.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var r={},a=100,o=JSON.parse(i.MODEL_VERSION),s={major:null,minor:null,patch:null};r.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+a++},r.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},r.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},r.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},r.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)},r.getModelVersionString=function(){return i.MODEL_VERSION},r.getModelVersionObject=function(e){if(!e)return s;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:s},r.getLatestModelVersion=function(){return o};var l=window.Model;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n0}}],[{key:"getModelName",value:function(){return"InputEventARE"}}]),n}(l({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[l.Array(String)],areURL:[String]}));function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);nn[e].toLowerCase()?1:-1})),ee=e),Q},J.translate=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i-1){var r=e.split(" // "),a="en"===n[0]||"de"===n[0]?n[0]:J.getBrowserLang(),o=Z.indexOf(a);return o=o>0?o:0,n.forEach((function(e){r[o]=r[o].replace("{?}",e)})),r[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},J.getTranslation=function(e,t,n){if(!e)return"";if(t=t||"en","string"==typeof e)return e;var i=J.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 r=Object.keys(e);return e[r[0]]?n?{lang:r[0],text:e[r[0]]}:e[r[0]]:n?{lang:void 0,text:""}:""},J.getTranslationObject=function(e,t){t=t||J.getBrowserLang(),e=J.translate(e,t);var n={};return n[t]=e,n},J.setLanguage=function(e){X=e,q&&q.changeLanguage(e),B.save("CUSTOM_LANGUAGE_KEY",X),W()(document).trigger(i.EVENT_LANGUAGE_CHANGE)},J.getCustomLanguage=function(){return X},J.translations={},J.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",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",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",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event"},J.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",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",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",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event"};var te=n(7),ne=n.n(te),ie={},re="20px";function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oe(e,t){for(var n=0;na.height/3&&(re=.3*a.height),1===n.length&&"ELEMENT_TYPE_NORMAL"===i&&(re*=2),re+"px"},ie.adaptFontSize=function(e){for(var t=0;t\n \n ')},fe.getGridItem=function(e,t){switch(e.type){case wt.ELEMENT_TYPE_COLLECT:return function(e){e=pe(e);var t=J.getTranslation(e.label);return'\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • ')}(e);case wt.ELEMENT_TYPE_PREDICTION:return function(e){e=pe(e);var t=J.getTranslation(e.label);return'\n
  • \n
    \n
    ').concat(t,"
    \n
    \n
  • ")}(e);default:return function(e,t){e=pe(e);var n="",i="",r="font-size:"+ie.getLastFontSize()+";",a="1%",o=J.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):(r+="flex: 1 1 auto;",a="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===de.getModelName()})).length>0?'':"";return''.concat(t+" "+n,"")}(e),"\n
    \n
  • ")}(e,t)}};var ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(n,e);var t=ge(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=r.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||r.generateId(n.getIdPrefix()),a}return function(e,t,n){t&&me(e.prototype,t),n&&me(e,n)}(n,null,[{key:"getModelName",value:function(){return"GridImage"}},{key:"getIdPrefix",value:function(){return"grid-image"}}]),n}(l({id:String,modelName:String,modelVersion:String,data:[String],author:[String],authorURL:[String]}));function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function we(e,t){for(var n=0;n=i)return"break";var a=t.reduce((function(t,n){return t&&(r>=n.y+n.height||e>=n.x+n.width)}),!0);a&&(i=e+r),n.push({x:e,y:r,sum:e+r,valid:a})},a=0;a<10;a++){if("break"===r(a))break}},a=0;a<10;a++)r(a);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()}},Ut.getFreeCoordinates=function(e){for(var t=new cn({},e),n={},i=0;i0}))}(n,i).length>0;var n,i})),a=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===de.getModelName()})))}),[]).map((function(e){return e.toGridId}))}(t).indexOf(e.id)})),o={grid:t,parents:r,children:a,navCount:r.length+a.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};var Ht=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ft(e,t)}(n,e);var t=$t(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=r.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||r.generateId(n.getModelName().toLowerCase()),a}return function(e,t,n){t&&jt(e.prototype,t),n&&jt(e,n)}(n,null,[{key:"getModelName",value:function(){return"EncryptedObject"}}]),n}(l({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]}));Ht.defaults({modelVersion:i.MODEL_VERSION});var zt={},Wt=["thumbnail"];zt.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===Wt.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 r=0;r1?i[0]:i;"string"==typeof e?i?r&&"function"!=typeof r?Yt.warn("object type has to be a constructor function or empty, aborting."):a&&a.isShortVersion?Yt.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],r&&(n[e]=r)):Yt.warn("cache-values has to be set, aborting."):Yt.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"==typeof e){if(!t[e])return null;var r=JSON.parse(t[e]),a=n[e];return r instanceof Array?r.map((function(e){return i(a,e)})):i(a,r)}Yt.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?(Yt.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 Xt={},qt=null,Zt=null,Qt=!1,en=new Jt;function tn(){if(!Zt||!qt){var e="using encryptionService uninitialized is not possible, aborting...";throw Yt.error(e),e}}function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rn(e,t){for(var n=0;n1?i:i[0]},Xt.encryptString=function(e,t){t||tn();return(t=t||Zt)&&!Qt?Kt.encrypt(t,e,{iter:1e3}):e},Xt.decryptString=function(e,t){if(t||tn(),en.has(e))return Yt.debug("using decryption cache..."),en.get(e);t=t||Zt;var n=null;(new Date).getTime();if(t&&!Qt)n=Kt.decrypt(t,e);else try{n=e;var i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=Kt.decrypt(t,e))}catch(i){n=Kt.decrypt(t,e)}return en.set(e,n),n},Xt.getStringHash=function(e){var t=Kt.hash.sha256.hash(e);return Kt.codec.hex.fromBits(t)},Xt.getUserPasswordHash=function(e){return Xt.getStringHash("STATIC_USER_PW_SALT"+e)},Xt.setEncryptionProperties=function(e,t,n){e=e||"",qt=t,Zt=Xt.getStringHash(""+qt+e),Qt=n,en.clearAll(),Yt.debug("new encryption key is: "+Zt)},Xt.resetEncryptionProperties=function(){Yt.debug("reset encryption properties..."),qt=null,Zt=null,Qt=!1};var cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&an(e,t)}(n,e);var t=on(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=r.setDefaults(e,i,n))&&(e.id=e.id?e.id:r.generateId(n.getIdPrefix())),(a=t.call(this,e)).minColumnCount=e.minColumnCount||a.getWidth()||B.getLastGridDimensions().minColumnCount||4,a.rowCount=e.rowCount||a.getHeight()||B.getLastGridDimensions().rowCount||3,a.id=a.id||r.generateId("grid-data"),a}return function(e,t,n){t&&rn(e.prototype,t),n&&rn(e,n)}(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))})),Xt.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=Ut.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}},{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===wt.ELEMENT_TYPE_NORMAL}))).map((function(e){return e.id})),r=i.indexOf(e);if(-1===r)return i[0];var a=r+(t?-1:1);return i[a=(a=a>i.length-1?0:a)<0?i.length-1:a]}},{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===$e.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=r.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}(l({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:l.Array(wt),additionalFiles:[l.Array(It)],webRadios:[l.Array(Pt)],thumbnail:[Object]}));cn.defaults({id:"",modelName:cn.getModelName(),modelVersion:i.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:J.getBrowserLang()});var un={},dn=!1,fn=!1;function pn(e){return new URLSearchParams(window.location.search).has(e)}function hn(e){return new URLSearchParams(window.location.search).get(e)}function mn(e){return"false"===hn(e)}un.isDemoMode=function(){return dn=dn||pn("demo"),function(e){if(!pn(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)}}("demo"),dn},un.isScanningEnabled=function(){return pn("scanning")&&!mn("scanning")},un.isDirectionEnabled=function(){return pn("direction")&&!mn("direction")},un.isHuffmanEnabled=function(){return pn("huffman")&&!mn("huffman")},un.shouldResetDatabase=function(){var e=!fn&&(un.isDemoMode()||"true"===hn("reset"));return fn=!0,e},un.getDefaultGridsetName=function(){return hn("default")};var vn=n(8),gn=n.n(vn),_n={};function bn(e,t,n){if(!e)return e;var i=e instanceof Array;e=i?e:[e];for(var a=function(i){n(r.getModelVersionObject(e[i].modelVersion)).forEach((function(n){e[i]=n(e[i],t)}))},o=0;o0&&(t=(n=e.change.docs.filter((function(e){return!!w(e)&&!function(e){return h[w(e)]&&E(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)),!f&&(t.length>0||n.length>0)&&a(t,n)}catch(e){log.error(e)}}function y(e){e&&e.length>0&&e.forEach((function(e){var t=w(e),n=E(e);(!h[t]||h[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&&r?Nn.set(t,r):!t&&e&&r&&Nn.set(e,r),i(r)})).catch((function(e){log.error(e),r()})).finally((function(){Ln()}))}))},Sn.save=function(e,t){return log.debug("saving "+e+"..."),kn(),t.id&&(Nn.clear(t.id,t),Nn.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();Tn.put(t).then((function(i){t._rev=i.rev,Nn.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()})).catch((function(e){t.id&&Nn.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(){Ln()}))}))},Sn.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();kn(),Nn.clearAll();var t=Tn.bulkDocs(e);return t.finally((function(){Ln()})),t},Sn.remove=function(e){var t=On();return Sn.all(null,e).then((function(e){return Nn.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)}))},Sn.resetDatabase=function(e){return Sn.isUsingLocalDb()&&Sn.getOpenedDatabaseName()===i.LOCAL_DEMO_USERNAME?(Nn.clearAll(),new Promise((function(t){Tn.destroyDb(e).then((function(){Tn=null,Sn.initDatabase(e).then((function(){return t()}))})).catch((function(e){log.error("error destroying database: "+e)}))}))):Promise.reject("do not destroy!")},Sn.deleteDatabase=function(e){if(Sn.getOpenedDatabaseName()===e&&!Sn.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();Nn.clearAll();var t=[];return Sn.getOpenedDatabaseName()===e&&t.push(Sn.closeCurrentDatabase()),Promise.all(t).then((function(){return new gn.a(e).destroy()}))},Sn.closeCurrentDatabase=function(){if(!Tn)return Promise.resolve();kn();var e=Tn.close();return Tn=null,e},Sn.getOpenedDatabaseName=function(){return Tn?Tn.getOpenedDatabaseName():null},Sn.isUsingLocalDb=function(){return Tn?Tn.isUsingLocalDb():null},Sn.getSyncState=function(){return Tn?Tn.getSyncState():null},Sn.isSyncEnabled=function(){return Tn?Tn.isSyncEnabled():null};var jn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mn(e,t)}(n,e);var t=Pn(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=r.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||r.generateId(n.getIdPrefix()),a}return function(e,t,n){t&&Rn(e.prototype,t),n&&Rn(e,n)}(n,[{key:"clone",value:function(){var e=new n(this);return delete e._id,delete e._rev,e.id=r.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}}],[{key:"getModelName",value:function(){return"Dictionary"}},{key:"getIdPrefix",value:function(){return"dictionary"}}]),n}(l({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]}));jn.defaults({id:"",modelName:jn.getModelName(),modelVersion:i.MODEL_VERSION,data:JSON.stringify({})});var Fn={};Fn.createItem=function(e,t){if(!e)throw'parameter "word" must be specified.';var n,i=parseInt(t),r={w:e,f:0,t:{}};return(n=i)==parseInt(n)&&(r.r=i),r};var $n=Fn;var Bn=function(){var e=this,t={},n=null,i=null;function r(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 a(e){var t=r(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]=$n.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 r=t[i];Object.keys(r.t).forEach((function(t){(n?e.toUpperCase()===t.toUpperCase():e===t)&&delete r.t[t]}))}}))},e.contains=function(e,n){return n?!!t[e]:!!a(e)},e.predictCompleteWord=function(r,a){r=r||"",a=a||{};var o=[];if(Object.keys(t).forEach((function(e){0===e.toLowerCase().indexOf(r.toLowerCase())&&o.push(t[e])})),0===o.length&&r.length>1){var s=null;return(s=n&&i&&0===r.indexOf(n)?i:e.predictCompleteWord(r.substring(0,r.length-1),a)).forEach((function(e){e.fuzzyMatch=!0})),s}return n=r,i=o.map((function(e){return{word:e.w,frequency:e.f,rank:e.r}}))},e.predictNextWord=function(e,t){var n=r(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 r=a(n),o=a(t);o.f++,r&&r.t&&(r.t[o.w]?r.t[o.w]++:r.t[o.w]=1)}},e.getWords=function(){return Object.keys(t)}};function Vn(){this.DEFAULT_DICTIONARY_KEY="DEFAULT_DICTIONARY_KEY";var e=this,t={},n=null;function i(n,i,r){var a=[];(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"===r?o.predictNextWord:"PREDICT_METHOD_COMPLETE_WORD"===r?o.predictCompleteWord:null;s=s||(zn(n)?o.predictNextWord:o.predictCompleteWord),a=a.concat(s(Hn(n),i))}})),a.sort((function(e,t){return e.fuzzyMatch!==t.fuzzyMatch?e.fuzzyMatch?1:-1:e.frequency!==t.frequency?e.frequency0&&(!zn(c)||new RegExp("[\\.\\?!,]").test(c[c.length-1]))&&(c+=" "),o||e.learn(n,a?l:s,r),c+n+" "},this.learn=function(n,i,r){n=Wn(n),i=Wn(i);var a=e.getDictionaryKeys(!0);if(r=1===a.length?a[0]:r,a.length>0&&(!r||!t[r])){var o=0;a.forEach((function(t){var a=0;e.hasWord(n,t)&&(a+=2),e.hasWord(i,t)&&a++,a>0&&a>=o&&(o=a,r=t)}))}r=r||e.DEFAULT_DICTIONARY_KEY,t[r]||e.addDictionary(r),Object.keys(t).forEach((function(e){var a=t[e];a.disabled||a.learn(n,i,r===e)}))},this.learnFromInput=function(t,i){if(zn(t)){var r=Hn(t,2),a=Hn(t,3);if(r&&r!==n)return n=r,e.learn(r,a,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(" "),r=0;r-1&&Yn.init(Xn)}));var ni={},ii={},ri={},ai="";ni.DEFAULT_KEY="DEFAULT_KEY",ni.DEFAULT_KEY2="DEFAULT_KEY2",ni.debounce=function(e,t,n){n=n||ni.DEFAULT_KEY,e||t?(ii[n]&&clearTimeout(ii[n]),ii[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},ni.clearDebounce=function(e){e=e||ni.DEFAULT_KEY,ii[e]&&clearTimeout(ii[e])},ni.throttle=function(e,t,n,i){if(e&&e.apply){n=n||500;var r=i||e,a=ri[r];(!a||(new Date).getTime()-a>n)&&(e.apply(null,t),ri[r]=(new Date).getTime())}},ni.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";ai=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},ni.appendToClipboard=function(e){ni.copyToClipboard(ai+e)},ni.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)}))},ni.getElement=function(e,t,n){var i=document.elementsFromPoint(t,n),r=null;return i.forEach((function(t){r=r||function(e,t){for(var n=0;e&&-1===t.indexOf(e)&&n<100;n++)e=e.parentElement;return e}(t,e)})),r},ni.splitInChunks=function(e,t){for(var n=[],i=0,r=e.length;i1&&r.push(function(e,t){log.warn("fixing duplicated metadata...");var n=null;return Sn.all().then((function(i){var r=[];n=t.map((function(e){return e.id}));var a=[];i.forEach((function(t){r.push(function t(n,i){var r=JSON.parse(JSON.stringify(i));try{return Xt.decryptObjects(n)}catch(i){if(0===r.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return Xt.setEncryptionProperties(e,r.pop()),t(n,r)}}(t,n))}));var o=n.pop();return Xt.setEncryptionProperties(e,o),log.warn("keeiping metadata: "+o),log.warn("decrypted docs:"),log.warn(r),log.warn("re-encrypting and saving them..."),r.forEach((function(e){var t=fi(e.modelName,e);a.push(t)})),Promise.all(a)})).then((function(){var e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach((function(t){e.push(Sn.remove(t))})),Promise.all(e)})).then((function(){return log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()}))}(e,t))):(i=new P,Xt.setEncryptionProperties(e,i.id,n),r.push(fi(P.getIdPrefix(),i))),Promise.all(r)})).then((function(){return Sn.all(jn.getIdPrefix()).then((function(e){return e?Promise.resolve():new Promise((function(e){log.info("importing dictionary: "+ci),W.a.get(ci).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 jn({dictionaryKey:ui,data:e,isDefault:!0});return fi(jn.getIdPrefix(),t)}))}))).then((function(){li=null,Yn.init()})),si}function fi(e,t){return new Promise((function(n,i){var r=_n.convertLiveToDatabaseObjects(t);Sn.save(e,r).then((function(){log.debug("saved "+e+", id: "+t.id),n()})).catch((function(e){i(e)}))}))}oi.getObject=function(e,t,n){return new Promise((function(i,r){si.then((function(){if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),r();Sn.all(e.getIdPrefix(),t).then((function(t){var r={objectType:e,onlyShortVersion:n},a=_n.convertDatabaseToLiveObjects(t,r),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}(a);o&&li!==o&&(li=o,B.setUserModelVersion(Sn.getOpenedDatabaseName(),o)),i(a)})).catch((function(e){r(e)}))}))}))},oi.getSingleObject=function(e,t,n){return oi.getObject(e,t,n).then((function(e){return Promise.resolve(e instanceof Array?e[0]:e)}))},oi.saveObject=function(e,t,n){return si.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()+"..."),oi.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 r=new e(t,i),a=JSON.parse(JSON.stringify(r));return a._id=i._id,a._rev=i._rev,fi(e.getIdPrefix(),a)}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,fi(e.getIdPrefix(),o)}))},oi.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(_n.convertLiveToDatabaseObjects(e).forEach((function(e){e._id=e.id})),t>1e3){var r=Math.floor(1e3/n);i=ni.splitInChunks(e,r)}else i=[e];return function e(t){var n=JSON.parse(JSON.stringify(t.shift()));return Sn.bulkDocs(n).then((function(){return t.length>0?e(t):Promise.resolve()}))}(i)},oi.bulkDelete=function(e){return e.forEach((function(e){e._deleted=!0,e._id=e.id})),Sn.bulkDocs(JSON.parse(JSON.stringify(e)))},oi.removeObject=function(e){return Sn.remove(e)},oi.initForUser=function(e,t,n,i){var r=n&&!i||!1,a=Sn.getOpenedDatabaseName()===e,o=-1!==B.getSavedLocalUsers().indexOf(e);return a&&r===Sn.isSyncEnabled()?Promise.resolve():Sn.initDatabase(e,n,i).then((function(){return a?Promise.resolve():di(t,e,o)}))},oi.registerForUser=function(e,t,n,i){var r=n&&!i,a=-1!==B.getSavedLocalUsers().indexOf(e);return Sn.getOpenedDatabaseName()===e&&r===Sn.isSyncEnabled()?Promise.resolve():Sn.createDatabase(e,n,i).then((function(){return di(t,e,a)}))},oi.deleteDatabase=function(e){if(e)return Sn.deleteDatabase(e)},oi.closeCurrentDatabase=function(){return Sn.closeCurrentDatabase()},oi.getCurrentUsedDatabase=function(){return Sn.getOpenedDatabaseName()};var pi={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 r=document.createElement("canvas"),a=1;e.width>t&&(a=t/e.width),r.width=e.width*a,r.height=e.height*a,r.getContext("2d").drawImage(e,0,0,r.width,r.height);try{return r.toDataURL(i,n)}catch(e){throw"image converting failed!"}},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])}}))},convertBase64:function(e,t,n){return new Promise((function(i,r){if(!e)return i(null);if("image/svg+xml"===e.substring(5,e.indexOf(";")))return i(e);t=t||150;var a=document.createElement("img");a.onload=function(){try{i(pi.getBase64FromImg(a,t,n))}catch(e){i(null)}},a.src=e}))},urlToBase64:function(e){return new Promise((function(t,n){if(e.lastIndexOf(".svg")===e.length-4)$.get(e,null,(function(e){try{e.documentElement.width.baseVal.value=e.documentElement.width.baseVal.value||500,e.documentElement.height.baseVal.value=e.documentElement.height.baseVal.value||500;var n=btoa((new XMLSerializer).serializeToString(e));t("data:image/svg+xml;base64,"+n)}catch(e){t(null)}})).fail((function(){t(null)}));else{var i=new Image;i.crossOrigin="anonymous",i.onload=function(){try{t(pi.getBase64FromImg(i,1e3))}catch(e){t(null)}},i.onerror=function(){t(null)},i.src=e}}))},getScreenshot:function(e){return n.e(3).then(n.t.bind(null,240,7)).then((function(t){return t.default(document.querySelector(e),{scale:.2,logging:!1,ignoreElements:function(e){return i.IS_FIREFOX&&-1!==e.style["background-image"].indexOf("image/svg")}}).then((function(e){return Promise.resolve(e.toDataURL())}))}))},getEmptyImage:function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}},hi={};hi.gridDataToOBF=function(e){},hi.gridSetToOBZ=function(e){},hi.OBFToGridData=function(e,t){var n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():J.getBrowserLang(),r=new cn({obfId:e.id,label:J.getTranslationObject(e.name,i),locale:i,rowCount:e.grid.rows,minColumnCount:e.grid.columns,gridElements:[]});return e.buttons.forEach((function(a){if(!a.hidden){var o=function(e,t){var n=t.grid.order,i=null;return n.forEach((function(t,n){t.forEach((function(t,r){t===e&&(i={x:r,y:n})}))})),i}(a.id,e),s=new wt({width:1,height:1,label:J.getTranslationObject(a.label,i),x:o.x,y:o.y,backgroundColor:a.background_color});(s=function(e,t,n,i){t.vocalization&&(e.actions=e.actions.filter((function(e){return e.modelName!==Ae.getModelName()})),e.actions.push(new Re({speakText:t.vocalization,speakLanguage:n.locale})));if(t.load_board&&t.load_board.path){var r=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);r&&e.actions.push(new de({toGridId:r}))}return e}(s,a,e,t)).actions.filter((function(e){return e.modelName===Ae.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],r=null,a=[];if(!i)return Promise.resolve(null);if(i.data)r=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];r=l+c}else i.url&&a.push(pi.urlToBase64(i.url).then((function(e){return r=e,Promise.resolve()})));return Promise.all(a).then((function(){return r?Promise.resolve(new ye({data:r})):(log.info("failed to import image: "+e),Promise.resolve(null))}))}(a.image_id,e,t).then((function(e){return s.image=e,Promise.resolve()}))),r.gridElements.push(s)}})),Promise.all(n).then((function(){return Promise.resolve(r)}))},hi.OBZToGridSet=function(e){var t=[],n=[];return Object.keys(e).forEach((function(i){-1!==i.indexOf(".obf")&&t.push(hi.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===de.getModelName()){var i=t.toGridId,r=n.reduce((function(e,t){return e||(t.obfId===i?t.id:null)}),null);r?t.toGridId=r:e.actions=e.actions.filter((function(e){return e.id!==t.id}))}}))}))})),n.forEach((function(e){delete e.obfId})),Promise.resolve(n)}))};var mi={readZip:function(e,t){var i={};return new Promise((function(r){Promise.all([n.e(2),n.e(0)]).then(n.t.bind(null,241,7)).then((function(n){n.loadAsync(e).then((function(e){var n=[];Object.keys(e.files).forEach((function(r){var a=e.files[r];n.push(a.async("base64").then((function(e){try{i[r]=t?JSON.parse(atob(e)):e}catch(t){i[r]=e}})))})),Promise.all(n).then((function(){r(i)}))}))}))}))}},vi={},gi=null,_i=null,bi=[];vi.setProgress=function(e,t){gi=Math.round(100*t),_i=e,bi.forEach((function(e){e(_i,gi)}))},vi.register=function(e){bi.push(e)},vi.clearHandlers=function(){bi=[]};var yi={},Ei="app/examples/default.grd.json";un.getDefaultGridsetName()&&(Ei="app/examples/"+un.getDefaultGridsetName()),yi.getGrid=function(e,t){return e?oi.getSingleObject(cn,e,t).then((function(e){return Promise.resolve(e?new cn(e):null)})):Promise.resolve(null)},yi.getGlobalGrid=function(e){return yi.getMetadata().then((function(t){return t.globalGridId&&(e||t.globalGridActive)?yi.getGrid(t.globalGridId).then((function(e){return Promise.resolve(e)})):Promise.resolve(null)}))},yi.getGrids=function(e,t){return new Promise((function(n){oi.getObject(cn,null,!e).then((function(e){if(e){var i=e instanceof Array?e:[e];t?yi.getMetadata().then((function(e){n(i.filter((function(t){return t.id!==e.globalGridId})))})):n(i)}else n([])}))}))},yi.saveGrid=function(e){return e.gridElements=Ut.sortGridElements(e.gridElements),oi.saveObject(cn,e)},yi.saveGrids=function(e){return e.forEach((function(e){e.gridElements=Ut.sortGridElements(e.gridElements)})),oi.bulkSave(e)},yi.updateGrid=function(e,t){return t.id=e,t.gridElements=Ut.sortGridElements(t.gridElements),oi.saveObject(cn,t,!0)},yi.deleteGrid=function(e){return oi.removeObject(e)},yi.deleteAllGrids=function(){return yi.getGrids().then((function(e){return e&&0!==e.length?oi.bulkDelete(e):Promise.resolve()})).then((function(){return e="",yi.getMetadata().then((function(t){return t.globalGridId=e,t.globalGridActive=!!e,yi.saveMetadata(t)}));var e}))},yi.importDefaultGridset=function(){return Promise.resolve().then((function(){return W.a.get(Ei)})).then((function(e){if(!e)return Promise.resolve();log.info("importing default grid set "+Ei);try{e=JSON.parse(e)}catch(e){}return yi.importData(e,!1,!0)}))},yi.saveAdditionalGridFiles=function(e,t){return new Promise((function(n){t||n(),yi.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)})),yi.saveGrid(e).then((function(){n()}))}))}))},yi.getGridElement=function(e,t){return new Promise((function(n){yi.getGrid(e).then((function(e){var i=e.gridElements.filter((function(e){return e.id===t}))[0];i?n(i):yi.getGlobalGrid().then((function(e){n(e.gridElements.filter((function(e){return e.id===t}))[0])}))}))}))},yi.getGridsAttribute=function(e){return new Promise((function(t){yi.getGrids().then((function(n){var i={};n.forEach((function(t){i[t.id]=t[e]})),t(i)}))}))},yi.addGridElements=function(e,t){return new Promise((function(n){yi.getGrid(e).then((function(i){(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),yi.updateGrid(e,i).then((function(){n()}))}))}))},yi.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise((function(n){yi.getMetadata().then((function(i){if(i){var r=i instanceof Array?i[0].id:i.id;e.id=r,B.saveLocalMetadata(e),B.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():oi.saveObject(P,e).then((function(){n()}))}))}))},yi.getMetadata=function(){return new Promise((function(e){oi.getObject(P).then((function(t){var n=null;if(n=t?t instanceof Array?t[0]:t:new P,!B.shouldSyncNavigation()){var i=B.getLocalMetadata();i&&(n.locked=i.locked,n.fullscreen=i.fullscreen,n.lastOpenedGridId=i.lastOpenedGridId)}e(new P(n))}))}))},yi.saveImage=function(e){return t=ye,n=e,i=[],new Promise((function(e,a){yi.getMetadata().then((function(o){if(!o||!o.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void a();var s=null;o.hashCodes[t.getModelName()]?s=o.hashCodes[t.getModelName()]:(s={},o.hashCodes[t.getModelName()]=s);var l=r.hashCode(n);s[l]?(log.debug("saveHashedItemInternal: hash found, not saving new element"),n.id=s[l]):(log.debug("saveHashedItemInternal: hash not found, saving new element"),s[l]=n.id,i.push(oi.saveObject(t,n)),i.push(oi.saveObject(P,o))),Promise.all(i).then((function(){e(n.id)}))}))}));var t,n,i},yi.getImage=function(e){return oi.getObject(ye,e)},yi.getDictionary=function(e){return e?oi.getSingleObject(jn,e).then((function(e){return Promise.resolve(new jn(e))})):Promise.resolve(null)},yi.getDictionaries=function(){return new Promise((function(e){oi.getObject(jn).then((function(t){if(t){var n=t instanceof Array?t.map((function(e){return new jn(e)})):[new jn(t)];e(n)}else e([])}))}))},yi.saveDictionary=function(e){return e.isDefault=!1,oi.saveObject(jn,e)},yi.deleteObject=function(e){return oi.removeObject(e)},yi.downloadSingleGrid=function(e){yi.getGrid(e).then((function(e){if(e){var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});ne.a.saveAs(t,J.getTranslation(e.label)+".grd")}}))},yi.downloadBackup=function(){var e={},t=[];t.push(yi.getMetadata().then((function(t){return e.metadata=t,Promise.resolve()}))),t.push(yi.getDictionaries().then((function(t){return t.reduce((function(e,t){return e&&t.isDefault}),!0)||(e.dictionaries=t),Promise.resolve()}))),t.push(yi.getGrids(!0).then((function(t){return e.grids=t,Promise.resolve()}))),Promise.all(t).then((function(){var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});ne.a.saveAs(t,"my-backup.grd")}))},yi.downloadAllGridsSimple=function(){yi.getGrids(!0).then((function(e){e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:zt.removeLongPropertyValues(e)})))}))},yi.importGridsFromFile=function(e,t){var n=e.name.substring(e.name.length-4),i=!1;return new Promise((function(r,a){var o=new FileReader;o.onload=function(a){var o=a.target.result,s=[];t&&(vi.setProgress(J.translate("Deleting grids // Grids werden gelöscht")),s.push(yi.deleteAllGrids())),Promise.all(s).then((function(){var a=null,s=[];if(vi.setProgress(J.translate("Reading grids from file // Grids werden aus Datei gelesen")),".grd"===n)a=JSON.parse(o);else if(".obf"===n)s.push(hi.OBFToGridData(JSON.parse(o)).then((function(e){return a=e,Promise.resolve()})));else if(".obz"===n){var l=mi.readZip(e,!0).then((function(e){return hi.OBZToGridSet(e)})).then((function(e){return a=e,t&&(i=!0),Promise.resolve()}));s.push(l)}Promise.all(s).then((function(){vi.setProgress(J.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),yi.importData(a,i,t).then((function(){r()}))}))}))},o.readAsText(e)}))},yi.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();var i=null,a=null,o=null,s=[];return e instanceof Array?o=_n.updateDataModel(e):(i=n?_n.updateDataModel(e.dictionaries):null,a=n?_n.updateDataModel(e.metadata):null,o=_n.updateDataModel(e.grids),i||a||o||!e.id||(o=[_n.updateDataModel(e)])),(a?Promise.resolve(a):yi.getMetadata()).then((function(e){return o&&s.push(yi.getGrids().then((function(n){var i=n.map((function(e){return J.getTranslation(e.label)})),s=null,l=Ut.regenerateIDs(o);o=l.grids,a&&(e.lastOpenedGridId=l.idMapping[e.lastOpenedGridId],e.globalGridId=l.idMapping[e.globalGridId]),o.forEach((function(e){var t=J.getTranslation(e.label);e.label[J.getBrowserLang()]=r.getNewName(t,i)}));var c=o[0]?o[0].locale:null;if(t){var u=o[0].id;s=Ut.generateGlobalGrid(u,c),o.unshift(s),e.globalGridId=s.id,e.globalGridActive=!!e.globalGridId}return yi.saveGrids(o).then((function(){return yi.saveMetadata(e,!0)}))}))),i&&s.push(yi.getDictionaries().then((function(e){return oi.bulkDelete(e)})).then((function(){return i=i.map((function(e){return delete e.id,delete e._id,delete e._rev,new jn(e)})),oi.bulkSave(i).then((function(){return Yn.init(),Promise.resolve()}))}))),Promise.all(s)}))},yi.getSyncState=function(){return Sn.getSyncState()},yi.getCurrentUser=function(){return oi.getCurrentUsedDatabase()};var wi={},Ci="#asterics-grid-user-documentation",Si="",Ti=Ci,Ni=Si,Ai=Ti;wi.setHelpLocation=function(e,t){Ni=Si,Ai=Ti,Si=e,Ti=t||""},wi.setHelpLocationIndex=function(){wi.setHelpLocation("",Ci)},wi.revertToLastLocation=function(){wi.setHelpLocation(Ni,Ai)},wi.openHelp=function(){var e="https://www.asterics.eu/manuals/asterics-grid/"+(Si?Si+".html"+Ti:Ti);J.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(),wi.openHelp())}));var Oi=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(" "),n("div",{staticStyle:{width:"100%","text-align":"center","font-size":"2em","margin-top":"1em"}},[e.progressText?n("span",[e._v(e._s(e.progressText)+" ...")]):e._e()])]),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._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()],1)])};Oi._withStripped=!0;var Ii=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.png",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()};Ii._withStripped=!0;var ki=n(3),Li={},xi={},Di=null,Ri=!1;function Mi(e){null!==xi[e]&&(xi[e].close(),xi[e]=null,log.debug("SSE closed."))}function Pi(e){for(var t="",n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);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},Li.getTypeId=function(e,t){var n=window.atob(t);return W()(n).find('components component[id="'+e+'"]').attr("type_id")},Li.getComponentDescriptorsAsXml=function(e){return new Promise((function(t,n){W.a.ajax({type:"GET",url:Li.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)}})}))},Li.getPossibleEvents=function(e,t,n){return new Promise((function(i){Li.getComponentDescriptorsAsXml(n).then((function(n){var r=Li.getTypeId(e,t),a=W()(n).find('componentType[id="'+r+'"] eventListenerPort').map((function(){return this.id})).get();i(a)}))}))},Li.subscribeEvents=function(e,t,n){if("undefined"!=typeof EventSource){var i=Li.getRestURL(e);xi[i]||(xi[i]=new EventSource(i+"runtime/model/channels/event/listener"),xi[i].onopen=function(e){log.debug("SSE opened."),Ri=!0},xi[i].onerror=function(r){Mi(i),n&&n(r),Ri&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),Di=setTimeout((function(){Di=null,Li.subscribeEvents(e,t,n)}),3e3))}),xi[i].addEventListener("event",(function(e){t(e.data,200)}),!1)}else log.warn("SSE not supported by browser")},Li.unsubscribeEvents=function(e){Di&&clearTimeout(Di),Ri=!1,e?Mi(e):Object.keys(xi).forEach((function(e){Mi(e)}))};var ji={},Fi=[],$i={},Bi=0;function Vi(){var e={},t=null,n=null,i=[],r=[],a=[],o=[],s=[],l=[],c=[],u=[],d=[],f=[],p={},h=document.body,v=!1,g={},_=Bi++;function b(e,t){Li.subscribeEvents(e.areURL,(function(n){e.eventNames.indexOf(n)>-1&&t()}))}function y(t,n){if(t&&t.keyCode&&n){var i=t.keyCode+"",r=p[i]?p[i]:[];return p[i]=r,r.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)&&D(i)}function C(e){D(l,[e],!0),n&&t?e.touches[0].clientY>n+100?(log.debug("swipe down."),n=null,D(a)):e.touches[0].clientYt+100?(log.debug("swipe right."),t=null,D(s)):e.touches[0].clientX0&&!e.repeat&&d.forEach((function(n){n(t,e.code,e)}));var n=t+"";if(p[n]){var i=function(e){e.lastAction=(new Date).getTime(),e.handler(),k(r)};if(e.preventDefault(),e.repeat)return;var r=p[n];(r=r.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,L(e.lastKeydown,e.inputEvent.timeout)&&(e.counter=0)})),r.forEach((function(e){var t=e.inputEvent;if(t.repeat&&1!==t.repeat||t.holdDuration||!L(e.lastAction,t.timeout))if(t.repeat>1){if(e.counter++,e.counter===t.repeat){var n=r.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)}))}(r),e.timeoutHandler=setTimeout((function(){i(e)}),n)}}else t.holdDuration&&(e.timeoutHandler=setTimeout((function(){i(e)}),t.holdDuration));else{var a=r.filter((function(t){return t!==e&&t.inputEvent.holdDuration})).length>0,o=r.filter((function(t){return t!==e&&t.inputEvent.repeat>1})),s=o.length>0,l=Math.max.apply(null,o.map((function(e){return e.counter})));if(a)e.doOnKeyup=function(){i(e)};else if(s&&l<1){var c=Math.max.apply(Math,Ui(o.map((function(e){return e.inputEvent.timeout}))));e.timeoutHandler=setTimeout((function(){i(e)}),c+10)}else s||i(e)}e.lastKeydown=(new Date).getTime()}))}}function A(e){if(!e.repeat){var t=(e.which||e.keyCode)+"";if(p[t]){var n=p[t];n.forEach((function(e){e.doOnKeyup&&(e.doOnKeyup(),k(n)),e.inputEvent.holdDuration&&I(e)}))}}}function O(){document.fullscreenElement||D(f)}function I(e){clearTimeout(e.timeoutHandler),e.timeoutHandler=null,e.doOnKeyup=null,e.counter=0}function k(e){e.forEach((function(e){return I(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((function(e){e.apply?n?e.apply(null,t):ni.throttle((function(){e.apply(null,t)})):log.warn("handler seems to be not a function!")}))}return e.startListening=function(){v||(v=!0,Object.keys(g).forEach((function(e){var t=g[e];b(t.inputEvent,t.fn)})),document.addEventListener("mousemove",E),document.addEventListener("keydown",N),document.addEventListener("keyup",A),document.addEventListener("fullscreenchange",O),h.addEventListener("touchmove",C,{passive:!1}),h.addEventListener("touchstart",T),h.addEventListener("touchend",S))},e.stopListening=function(){v=!1,Object.keys(g).forEach((function(e){var t=g[e];Li.unsubscribeEvents(t.areURL)})),document.removeEventListener("mousemove",E),document.removeEventListener("keydown",N),document.removeEventListener("keyup",A),document.removeEventListener("fullscreenchange",O),h.removeEventListener("touchmove",C),h.removeEventListener("touchstart",T),h.removeEventListener("touchend",S)},e.destroy=function(){e.stopListening(),Fi=Fi.filter((function(t){return t.getID()!==e.getID()}))},e.isListening=function(){return v},e.getID=function(){return _},e.onMouseUpperOrLeftBorder=function(e){return x(e,i)},e.onSwipedDown=function(e){return x(e,a)},e.onSwipedUp=function(e){return x(e,r)},e.onSwipedRight=function(e){return x(e,s)},e.onSwipedLeft=function(e){return x(e,o)},e.onEscape=function(e){return y(new m({keyCode:27}),e)},e.onAnyKey=function(e){return x(e,d)},e.onTouchMove=function(e){return x(e,l)},e.onTouchStart=function(e){return x(e,c)},e.onTouchEnd=function(e){return x(e,u)},e.onExitFullscreen=function(e){return x(e,f)},e.off=function(e){var t=function(t){return t!==e};i=i.filter(t),r=r.filter(t),a=a.filter(t),o=o.filter(t),s=s.filter(t),l=l.filter(t),c=c.filter(t),u=u.filter(t),d=d.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case m.getModelName():return y(e,t);case w.getModelName():g[e.id]={inputEvent:e,fn:t},v&&b(e,t)}},e}ji.instance=function(){var e=new Vi;return Fi.push(e),e},ji.pauseAll=function(){Fi.forEach((function(e){$i[e.getID()]=e.isListening(),e.stopListening()}))},ji.resumeAll=function(){Fi.forEach((function(e){$i[e.getID()]&&e.startListening()}))},ji.global=ji.instance();var Hi=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"}],attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],staticClass:"inline",attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),n("div",{staticClass:"inline",domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.actionLink?n("div",{staticClass:"inline"},[n("a",{staticStyle:{color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[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")])])};Hi._withStripped=!0;var zi={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null};var Wi={props:["fullHeader"],data:function(){return{tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:zi}},methods:{setTooltip:function(e,t){var n=this;n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(zi)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout((function(){n.clearTooltip()}),n.tooltipOptions.timeout)),this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink},clearTooltip:function(){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=B.get(B.get("WINDOW_SIZE_KEY"));B.save("WINDOW_SIZE_KEY",n),i&&n!==i&&o();var r=B.get("NOTIFICATION_BAR_STYLE_KEY"),a=B.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");r&&(e.setAttribute("style",r),e.style.display="none");a&&t.setAttribute("style",a);function o(){var n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),B.save("NOTIFICATION_BAR_STYLE_KEY",""),B.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}W()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){ni.debounce((function(){B.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),W()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",B.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){ni.debounce((function(){B.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),window.addEventListener("resize",(function(){ni.debounce((function(){o()}),300,"RESIZE_RESET_NOTIFICATIONBAR")}))}(),this},beforeDestroy:function(){}};n(49);function Ki(e,t,n,i,r,a,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),a&&(c._scopeId="data-v-"+a),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__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=l):r&&(l=s?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),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 Yi=Ki(Wi,Hi,[],!1,null,"7bec61b8",null);Yi.options.__file="src/vue-components/components/notificationBar.vue";var Ji=Yi.exports,Xi={},qi=null;Xi.setViewComponent=function(e,t){qi&&qi.$refs.notificationBar.tooltipOptions.closeOnNavigate&&Xi.clearTooltip(),qi.setComponent(e,t)},Xi.isSidebarOpen=function(){return qi.showSidebar},Xi.setTooltip=function(e,t){qi&&qi.$refs.notificationBar.setTooltip(e,t)},Xi.setTooltipI18n=function(e,t){var n=J.translate(e);Xi.setTooltip(n,t)},Xi.clearTooltip=function(){qi&&qi.$refs.notificationBar.clearTooltip()},Xi.init=function(){qi=new ki.a({el:"#app",components:{NotificationBar:Ji},data:function(){return{component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:oi.getCurrentUsedDatabase(),isLocalUser:B.isSavedLocalUser(oi.getCurrentUsedDatabase()),syncState:yi.getSyncState(),constants:i,tooltipHTML:null,actionLink:null}},methods:{setComponent:function(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar:function(){W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)},openSidebar:function(){W()(document).trigger(i.EVENT_SIDEBAR_OPEN)},openHelp:function(){wi.openHelp()},moreNavigation:function(){W.a.contextMenu("destroy"),W.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":xs.toRegister();break;case"CONTEXT_ADD_OFFLINE":xs.toAddOffline();break;case"CONTEXT_ABOUT":xs.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}),J.initDomI18n(),W()("#moreNavigation").contextMenu()}},mounted:function(){var e=this,t=this;function n(){!t.showSidebar&&oi.getCurrentUsedDatabase()&&(ni.closeFullscreen(),yi.getMetadata().then((function(e){e.fullscreen&&(e.fullscreen=!1,yi.saveMetadata(e).then((function(){t.openSidebar()})))})))}J.initDomI18n(),W()(document).on(i.EVENT_SIDEBAR_OPEN,(function(){if(!t.showSidebar)return oi.getCurrentUsedDatabase()?void yi.getMetadata().then((function(n){n.locked||n.fullscreen||(t.showSidebar=!0,e.$nextTick((function(){W()(document).trigger(i.EVENT_SIDEBAR_OPENED),W()(document).trigger(i.EVENT_GRID_RESIZE)})))})):(t.showSidebar=!0,void e.$nextTick((function(){W()(document).trigger(i.EVENT_SIDEBAR_OPENED),W()(document).trigger(i.EVENT_GRID_RESIZE)})))})),W()(document).on(i.EVENT_SIDEBAR_CLOSE,(function(){t.showSidebar=!1,e.$nextTick((function(){W()(document).trigger(i.EVENT_GRID_RESIZE)}))})),W()(document).on(i.EVENT_DB_INITIALIZED,(function(){t.currentUser=oi.getCurrentUsedDatabase(),t.isLocalUser=B.isSavedLocalUser(t.currentUser)})),W()(document).on(i.EVENT_DB_CLOSED,(function(){t.currentUser=oi.getCurrentUsedDatabase(),t.isLocalUser=B.isSavedLocalUser(t.currentUser)})),W()(document).on(i.EVENT_DB_SYNC_STATE_CHANGE,(function(e,n){t.syncState=n})),t.syncState=yi.getSyncState(),window.addEventListener("resize",(function(){ni.debounce((function(){W()(document).trigger(i.EVENT_GRID_RESIZE)}),300,i.EVENT_GRID_RESIZE)})),ji.global.onSwipedDown(n).onEscape(n).onExitFullscreen(n),ji.global.startListening(),t.openSidebar()},updated:function(){J.initDomI18n()}})};var Zi=Ki({props:["fullHeader"],data:function(){return{show:!Xi.isSidebarOpen(),tag:"div"}},methods:{openSidebar:function(){W()(document).trigger(i.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn:function(){this.show=!1},onCloseFn:function(){this.show=!0}},mounted:function(){W()(document).on(i.EVENT_SIDEBAR_CLOSE,this.onCloseFn),W()(document).on(i.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy:function(){W()(document).off(i.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},Ii,[],!1,null,"4ff1a546",null);Zi.options.__file="src/vue-components/components/headerIcon.vue";var Qi=Zi.exports,er=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)])};er._withStripped=!0;var tr={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(){J.initDomI18n()},updated:function(){J.initDomI18n()}},nr=(n(53),Ki(tr,er,[],!1,null,"66ff21d8",null));nr.options.__file="src/vue-components/components/accordion.vue";var ir=nr.exports,rr=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")])])])])])])])])};rr._withStripped=!0;n(4);var ar={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:de,imageUtil:pi,i18nService:J}},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 cn(this.gridFrom).getNewXYPos();e=new wt({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!==de.getModelName()})),e.actions.push(new de({toGridId:this.gridTo.id})),yi.saveGrid(this.gridFrom)}},mounted:function(){var e=this;this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),yi.getGrid(this.gridFromProp.id).then((function(t){e.gridFrom=JSON.parse(JSON.stringify(t)),J.initDomI18n()}))},updated:function(){J.initDomI18n()}},or=(n(56),Ki(ar,rr,[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));or.options.__file="src/vue-components/modals/gridLinkModal.vue";var sr=or.exports,lr=null;var cr={components:{GridLinkModal:sr,Accordion:ir,HeaderIcon:Qi},data:function(){return{metadata:null,grids:null,graphList:[],selectedGraphElement:null,newLabel:{},showLoading:!0,progressText:"",selectValues:{CONNECTED_GRIDS:"CONNECTED_GRIDS",NOT_REACHABLE_GRIDS:"NOT_REACHABLE_GRIDS",ALL_GRIDS:"ALL_GRIDS"},selectValue:null,linkModal:{show:!1,gridFrom:null,gridTo:null},i18nService:J,currentLanguage:J.getBrowserLang(),imageUtil:pi}},methods:{setSelectedGraphElement:function(e,t){e&&(this.selectedGraphElement=e,this.newLabel=JSON.parse(JSON.stringify(this.selectedGraphElement.grid.label)),this.reinitContextMenu(),this.metadata.lastOpenedGridId=e.grid.id,yi.saveMetadata(this.metadata),t||W()(".all-grids-view").animate({scrollTop:0},200))},reinitContextMenu:function(){var e;!function(){W.a.contextMenu("destroy");var e=lr.selectedGraphElement?J.getTranslation(lr.selectedGraphElement.grid.label):"",t={CONTEXT_CONNECT:{name:J.translate('Connect to grid "{?}" // Verknüpfen mit Grid "{?}"',e),icon:"fas fa-external-link-alt",visible:function(){return lr.selectValue!==lr.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"}};W.a.contextMenu({selector:".gridOptions",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_CONNECT":lr.linkModal.gridFrom=lr.selectedGraphElement.grid,lr.linkModal.gridTo=lr.grids.filter((function(e){return e.id===t}))[0],lr.linkModal.show=!0;break;case"CONTEXT_SHOW":lr.show(t);break;case"CONTEXT_EDIT":lr.edit(t);break;case"CONTEXT_DUPLICATE":lr.clone(t);break;case"CONTEXT_DELETE":lr.deleteGrid(t);break;case"CONTEXT_EXPORT":lr.exportToFile(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_DELETE_ALL:{name:"Delete all grids // Alle Grids löschen",icon:"fas fa-trash-alt",disabled:function(){return 0===lr.grids.length}},CONTEXT_RESET:{name:"Reset to default configuration // Auf Standardkonfiguration zurücksetzen",icon:"fas fa-minus-circle"}},W.a.contextMenu({selector:"#moreButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_NEW":lr.addGrid();break;case"CONTEXT_IMPORT":document.getElementById("inputFile").click();break;case"CONTEXT_IMPORT_BACKUP":document.getElementById("inputFileBackup").click();break;case"CONTEXT_EXPORT":lr.exportToFile();break;case"CONTEXT_DELETE_ALL":lr.deleteAll();break;case"CONTEXT_RESET":lr.reset()}}(e)},trigger:"left",items:e,zIndex:10})},deleteGrid:function(e){var t=this;log.debug("delete: "+e);var n=J.getTranslation(this.grids.filter((function(t){return t.id===e}))[0].label);confirm(J.translate("CONFIRM_DELETE_GRID",n))&&yi.deleteGrid(e).then((function(){t.reload()}))},addGrid:function(){var e=this,t=this.grids.map((function(e){return J.getTranslation(e.label)})),n=new cn({label:J.getTranslationObject(r.getNewName("newGrid",t)),gridElements:[]});yi.saveGrid(n).then((function(){return e.reload(n.id)})).then((function(){W()("#gridName").focus()}))},isLabelDuplicate:function(e){return!e||this.grids.map((function(e){return J.getTranslation(e.label)})).filter((function(t){return t===e})).length>0},saveGridLabel:function(){this.selectedGraphElement.grid.label=JSON.parse(JSON.stringify(this.newLabel)),yi.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show:function(e){xs.toGrid(e)},edit:function(e){xs.toEditGrid(e)},clone:function(e){var t=this;yi.getGrid(e).then((function(e){var n=e.clone();yi.saveGrid(n).then((function(){t.reload(n.id)}))}))},exportToFile:function(e){e?yi.downloadSingleGrid(e):yi.downloadBackup()},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(J.translate("CONFIRM_IMPORT_BACKUP",t))?this.importFromFileInternal(e,!0):this.resetFileInput(e)},reload:function(e){var t=this;return yi.getMetadata().then((function(e){return t.metadata=JSON.parse(JSON.stringify(e)),yi.getGrids()})).then((function(n){t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=Ut.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(J.translate("CONFIRM_RESET_DB"))&&(this.showLoading=!0,yi.deleteAllGrids().then((function(){return yi.importDefaultGridset()})).then((function(){e.reload()})))},deleteAll:function(){var e=this;confirm(J.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,yi.deleteAllGrids().then((function(){e.reload()})))},setGlobalGridActive:function(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,yi.saveMetadata(this.metadata)},resetGlobalGrid:function(e){var t=this;(e||confirm(J.translate("Do you really want to reset the global grid to default? // Möchten Sie das globale Grid wirklich zurücksetzen?")))&&yi.getGlobalGrid(!0).then((function(e){return e?yi.deleteGrid(e.id):Promise.resolve()})).then((function(){var e=Ut.generateGlobalGrid(t.grids[0].id);return t.metadata.globalGridId=e.id,t.metadata.globalGridActive=!0,yi.saveGrid(e)})).then((function(){return yi.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,yi.importGridsFromFile(i,t).then((function(){n.resetFileInput(e),n.reload()})))},resetFileInput:function(e){var t=W()(e.target);t.wrap("").closest("form").get(0).reset(),t.unwrap()}},computed:{headerDetails:function(){return this.selectedGraphElement?J.translate("Details for grid {?} // Details für Grid {?}",'"'.concat(J.getTranslation(this.selectedGraphElement.grid.label),'"')):""},connectedGridsOptionLabel:function(){return this.selectedGraphElement?J.translate('Grids connected with "{?}" // Grid verknüpft mit "{?}"',J.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(){var e=this;W()(document).on(i.EVENT_DB_PULL_UPDATED,e.onPullUpdate),vi.register((function(t){e.progressText=t}))},mounted:function(){var e=this;lr=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then((function(){e.reinitContextMenu(),J.initDomI18n()}))},updated:function(){J.initDomI18n()},beforeDestroy:function(){W()(document).off(i.EVENT_DB_PULL_UPDATED,this.onPullUpdate),W.a.contextMenu("destroy"),vi.clearHandlers()}},ur=(n(58),Ki(cr,Oi,[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));ur.options.__file="src/vue-components/views/allGridsView.vue";var dr=ur.exports,fr=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()};fr._withStripped=!0;var pr={},hr={},mr={};pr.setState=function(e,t){hr[e]!==t&&(hr[e]=t,mr[e]=mr[e]||[],mr[e].forEach((function(e){e(t)})))},pr.getState=function(e){return hr[e]},pr.onStateChanged=function(e,t){mr[e]=mr[e]||[],mr[e].push(t)},pr.clearListeners=function(e){e?mr[e]=[]:mr={}};var vr={};vr.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",vr.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";var gr=[],_r=B.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",br=[],yr=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 Er(e){var t=br.filter((function(t){return t.name===e}));return t.length>0?t:null}function wr(e,t,n,i){-1===br.map((function(e){return e.name})).indexOf(e)&&br.push({name:e,lang:t,type:n,ref:i})}function Cr(){br.sort((function(e,t){return e.type===vr.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===vr.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name)}))}vr.speak=function(e,t,n){if(e){vr.stopSpeaking(),t=t||J.getBrowserLang();var r=Er(n)||Er(_r)||function(e){return br.filter((function(t){return t.lang.substring(0,2)===e}))}(t),a=r.filter((function(e){return e.type===vr.VOICE_TYPE_NATIVE})),o=r.filter((function(e){return e.type===vr.VOICE_TYPE_RESPONSIVEVOICE}));if(vr.nativeSpeechSupported()&&a.length>0){var s=new SpeechSynthesisUtterance(e);s.voice=a[0].ref,log.debug("used voice: "+s.voice.name),window.speechSynthesis.speak(s)}else o.length>0&&responsiveVoice.speak(e,o[0].name);l(),setTimeout((function(){l()}),700)}function l(){vr.isSpeaking()&&pr.setState(i.STATE_ACTIVATED_TTS,!0)}},vr.speakLabel=function(e,t){e&&t&&yi.getGridElement(e,t).then((function(e){vr.speak(J.getTranslation(e.label))}))},vr.stopSpeaking=function(){vr.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},vr.isSpeaking=function(){return window.speechSynthesis.speaking||responsiveVoice.isPlaying()},vr.getVoicesLangs=function(){var e=br.map((function(e){return e.lang.substring(0,2)}));return J.getAllLanguages().filter((function(t){return-1!==e.indexOf(t.code)}))},vr.getVoices=function(){return br},vr.setPreferredVoiceName=function(e){_r=e,B.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},vr.getPreferredVoiceName=function(){return _r},vr.nativeSpeechSupported=function(){if("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis)return!1;var e=gr.length>0?gr:window.speechSynthesis.getVoices();return(e=e.length>0?e:window.speechSynthesis.getVoices()).length>0},window.speechSynthesis&&window.speechSynthesis.getVoices&&(gr=window.speechSynthesis.getVoices(),setTimeout((function(){(gr=window.speechSynthesis.getVoices()).forEach((function(e){wr(e.name,e.lang,vr.VOICE_TYPE_NATIVE,e)})),Cr()}),100)),yr.forEach((function(e){wr(e.name,e.lang,vr.VOICE_TYPE_RESPONSIVEVOICE)})),Cr();var Sr={},Tr=[],Nr="",Ar=0,Or=null;function Ir(e){Nr=e=void 0===e?Nr:e,Yn.learnFromInput(Nr,Or),$('.item[data-type="ELEMENT_TYPE_COLLECT"] .collect-text').text(Nr),ie.adaptFontSize($('.item[data-type="ELEMENT_TYPE_COLLECT"]'))}function kr(e,t){if(!e)return null;var n=e.actions.map((function(e){return e.modelName})).indexOf(t);return-1===n?null:e.actions[n]}function Lr(){var e=[],t=[];this.canUndo=function(){return e.length>0},this.canRedo=function(){return t.length>0},this.updateGrid=function(n){return new Promise((function(i){yi.getGrid(n.id).then((function(r){r.isEqual(n)?(log.debug("grid not updated, do noting"),i(!1)):(e.push(JSON.parse(JSON.stringify(r))),t=[],yi.saveGrid(n).then((function(){i(!0)})))}))}))},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return yi.getGrid(n.id).then((function(e){t.push(JSON.parse(JSON.stringify(e))),yi.saveGrid(n)})),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return yi.getGrid(n.id).then((function(t){e.push(JSON.parse(JSON.stringify(t))),yi.saveGrid(n)})),n}}}function xr(e,t,n){var r=this,a=(e=e,t=t,!1),o=!1,s=null,l=null,c=null,u=null,d=null,f=null,p=null,h=null,m=null,v=new Lr,g=!1;function _(e){return g=!1,(m=new Promise((function(t){e?(b(n,e),y(f).then((function(){t()}))):yi.getGrid(n.gridId).then((function(e){b(n,e),y(f).then((function(){t()}))}))}))).then((function(){g=!0})),m}function b(e,t){e&&(s=e.gridId||s,a=null!=e.enableResizing?e.enableResizing:a,o=e.dragAndDrop),p=(f=t).rowCount,h=f.minColumnCount}function y(s){var u=[];return n.dragAndDrop||(s.gridElements=s.gridElements.filter((function(e){return!e.hidden})),u.push(yi.getGlobalGrid().then((function(e){if(e){var t=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,i=1,r=1;1===e.getHeight()&&(r=t*f.rowCount/(1-t),i=1/(f.rowCount*t)-1/f.rowCount,r>=1?(i=1,r=Math.round(r)):(r=1,i=Math.round(i)));var a=Ut.getOffset(e),o=e.getWidth()-a.x,s=f.getWidthWithBounds();e.gridElements.forEach((function(e){e.width*=s,e.x*=s,0===e.y&&(e.height*=r)})),f.gridElements.forEach((function(e){e.width*=o,e.x*=o,e.x+=a.x*s,e.y+=a.y*r+e.y*(i-1),e.height*=i})),f.rowCount*=i,f.rowCount+=a.y*r,p=f.rowCount,f.gridElements=e.gridElements.concat(f.gridElements)}return Promise.resolve()})))),Promise.all(u).then((function(){return Sr.initWithElements(f.gridElements,o),Yn.initWithElements(f.gridElements),W()(e).empty(),W()(e).append(fe.getGridBase(s.id)),c=W()("#"+s.id),s.gridElements.forEach((function(e){c.append(e.toHTML(f.locale))})),c.gridList({lanes:p,minColumns:h,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:o},{start:w,stop:S}),l=c.data("_gridList"),s.hasSetPositions()||(c.gridList("resize",p),r.toGridData().then((function(e){f=e,yi.updateGrid(f.id,f)}))),function(){var e=[];a&&e.push(W()(t).resizable(E()));return W()(document).on(i.EVENT_GRID_RESIZE,(function(){r.autosize()})),Promise.all(e)}().then((function(){r.autosize(200)})),Promise.resolve()}))}function E(){var e=l._cellHeight,t=l._cellWidth;return{autoHide:!1,handles:"se",disabled:!a,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?yi.getImage(t).then((function(t){if(t){var r=W()("#"+i)[0].getBoundingClientRect().width;pi.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(){S()}))},resize:function(n,i){var r=i.element.parent();r.css("z-index",1);var a=Math.max(Math.round(i.element.width()/t),1),o=Math.max(Math.round(i.element.height()/e),1);o=o<=p?o:p,ie.adaptFontSize(r),c.gridList("resizeItem",i.element.parent(),{w:a,h:o}),i.element.css("height",""),i.element.css("width","")}}}function w(){W.a.isFunction(u)&&u(f)}function C(){W.a.isFunction(d)&&setTimeout((function(){d(f)}),200)}function S(){return new Promise((function(e){r.toGridData().then((function(t){v.updateGrid(t).then((function(n){n&&(f=t,r.autosize(),C()),e()}))}))}))}r.autosize=function(e){e=e||0,ie.adaptFontSizeForGridElements(),setTimeout((function(){c.gridList("autosize"),setTimeout((function(){if(W()("#grid-layout-background-vertical")[0]){var e=l._cellWidth,t=l._cellHeight;W()("#grid-layout-background-vertical").css("margin-left","".concat(e-5,"px")),W()("#grid-layout-background-vertical").css("background-size","".concat(e,"px ").concat(e,"px")),W()("#grid-layout-background-horizontal").css("margin-top","".concat(t-5,"px")),W()("#grid-layout-background-horizontal").css("background-size","".concat(t,"px ").concat(t,"px")),W()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){ie.adaptFontSizeForGridElements()}),200),a&&W()(t).resizable(E())}),e)},r.enableElementResizing=function(){W()(t).resizable("enable")},r.disableElementResizing=function(){W()(t).resizable("disable")},r.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(p=e,h=t,c.gridList("resize",p,t)),S()},r.removeElement=function(e){return w(),f.gridElements=f.gridElements.filter((function(t){return t.id!==e})),_(f).then((function(){return S()})).then((function(){return Promise.resolve(f)}))},r.duplicateElement=function(e){w();var t=f.gridElements.filter((function(t){return t.id===e}))[0].duplicate();f.gridElements.push(t),_(f).then((function(){l.resolveCollisions(t.id),S()}))},r.reinit=function(e){return w(),_(e).then((function(){C()})),m},r.fillGaps=function(){w(),c.gridList("fillGaps"),S()},r.undo=function(){if(v.canUndo()){var e=v.doUndo();_(f=new cn(e)).then((function(){C()}))}},r.redo=function(){if(v.canRedo()){var e=v.doRedo();_(f=new cn(e)).then((function(){C()}))}},r.updateGridWithUndo=function(e){return new Promise((function(t){v.updateGrid(e).then((function(e){e?(w(),_().then((function(){t(!0),C()}))):t(!1)}))}))},r.canUndo=function(){return v.canUndo()},r.canRedo=function(){return v.canRedo()},r.setLayoutChangedStartListener=function(e){u=e},r.setLayoutChangedEndListener=function(e){d=e},r.getCurrentGridId=function(){return f.id},r.toGridData=function(){return new Promise((function(e){var t=[];f.rowCount=p,f.minColumnCount=h,l.items.forEach((function(e){var n=e.$element.attr("data-id"),i=f.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)})),f.gridElements=t,e(f)}))},r.getInitPromise=function(){return m},r.isInitialized=function(){return g},r.destroy=function(){W()(document).off(i.EVENT_GRID_RESIZE),r.setLayoutChangedEndListener(null),r.setLayoutChangedStartListener(null)},_()}Sr.initWithElements=function(e,t){Tr=[];var n=0,i=0;if(Or=null,e.forEach((function(e){if(e&&e.type===wt.ELEMENT_TYPE_NORMAL){i++;var t=J.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===wt.ELEMENT_TYPE_COLLECT){var r=JSON.parse(JSON.stringify(e));Or=Or||r.actions.reduce((function(e,t){var n=Ye.getModelName()?t.dictionaryKey:null;return e||n}),null),Tr.push(r)}})),Ar=n/i,Tr.length>0)var r=setInterval((function(){$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(r),Ir(),t||Yn.predict(Nr,Or))}),100)},Sr.doAction=function(e){kr(e,"GridActionPredict")&&Yn.predict(Nr,Or);var t=e.actions.filter((function(e){return e.modelName===Ae.getModelName()}))[0],n=t&&t.speakLanguage?t.speakLanguage:J.getBrowserLang();vr.speak(Nr,n)},Sr.doCollectElementActions=function(e){if(e){switch(e){case tt.COLLECT_ACTION_CLEAR:Ir("");break;case tt.COLLECT_ACTION_REMOVE_WORD:var t=Nr.trim().split(" ");t.pop();var n=t.join(" ");Ir(""===n?"":n+" ");break;case tt.COLLECT_ACTION_REMOVE_CHAR:Ir(Nr.substring(0,Nr.length-1));break;case tt.COLLECT_ACTION_COPY_CLIPBOARD:ni.copyToClipboard(Nr);break;case tt.COLLECT_ACTION_APPEND_CLIPBOARD:ni.appendToClipboard(Nr);break;case tt.COLLECT_ACTION_CLEAR_CLIPBOARD:ni.copyToClipboard("")}Yn.predict(Nr,Or)}},$(window).on(i.ELEMENT_EVENT_ID,(function(e,t){if(0!==Tr.length&&!kr(t,tt.getModelName())&&!kr(t,de.getModelName())){if(!t.type||t.type===wt.ELEMENT_TYPE_NORMAL){if(!J.getTranslation(t.label))return;var n=J.getTranslation(t.label),i=1===n.length&&Ar>.5?n.toLowerCase():n+" ";Ir(Nr+i),Tr.forEach((function(e){var t=kr(e,"GridActionPredict");t&&t.suggestOnChange&&Yn.predict(Nr,Or)}))}if(t.type&&t.type===wt.ELEMENT_TYPE_PREDICTION){var r=$("#".concat(t.id," .text-container span")).text();if(r)Ir(Yn.applyPrediction(Nr||"",r,Or)),Tr.forEach((function(e){var t=kr(e,"GridActionPredict");t&&t.suggestOnChange&&Yn.predict(Nr,Or)}))}}}));var Dr=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.gridElement,"hidden",n.concat([null])):a>-1&&e.$set(e.gridElement,"hidden",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.gridElement,"hidden",r)}}}):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()])])])])])};Dr._withStripped=!0;var Rr={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},Mr=10,Pr=1,Ur=null,Gr=null,jr=!1;function Fr(e,t,n){n=n||Mr,t=t||1;var i=[];return new Promise((function(r){if(!e)return r([]);function a(a){a&&a.length&&0!==a.length||(a=[]);var o=t*n-n,s=o+n-1;jr=a.length>s+1;for(var l=o;l<=s;l++)a[l]&&function(){var e=JSON.parse(JSON.stringify(a[l])),t=pi.urlToBase64(e[Rr.PROP_IMAGE_URL]);e.promise=t,t.then((function(t){t?e.base64=t:e.failed=!0})),i.push(e)}();Ur=e,r(i)}Ur!==e?W.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){Gr=e,a(e)})):a(Gr)}))}Rr.query=function(e,t,n){return Pr=t=t||1,Mr=n||Mr,Fr(e,t,n)},Rr.nextChunk=function(){return Pr++,Fr(Ur,Pr,Mr)},Rr.hasNextChunk=function(){return jr};var $r={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:J,currentLang:J.getBrowserLang()}},methods:{changedImg:function(){var e=this;e.clearImage(),pi.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");pi.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 cn(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=Ut.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then((function(e){t(e)}))}else t(!1)}e.gridElement.image||(e.gridElement.image=new ye),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,pi.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then((function(e){var t=new ye({data:e});return yi.saveImage(t)})).then((function(t){return e.gridElement.image.id=t,pi.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 ye)),yi.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 ye(i.image)))),t.elementW=$("#"+e.gridElement.id)[0].getBoundingClientRect().width,t.originalGridElementJSON=JSON.stringify(i)}else{var r=n.getNewXYPos();log.debug("creating element: x "+r.x+" / y "+r.y),t.gridElement=JSON.parse(JSON.stringify(new wt({x:r.x,y:r.y})));var a=Math.round($("#grid-container")[0].getBoundingClientRect().height/n.rowCount);t.elementW=2*a,t.originalGridElementJSON=JSON.stringify(t.gridElement)}})),yi.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(){wi.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,ni.debounce((function(){Rr.query(n.searchText).then((function(e){n.processSearchResults(e)}))}),e)},searchMore:function(){var e=this;Rr.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=Rr.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(),wi.setHelpLocation("03_appearance_layout","#edit-modal")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation()}},Br=(n(60),Ki($r,Dr,[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));Br.options.__file="src/vue-components/modals/editGridModal.vue";var Vr=Br.exports,Hr=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")])])])])])])])])};Hr._withStripped=!0;var zr={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 cn(this.gridData);this.parsedElems.forEach((function(t){var n=new wt({label:J.getTranslationObject(t),x:e.getNewXYPos().x,y:e.getNewXYPos().y});e.gridElements.push(n)})),this.gridInstance.updateGridWithUndo(e),this.$emit("close")}}},mounted:function(){J.initDomI18n(),wi.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy:function(){wi.revertToLastLocation()}},Wr=(n(62),Ki(zr,Hr,[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));Wr.options.__file="src/vue-components/modals/addMultipleModal.vue";var Kr=Wr.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"},[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",[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),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,r=n.target,a=!!r.checked;if(Array.isArray(i)){var o=e._i(i,null);r.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",a)}}}),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,r=n.target,a=!!r.checked;if(Array.isArray(i)){var o=e._i(i,null);r.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",a)}}}),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 elements // Aktion für Sammelelemente 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.webRadios,callback:function(t){e.$set(e.gridData,"webRadios",t)},expression:"gridData.webRadios"}})],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(" "),"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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.selectFromAllLanguages=n.concat([null])):a>-1&&(e.selectFromAllLanguages=n.slice(0,a).concat(n.slice(a+1)))}else e.selectFromAllLanguages=r}}}),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()])])])};Yr._withStripped=!0;var Jr="https://www.radio-browser.info/webservice/json/",Xr=["name","country","state","language","tag","tagList","order"],qr={},Zr=document.getElementById("audioPlayer"),Qr=B.get("WEBRADIO_LAST_PLAYED_ID_KEY"),ea=parseFloat(B.get("WEBRADIO_LAST_VOLUME_KEY")||1),ta=!1;function na(){Xi.setTooltip(J.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*ea)),{revertOnClose:!0,timeout:5e3})}function ia(e,t){return new Promise((function(n,i){if(e.radioUrl)return n(e);function r(e,i){i.radioUrl=e[0].url,i.radioUrl.lastIndexOf("/")===i.radioUrl.length-1&&(i.radioUrl=i.radioUrl+";");var r=i.radioUrl.lastIndexOf(":");if(r>-1){var a=i.radioUrl.substring(r+1);parseInt(a)+""===a&&(i.radioUrl=i.radioUrl+"/;")}t&&yi.getGrid(t).then((function(e){var t=(e.webRadios||[]).filter((function(e){return i.radioId===e.radioId}))[0];t&&(t.radioUrl=i.radioUrl,yi.saveGrid(e))})),n(i)}W.a.ajax({type:"GET",url:Jr+"url/"+e.radioId,dataType:"json"}).then((function(t){r(t,e)}),(function(t,n){if("parsererror"===n){var a=t.responseText.substring(t.responseText.indexOf('"name":')+8,t.responseText.indexOf('"url":')-2),o=a.replace(new RegExp('"',"g"),"'"),s=t.responseText.replace(a,o);r(JSON.parse(s),e)}else Xi.setTooltip(J.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName)),i(t)}))}))}qr.doAction=function(e,t){yi.getGrid(e).then((function(n){var i=n.webRadios||[],r=t.radioId||Qr,a=i.filter((function(e){return r===e.radioId}))[0]||i[0];if(a)switch(t.action){case lt.WEBRADIO_ACTION_START:ia(a,e).then((function(e){qr.play(e)}));break;case lt.WEBRADIO_ACTION_TOGGLE:ia(a,e).then((function(e){qr.toggle(e)}));break;case lt.WEBRADIO_ACTION_STOP:qr.stop();break;case lt.WEBRADIO_ACTION_NEXT:var o=i.map((function(e){return e.radioId})).indexOf(a.radioId);if(o<0||i.length<2)return;ia(i[o=o+1=0?o-1:i.length-1],e).then((function(e){qr.play(e)}));break;case lt.WEBRADIO_ACTION_VOLUP:qr.volumeUp();break;case lt.WEBRADIO_ACTION_VOLDOWN:qr.volumeDown()}else log.info("no radio station to play found.")}))},qr.play=function(e){e&&(Zr.paused||Qr!==e.radioId)&&(Zr.paused||qr.stop(),Qr=e.radioId||Qr,B.save("WEBRADIO_LAST_PLAYED_ID_KEY",Qr),ia(e).then((function(t){log.debug("playing: "+t.radioUrl),Zr.src=t.radioUrl,Zr.volume=ea;var n=Zr.play(),i=J.translate("playing: {?} // Wiedergabe: {?}",t.radioName);Xi.setTooltip(i,{closeOnNavigate:!1,actionLink:J.translate("Stop // Stopp"),actionLinkFn:qr.stop,imageUrl:t.faviconUrl}),n&&n.then&&n.catch((function(){Qr===e.radioId&&Xi.setTooltip(J.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName))}))})))},qr.stop=function(e){e&&e!==Qr||(Zr.pause(),Xi.clearTooltip())},qr.toggle=function(e){Zr.paused?qr.play(e):qr.stop()},qr.volumeUp=function(){ea=ea+.15<=1?ea+.15:1,ea=Math.round(100*ea)/100,B.save("WEBRADIO_LAST_VOLUME_KEY",ea),na(),Zr.volume=ea},qr.volumeDown=function(){ea=ea-.15>=0?ea-.15:0,ea=Math.round(100*ea)/100,B.save("WEBRADIO_LAST_VOLUME_KEY",ea),na(),Zr.volume=ea},qr.search=function(e,t,n){if(!e)return Promise.resolve([]);var i={},r=[];Xr.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,r){var a=r[n+1],o=a?a.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 a=t||20;return a++,i.limit=a,n&&(i.offset=n),new Promise((function(e,t){W.a.ajax({type:"POST",url:Jr+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then((function(t){ta=t.length===a;var n=t.filter((function(e){return"0"!==e.lastcheckok}));n=n.slice(0,a-1),e(n.map((function(e){return{radioId:e.id,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon}})))}),(function(e){t(e)}))}))},qr.hasMoreSearchResults=function(){return ta};var ra={};function aa(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak");var r=J.getTranslation(e.label,null,!0);vr.speak(r.text,t.speakLanguage||r.lang);break;case"GridActionSpeakCustom":if(log.debug("action speak custom"),t.speakText){var a=J.getTranslation(t.speakText,null,!0);vr.speak(a.text,t.speakLanguage||a.lang)}break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?xs.toLastGrid():xs.isOnEditPage()?xs.toEditGrid(t.toGridId):xs.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?oa(t,i):yi.getGrid(n).then((function(e){oa(t,e)}));break;case"GridActionPredict":log.debug("action predict"),Yn.predict(J.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),Sr.doCollectElementActions(t.action);break;case"GridActionWebradio":qr.doAction(n,t);break;case"GridActionChangeLang":J.setLanguage(t.language),J.initDomI18n()}}function oa(e,t){if(e.componentId){var n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;Li.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then((function(){e.dataPortId&&e.dataPortSendData&&Li.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&Li.triggerEvent(e.componentId,e.eventPortId,e.areURL)}))}}ra.doAction=function(e,t){e&&t&&yi.getGridElement(e,t).then((function(n){switch(log.debug("do actions for: "+J.getTranslation(n.label)+", "+t),n.type){case wt.ELEMENT_TYPE_COLLECT:Sr.doAction(n);break;case wt.ELEMENT_TYPE_PREDICTION:Yn.doAction(n.id)}!function(e,t){e.actions.forEach((function(n){aa(e,n,t)}))}(n,e),$(window).trigger(i.ELEMENT_EVENT_ID,[n])}))},ra.testAction=function(e,t,n){aa(e,t,n.id,n)};var sa=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")])])])])};sa._withStripped=!0;var la={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]}:{};ra.testAction(null,e,new cn(t,this.gridData))},reloadAREModel:function(e){var t=this;t.loading=!0,Li.downloadDeployedModelBase64(e.areURL).then((function(n){Li.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;Li.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then((function(){t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0}))},reloadComponentIds:function(e){var t=this;Li.getRuntimeComponentIds(e.areURL).then((function(e){t.areComponentIds=e}))},reloadPorts:function(e){var t=this;Li.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then((function(e){t.areComponentEventPorts=e})),Li.getComponentInputPortIds(e.componentId,e.areURL).then((function(e){t.areComponentPorts=e}))},testAREUrl:function(e){var t=this;e.areURL=Li.getRestURL(e.areURL),t.areConnected=void 0,Li.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";ne.a.saveAs(t,n)},fixAreUrl:function(){this.action.areURL=Li.getRestURL(this.action.areURL)}},mounted:function(){this.action.areURL=this.action.areURL||Li.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new cn(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new It),wi.setHelpLocation("05_actions","#asterics-action")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation()}},ca=(n(64),Ki(la,sa,[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));ca.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var ua=ca.exports,da=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),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"})])])])])};da._withStripped=!0;var fa={props:{value:Array},data:function(){return{selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:qr,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}},methods:{modelChanged:function(){this.$emit("input",JSON.parse(JSON.stringify(this.selectedRadioList)))},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,ni.debounce((function(){qr.search(e.webradioSearch,10,e.webradioStartIndex).then((function(t){e.hasMoreWebradios=qr.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){qr.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter((function(t){return t.radioId!==e.radioId})),this.modelChanged()}},mounted:function(){this.selectedRadioList=JSON.parse(JSON.stringify(this.value)),J.initDomI18n()},updated:function(){J.initDomI18n()}},pa=(n(66),Ki(fa,da,[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));pa.options.__file="src/vue-components/components/radioListSelector.vue";var ha={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:wt,editActionId:null,selectedNewAction:wt.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:wt.getActionTypes(),voiceLangs:vr.getVoicesLangs(),dictionaryKeys:Yn.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:tt.getActions(),webradioActions:lt.getActions(),currentLang:J.getBrowserLang(),allLanguages:J.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1}},components:{RadioListSelector:pa.exports,Accordion:ir,EditAreAction:ua},methods:{selectedRadioChanged:function(e){var t=this,n=this.gridData.webRadios.filter((function(t){return t.radioId===e}))[0].faviconUrl;n&&pi.urlToBase64(n).then((function(e){e&&(t.gridElement.image=new ye({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]]}:{};ra.testAction(this.gridElement,e,new cn(t,this.gridData))},addAction:function(){var e=JSON.parse(JSON.stringify(wt.getActionInstance(this.selectedNewAction)));e.modelName===de.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(){wi.openHelp()},editNext:function(e){var t=this;t.saveInternal().then((function(){t.editElementId=new cn(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)})),yi.saveGrid(e.gridData).then((function(){return yi.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then((function(){return e.$emit("reload"),Promise.resolve()}))}))},initInternal:function(){var e=this;yi.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]})),yi.getGridsAttribute("label").then((function(t){e.gridLabels=t}))}},mounted:function(){this.editElementId=this.editElementIdParam,this.initInternal(),wi.setHelpLocation("05_actions","#edit-actions-modal")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.setHelpLocation("02_navigation","#edit-view")}},ma=(n(68),Ki(ha,Yr,[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));ma.options.__file="src/vue-components/modals/editActionsModal.vue";var va=ma.exports,ga=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")])])])])])])])])};ga._withStripped=!0;var _a={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new cn(this.gridDataParam).getHeight(),metadata:null}},methods:{save:function(){var e=this;B.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});var t=[];this.metadata&&t.push(yi.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&&yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),setTimeout((function(){return J.initDomI18n()}),10)})),J.initDomI18n()}},ba=(n(70),Ki(_a,ga,[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));ba.options.__file="src/vue-components/modals/gridDimensionModal.vue";var ya=ba.exports,Ea=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.moveAllElements=n.concat([null])):a>-1&&(e.moveAllElements=n.slice(0,a).concat(n.slice(a+1)))}else e.moveAllElements=r}}}),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")])])])])])])])])};Ea._withStripped=!0;var wa={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:J,imageUtil:pi}},methods:{prev:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var r=i-1<0?e.otherGrids.length-1:i-1;t=e.otherGrids[r]}})),this.selectedGrid=t},next:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var r=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(yi.saveGrid(e.gridData)),n.push(yi.saveGrid(t)),Promise.all(n)}))}},mounted:function(){var e=this;yi.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],J.initDomI18n()})),yi.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(){J.initDomI18n()}},Ca=(n(72),Ki(wa,Ea,[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));Ca.options.__file="src/vue-components/modals/elementMoveModal.vue";var Sa=Ca.exports,Ta=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")])])])])])])])])};Ta._withStripped=!0,window.hideKeyboardTranslations=!1;var Na={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:J.getBrowserLang(),chosenLocale:J.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:Re,allLanguages:J.getAllLanguages(),usedLocales:B.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];B.addUsedLocales(Object.keys(t.label)),yi.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 J.getTranslation(this.allLanguages.filter((function(t){return t.code===e}))[0])},copy:function(e){var t=W()("#translationList input[lang='".concat(e,"']")).toArray().reduce((function(e,t){return e+t.value+"\n"}),"");ni.copyToClipboard(t)},paste:function(e){var t=this;ni.getClipboardContent().then((function(n){if(n){t.changedGrid(t.gridData);var i=n.trim().split("\n");W()("#translationList input[lang='".concat(e,"']")).toArray().forEach((function(e,t){i[t]&&(W()(e).val(i[t]),W()(e)[0].dispatchEvent(new Event("input")))}))}}))},showGridElements:function(e){return!window.hideKeyboardTranslations||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))}},mounted:function(){var e=this;yi.getGrids(!0).then((function(t){e.allGrids=JSON.parse(JSON.stringify(t)),e.allGrids.sort((function(e,t){return J.getTranslation(e.label).localeCompare(J.getTranslation(t.label))})),e.gridData=e.allGrids.filter((function(t){return t.id===e.gridDataId}))[0]})),J.initDomI18n()},updated:function(){J.initDomI18n()}},Aa=(n(74),Ki(Na,Ta,[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));Aa.options.__file="src/vue-components/modals/gridTranslateModal.vue";var Oa=Aa.exports,Ia=null,ka=null;var La=Ki({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:i,markedElement:null}},components:{GridTranslateModal:Oa,ElementMoveModal:Sa,GridDimensionModal:ya,EditGridModal:Vr,AddMultipleModal:Kr,EditActionsModal:va,HeaderIcon:Qi},methods:{setDimensions:function(e,t){ka.setDimensions(e,t)},fillGaps:function(){ka.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){ka.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){ka.redo()}),10)},reload:function(e){ka.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back:function(){xs.toMain()},editElement:function(e){this.editElementId=e,this.showEditModal=!0},removeElement:function(e){var t=this;ka.removeElement(e).then((function(e){t.gridData=e}))},newElement:function(e){switch(e){case wt.ELEMENT_TYPE_PREDICTION:case wt.ELEMENT_TYPE_COLLECT:var t=new cn(this.gridData).getNewXYPos(),n=new wt({type:e,x:t.x,y:t.y});this.gridData.gridElements.push(n),ka.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(J.translate("CONFIRM_DELETE_ALL_ELEMS"))&&(this.gridData.gridElements=[],ka.updateGridWithUndo(this.gridData))},fillElements:function(){var e=Ut.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),ka.updateGridWithUndo(this.gridData)},reloadFn:function(e,t,n){if(Ia&&t.includes(Ia.gridData.id)&&ka&&ka.isInitialized()){var i=new cn(n.filter((function(e){return e.id===Ia.gridData.id}))[0]);i.isEqual(Ia.gridData)||(log.debug("reloading on remote update..."),Ia.reload(i))}},markElement:function(e){var t=this;W()(".grid-item-content").removeClass("marked"),e&&setTimeout((function(){ni.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,W()("#"+e).addClass("marked"))}),null,200)}),10)},getGridInstance:function(){return ka}},created:function(){W()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){var e=this,t=this;Ia=t,ji.global.stopListening(),yi.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),xs.toMain(),Promise.reject())})).then((function(){return yi.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,yi.saveMetadata(t.metadata))}))})).then((function(){return e=t.gridData,(ka=new xr("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:e.id})).getInitPromise();var e})).then((function(){ka.setLayoutChangedEndListener((function(e){t.canUndo=ka.canUndo(),t.canRedo=ka.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"}}}},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!!Ia.markedElement},r={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:function(){return Ia.markedElement&&Ia.markedElement.type===wt.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 cn({},Ia.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:!!Ia.metadata.globalGridId&&Ia.metadata.globalGridActive&&Ia.metadata.globalGridId!==Ia.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:Ia.metadata.globalGridId===Ia.gridData.id}};function a(e,t){switch(e){case"CONTEXT_EDIT":Ia.editElement(t);break;case"CONTEXT_DUPLICATE":ka.duplicateElement(t);break;case"CONTEXT_DO_ACTION":ra.doAction(Ia.gridData.id,t);break;case"CONTEXT_ACTIONS":Ia.editActions(t);break;case"CONTEXT_DELETE":Ia.removeElement(t);break;case"CONTEXT_NEW_SINGLE":Ia.newElement();break;case"CONTEXT_NEW_MASS":Ia.newElements();break;case"CONTEXT_NEW_COLLECT":Ia.newElement(wt.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":Ia.newElement(wt.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_DELETE_ALL":Ia.clearElements();break;case"CONTEXT_FILL_EMPTY":Ia.fillElements();break;case"CONTEXT_LAYOUT_FILL":Ia.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":Ia.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":Ia.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":Ia.editElement(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":Ia.editActions(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_DELETE":Ia.removeElement(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":ka.duplicateElement(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":ra.doAction(Ia.gridData.id,Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_MOVE_TO":Ia.editElementId=t||Ia.markedElement.id,Ia.markElement(null),Ia.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":xs.toEditGrid(Ia.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":xs.toEditGrid(Ia.metadata.lastOpenedGridId)}}W()(".grid-container").on("click",(function(e){if(Ia){for(var t=null,n=e.target;!t&&n.parentNode;)t=W()(n).attr("data-id"),n=n.parentNode;Ia.markElement(t)}})),W.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){a(e,W()(this).attr("data-id"))},items:t,zIndex:10}),W.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){a(e,W()(this).attr("data-id"))},items:n,zIndex:10}),W.a.contextMenu({selector:".grid-container",callback:function(e,t){a(e)},items:e,zIndex:10}),W.a.contextMenu({selector:"#moreButton",callback:function(e,t){a(e)},trigger:"left",items:r,zIndex:10})}(),J.initDomI18n(),t.showGrid=!0}))},updated:function(){J.initDomI18n()},beforeDestroy:function(){W()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),Ia=null,ji.global.startListening(),ka&&(ka.destroy(),ka=null),W.a.contextMenu("destroy")}},fr,[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);La.options.__file="src/vue-components/views/gridEditView.vue";var xa=La.exports,Da=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(" "),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)};Da._withStripped=!0;var Ra=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 Ma(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},Ra.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},Ra.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},Ra.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;n0&&u<1e3;){u++;var d=N(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&&(r=e[n-1]),n+1=i(e)&&o<=r(e)||i(e)<=s&&r(e)>=s||i(e)>=o&&r(e)<=s}))}function A(e){return function(t,n){return e(t)-e(n)}}function O(){var e=arguments;return function(t,n){for(var i=0;i=s*n.length)i.restartScanning();else if(Ra.removeClass(e,t),Ra.addClass(e,r),h&&(Ra.addClass(n[l],t),Ra.removeClass(n,r),v=n[l],C=function(){D(n,!0,l+1,c+1)},f)){var u=0===l&&o&&n.length>2?a*d:a;g=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,r=e.length;i1?D(R(v),!0):Ra.flattenArray(v).length>1?D(R(Ra.flattenArray(v)),!0):(p&&p(Ra.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){C&&(clearTimeout(g),C())},i.enableTouchScanning=function(){y||(y=function(){i.select()},(E=Ra(".area")[0]?Ra(".area")[0]:Ra("#grid-container")).addEventListener("click",y))},i.disableTouchScanning=function(){y&&(E.removeEventListener("click",y),y=null)},S(n)}Pa.getInstanceFromConfig=function(e,t,n,i){return new Ua(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 Ga={};function ja(e,t){var n=e,r=void 0!==t.timeoutMs?t.timeoutMs:1e3,a=t.demoMode,o=t.selectionListener,s=t.activeListener,l={},c=[],u=null,d=null,f=!1,p=null;function h(e,t){var n=t||this;e.preventDefault(),w(n),u=n,d=e}function m(e,t){if(f){var n=t||this;e.preventDefault(),C(n)}}function v(e){f||T(!1),ni.debounce((function(){T(!0)}),r+300,"hovering-mouseMove")}function g(){C(u)}function _(e){var t=S(e);w(t),u=t}function b(e){C(u)}function y(e){a||e.preventDefault(),ni.throttle((function(){var t=S(e);w(t),u=t,d=e}),[],50,"hovering-touchmove")}function E(e){vr.speak(J.translate("speech output activated // Sprachausgabe aktiviert")),Xi.clearTooltip(),pr.setState(i.STATE_ACTIVATED_TTS,!0),T(!0),c.forEach((function(e){e.removeEventListener("click",E)}))}function w(e){u&&u!==e&&C(u),e&&!l[e]&&(Ra.addClass(e,"mouseentered"),s&&e!==u&&s(e),0!==r&&(l[e]=setTimeout((function(){o&&o(e)}),r)))}function C(e){e&&(Ra.removeClass(e,"mouseentered"),clearTimeout(l[e]),l[e]=null,u=null)}function S(e){if(e.touches&&0===e.touches.length&&(e=d),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 ni.getElement(c,t,n)}log.warn("no event")}function T(e){f=!e,a||(e?W()("#touchElement").show():W()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(W()(n).css("cursor","none"),W()("#touchElement").css("cursor","none"),t.containerClass&&W()(t.containerClass).css("cursor","none")),c=Ra.selectAsList(n);var e=pr.getState(i.STATE_ACTIVATED_TTS);!vr.nativeSpeechSupported()||e||a?T(!0):(Xi.setTooltip(J.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),pr.onStateChanged(i.STATE_ACTIVATED_TTS,(function(e){e&&Xi.clearTooltip()})),c.forEach((function(e){e.addEventListener("click",E)}))),c.forEach((function(e){e.addEventListener("mouseenter",h),e.addEventListener("mouseleave",m),e.addEventListener("mouseup",g)})),(p=ji.instance()).onTouchStart(_),p.onTouchEnd(b),p.onTouchMove(y),p.startListening(),document.addEventListener("mousemove",v)},this.destroy=function(){t.hideCursor&&(W()(n).css("cursor","default"),W()("#touchElement").css("cursor","default"),t.containerClass&&W()(t.containerClass).css("cursor","default")),ni.clearDebounce("hovering-mouseMove"),c.forEach((function(e){e.removeEventListener("mouseenter",h),e.removeEventListener("mouseleave",m),e.removeEventListener("mouseup",g),e.removeEventListener("click",E)})),p.destroy(),document.removeEventListener("mousemove",v),Object.keys(l).forEach((function(e){clearTimeout(l[e])})),pr.clearListeners(i.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){r=e},this.setSelectionListener=function(e){o=e}}function Fa(e){var t=e,n=null,i=[];function r(e){n&&n(e.currentTarget)}function a(e){var t=e.which||e.keyCode;13!==t&&32!==t||n&&n(e.currentTarget)}this.startClickcontrol=function(){(i=Ra.selectAsList(t)).forEach((function(e){e.addEventListener("click",r),e.addEventListener("keydown",a)}))},this.destroy=function(){i.forEach((function(e){e.removeEventListener("click",r),e.removeEventListener("keydown",a)}))},this.setSelectionListener=function(e){n=e}}Ga.getInstanceFromConfig=function(e,t,n){return new ja(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 $a=n(45),Ba=n.n($a),Va={};function Ha(e,t,n,i){var r=this,a=e,o=t,s=n,l=!1,c=!0,u=!1,d=0,f=1e3,p=!0,h=[],m=null,v=null,g=null,_=null,b="",y=null,E="",w=!1,C=null;function S(){if(y=ji.instance(),E="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");W.a.isFunction(e.selectionListener)&&(m=e.selectionListener);l=void 0!==e.printCodes&&e.printCodes,c=void 0===e.printColors||e.printColors,u=void 0!==e.colorWholeElement&&e.colorWholeElement,p=void 0===e.markInactive||e.markInactive,h=e.colors||h,d=e.elementCount||0,f=e.timeout||1e3,e.inputEvents.forEach((function(e,t){E+=t+1,y.onInputEvent(e,(function(){r.input(t+1)}))}))}(i),0!==(v=W()(a)).length){var e=v.toArray().map((function(e){return e.id}));if(e.lengths?t.length:s})),o.assignCodeWords(E,(function(e,t){if(e.name&&(e.codeWord=t,e.element=document.getElementById(e.name),c||l)){var n="";e.codeWord.split("").forEach((function(e){var t=c?A(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),r=(100-5*s)/s+"%",a=l?e:" ";n+='').concat(a,"")}));var i=l?"10px":"3px",r=W()(e.element).width()+"px";W()(e.element).append('
    ').concat(n,"
    "))}})),_=_.filter((function(e){return e.name})),T()}}function T(){u&&_.forEach((function(e){if(0===e.codeWord.indexOf(b)){var t=e.codeWord.substring(b.length)[0];e.element.style.background=A(t)}}))}function N(e){v.removeClass(s);var t=e.map((function(e){return e.id})),n=v.toArray().filter((function(e){return-1===t.indexOf(e.id)}));W()(n).addClass(s)}function A(e){var t=parseInt(e)-1;return h[t]}r.start=function(){w=!0,u&&W()(v).addClass("noanimation"),y.startListening()},r.stop=function(){w=!1,W()(v).find(".huffman-code-visualization").remove(),u&&(W()(v).removeClass("noanimation"),W()(v).css("background","")),y.stopListening()},r.destroy=function(){r.stop(),y.destroy()},r.reinit=function(){w&&(r.stop(),S(),r.start())},r.input=function(e){if(e+="",clearTimeout(C),1===e.length){b+=e,T();var t,n=_.filter((function(e){return e.codeWord===b})).map((function(e){return e.element})),i=_.filter((function(e){return 0===e.codeWord.indexOf(b)})).map((function(e){return e.element}));v.removeClass(o),n[0]?(t=n[0],g=t||g,v.removeClass(o),W()(g).addClass(o),N(v.toArray()),m&&m(n[0])):p&&N(i),(n[0]||0===i.length)&&(N(v.toArray()),b="",T()),f>0&&(C=setTimeout((function(){N(v.toArray()),b="",T()}),f))}},r.getCurrentInput=function(){return b},S()}function za(e){return function(e){if(Array.isArray(e))return Wa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Wa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wa(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0&&t>0&&n>0&&i>0},r=function(e,t,n,i){return e<0&&t<0&&n<0&&i<0},a=t.map((function(e){var t=e.getBoundingClientRect(),a=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(a),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(a,o,s,l),right:r(a,o,s,l),up:i(c,u,d,f),down:r(c,u,d,f),absDiffX:p,absDiffY:h,absDiff:p+h}}));function s(e,t,n,i,r){var a=e.filter((function(e){return e[t]}));if(a.length>0)return a[0].element;if(o){var s=Math.min.apply(Math,za(e.map((function(e){return e[r]})))),l=e.filter((function(e){return e[r]===s&&e[n]})),c=Math.max.apply(Math,za(l.map((function(e){return e[i]})))),u=l.filter((function(e){return e[i]===c}))[0];return u?u.element:null}return null}var l=s(a=a.sort((function(e,t){return e.absDiff-t.absDiff})),"left","right","absDiffX","absDiffY"),u=s(a,"right","left","absDiffX","absDiffY"),f=s(a,"up","down","absDiffY","absDiffX"),p=s(a,"down","up","absDiffY","absDiffX");d[e.id]={element:e,left:l,right:u,up:f,down:p}}))}),200),function(e){e&&(W.a.isFunction(e.selectionListener)&&(l=e.selectionListener),o=void 0!==e.wrapAround&&e.wrapAround,s=void 0!==e.resetToStart&&e.resetToStart,f.onInputEvent(e.inputEventLeft,i.left),f.onInputEvent(e.inputEventRight,i.right),f.onInputEvent(e.inputEventUp,i.up),f.onInputEvent(e.inputEventDown,i.down),f.onInputEvent(e.inputEventSelect,i.select))}(n))}Ka.getInstanceFromConfig=function(e,t,n,i){return new Ya(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 Ja={};function Xa(e,t){var n=this,i=e,r=null,a=null,o=null,s=null,l=null,c=0;function u(e){s.removeClass(r),W()(e).addClass(r),o&&o(e)}n.start=function(){l.startListening(),u(s[0]),c=0},n.destroy=function(){l.destroy(),s.removeClass(r)},n.next=function(){++c>s.length-1&&(c=0),u(s[c])},n.select=function(){a&&a(s[c])},l=ji.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(W.a.isFunction(e.selectionListener)&&(a=e.selectionListener),W.a.isFunction(e.activeListener)&&(o=e.activeListener),r=e.activeClass||"scanFocus",l.onInputEvent(e.inputEventSelect,(function(){n.select()})),l.onInputEvent(e.inputEventNext,(function(){n.next()})))}(t),s=W()(i)}Ja.getInstanceFromConfig=function(e,t,n){return new Xa(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]})};var qa=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanVertical",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanVertical",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanVertical",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanBinary",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanBinary",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanBinary",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.touchScanning=n.concat([null])):a>-1&&(e.touchScanning=n.slice(0,a).concat(n.slice(a+1)))}else e.touchScanning=r},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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanAuto",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanAuto",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanAuto",r)}}}),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")])])])])])])])])};qa._withStripped=!0;var Za=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,r){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,r)}}},[n("i",{staticClass:"fas fa-trash"})])])})),0)]):e._e()])})),0)])};Za._withStripped=!0;var Qa={components:{Accordion:ir},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:m,InputEventARE:w,InputConfig:I,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:ji.instance(),lastInitTime:null,areService:Li}},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 r=I.getInputEventInstance(t,{label:n.label});ki.a.set(this.inputs,e,JSON.parse(JSON.stringify(r))),this.maxInputs&&this.inputs.length "+t.targetComponentId},changedAreURL:function(e){e.areURL&&(e.areURL=Li.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=J.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=Pa.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled})),wi.setHelpLocation("04_input_options","#scanning")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},so=(n(80),Ki(oo,qa,[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));so.options.__file="src/vue-components/modals/input/scanningModal.vue";var lo=so.exports,co=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"mouseclickEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"mouseclickEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"mouseclickEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"hoverEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"hoverEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"hoverEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"hoverHideCursor",n.concat([null])):a>-1&&e.$set(e.inputConfig,"hoverHideCursor",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"hoverHideCursor",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):a>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"globalReadActive",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.concat([null])):a>-1&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"hoverDisableHoverpane",r)}}}),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")])])])])])])])])};co._withStripped=!0;var uo=Ki({props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")}))},cancel:function(){this.$emit("close")},openHelp:function(){wi.openHelp()},initTest:function(){var e=this;setTimeout((function(){var t=e;e.stopTest(),t.inputConfig.hoverEnabled&&(t.hover=Ga.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 Fa(".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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#mousetouch-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},co,[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);uo.options.__file="src/vue-components/modals/input/mouseModal.vue";var fo=uo.exports,po=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"dirEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"dirEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"dirEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"dirWrapAround",n.concat([null])):a>-1&&e.$set(e.inputConfig,"dirWrapAround",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"dirWrapAround",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"dirResetToStart",n.concat([null])):a>-1&&e.$set(e.inputConfig,"dirResetToStart",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"dirResetToStart",r)}}}),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")])])])])])])])])};po._withStripped=!0;var ho={props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){wi.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=J.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=Ka.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#direction-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},mo=(n(82),Ki(ho,po,[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));mo.options.__file="src/vue-components/modals/input/directionInputModal.vue";var vo=mo.exports,go=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffShowNumbers",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffShowNumbers",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffShowNumbers",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffShowColors",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffShowColors",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffShowColors",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffColorWholeElement",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffColorWholeElement",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffColorWholeElement",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffMarkInactive",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffMarkInactive",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffMarkInactive",r)}}}),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")])])])])])])])])};go._withStripped=!0;var _o={props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){wi.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=J.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=Va.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#huffman-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},bo=(n(84),Ki(_o,go,[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));bo.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var yo=bo.exports,Eo=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"seqEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"seqEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"seqEnabled",r)}}}),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.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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):a>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"globalReadActive",r)}}}),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")])])])])])])])])};Eo._withStripped=!0;var wo={props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){wi.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=J.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=Ja.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#sequential-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},Co=(n(86),Ki(wo,Eo,[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));Co.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var So=Co.exports,To=null,No=null,Ao={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL"};function Oo(){To&&window.removeEventListener("resize",To.resizeListener,!0),To&&W()(document).off(i.EVENT_GRID_RESIZE,To.resizeListener),To&&To.scanner&&To.scanner.destroy(),To&&To.hover&&To.hover.destroy(),To&&To.clicker&&To.clicker.destroy(),To&&To.directionInput&&To.directionInput.destroy(),To&&To.huffmanInput&&To.huffmanInput.destroy(),To&&To.seqInput&&To.seqInput.destroy()}function Io(){W.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=To.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":""}};W.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":To.openModal(Ao.MODAL_MOUSE);break;case"CONTEXT_SCANNING":To.openModal(Ao.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":To.openModal(Ao.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":To.openModal(Ao.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":To.openModal(Ao.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:r,zIndex:10})}var ko=Ki({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:Ao,viewInitialized:!1,unlockCount:8,unlockCounter:8}},components:{SequentialInputModal:So,HuffmanInputModal:yo,DirectionInputModal:vo,MouseModal:fo,ScanningModal:lo,HeaderIcon:Qi},methods:{openModal:function(e){this.showModal=e,Oo()},lock:function(){this.metadata.locked=!0,this.unlockCounter=8,yi.saveMetadata(this.metadata).then((function(){W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)}))},unlock:function(e){var t=this;t.unlockCounter--,ni.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,yi.saveMetadata(t.metadata).then((function(){W()(document).trigger(i.EVENT_SIDEBAR_OPEN)})))},applyFullscreen:function(e){ni.openFullscreen(),this.metadata.fullscreen=!0;var t=Promise.resolve();e||(t=yi.saveMetadata(this.metadata)),t.then((function(){W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)}))},initInputMethods:function(){var e=this;if(No){var t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),W()(document).on(i.EVENT_GRID_RESIZE,e.resizeListener);var n=function(t){Ra.removeAddClass(t,"selected"),ra.doAction(e.gridData.id,t.id)},r=function(n){t.globalReadActive&&vr.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=Ja.getInstanceFromConfig(t,".grid-item-content",{selectionListener:n,activeListener:r}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=Ka.getInstanceFromConfig(t,".grid-item-content","scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=Va.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=Pa.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive"),e.scanner.setSelectionListener(n),No.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),No.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=Ga.getInstanceFromConfig(t,".grid-item-content",{activeListener:r,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):W()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new Fa(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())}},reinitInputMethods:function(){var e=this;Oo(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),Io(),e.initInputMethods()}))},reload:function(e){var t=this;No.reinit(e).then((function(){e&&(t.gridData=JSON.parse(JSON.stringify(e))),t.reinitInputMethods()}))},reloadOnLangChange:function(){this.reload()},toEditGrid:function(){xs.toEditGrid(this.gridData.id)},toManageGrids:function(){xs.toManageGrids()},toLogin:function(){xs.toLogin()},reloadFn:function(e,t,n){var r=this;if(To&&No&&No.isInitialized()){log.debug("got update event, ids updated:"+t);var a=n.filter((function(e){return To.gridData&&e.id===To.gridData.id}))[0];this.updatedMetadataDoc=n.filter((function(e){return To.metadata&&e.id===To.metadata.id}))[0]||this.updatedMetadataDoc,a&&To.reload(new cn(a)),B.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==To.gridData.id?yi.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then((function(e){e.hasOutdatedThumbnail()||xs.toLastOpenedGrid()})):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==To.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?To.applyFullscreen(!0):W()(document).trigger(i.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==To.metadata.locked&&(this.updatedMetadataDoc.locked?To.lock():To.unlock(!0))))}else setTimeout((function(){r.reloadFn(e,t,n)}),500)},onSidebarOpen:function(){To&&To.metadata&&(To.metadata.fullscreen=!1,W()(document).trigger(i.EVENT_GRID_RESIZE))},resizeListener:function(){var e=this;ni.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created:function(){W()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn),W()(document).on(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),W()(document).on(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){var e=this,t=this;To=t,yi.getGlobalGrid().then((function(e){return t.globalGridData=e,yi.getGrid(t.gridId)})).then((function(n){if(!n)return log.warn("grid not found! gridId: "+e.gridId),yi.getGrids(!1,!0).then((function(e){return e[0]?xs.toGrid(e[0].id):xs.toManageGrids(),Promise.reject()}));if(n.hasAREModel()){var i=n.getAREModel();Li.uploadAndStartModel(i.dataBase64,n.getAREURL(),i.fileName)}return t.gridData=JSON.parse(JSON.stringify(n)),xs.addToGridHistory(t.gridData.id),Promise.resolve()})).then((function(){return yi.getMetadata()})).then((function(n){var r=JSON.parse(JSON.stringify(n||new P));return r.lastOpenedGridId=e.gridId,r.locked=void 0===r.locked?un.isDemoMode()&&yi.getCurrentUser()===i.LOCAL_DEMO_USERNAME:r.locked,r.fullscreen=void 0===r.fullscreen?un.isDemoMode()&&yi.getCurrentUser()===i.LOCAL_DEMO_USERNAME:r.fullscreen,r.inputConfig.scanEnabled=!!un.isScanningEnabled()||r.inputConfig.scanEnabled,r.inputConfig.dirEnabled=!!un.isDirectionEnabled()||r.inputConfig.dirEnabled,r.inputConfig.huffEnabled=!!un.isHuffmanEnabled()||r.inputConfig.huffEnabled,yi.saveMetadata(r).then((function(){r.locked&&W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)})),t.metadata=r,Promise.resolve()})).then((function(){return e=t.gridData.id,(No=new xr("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:e,globalGridHeightPercentage:To.metadata.globalGridHeightPercentage})).getInitPromise();var e})).then((function(){Io(),t.viewInitialized=!0;var e=new cn(t.gridData);e.hasOutdatedThumbnail()&&pi.getScreenshot("#grid-container").then((function(n){var i={data:n,hash:e.getHash()};t.gridData.thumbnail=i,yi.saveGrid(t.gridData)})),t.initInputMethods()})).catch((function(e){e&&log.warn(e)}))},updated:function(){J.initDomI18n()},beforeDestroy:function(){W()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),W()(document).off(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),W()(document).off(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),Oo(),W.a.contextMenu("destroy"),To=null,No&&(No.destroy(),No=null)}},Da,[],!1,null,"cc4f17d6",null);ko.options.__file="src/vue-components/views/gridView.vue";var Lo=ko.exports,xo=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.remember=n.concat([null])):a>-1&&(e.remember=n.slice(0,a).concat(n.slice(a+1)))}else e.remember=r}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.remember=n.concat([null])):a>-1&&(e.remember=n.slice(0,a).concat(n.slice(a+1)))}else e.remember=r}}}),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)};xo._withStripped=!0;var Do,Ro=n(6),Mo=n.n(Ro),Po={},Uo=null,Go=null,jo=null,Fo=null,$o=!1,Bo=null,Vo=null,Ho=i.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function zo(e,t,n){return jo!==e?Promise.reject():(Fo=e,Bo=t,Vo=n,e=e.trim(),Mo.a.login({username:e,password:t}).then((function(i){return log.info("login success!"),Po.stopAutoRetryLogin(),Uo=i,Go=e,B.setLastActiveUser(e),B.setAutologinUser(n?e:""),n&&B.saveUserPassword(e,t),Promise.resolve()})))}function Wo(e,t,n){return zo(e,t,n).then((function(){return oi.initForUser(e,t,Po.getLoggedInUserDatabase(),!n).then((function(){return Promise.resolve(!0)}))}),(function(i){return jo!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),B.isDatabaseSynced(e)?(log.info("using offline local database..."),B.setLastActiveUser(e),B.setAutologinUser(n?e:""),Ko(i)!==Po.ERROR_CODE_UNAUTHORIZED&&Yo(e,t,n),oi.initForUser(e,t).then((function(){return Promise.resolve(!1)}))):Promise.reject(Ko(i)))}))}function Ko(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?Po.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?Po.ERROR_CODE_NETWORK_ERROR:void 0}function Yo(e,t,n){Po.stopAutoRetryLogin(),Do=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),Wo(e,t,n)}),1e4)}Po.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",Po.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",Po.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",Mo.a.configure({serverUrl:Ho,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),Po.getLoggedInUsername=function(){return Go},Po.getLoggedInUserDatabase=function(){if(!Uo||!Uo.userDBs)return null;var e=Object.keys(Uo.userDBs);return Uo.userDBs[e[0]]},Po.loginPlainPassword=function(e,t,n){jo=e;var i=Xt.getUserPasswordHash(t);return Po.loginHashedPassword(e,i,n)},Po.loginHashedPassword=function(e,t,n){return jo=e,Wo(e,t,n)},Po.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if($o)return log.warn("login currently in progress - aborting..."),Promise.reject();jo=e,$o=!0;var n=B.getSavedOnlineUsers(),i=B.getSavedLocalUsers(),r=new Promise((function(t,r){if(Po.getLoggedInUsername()===e)return t();if(Po.logout(),n.includes(e)&&B.isDatabaseSynced(e)){var a=B.getUserPassword(e);oi.initForUser(e,a).then((function(){Po.loginHashedPassword(e,a,!0),t()}))}else if(n.includes(e)){log.info("waiting for successful login because user wasn't completely synced before...");var o=B.getUserPassword(e);Po.loginHashedPassword(e,o,!0).then((function(){t()})).catch((function(e){r(e)}))}else i.includes(e)&&(B.setAutologinUser(e),oi.initForUser(e,e).then((function(){t()})))}));return r.then((function(){t||xs.toMain()})),r.finally((function(){$o=!1})),r},Po.logout=function(){Po.stopAutoRetryLogin(),Go&&(log.debug("logging out user: "+Go),oi.closeCurrentDatabase(),Mo.a.logout(Go),Go=null,Uo=null)},Po.register=function(e,t,n){jo=e,Po.stopAutoRetryLogin(),e=e.trim();var i=Xt.getUserPasswordHash(t);return log.debug("password hash: "+i),Mo.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then((function(t){return zo(e,i,n)})).then((function(){return log.info("registration successful!"),oi.registerForUser(Go,i,Po.getLoggedInUserDatabase(),!n)})).then((function(){return yi.importDefaultGridset()})).catch((function(e){return log.info("registration failed!"),log.info(e),Promise.reject(e)}))},Po.registerOffline=function(e,t){return Po.logout(),B.saveLocalUser(e),B.setAutologinUser(e),oi.registerForUser(e,t).then((function(){return yi.importDefaultGridset()}))},Po.validateUsername=function(e){return new Promise((function(t,n){e&&i.USERNAME_REGEX.test(e)?B.isSavedLocalUser(e)||e===i.LOCAL_DEMO_USERNAME?t(i.VALIDATION_ERROR_EXISTING):Mo.a.validateUsername(e).then((function(){t(i.VALIDATION_VALID)}),(function(e){log.debug(e),t(i.VALIDATION_ERROR_EXISTING)})):t(i.VALIDATION_ERROR_REGEX)}))},Po.stopAutoRetryLogin=function(){Do&&(window.clearInterval(Do),Do=null)},Po.ping=function(){W.a.get(Ho+"/ping")},W()(document).on(i.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),Fo&&Bo&&Yo(Fo,Bo,Vo)})),W()(document).on(i.EVENT_DB_DATAMODEL_UPDATE,(function(){Po.logout(),B.setAutologinUser(""),xs.toLogin()}));var Jo={components:{HeaderIcon:Qi},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(){xs.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="",Po.loginPlainPassword(e,t,this.remember).then((function(){n.loginSuccess=!0,xs.toMain()})).catch((function(e){n.loginSuccess=!1,n.loginErrorCode=e})))},loginStored:function(e){var t=this;e&&(t.savedUsers.includes(e)||Po.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",Po.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(J.translate(t,e)))return;B.unmarkSyncedDatabase(e),B.removeUserPassword(e),Po.getLoggedInUsername()===e&&Po.logout(),oi.deleteDatabase(e)}else Po.logout();this.allUsersList=B.getSavedUsers(this.activeUser),this.savedUsers=B.getSavedUsers(this.activeUser),this.savedOnlineUsers=B.getSavedOnlineUsers(),this.savedLocalUsers=B.getSavedLocalUsers()},hasValidMajorModelVersion:function(e){return B.getUserMajorModelVersion(e)<=r.getLatestModelVersion().major}},mounted:function(){var e=Po.getLoggedInUsername();this.activeUser=B.getAutologinUser()||e,this.savedUsers=B.getSavedUsers(this.activeUser),this.allUsersList=B.getSavedUsers(this.activeUser),this.savedOnlineUsers=B.getSavedOnlineUsers(),this.savedLocalUsers=B.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:B.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),J.initDomI18n()},updated:function(){J.initDomI18n()}},Xo=(n(114),Ki(Jo,xo,[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));Xo.options.__file="src/vue-components/views/loginView.vue";var qo=Xo.exports,Zo=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.remember=n.concat([null])):a>-1&&(e.remember=n.slice(0,a).concat(n.slice(a+1)))}else e.remember=r}}}),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)};Zo._withStripped=!0;var Qo=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)};Qo._withStripped=!0;var es={props:[],components:{Accordion:ir},data:function(){return{showInfo:!1}},methods:{},mounted:function(){J.initDomI18n()}},ts=(n(116),Ki(es,Qo,[],!1,null,"2a375b84",null));ts.options.__file="src/vue-components/components/comparisonComponent.vue";var ns=ts.exports,is={components:{ComparisonComponent:ns,HeaderIcon:Qi},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(){xs.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 ")])])])])};_s._withStripped=!0;var bs=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=Kn.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),wi.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished:function(){this.editId=null,this.searchWord="",wi.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord:function(e){var t=this,n=void 0===e?200:0;ni.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,ni.DEFAULT_KEY2)},clone:function(e){var t=this;yi.getDictionary(e).then((function(e){yi.saveDictionary(e.clone()).then((function(){t.reload()}))}))},deleteWord:function(e,t){var n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,ni.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),yi.saveDictionary(t)}),2e3,ni.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){var t=this,n=this;yi.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===jn.getModelName()&&this.reload(n[0])}},created:function(){var e=this;W()(document).on(i.EVENT_DB_PULL_UPDATED,e.updatedHandler),yi.getDictionaries().then((function(t){log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1}))},mounted:function(){this,J.initDomI18n()},updated:function(){J.initDomI18n()},beforeDestroy:function(){Yn.init(),W()(document).off(i.EVENT_DB_PULL_UPDATED,this.updatedHandler),W.a.contextMenu("destroy")}},Ts=(n(128),Ki(Ss,_s,[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));Ts.options.__file="src/vue-components/views/dictionariesView.vue";var Ns=Ts.exports,As=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("Language // Sprache")]),e._v(" "),e.gridLanguages?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!==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._e(),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.syncNavigation=n.concat([null])):a>-1&&(e.syncNavigation=n.slice(0,a).concat(n.slice(a+1)))}else e.syncNavigation=r},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._e()],1)};As._withStripped=!0;var Os={components:{HeaderIcon:Qi},props:[],data:function(){return{metadata:null,show:!1,langCode:"",gridLanguages:null,allLanguages:J.getAllLanguages(),currentLang:J.getBrowserLang(),saveSuccess:null,speechService:vr,syncNavigation:B.shouldSyncNavigation(),voices:vr.getVoices(),selectedVoiceName:vr.getPreferredVoiceName(),testText:J.translate("This is an english sentence. // Das ist ein deutscher Satz.")}},methods:{saveLangCode:function(){var e=this;this.saveSuccess=void 0,ni.debounce((function(){J.setLanguage(e.langCode),J.initDomI18n(),e.saveSuccess=!0}),300,"SAVE_LANG")},saveVoice:function(){var e=this;this.saveSuccess=void 0,ni.debounce((function(){vr.setPreferredVoiceName(e.selectedVoiceName),e.saveSuccess=!0}),300,"SAVE_VOICE")},saveSyncNavigation:function(){var e=this;this.saveSuccess=void 0,ni.debounce((function(){B.setShouldSyncNavigation(e.syncNavigation),e.saveSuccess=!0}),300,"SAVE_NAV")},testSpeak:function(){vr.speak(this.testText,null,this.selectedVoiceName)}},mounted:function(){var e=this;J.initDomI18n(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0})),yi.getGrids(!1,!0).then((function(t){e.gridLanguages=Object.keys(t[0].label)})),e.langCode=J.getCustomLanguage()},updated:function(){J.initDomI18n()}},Is=(n(130),Ki(Os,As,[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));Is.options.__file="src/vue-components/views/settingsView.vue";var ks=Is.exports,Ls=["#login","#register","#welcome","#add","#about"],xs={},Ds=null,Rs=null,Ms=!1,Ps=null,Us=[];function Gs(){var e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function js(e,t){Rs=t?null:location.hash,location.hash=e}function Fs(e,t,n){var i;Ps=e,e!==Lo&&W()("#touchElement").hide(),i=n||Gs(),W()("nav button").removeClass("selected"),W()("nav a[href='".concat(i,"'] button")).addClass("selected"),log.debug("loading view: "+e.__file),Xi.setViewComponent(e,t)}function $s(){yi.getMetadata().then((function(e){var t=e?e.lastOpenedGridId:null;Fs(Lo,{gridId:t})}))}xs.init=function(e,t){Ms=!0,e,(Ds=new Y.a(null,!0)).on({main:function(){wi.setHelpLocation("02_navigation","#main-view"),$s()},"grids/":function(){wi.setHelpLocation("02_navigation","#manage-grids-view"),Fs(dr)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),wi.setHelpLocation("02_navigation","#main-view"),Fs(Lo,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),wi.setHelpLocation("02_navigation","#main-view"),yi.getGrids().then((function(t){var n=t.filter((function(t){return J.getTranslation(t.label)===e.gridName})),i=n[0]?n[0].id:null;i?Fs(Lo,{gridId:i},"#main"):(log.warn("no grid with name ".concat(e.gridName," found!")),$s())}))},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),wi.setHelpLocation("02_navigation","#edit-view"),Fs(xa,{gridId:e.gridId})},login:function(){wi.setHelpLocation("02_navigation","#change-user-view"),Fs(qo)},register:function(){wi.setHelpLocation("06_users","#online-users"),Fs(as)},add:function(){wi.setHelpLocation("06_users","#offline-users"),Fs(cs)},welcome:function(){wi.setHelpLocationIndex(),Fs(ps)},about:function(){wi.setHelpLocationIndex(),Fs(gs)},dictionaries:function(){wi.setHelpLocation("02_navigation","#manage-dictionaries-view"),Fs(Ns)},settings:function(){Fs(ks)},"*":function(){wi.setHelpLocation("02_navigation","#main-view"),xs.toMain()}}),Ds.hooks({before:function(e,t){Ps&&Ps.destroy&&(Ps.destroy(),Ps=null);var n=function(){var e=location.hash;if(!oi.getCurrentUsedDatabase()){var t=B.getLastActiveUser()||B.getSavedUsers().length>0;e=(e=Ls.includes(e)?e:null)||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),js(n)):e()},after:function(e){},leave:function(e){}}),t&&js(t),Ds.resolve()},xs.isInitialized=function(){return Ms},xs.toMain=function(){0===Gs().indexOf("#main")?js("#main?date="+(new Date).getTime()):js("#main")},xs.toRegister=function(){js("#register")},xs.toAddOffline=function(){js("#add")},xs.toAbout=function(){js("#about")},xs.toLogin=function(){js("#login")},xs.toLastOpenedGrid=function(){yi.getMetadata().then((function(e){xs.toGrid(e.lastOpenedGridId)}))},xs.toGrid=function(e){e&&js("#grid/"+e+"?date="+(new Date).getTime())},xs.toEditGrid=function(e){e&&js("#grid/edit/"+e)},xs.toManageGrids=function(){js("#grids")},xs.back=function(){Rs&&Rs!==location.hash?js(Rs,!0):this.toMain()},xs.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},xs.getCurrentView=function(){return Ps},xs.addToGridHistory=function(e){Us.length>0&&Us[Us.length-1]===e||(-1===Us.indexOf(e)?Us.push(e):Us=[e])},xs.toLastGrid=function(){if(1!==Us.length){Us.pop();var e=Us.pop();xs.toGrid(e)}};var Bs={},Vs=null;Bs.init=function(){ki.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())}}),ki.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)}}}),ki.a.filter("translate",(function(e){return J.translate(e)})),ki.a.filter("extractTranslation",(function(e){return J.getTranslation(e)}))};n(132),n(134),n(136);var Hs={init:function(){ji.global.onAnyKey((function(e,t,n){if(n.ctrlKey&&n.shiftKey&&39===e){var i=B.getSavedUsers(),r=yi.getCurrentUser(),a=i.indexOf(r),o=i[a=a+1r.getLatestModelVersion().major&&(log.info('data model version of user "'.concat(n,'" is newer than version of running AsTeRICS Grid -> prevent autologin.')),n=null,B.setAutologinUser("")),log.info("autologin user: "+n),un.isDemoMode()?(e.push(Po.registerOffline(i.LOCAL_DEMO_USERNAME,i.LOCAL_DEMO_USERNAME)),B.setAutologinUser("")):e.push(Po.loginStoredUser(n,!0)),Promise.all(e).finally((function(){Xi.init();var e=n||un.isDemoMode(),i=t||B.getSavedUsers().length>0;B.setLastActiveUser(n||t||"");var r=location.hash||(e?"#main":i?"#login":"#welcome");xs.isInitialized()||xs.init("#injectView",r)}))}()}]); \ 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 r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,i.emitWarning(r)}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 r,a,o,s,l,c,u,d=[],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(r=0,a=n._listeners.length;r0&&r._listeners.length>this._maxListeners&&(r._listeners.warned=!0,u.call(this,r._listeners.length,a))):r._listeners=t,!0;a=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 r=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function a(){return 0==--t&&r.off(e,a),n.apply(this,arguments)}return a._origin=n,this._on(e,a,i),r},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,r,a,o=arguments.length;if(this._all&&this._all.length){if(a=this._all.slice(),o>3)for(t=new Array(o),r=0;r3)for(t=new Array(o-1),r=1;r3)for(t=new Array(s),r=1;r3)for(t=new Array(s-1),r=1;r0&&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 r="string"==typeof e?e.split(this.delimiter):e.slice();i=f.call(this,null,r,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[r]),0===Object.keys(o).length&&delete t[r])}}}(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(137);"string"==typeof i&&(i=[[e.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(2)(i,r);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={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_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"};i.IS_ENVIRONMENT_DEV="#ASTERICS_GRID_ENV#"===i.ENVIRONMENT,i.IS_ENVIRONMENT_PROD=!i.IS_ENVIRONMENT_DEV,i.IS_FIREFOX=-1!==navigator.userAgent.indexOf("Firefox"),i.STATE_ACTIVATED_TTS="STATE_ACTIVATED_TTS";var r={},a=100,o=JSON.parse(i.MODEL_VERSION),s={major:null,minor:null,patch:null};r.generateId=function(e){return(e=e||"id")+"-"+(new Date).getTime()+"-"+a++},r.getAsObject=function(e){return"string"==typeof e?JSON.parse(e):e},r.getNewName=function(e,t){for(var n=1,i=e;t.includes(i);)i=e+" ("+n+")",n++;return i},r.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},r.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)},r.getModelVersionString=function(){return i.MODEL_VERSION},r.getModelVersionObject=function(e){if(!e)return s;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:s},r.getLatestModelVersion=function(){return o};var l=window.Model;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n0}}],[{key:"getModelName",value:function(){return"InputEventARE"}}]),n}(l({id:String,modelName:String,modelVersion:String,label:[String],eventNames:[l.Array(String)],areURL:[String]}));function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);nn[e].toLowerCase()?1:-1})),ee=e),Q},J.translate=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i-1){var r=e.split(" // "),a="en"===n[0]||"de"===n[0]?n[0]:J.getBrowserLang(),o=Z.indexOf(a);return o=o>0?o:0,n.forEach((function(e){r[o]=r[o].replace("{?}",e)})),r[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},J.getTranslation=function(e,t,n){if(!e)return"";if(t=t||"en","string"==typeof e)return e;var i=J.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 r=Object.keys(e);return e[r[0]]?n?{lang:r[0],text:e[r[0]]}:e[r[0]]:n?{lang:void 0,text:""}:""},J.getTranslationObject=function(e,t){t=t||J.getBrowserLang(),e=J.translate(e,t);var n={};return n[t]=e,n},J.setLanguage=function(e){X=e,q&&q.changeLanguage(e),B.save("CUSTOM_LANGUAGE_KEY",X),W()(document).trigger(i.EVENT_LANGUAGE_CHANGE)},J.getCustomLanguage=function(){return X},J.translations={},J.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",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",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",UP:"Go up",DOWN:"Go down",LEFT:"Go left",RIGHT:"Go right",GENERAL_INPUT:"Input",InputEventKey:"Keypress",InputEventARE:"AsTeRICS ARE event"},J.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",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",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",UP:"Nach oben",DOWN:"Nach unten",LEFT:"Nach links",RIGHT:"Nach rechts",GENERAL_INPUT:"Eingabe",InputEventKey:"Tastendruck",InputEventARE:"AsTeRICS ARE Event"};var te=n(7),ne=n.n(te),ie={},re="20px";function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oe(e,t){for(var n=0;na.height/3&&(re=.3*a.height),1===n.length&&"ELEMENT_TYPE_NORMAL"===i&&(re*=2),re+"px"},ie.adaptFontSize=function(e){for(var t=0;t\n \n ')},fe.getGridItem=function(e,t){switch(e.type){case wt.ELEMENT_TYPE_COLLECT:return function(e){e=pe(e);var t=J.getTranslation(e.label);return'\n
  • \n
    \n
    \n
    \n \n
    \n
    \n
    \n
  • ')}(e);case wt.ELEMENT_TYPE_PREDICTION:return function(e){e=pe(e);var t=J.getTranslation(e.label);return'\n
  • \n
    \n
    ').concat(t,"
    \n
    \n
  • ")}(e);default:return function(e,t){e=pe(e);var n="",i="",r="font-size:"+ie.getLastFontSize()+";",a="1%",o=J.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):(r+="flex: 1 1 auto;",a="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===de.getModelName()})).length>0?'':"";return''.concat(t+" "+n,"")}(e),"\n
    \n
  • ")}(e,t)}};var ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(n,e);var t=ge(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=r.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||r.generateId(n.getIdPrefix()),a}return function(e,t,n){t&&me(e.prototype,t),n&&me(e,n)}(n,null,[{key:"getModelName",value:function(){return"GridImage"}},{key:"getIdPrefix",value:function(){return"grid-image"}}]),n}(l({id:String,modelName:String,modelVersion:String,data:[String],author:[String],authorURL:[String]}));function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function we(e,t){for(var n=0;n=i)return"break";var a=t.reduce((function(t,n){return t&&(r>=n.y+n.height||e>=n.x+n.width)}),!0);a&&(i=e+r),n.push({x:e,y:r,sum:e+r,valid:a})},a=0;a<10;a++){if("break"===r(a))break}},a=0;a<10;a++)r(a);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()}},Ut.getFreeCoordinates=function(e){for(var t=new cn({},e),n={},i=0;i0}))}(n,i).length>0;var n,i})),a=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===de.getModelName()})))}),[]).map((function(e){return e.toGridId}))}(t).indexOf(e.id)})),o={grid:t,parents:r,children:a,navCount:r.length+a.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};var Ht=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ft(e,t)}(n,e);var t=$t(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=r.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||r.generateId(n.getModelName().toLowerCase()),a}return function(e,t,n){t&&jt(e.prototype,t),n&&jt(e,n)}(n,null,[{key:"getModelName",value:function(){return"EncryptedObject"}}]),n}(l({id:String,modelName:String,modelVersion:String,encryptedDataBase64:[String],encryptedDataBase64Short:[String]}));Ht.defaults({modelVersion:i.MODEL_VERSION});var zt={},Wt=["thumbnail"];zt.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===Wt.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 r=0;r1?i[0]:i;"string"==typeof e?i?r&&"function"!=typeof r?Yt.warn("object type has to be a constructor function or empty, aborting."):a&&a.isShortVersion?Yt.debug("not caching model instances only containing short version of data, aborting."):(t[e]=JSON.stringify(i),delete n[e],r&&(n[e]=r)):Yt.warn("cache-values has to be set, aborting."):Yt.warn("cache-key has to be a string, aborting.")},e.get=function(e){if("string"==typeof e){if(!t[e])return null;var r=JSON.parse(t[e]),a=n[e];return r instanceof Array?r.map((function(e){return i(a,e)})):i(a,r)}Yt.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?(Yt.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 Xt={},qt=null,Zt=null,Qt=!1,en=new Jt;function tn(){if(!Zt||!qt){var e="using encryptionService uninitialized is not possible, aborting...";throw Yt.error(e),e}}function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rn(e,t){for(var n=0;n1?i:i[0]},Xt.encryptString=function(e,t){t||tn();return(t=t||Zt)&&!Qt?Kt.encrypt(t,e,{iter:1e3}):e},Xt.decryptString=function(e,t){if(t||tn(),en.has(e))return Yt.debug("using decryption cache..."),en.get(e);t=t||Zt;var n=null;(new Date).getTime();if(t&&!Qt)n=Kt.decrypt(t,e);else try{n=e;var i=JSON.parse(n);i.iv&&i.cipher&&i.ct&&(n=Kt.decrypt(t,e))}catch(i){n=Kt.decrypt(t,e)}return en.set(e,n),n},Xt.getStringHash=function(e){var t=Kt.hash.sha256.hash(e);return Kt.codec.hex.fromBits(t)},Xt.getUserPasswordHash=function(e){return Xt.getStringHash("STATIC_USER_PW_SALT"+e)},Xt.setEncryptionProperties=function(e,t,n){e=e||"",qt=t,Zt=Xt.getStringHash(""+qt+e),Qt=n,en.clearAll(),Yt.debug("new encryption key is: "+Zt)},Xt.resetEncryptionProperties=function(){Yt.debug("reset encryption properties..."),qt=null,Zt=null,Qt=!1};var cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&an(e,t)}(n,e);var t=on(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=r.setDefaults(e,i,n))&&(e.id=e.id?e.id:r.generateId(n.getIdPrefix())),(a=t.call(this,e)).minColumnCount=e.minColumnCount||a.getWidth()||B.getLastGridDimensions().minColumnCount||4,a.rowCount=e.rowCount||a.getHeight()||B.getLastGridDimensions().rowCount||3,a.id=a.id||r.generateId("grid-data"),a}return function(e,t,n){t&&rn(e.prototype,t),n&&rn(e,n)}(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))})),Xt.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=Ut.getFreeCoordinates(this);return n.length>0?n[0]:{x:t,y:0}}},{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===wt.ELEMENT_TYPE_NORMAL}))).map((function(e){return e.id})),r=i.indexOf(e);if(-1===r)return i[0];var a=r+(t?-1:1);return i[a=(a=a>i.length-1?0:a)<0?i.length-1:a]}},{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===$e.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=r.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}(l({id:String,modelName:String,modelVersion:String,isShortVersion:Boolean,label:[Object,String],locale:[String],rowCount:[Number],minColumnCount:[Number],gridElements:l.Array(wt),additionalFiles:[l.Array(It)],webRadios:[l.Array(Pt)],thumbnail:[Object]}));cn.defaults({id:"",modelName:cn.getModelName(),modelVersion:i.MODEL_VERSION,isShortVersion:!1,additionalFiles:[],webRadios:[],label:{},locale:J.getBrowserLang()});var un={},dn=!1,fn=!1;function pn(e){return new URLSearchParams(window.location.search).has(e)}function hn(e){return new URLSearchParams(window.location.search).get(e)}function mn(e){return"false"===hn(e)}un.isDemoMode=function(){return dn=dn||pn("demo"),function(e){if(!pn(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)}}("demo"),dn},un.isScanningEnabled=function(){return pn("scanning")&&!mn("scanning")},un.isDirectionEnabled=function(){return pn("direction")&&!mn("direction")},un.isHuffmanEnabled=function(){return pn("huffman")&&!mn("huffman")},un.shouldResetDatabase=function(){var e=!fn&&(un.isDemoMode()||"true"===hn("reset"));return fn=!0,e},un.getDefaultGridsetName=function(){return hn("default")};var vn=n(8),gn=n.n(vn),_n={};function bn(e,t,n){if(!e)return e;var i=e instanceof Array;e=i?e:[e];for(var a=function(i){n(r.getModelVersionObject(e[i].modelVersion)).forEach((function(n){e[i]=n(e[i],t)}))},o=0;o0&&(t=(n=e.change.docs.filter((function(e){return!!w(e)&&!function(e){return h[w(e)]&&E(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)),!f&&(t.length>0||n.length>0)&&a(t,n)}catch(e){log.error(e)}}function y(e){e&&e.length>0&&e.forEach((function(e){var t=w(e),n=E(e);(!h[t]||h[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&&r?Nn.set(t,r):!t&&e&&r&&Nn.set(e,r),i(r)})).catch((function(e){log.error(e),r()})).finally((function(){Ln()}))}))},Sn.save=function(e,t){return log.debug("saving "+e+"..."),kn(),t.id&&(Nn.clear(t.id,t),Nn.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();Tn.put(t).then((function(i){t._rev=i.rev,Nn.set(t.id,t),log.debug("updated "+e+", id: "+t._id),n()})).catch((function(e){t.id&&Nn.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(){Ln()}))}))},Sn.bulkDocs=function(e){if(!(e&&e instanceof Array&&0!==e.length))return log.warn("bulkSave: no valid dataList"),Promise.reject();kn(),Nn.clearAll();var t=Tn.bulkDocs(e);return t.finally((function(){Ln()})),t},Sn.remove=function(e){var t=On();return Sn.all(null,e).then((function(e){return Nn.clearAll(),log.debug("deleted object from db! id: "+e.id),t.remove(e)}))},Sn.resetDatabase=function(e){return Sn.isUsingLocalDb()&&Sn.getOpenedDatabaseName()===i.LOCAL_DEMO_USERNAME?(Nn.clearAll(),new Promise((function(t){Tn.destroyDb(e).then((function(){Tn=null,Sn.initDatabase(e).then((function(){return t()}))})).catch((function(e){log.error("error destroying database: "+e)}))}))):Promise.reject("do not destroy!")},Sn.deleteDatabase=function(e){if(Sn.getOpenedDatabaseName()===e&&!Sn.isUsingLocalDb()||!e)return log.warn("won't delete database since using remote db or databaseName not specified..."),Promise.reject();Nn.clearAll();var t=[];return Sn.getOpenedDatabaseName()===e&&t.push(Sn.closeCurrentDatabase()),Promise.all(t).then((function(){return new gn.a(e).destroy()}))},Sn.closeCurrentDatabase=function(){if(!Tn)return Promise.resolve();kn();var e=Tn.close();return Tn=null,e},Sn.getOpenedDatabaseName=function(){return Tn?Tn.getOpenedDatabaseName():null},Sn.isUsingLocalDb=function(){return Tn?Tn.isUsingLocalDb():null},Sn.getSyncState=function(){return Tn?Tn.getSyncState():null},Sn.isSyncEnabled=function(){return Tn?Tn.isSyncEnabled():null};var jn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mn(e,t)}(n,e);var t=Pn(n);function n(e,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=r.setDefaults(e,i,n),(a=t.call(this,e)).id=a.id||r.generateId(n.getIdPrefix()),a}return function(e,t,n){t&&Rn(e.prototype,t),n&&Rn(e,n)}(n,[{key:"clone",value:function(){var e=new n(this);return delete e._id,delete e._rev,e.id=r.generateId("dictionary"),e.dictionaryKey=this.dictionaryKey+" (Copy)",e}}],[{key:"getModelName",value:function(){return"Dictionary"}},{key:"getIdPrefix",value:function(){return"dictionary"}}]),n}(l({id:String,modelName:String,modelVersion:String,dictionaryKey:String,data:[String],isDefault:[Boolean]}));jn.defaults({id:"",modelName:jn.getModelName(),modelVersion:i.MODEL_VERSION,data:JSON.stringify({})});var Fn={};Fn.createItem=function(e,t){if(!e)throw'parameter "word" must be specified.';var n,i=parseInt(t),r={w:e,f:0,t:{}};return(n=i)==parseInt(n)&&(r.r=i),r};var $n=Fn;var Bn=function(){var e=this,t={},n=null,i=null;function r(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 a(e){var t=r(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]=$n.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 r=t[i];Object.keys(r.t).forEach((function(t){(n?e.toUpperCase()===t.toUpperCase():e===t)&&delete r.t[t]}))}}))},e.contains=function(e,n){return n?!!t[e]:!!a(e)},e.predictCompleteWord=function(r,a){r=r||"",a=a||{};var o=[];if(Object.keys(t).forEach((function(e){0===e.toLowerCase().indexOf(r.toLowerCase())&&o.push(t[e])})),0===o.length&&r.length>1){var s=null;return(s=n&&i&&0===r.indexOf(n)?i:e.predictCompleteWord(r.substring(0,r.length-1),a)).forEach((function(e){e.fuzzyMatch=!0})),s}return n=r,i=o.map((function(e){return{word:e.w,frequency:e.f,rank:e.r}}))},e.predictNextWord=function(e,t){var n=r(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 r=a(n),o=a(t);o.f++,r&&r.t&&(r.t[o.w]?r.t[o.w]++:r.t[o.w]=1)}},e.getWords=function(){return Object.keys(t)}};function Vn(){this.DEFAULT_DICTIONARY_KEY="DEFAULT_DICTIONARY_KEY";var e=this,t={},n=null;function i(n,i,r){var a=[];(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"===r?o.predictNextWord:"PREDICT_METHOD_COMPLETE_WORD"===r?o.predictCompleteWord:null;s=s||(zn(n)?o.predictNextWord:o.predictCompleteWord),a=a.concat(s(Hn(n),i))}})),a.sort((function(e,t){return e.fuzzyMatch!==t.fuzzyMatch?e.fuzzyMatch?1:-1:e.frequency!==t.frequency?e.frequency0&&(!zn(c)||new RegExp("[\\.\\?!,]").test(c[c.length-1]))&&(c+=" "),o||e.learn(n,a?l:s,r),c+n+" "},this.learn=function(n,i,r){n=Wn(n),i=Wn(i);var a=e.getDictionaryKeys(!0);if(r=1===a.length?a[0]:r,a.length>0&&(!r||!t[r])){var o=0;a.forEach((function(t){var a=0;e.hasWord(n,t)&&(a+=2),e.hasWord(i,t)&&a++,a>0&&a>=o&&(o=a,r=t)}))}r=r||e.DEFAULT_DICTIONARY_KEY,t[r]||e.addDictionary(r),Object.keys(t).forEach((function(e){var a=t[e];a.disabled||a.learn(n,i,r===e)}))},this.learnFromInput=function(t,i){if(zn(t)){var r=Hn(t,2),a=Hn(t,3);if(r&&r!==n)return n=r,e.learn(r,a,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(" "),r=0;r-1&&Yn.init(Xn)}));var ni={},ii={},ri={},ai="";ni.DEFAULT_KEY="DEFAULT_KEY",ni.DEFAULT_KEY2="DEFAULT_KEY2",ni.debounce=function(e,t,n){n=n||ni.DEFAULT_KEY,e||t?(ii[n]&&clearTimeout(ii[n]),ii[n]=setTimeout((function(){e()}),t)):log.warn("called util.debounce() without needed parameters. aborting.")},ni.clearDebounce=function(e){e=e||ni.DEFAULT_KEY,ii[e]&&clearTimeout(ii[e])},ni.throttle=function(e,t,n,i){if(e&&e.apply){n=n||500;var r=i||e,a=ri[r];(!a||(new Date).getTime()-a>n)&&(e.apply(null,t),ri[r]=(new Date).getTime())}},ni.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";ai=e,log.debug("Copying text command was "+n)}catch(e){log.warn("Unable to copy to clipboard.")}document.body.removeChild(t)},ni.appendToClipboard=function(e){ni.copyToClipboard(ai+e)},ni.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)}))},ni.getElement=function(e,t,n){var i=document.elementsFromPoint(t,n),r=null;return i.forEach((function(t){r=r||function(e,t){for(var n=0;e&&-1===t.indexOf(e)&&n<100;n++)e=e.parentElement;return e}(t,e)})),r},ni.splitInChunks=function(e,t){for(var n=[],i=0,r=e.length;i1&&r.push(function(e,t){log.warn("fixing duplicated metadata...");var n=null;return Sn.all().then((function(i){var r=[];n=t.map((function(e){return e.id}));var a=[];i.forEach((function(t){r.push(function t(n,i){var r=JSON.parse(JSON.stringify(i));try{return Xt.decryptObjects(n)}catch(i){if(0===r.length)throw"something really went wrong - unable to decrypt object: "+n.modelName+", id: "+n.id;return Xt.setEncryptionProperties(e,r.pop()),t(n,r)}}(t,n))}));var o=n.pop();return Xt.setEncryptionProperties(e,o),log.warn("keeiping metadata: "+o),log.warn("decrypted docs:"),log.warn(r),log.warn("re-encrypting and saving them..."),r.forEach((function(e){var t=fi(e.modelName,e);a.push(t)})),Promise.all(a)})).then((function(){var e=[];return log.warn("deleting superfluous metadata objects ..."),n.forEach((function(t){e.push(Sn.remove(t))})),Promise.all(e)})).then((function(){return log.warn("all done - reloading page..."),window.location.reload(),Promise.reject()}))}(e,t))):(i=new P,Xt.setEncryptionProperties(e,i.id,n),r.push(fi(P.getIdPrefix(),i))),Promise.all(r)})).then((function(){return Sn.all(jn.getIdPrefix()).then((function(e){return e?Promise.resolve():new Promise((function(e){log.info("importing dictionary: "+ci),W.a.get(ci).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 jn({dictionaryKey:ui,data:e,isDefault:!0});return fi(jn.getIdPrefix(),t)}))}))).then((function(){li=null,Yn.init()})),si}function fi(e,t){return new Promise((function(n,i){var r=_n.convertLiveToDatabaseObjects(t);Sn.save(e,r).then((function(){log.debug("saved "+e+", id: "+t.id),n()})).catch((function(e){i(e)}))}))}oi.getObject=function(e,t,n){return new Promise((function(i,r){si.then((function(){if(!e.getIdPrefix)return log.warn("missing method getIdPrefix() in allObjects()"),r();Sn.all(e.getIdPrefix(),t).then((function(t){var r={objectType:e,onlyShortVersion:n},a=_n.convertDatabaseToLiveObjects(t,r),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}(a);o&&li!==o&&(li=o,B.setUserModelVersion(Sn.getOpenedDatabaseName(),o)),i(a)})).catch((function(e){r(e)}))}))}))},oi.getSingleObject=function(e,t,n){return oi.getObject(e,t,n).then((function(e){return Promise.resolve(e instanceof Array?e[0]:e)}))},oi.saveObject=function(e,t,n){return si.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()+"..."),oi.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 r=new e(t,i),a=JSON.parse(JSON.stringify(r));return a._id=i._id,a._rev=i._rev,fi(e.getIdPrefix(),a)}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,fi(e.getIdPrefix(),o)}))},oi.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(_n.convertLiveToDatabaseObjects(e).forEach((function(e){e._id=e.id})),t>1e3){var r=Math.floor(1e3/n);i=ni.splitInChunks(e,r)}else i=[e];return function e(t){var n=JSON.parse(JSON.stringify(t.shift()));return Sn.bulkDocs(n).then((function(){return t.length>0?e(t):Promise.resolve()}))}(i)},oi.bulkDelete=function(e){return e.forEach((function(e){e._deleted=!0,e._id=e.id})),Sn.bulkDocs(JSON.parse(JSON.stringify(e)))},oi.removeObject=function(e){return Sn.remove(e)},oi.initForUser=function(e,t,n,i){var r=n&&!i||!1,a=Sn.getOpenedDatabaseName()===e,o=-1!==B.getSavedLocalUsers().indexOf(e);return a&&r===Sn.isSyncEnabled()?Promise.resolve():Sn.initDatabase(e,n,i).then((function(){return a?Promise.resolve():di(t,e,o)}))},oi.registerForUser=function(e,t,n,i){var r=n&&!i,a=-1!==B.getSavedLocalUsers().indexOf(e);return Sn.getOpenedDatabaseName()===e&&r===Sn.isSyncEnabled()?Promise.resolve():Sn.createDatabase(e,n,i).then((function(){return di(t,e,a)}))},oi.deleteDatabase=function(e){if(e)return Sn.deleteDatabase(e)},oi.closeCurrentDatabase=function(){return Sn.closeCurrentDatabase()},oi.getCurrentUsedDatabase=function(){return Sn.getOpenedDatabaseName()};var pi={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 r=document.createElement("canvas"),a=1;e.width>t&&(a=t/e.width),r.width=e.width*a,r.height=e.height*a,r.getContext("2d").drawImage(e,0,0,r.width,r.height);try{return r.toDataURL(i,n)}catch(e){throw"image converting failed!"}},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])}}))},convertBase64:function(e,t,n){return new Promise((function(i,r){if(!e)return i(null);if("image/svg+xml"===e.substring(5,e.indexOf(";")))return i(e);t=t||150;var a=document.createElement("img");a.onload=function(){try{i(pi.getBase64FromImg(a,t,n))}catch(e){i(null)}},a.src=e}))},urlToBase64:function(e){return new Promise((function(t,n){if(e.lastIndexOf(".svg")===e.length-4)$.get(e,null,(function(e){try{e.documentElement.width.baseVal.value=e.documentElement.width.baseVal.value||500,e.documentElement.height.baseVal.value=e.documentElement.height.baseVal.value||500;var n=btoa((new XMLSerializer).serializeToString(e));t("data:image/svg+xml;base64,"+n)}catch(e){t(null)}})).fail((function(){t(null)}));else{var i=new Image;i.crossOrigin="anonymous",i.onload=function(){try{t(pi.getBase64FromImg(i,1e3))}catch(e){t(null)}},i.onerror=function(){t(null)},i.src=e}}))},getScreenshot:function(e){return n.e(3).then(n.t.bind(null,240,7)).then((function(t){return t.default(document.querySelector(e),{scale:.2,logging:!1,ignoreElements:function(e){return i.IS_FIREFOX&&-1!==e.style["background-image"].indexOf("image/svg")}}).then((function(e){return Promise.resolve(e.toDataURL())}))}))},getEmptyImage:function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}},hi={};hi.gridDataToOBF=function(e){},hi.gridSetToOBZ=function(e){},hi.OBFToGridData=function(e,t){var n=[],i=e.locale&&2===e.locale.length?e.locale.toLowerCase():J.getBrowserLang(),r=new cn({obfId:e.id,label:J.getTranslationObject(e.name,i),locale:i,rowCount:e.grid.rows,minColumnCount:e.grid.columns,gridElements:[]});return e.buttons.forEach((function(a){if(!a.hidden){var o=function(e,t){var n=t.grid.order,i=null;return n.forEach((function(t,n){t.forEach((function(t,r){t===e&&(i={x:r,y:n})}))})),i}(a.id,e),s=new wt({width:1,height:1,label:J.getTranslationObject(a.label,i),x:o.x,y:o.y,backgroundColor:a.background_color});(s=function(e,t,n,i){t.vocalization&&(e.actions=e.actions.filter((function(e){return e.modelName!==Ae.getModelName()})),e.actions.push(new Re({speakText:t.vocalization,speakLanguage:n.locale})));if(t.load_board&&t.load_board.path){var r=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);r&&e.actions.push(new de({toGridId:r}))}return e}(s,a,e,t)).actions.filter((function(e){return e.modelName===Ae.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],r=null,a=[];if(!i)return Promise.resolve(null);if(i.data)r=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];r=l+c}else i.url&&a.push(pi.urlToBase64(i.url).then((function(e){return r=e,Promise.resolve()})));return Promise.all(a).then((function(){return r?Promise.resolve(new ye({data:r})):(log.info("failed to import image: "+e),Promise.resolve(null))}))}(a.image_id,e,t).then((function(e){return s.image=e,Promise.resolve()}))),r.gridElements.push(s)}})),Promise.all(n).then((function(){return Promise.resolve(r)}))},hi.OBZToGridSet=function(e){var t=[],n=[];return Object.keys(e).forEach((function(i){-1!==i.indexOf(".obf")&&t.push(hi.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===de.getModelName()){var i=t.toGridId,r=n.reduce((function(e,t){return e||(t.obfId===i?t.id:null)}),null);r?t.toGridId=r:e.actions=e.actions.filter((function(e){return e.id!==t.id}))}}))}))})),n.forEach((function(e){delete e.obfId})),Promise.resolve(n)}))};var mi={readZip:function(e,t){var i={};return new Promise((function(r){Promise.all([n.e(2),n.e(0)]).then(n.t.bind(null,241,7)).then((function(n){n.loadAsync(e).then((function(e){var n=[];Object.keys(e.files).forEach((function(r){var a=e.files[r];n.push(a.async("base64").then((function(e){try{i[r]=t?JSON.parse(atob(e)):e}catch(t){i[r]=e}})))})),Promise.all(n).then((function(){r(i)}))}))}))}))}},vi={},gi=null,_i=null,bi=[];vi.setProgress=function(e,t){gi=Math.round(100*t),_i=e,bi.forEach((function(e){e(_i,gi)}))},vi.register=function(e){bi.push(e)},vi.clearHandlers=function(){bi=[]};var yi={},Ei="app/examples/default.grd.json";un.getDefaultGridsetName()&&(Ei="app/examples/"+un.getDefaultGridsetName()),yi.getGrid=function(e,t){return e?oi.getSingleObject(cn,e,t).then((function(e){return Promise.resolve(e?new cn(e):null)})):Promise.resolve(null)},yi.getGlobalGrid=function(e){return yi.getMetadata().then((function(t){return t.globalGridId&&(e||t.globalGridActive)?yi.getGrid(t.globalGridId).then((function(e){return Promise.resolve(e)})):Promise.resolve(null)}))},yi.getGrids=function(e,t){return new Promise((function(n){oi.getObject(cn,null,!e).then((function(e){if(e){var i=e instanceof Array?e:[e];t?yi.getMetadata().then((function(e){n(i.filter((function(t){return t.id!==e.globalGridId})))})):n(i)}else n([])}))}))},yi.saveGrid=function(e){return e.gridElements=Ut.sortGridElements(e.gridElements),oi.saveObject(cn,e)},yi.saveGrids=function(e){return e.forEach((function(e){e.gridElements=Ut.sortGridElements(e.gridElements)})),oi.bulkSave(e)},yi.updateGrid=function(e,t){return t.id=e,t.gridElements=Ut.sortGridElements(t.gridElements),oi.saveObject(cn,t,!0)},yi.deleteGrid=function(e){return oi.removeObject(e)},yi.deleteAllGrids=function(){return yi.getGrids().then((function(e){return e&&0!==e.length?oi.bulkDelete(e):Promise.resolve()})).then((function(){return e="",yi.getMetadata().then((function(t){return t.globalGridId=e,t.globalGridActive=!!e,yi.saveMetadata(t)}));var e}))},yi.importDefaultGridset=function(){return Promise.resolve().then((function(){return W.a.get(Ei)})).then((function(e){if(!e)return Promise.resolve();log.info("importing default grid set "+Ei);try{e=JSON.parse(e)}catch(e){}return yi.importData(e,!1,!0)}))},yi.saveAdditionalGridFiles=function(e,t){return new Promise((function(n){t||n(),yi.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)})),yi.saveGrid(e).then((function(){n()}))}))}))},yi.getGridElement=function(e,t){return new Promise((function(n){yi.getGrid(e).then((function(e){var i=e.gridElements.filter((function(e){return e.id===t}))[0];i?n(i):yi.getGlobalGrid().then((function(e){n(e.gridElements.filter((function(e){return e.id===t}))[0])}))}))}))},yi.getGridsAttribute=function(e){return new Promise((function(t){yi.getGrids().then((function(n){var i={};n.forEach((function(t){i[t.id]=t[e]})),t(i)}))}))},yi.addGridElements=function(e,t){return new Promise((function(n){yi.getGrid(e).then((function(i){(i=JSON.parse(JSON.stringify(i))).gridElements=i.gridElements.concat(t),yi.updateGrid(e,i).then((function(){n()}))}))}))},yi.saveMetadata=function(e,t){return e=JSON.parse(JSON.stringify(e)),new Promise((function(n){yi.getMetadata().then((function(i){if(i){var r=i instanceof Array?i[0].id:i.id;e.id=r,B.saveLocalMetadata(e),B.shouldSyncNavigation()||t||(e.locked=i.locked,e.fullscreen=i.fullscreen,e.lastOpenedGridId=i.lastOpenedGridId)}i.isEqual(e)?n():oi.saveObject(P,e).then((function(){n()}))}))}))},yi.getMetadata=function(){return new Promise((function(e){oi.getObject(P).then((function(t){var n=null;if(n=t?t instanceof Array?t[0]:t:new P,!B.shouldSyncNavigation()){var i=B.getLocalMetadata();i&&(n.locked=i.locked,n.fullscreen=i.fullscreen,n.lastOpenedGridId=i.lastOpenedGridId)}e(new P(n))}))}))},yi.saveImage=function(e){return t=ye,n=e,i=[],new Promise((function(e,a){yi.getMetadata().then((function(o){if(!o||!o.hashCodes)return log.warn("error: hashCodes or metadata do not exist"),void a();var s=null;o.hashCodes[t.getModelName()]?s=o.hashCodes[t.getModelName()]:(s={},o.hashCodes[t.getModelName()]=s);var l=r.hashCode(n);s[l]?(log.debug("saveHashedItemInternal: hash found, not saving new element"),n.id=s[l]):(log.debug("saveHashedItemInternal: hash not found, saving new element"),s[l]=n.id,i.push(oi.saveObject(t,n)),i.push(oi.saveObject(P,o))),Promise.all(i).then((function(){e(n.id)}))}))}));var t,n,i},yi.getImage=function(e){return oi.getObject(ye,e)},yi.getDictionary=function(e){return e?oi.getSingleObject(jn,e).then((function(e){return Promise.resolve(new jn(e))})):Promise.resolve(null)},yi.getDictionaries=function(){return new Promise((function(e){oi.getObject(jn).then((function(t){if(t){var n=t instanceof Array?t.map((function(e){return new jn(e)})):[new jn(t)];e(n)}else e([])}))}))},yi.saveDictionary=function(e){return e.isDefault=!1,oi.saveObject(jn,e)},yi.deleteObject=function(e){return oi.removeObject(e)},yi.downloadSingleGrid=function(e){yi.getGrid(e).then((function(e){if(e){var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});ne.a.saveAs(t,J.getTranslation(e.label)+".grd")}}))},yi.downloadBackup=function(){var e={},t=[];t.push(yi.getMetadata().then((function(t){return e.metadata=t,Promise.resolve()}))),t.push(yi.getDictionaries().then((function(t){return t.reduce((function(e,t){return e&&t.isDefault}),!0)||(e.dictionaries=t),Promise.resolve()}))),t.push(yi.getGrids(!0).then((function(t){return e.grids=t,Promise.resolve()}))),Promise.all(t).then((function(){var t=new Blob([JSON.stringify(e)],{type:"text/plain;charset=utf-8"});ne.a.saveAs(t,"my-backup.grd")}))},yi.downloadAllGridsSimple=function(){yi.getGrids(!0).then((function(e){e&&(log.info("simple version of exported grids without images and files included:"),log.info(JSON.stringify({grids:zt.removeLongPropertyValues(e)})))}))},yi.importGridsFromFile=function(e,t){var n=e.name.substring(e.name.length-4),i=!1;return new Promise((function(r,a){var o=new FileReader;o.onload=function(a){var o=a.target.result,s=[];t&&(vi.setProgress(J.translate("Deleting grids // Grids werden gelöscht")),s.push(yi.deleteAllGrids())),Promise.all(s).then((function(){var a=null,s=[];if(vi.setProgress(J.translate("Reading grids from file // Grids werden aus Datei gelesen")),".grd"===n)a=JSON.parse(o);else if(".obf"===n)s.push(hi.OBFToGridData(JSON.parse(o)).then((function(e){return a=e,Promise.resolve()})));else if(".obz"===n){var l=mi.readZip(e,!0).then((function(e){return hi.OBZToGridSet(e)})).then((function(e){return a=e,t&&(i=!0),Promise.resolve()}));s.push(l)}Promise.all(s).then((function(){vi.setProgress(J.translate("Encrypting and saving grids to database // Grids werden verschlüsselt und in Datenbank gespeichert")),yi.importData(a,i,t).then((function(){r()}))}))}))},o.readAsText(e)}))},yi.importData=function(e,t,n){if(!e||0===e.length)return Promise.resolve();var i=null,a=null,o=null,s=[];return e instanceof Array?o=_n.updateDataModel(e):(i=n?_n.updateDataModel(e.dictionaries):null,a=n?_n.updateDataModel(e.metadata):null,o=_n.updateDataModel(e.grids),i||a||o||!e.id||(o=[_n.updateDataModel(e)])),(a?Promise.resolve(a):yi.getMetadata()).then((function(e){return o&&s.push(yi.getGrids().then((function(n){var i=n.map((function(e){return J.getTranslation(e.label)})),s=null,l=Ut.regenerateIDs(o);o=l.grids,a&&(e.lastOpenedGridId=l.idMapping[e.lastOpenedGridId],e.globalGridId=l.idMapping[e.globalGridId]),o.forEach((function(e){var t=J.getTranslation(e.label);e.label[J.getBrowserLang()]=r.getNewName(t,i)}));var c=o[0]?o[0].locale:null;if(t){var u=o[0].id;s=Ut.generateGlobalGrid(u,c),o.unshift(s),e.globalGridId=s.id,e.globalGridActive=!!e.globalGridId}return yi.saveGrids(o).then((function(){return yi.saveMetadata(e,!0)}))}))),i&&s.push(yi.getDictionaries().then((function(e){return oi.bulkDelete(e)})).then((function(){return i=i.map((function(e){return delete e.id,delete e._id,delete e._rev,new jn(e)})),oi.bulkSave(i).then((function(){return Yn.init(),Promise.resolve()}))}))),Promise.all(s)}))},yi.getSyncState=function(){return Sn.getSyncState()},yi.getCurrentUser=function(){return oi.getCurrentUsedDatabase()};var wi={},Ci="#asterics-grid-user-documentation",Si="",Ti=Ci,Ni=Si,Ai=Ti;wi.setHelpLocation=function(e,t){Ni=Si,Ai=Ti,Si=e,Ti=t||""},wi.setHelpLocationIndex=function(){wi.setHelpLocation("",Ci)},wi.revertToLastLocation=function(){wi.setHelpLocation(Ni,Ai)},wi.openHelp=function(){var e="https://www.asterics.eu/manuals/asterics-grid/"+(Si?Si+".html"+Ti:Ti);J.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(),wi.openHelp())}));var Oi=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(" "),n("div",{staticStyle:{width:"100%","text-align":"center","font-size":"2em","margin-top":"1em"}},[e.progressText?n("span",[e._v(e._s(e.progressText)+" ...")]):e._e()])]),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._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()],1)])};Oi._withStripped=!0;var Ii=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.png",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()};Ii._withStripped=!0;var ki=n(3),Li={},xi={},Di=null,Ri=!1;function Mi(e){null!==xi[e]&&(xi[e].close(),xi[e]=null,log.debug("SSE closed."))}function Pi(e){for(var t="",n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);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},Li.getTypeId=function(e,t){var n=window.atob(t);return W()(n).find('components component[id="'+e+'"]').attr("type_id")},Li.getComponentDescriptorsAsXml=function(e){return new Promise((function(t,n){W.a.ajax({type:"GET",url:Li.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)}})}))},Li.getPossibleEvents=function(e,t,n){return new Promise((function(i){Li.getComponentDescriptorsAsXml(n).then((function(n){var r=Li.getTypeId(e,t),a=W()(n).find('componentType[id="'+r+'"] eventListenerPort').map((function(){return this.id})).get();i(a)}))}))},Li.subscribeEvents=function(e,t,n){if("undefined"!=typeof EventSource){var i=Li.getRestURL(e);xi[i]||(xi[i]=new EventSource(i+"runtime/model/channels/event/listener"),xi[i].onopen=function(e){log.debug("SSE opened."),Ri=!0},xi[i].onerror=function(r){Mi(i),n&&n(r),Ri&&(log.info("SSE error occured, trying to reconnect in 10 seconds..."),Di=setTimeout((function(){Di=null,Li.subscribeEvents(e,t,n)}),3e3))}),xi[i].addEventListener("event",(function(e){t(e.data,200)}),!1)}else log.warn("SSE not supported by browser")},Li.unsubscribeEvents=function(e){Di&&clearTimeout(Di),Ri=!1,e?Mi(e):Object.keys(xi).forEach((function(e){Mi(e)}))};var ji={},Fi=[],$i={},Bi=0;function Vi(){var e={},t=null,n=null,i=[],r=[],a=[],o=[],s=[],l=[],c=[],u=[],d=[],f=[],p={},h=document.body,v=!1,g={},_=Bi++;function b(e,t){Li.subscribeEvents(e.areURL,(function(n){e.eventNames.indexOf(n)>-1&&t()}))}function y(t,n){if(t&&t.keyCode&&n){var i=t.keyCode+"",r=p[i]?p[i]:[];return p[i]=r,r.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)&&D(i)}function C(e){D(l,[e],!0),n&&t?e.touches[0].clientY>n+100?(log.debug("swipe down."),n=null,D(a)):e.touches[0].clientYt+100?(log.debug("swipe right."),t=null,D(s)):e.touches[0].clientX0&&!e.repeat&&d.forEach((function(n){n(t,e.code,e)}));var n=t+"";if(p[n]){var i=function(e){e.lastAction=(new Date).getTime(),e.handler(),k(r)};if(e.preventDefault(),e.repeat)return;var r=p[n];(r=r.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,L(e.lastKeydown,e.inputEvent.timeout)&&(e.counter=0)})),r.forEach((function(e){var t=e.inputEvent;if(t.repeat&&1!==t.repeat||t.holdDuration||!L(e.lastAction,t.timeout))if(t.repeat>1){if(e.counter++,e.counter===t.repeat){var n=r.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)}))}(r),e.timeoutHandler=setTimeout((function(){i(e)}),n)}}else t.holdDuration&&(e.timeoutHandler=setTimeout((function(){i(e)}),t.holdDuration));else{var a=r.filter((function(t){return t!==e&&t.inputEvent.holdDuration})).length>0,o=r.filter((function(t){return t!==e&&t.inputEvent.repeat>1})),s=o.length>0,l=Math.max.apply(null,o.map((function(e){return e.counter})));if(a)e.doOnKeyup=function(){i(e)};else if(s&&l<1){var c=Math.max.apply(Math,Ui(o.map((function(e){return e.inputEvent.timeout}))));e.timeoutHandler=setTimeout((function(){i(e)}),c+10)}else s||i(e)}e.lastKeydown=(new Date).getTime()}))}}function A(e){if(!e.repeat){var t=(e.which||e.keyCode)+"";if(p[t]){var n=p[t];n.forEach((function(e){e.doOnKeyup&&(e.doOnKeyup(),k(n)),e.inputEvent.holdDuration&&I(e)}))}}}function O(){document.fullscreenElement||D(f)}function I(e){clearTimeout(e.timeoutHandler),e.timeoutHandler=null,e.doOnKeyup=null,e.counter=0}function k(e){e.forEach((function(e){return I(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((function(e){e.apply?n?e.apply(null,t):ni.throttle((function(){e.apply(null,t)})):log.warn("handler seems to be not a function!")}))}return e.startListening=function(){v||(v=!0,Object.keys(g).forEach((function(e){var t=g[e];b(t.inputEvent,t.fn)})),document.addEventListener("mousemove",E),document.addEventListener("keydown",N),document.addEventListener("keyup",A),document.addEventListener("fullscreenchange",O),h.addEventListener("touchmove",C,{passive:!1}),h.addEventListener("touchstart",T),h.addEventListener("touchend",S))},e.stopListening=function(){v=!1,Object.keys(g).forEach((function(e){var t=g[e];Li.unsubscribeEvents(t.areURL)})),document.removeEventListener("mousemove",E),document.removeEventListener("keydown",N),document.removeEventListener("keyup",A),document.removeEventListener("fullscreenchange",O),h.removeEventListener("touchmove",C),h.removeEventListener("touchstart",T),h.removeEventListener("touchend",S)},e.destroy=function(){e.stopListening(),Fi=Fi.filter((function(t){return t.getID()!==e.getID()}))},e.isListening=function(){return v},e.getID=function(){return _},e.onMouseUpperOrLeftBorder=function(e){return x(e,i)},e.onSwipedDown=function(e){return x(e,a)},e.onSwipedUp=function(e){return x(e,r)},e.onSwipedRight=function(e){return x(e,s)},e.onSwipedLeft=function(e){return x(e,o)},e.onEscape=function(e){return y(new m({keyCode:27}),e)},e.onAnyKey=function(e){return x(e,d)},e.onTouchMove=function(e){return x(e,l)},e.onTouchStart=function(e){return x(e,c)},e.onTouchEnd=function(e){return x(e,u)},e.onExitFullscreen=function(e){return x(e,f)},e.off=function(e){var t=function(t){return t!==e};i=i.filter(t),r=r.filter(t),a=a.filter(t),o=o.filter(t),s=s.filter(t),l=l.filter(t),c=c.filter(t),u=u.filter(t),d=d.filter(t)},e.onInputEvent=function(e,t){if(e&&t)switch(e.modelName){case m.getModelName():return y(e,t);case w.getModelName():g[e.id]={inputEvent:e,fn:t},v&&b(e,t)}},e}ji.instance=function(){var e=new Vi;return Fi.push(e),e},ji.pauseAll=function(){Fi.forEach((function(e){$i[e.getID()]=e.isListening(),e.stopListening()}))},ji.resumeAll=function(){Fi.forEach((function(e){$i[e.getID()]&&e.startListening()}))},ji.global=ji.instance();var Hi=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"}],attrs:{id:"notificationBar"}},[n("img",{directives:[{name:"show",rawName:"v-show",value:e.tooltipImageUrl,expression:"tooltipImageUrl"}],staticClass:"inline",attrs:{id:"notificationBarImg",src:e.tooltipImageUrl,alt:""}}),e._v(" "),n("div",{staticClass:"inline",domProps:{innerHTML:e._s(e.tooltipHTML)}}),e._v(" "),e.actionLink?n("div",{staticClass:"inline"},[n("a",{staticStyle:{color:"#44a8f1"},attrs:{href:"javascript:;"},on:{click:e.onActionLink}},[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")])])};Hi._withStripped=!0;var zi={closeOnNavigate:!0,timeout:0,revertOnClose:!1,actionLink:"",actionLinkFn:null,imageUrl:null};var Wi={props:["fullHeader"],data:function(){return{tooltipHTML:null,actionLink:null,tooltipImageUrl:null,lastTooltipOptions:null,lastTooltipHTML:null,tooltipTimeoutHandler:null,tooltipOptions:zi}},methods:{setTooltip:function(e,t){var n=this;n.tooltipOptions.revertOnClose||(n.lastTooltipHTML=this.tooltipHTML,n.lastTooltipOptions=n.tooltipOptions),n.tooltipOptions=Object.assign(JSON.parse(JSON.stringify(zi)),t),clearTimeout(n.tooltipTimeoutHandler),n.tooltipOptions.timeout>0&&(n.tooltipTimeoutHandler=setTimeout((function(){n.clearTooltip()}),n.tooltipOptions.timeout)),this.tooltipHTML=e,this.tooltipImageUrl=n.tooltipOptions.imageUrl,this.actionLink=n.tooltipOptions.actionLink},clearTooltip:function(){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=B.get(B.get("WINDOW_SIZE_KEY"));B.save("WINDOW_SIZE_KEY",n),i&&n!==i&&o();var r=B.get("NOTIFICATION_BAR_STYLE_KEY"),a=B.get("NOTIFICATION_BAR_STYLE_IMAGE_KEY");r&&(e.setAttribute("style",r),e.style.display="none");a&&t.setAttribute("style",a);function o(){var n=e.style.display;e.setAttribute("style",""),t.setAttribute("style",""),B.save("NOTIFICATION_BAR_STYLE_KEY",""),B.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",""),e.style.display=n}W()("#notificationBar").draggable({containment:"#app",start:function(t,n){e.style.bottom="initial",e.style.right="initial"},drag:function(t,n){ni.debounce((function(){B.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),W()("#notificationBar").resizable({containment:"#app",start:function(n,i){t.style.height="90%",B.save("NOTIFICATION_BAR_STYLE_IMAGE_KEY",t.getAttribute("style")),e.style.bottom="",e.style.right=""},resize:function(t,n){ni.debounce((function(){B.save("NOTIFICATION_BAR_STYLE_KEY",e.getAttribute("style"))}),300)}}),window.addEventListener("resize",(function(){ni.debounce((function(){o()}),300,"RESIZE_RESET_NOTIFICATIONBAR")}))}(),this},beforeDestroy:function(){}};n(49);function Ki(e,t,n,i,r,a,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),a&&(c._scopeId="data-v-"+a),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__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=l):r&&(l=s?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),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 Yi=Ki(Wi,Hi,[],!1,null,"7bec61b8",null);Yi.options.__file="src/vue-components/components/notificationBar.vue";var Ji=Yi.exports,Xi={},qi=null;Xi.setViewComponent=function(e,t){qi&&qi.$refs.notificationBar.tooltipOptions.closeOnNavigate&&Xi.clearTooltip(),qi.setComponent(e,t)},Xi.isSidebarOpen=function(){return qi.showSidebar},Xi.setTooltip=function(e,t){qi&&qi.$refs.notificationBar.setTooltip(e,t)},Xi.setTooltipI18n=function(e,t){var n=J.translate(e);Xi.setTooltip(n,t)},Xi.clearTooltip=function(){qi&&qi.$refs.notificationBar.clearTooltip()},Xi.init=function(){qi=new ki.a({el:"#app",components:{NotificationBar:Ji},data:function(){return{component:null,properties:null,componentKey:0,showSidebar:!1,currentUser:oi.getCurrentUsedDatabase(),isLocalUser:B.isSavedLocalUser(oi.getCurrentUsedDatabase()),syncState:yi.getSyncState(),constants:i,tooltipHTML:null,actionLink:null}},methods:{setComponent:function(e,t){this.component=e,this.properties=t,this.componentKey++},closeSidebar:function(){W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)},openSidebar:function(){W()(document).trigger(i.EVENT_SIDEBAR_OPEN)},openHelp:function(){wi.openHelp()},moreNavigation:function(){W.a.contextMenu("destroy"),W.a.contextMenu({selector:"#moreNavigation",callback:function(e,t){!function(e){switch(e){case"CONTEXT_ADD_ONLINE":xs.toRegister();break;case"CONTEXT_ADD_OFFLINE":xs.toAddOffline();break;case"CONTEXT_ABOUT":xs.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}),J.initDomI18n(),W()("#moreNavigation").contextMenu()}},mounted:function(){var e=this,t=this;function n(){!t.showSidebar&&oi.getCurrentUsedDatabase()&&(ni.closeFullscreen(),yi.getMetadata().then((function(e){e.fullscreen&&(e.fullscreen=!1,yi.saveMetadata(e).then((function(){t.openSidebar()})))})))}J.initDomI18n(),W()(document).on(i.EVENT_SIDEBAR_OPEN,(function(){if(!t.showSidebar)return oi.getCurrentUsedDatabase()?void yi.getMetadata().then((function(n){n.locked||n.fullscreen||(t.showSidebar=!0,e.$nextTick((function(){W()(document).trigger(i.EVENT_SIDEBAR_OPENED),W()(document).trigger(i.EVENT_GRID_RESIZE)})))})):(t.showSidebar=!0,void e.$nextTick((function(){W()(document).trigger(i.EVENT_SIDEBAR_OPENED),W()(document).trigger(i.EVENT_GRID_RESIZE)})))})),W()(document).on(i.EVENT_SIDEBAR_CLOSE,(function(){t.showSidebar=!1,e.$nextTick((function(){W()(document).trigger(i.EVENT_GRID_RESIZE)}))})),W()(document).on(i.EVENT_DB_INITIALIZED,(function(){t.currentUser=oi.getCurrentUsedDatabase(),t.isLocalUser=B.isSavedLocalUser(t.currentUser)})),W()(document).on(i.EVENT_DB_CLOSED,(function(){t.currentUser=oi.getCurrentUsedDatabase(),t.isLocalUser=B.isSavedLocalUser(t.currentUser)})),W()(document).on(i.EVENT_DB_SYNC_STATE_CHANGE,(function(e,n){t.syncState=n})),t.syncState=yi.getSyncState(),window.addEventListener("resize",(function(){ni.debounce((function(){W()(document).trigger(i.EVENT_GRID_RESIZE)}),300,i.EVENT_GRID_RESIZE)})),ji.global.onSwipedDown(n).onEscape(n).onExitFullscreen(n),ji.global.startListening(),t.openSidebar()},updated:function(){J.initDomI18n()}})};var Zi=Ki({props:["fullHeader"],data:function(){return{show:!Xi.isSidebarOpen(),tag:"div"}},methods:{openSidebar:function(){W()(document).trigger(i.EVENT_SIDEBAR_OPEN),this.show=!1},onOpenFn:function(){this.show=!1},onCloseFn:function(){this.show=!0}},mounted:function(){W()(document).on(i.EVENT_SIDEBAR_CLOSE,this.onCloseFn),W()(document).on(i.EVENT_SIDEBAR_OPENED,this.onOpenFn),this.fullHeader&&(this.tag="header")},beforeDestroy:function(){W()(document).off(i.EVENT_SIDEBAR_CLOSE,document,this.onCloseFn)}},Ii,[],!1,null,"4ff1a546",null);Zi.options.__file="src/vue-components/components/headerIcon.vue";var Qi=Zi.exports,er=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)])};er._withStripped=!0;var tr={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(){J.initDomI18n()},updated:function(){J.initDomI18n()}},nr=(n(53),Ki(tr,er,[],!1,null,"66ff21d8",null));nr.options.__file="src/vue-components/components/accordion.vue";var ir=nr.exports,rr=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")])])])])])])])])};rr._withStripped=!0;n(4);var ar={props:["gridFromProp","gridToProp"],data:function(){return{gridFrom:null,gridTo:JSON.parse(JSON.stringify(this.gridToProp)),inputText:"",selectedElement:null,newElementLabel:null,GridActionNavigate:de,imageUtil:pi,i18nService:J}},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 cn(this.gridFrom).getNewXYPos();e=new wt({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!==de.getModelName()})),e.actions.push(new de({toGridId:this.gridTo.id})),yi.saveGrid(this.gridFrom)}},mounted:function(){var e=this;this.newElementLabel=JSON.parse(JSON.stringify(this.gridTo.label)),yi.getGrid(this.gridFromProp.id).then((function(t){e.gridFrom=JSON.parse(JSON.stringify(t)),J.initDomI18n()}))},updated:function(){J.initDomI18n()}},or=(n(56),Ki(ar,rr,[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));or.options.__file="src/vue-components/modals/gridLinkModal.vue";var sr=or.exports,lr=null;var cr={components:{GridLinkModal:sr,Accordion:ir,HeaderIcon:Qi},data:function(){return{metadata:null,grids:null,graphList:[],selectedGraphElement:null,newLabel:{},showLoading:!0,progressText:"",selectValues:{CONNECTED_GRIDS:"CONNECTED_GRIDS",NOT_REACHABLE_GRIDS:"NOT_REACHABLE_GRIDS",ALL_GRIDS:"ALL_GRIDS"},selectValue:null,linkModal:{show:!1,gridFrom:null,gridTo:null},i18nService:J,currentLanguage:J.getBrowserLang(),imageUtil:pi}},methods:{setSelectedGraphElement:function(e,t){e&&(this.selectedGraphElement=e,this.newLabel=JSON.parse(JSON.stringify(this.selectedGraphElement.grid.label)),this.reinitContextMenu(),this.metadata.lastOpenedGridId=e.grid.id,yi.saveMetadata(this.metadata),t||W()(".all-grids-view").animate({scrollTop:0},200))},reinitContextMenu:function(){var e;!function(){W.a.contextMenu("destroy");var e=lr.selectedGraphElement?J.getTranslation(lr.selectedGraphElement.grid.label):"",t={CONTEXT_CONNECT:{name:J.translate('Connect to grid "{?}" // Verknüpfen mit Grid "{?}"',e),icon:"fas fa-external-link-alt",visible:function(){return lr.selectValue!==lr.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"}};W.a.contextMenu({selector:".gridOptions",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_CONNECT":lr.linkModal.gridFrom=lr.selectedGraphElement.grid,lr.linkModal.gridTo=lr.grids.filter((function(e){return e.id===t}))[0],lr.linkModal.show=!0;break;case"CONTEXT_SHOW":lr.show(t);break;case"CONTEXT_EDIT":lr.edit(t);break;case"CONTEXT_DUPLICATE":lr.clone(t);break;case"CONTEXT_DELETE":lr.deleteGrid(t);break;case"CONTEXT_EXPORT":lr.exportToFile(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_DELETE_ALL:{name:"Delete all grids // Alle Grids löschen",icon:"fas fa-trash-alt",disabled:function(){return 0===lr.grids.length}},CONTEXT_RESET:{name:"Reset to default configuration // Auf Standardkonfiguration zurücksetzen",icon:"fas fa-minus-circle"}},W.a.contextMenu({selector:"#moreButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_NEW":lr.addGrid();break;case"CONTEXT_IMPORT":document.getElementById("inputFile").click();break;case"CONTEXT_IMPORT_BACKUP":document.getElementById("inputFileBackup").click();break;case"CONTEXT_EXPORT":lr.exportToFile();break;case"CONTEXT_DELETE_ALL":lr.deleteAll();break;case"CONTEXT_RESET":lr.reset()}}(e)},trigger:"left",items:e,zIndex:10})},deleteGrid:function(e){var t=this;log.debug("delete: "+e);var n=J.getTranslation(this.grids.filter((function(t){return t.id===e}))[0].label);confirm(J.translate("CONFIRM_DELETE_GRID",n))&&yi.deleteGrid(e).then((function(){t.reload()}))},addGrid:function(){var e=this,t=this.grids.map((function(e){return J.getTranslation(e.label)})),n=new cn({label:J.getTranslationObject(r.getNewName("newGrid",t)),gridElements:[]});yi.saveGrid(n).then((function(){return e.reload(n.id)})).then((function(){W()("#gridName").focus()}))},isLabelDuplicate:function(e){return!e||this.grids.map((function(e){return J.getTranslation(e.label)})).filter((function(t){return t===e})).length>0},saveGridLabel:function(){this.selectedGraphElement.grid.label=JSON.parse(JSON.stringify(this.newLabel)),yi.updateGrid(this.selectedGraphElement.grid.id,{label:this.newLabel})},show:function(e){xs.toGrid(e)},edit:function(e){xs.toEditGrid(e)},clone:function(e){var t=this;yi.getGrid(e).then((function(e){var n=e.clone();yi.saveGrid(n).then((function(){t.reload(n.id)}))}))},exportToFile:function(e){e?yi.downloadSingleGrid(e):yi.downloadBackup()},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(J.translate("CONFIRM_IMPORT_BACKUP",t))?this.importFromFileInternal(e,!0):this.resetFileInput(e)},reload:function(e){var t=this;return yi.getMetadata().then((function(e){return t.metadata=JSON.parse(JSON.stringify(e)),yi.getGrids()})).then((function(n){t.selectedGraphElement=null,t.grids=JSON.parse(JSON.stringify(n)),t.showLoading=!1,t.graphList=Ut.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(J.translate("CONFIRM_RESET_DB"))&&(this.showLoading=!0,yi.deleteAllGrids().then((function(){return yi.importDefaultGridset()})).then((function(){e.reload()})))},deleteAll:function(){var e=this;confirm(J.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,yi.deleteAllGrids().then((function(){e.reload()})))},setGlobalGridActive:function(e){if(!this.hasGlobalGrid)return this.resetGlobalGrid(!0);this.metadata.globalGridActive=e,yi.saveMetadata(this.metadata)},resetGlobalGrid:function(e){var t=this;(e||confirm(J.translate("Do you really want to reset the global grid to default? // Möchten Sie das globale Grid wirklich zurücksetzen?")))&&yi.getGlobalGrid(!0).then((function(e){return e?yi.deleteGrid(e.id):Promise.resolve()})).then((function(){var e=Ut.generateGlobalGrid(t.grids[0].id);return t.metadata.globalGridId=e.id,t.metadata.globalGridActive=!0,yi.saveGrid(e)})).then((function(){return yi.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,yi.importGridsFromFile(i,t).then((function(){n.resetFileInput(e),n.reload()})))},resetFileInput:function(e){var t=W()(e.target);t.wrap("").closest("form").get(0).reset(),t.unwrap()}},computed:{headerDetails:function(){return this.selectedGraphElement?J.translate("Details for grid {?} // Details für Grid {?}",'"'.concat(J.getTranslation(this.selectedGraphElement.grid.label),'"')):""},connectedGridsOptionLabel:function(){return this.selectedGraphElement?J.translate('Grids connected with "{?}" // Grid verknüpft mit "{?}"',J.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(){var e=this;W()(document).on(i.EVENT_DB_PULL_UPDATED,e.onPullUpdate),vi.register((function(t){e.progressText=t}))},mounted:function(){var e=this;lr=this,this.selectValue=this.selectValues.CONNECTED_GRIDS,this.reload().then((function(){e.reinitContextMenu(),J.initDomI18n()}))},updated:function(){J.initDomI18n()},beforeDestroy:function(){W()(document).off(i.EVENT_DB_PULL_UPDATED,this.onPullUpdate),W.a.contextMenu("destroy"),vi.clearHandlers()}},ur=(n(58),Ki(cr,Oi,[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));ur.options.__file="src/vue-components/views/allGridsView.vue";var dr=ur.exports,fr=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()};fr._withStripped=!0;var pr={},hr={},mr={};pr.setState=function(e,t){hr[e]!==t&&(hr[e]=t,mr[e]=mr[e]||[],mr[e].forEach((function(e){e(t)})))},pr.getState=function(e){return hr[e]},pr.onStateChanged=function(e,t){mr[e]=mr[e]||[],mr[e].push(t)},pr.clearListeners=function(e){e?mr[e]=[]:mr={}};var vr={};vr.VOICE_TYPE_NATIVE="VOICE_TYPE_NATIVE",vr.VOICE_TYPE_RESPONSIVEVOICE="VOICE_TYPE_RESPONSIVEVOICE";var gr=[],_r=B.get("SPEECH_PREFFERED_VOICE_NAME_KEY")||"",br=[],yr=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 Er(e){var t=br.filter((function(t){return t.name===e}));return t.length>0?t:null}function wr(e,t,n,i){-1===br.map((function(e){return e.name})).indexOf(e)&&br.push({name:e,lang:t,type:n,ref:i})}function Cr(){br.sort((function(e,t){return e.type===vr.VOICE_TYPE_NATIVE&&e.type!==t.type?-1:t.type===vr.VOICE_TYPE_NATIVE&&e.type!==t.type?1:e.name.localeCompare(t.name)}))}vr.speak=function(e,t,n){if(e){vr.stopSpeaking(),t=t||J.getBrowserLang();var r=Er(n)||Er(_r)||function(e){return br.filter((function(t){return t.lang.substring(0,2)===e}))}(t),a=r.filter((function(e){return e.type===vr.VOICE_TYPE_NATIVE})),o=r.filter((function(e){return e.type===vr.VOICE_TYPE_RESPONSIVEVOICE}));if(vr.nativeSpeechSupported()&&a.length>0){var s=new SpeechSynthesisUtterance(e);s.voice=a[0].ref,log.debug("used voice: "+s.voice.name),window.speechSynthesis.speak(s)}else o.length>0&&responsiveVoice.speak(e,o[0].name);l(),setTimeout((function(){l()}),700)}function l(){vr.isSpeaking()&&pr.setState(i.STATE_ACTIVATED_TTS,!0)}},vr.speakLabel=function(e,t){e&&t&&yi.getGridElement(e,t).then((function(e){vr.speak(J.getTranslation(e.label))}))},vr.stopSpeaking=function(){vr.nativeSpeechSupported()&&window.speechSynthesis.cancel(),responsiveVoice.cancel()},vr.isSpeaking=function(){return window.speechSynthesis.speaking||responsiveVoice.isPlaying()},vr.getVoicesLangs=function(){var e=br.map((function(e){return e.lang.substring(0,2)}));return J.getAllLanguages().filter((function(t){return-1!==e.indexOf(t.code)}))},vr.getVoices=function(){return br},vr.setPreferredVoiceName=function(e){_r=e,B.save("SPEECH_PREFFERED_VOICE_NAME_KEY",e)},vr.getPreferredVoiceName=function(){return _r},vr.nativeSpeechSupported=function(){if("undefined"==typeof SpeechSynthesisUtterance||!window.speechSynthesis)return!1;var e=gr.length>0?gr:window.speechSynthesis.getVoices();return(e=e.length>0?e:window.speechSynthesis.getVoices()).length>0},window.speechSynthesis&&window.speechSynthesis.getVoices&&(gr=window.speechSynthesis.getVoices(),setTimeout((function(){(gr=window.speechSynthesis.getVoices()).forEach((function(e){wr(e.name,e.lang,vr.VOICE_TYPE_NATIVE,e)})),Cr()}),100)),yr.forEach((function(e){wr(e.name,e.lang,vr.VOICE_TYPE_RESPONSIVEVOICE)})),Cr();var Sr={},Tr=[],Nr="",Ar=0,Or=null;function Ir(e){Nr=e=void 0===e?Nr:e,Yn.learnFromInput(Nr,Or),$('.item[data-type="ELEMENT_TYPE_COLLECT"] .collect-text').text(Nr),ie.adaptFontSize($('.item[data-type="ELEMENT_TYPE_COLLECT"]'))}function kr(e,t){if(!e)return null;var n=e.actions.map((function(e){return e.modelName})).indexOf(t);return-1===n?null:e.actions[n]}function Lr(){var e=[],t=[];this.canUndo=function(){return e.length>0},this.canRedo=function(){return t.length>0},this.updateGrid=function(n){return new Promise((function(i){yi.getGrid(n.id).then((function(r){r.isEqual(n)?(log.debug("grid not updated, do noting"),i(!1)):(e.push(JSON.parse(JSON.stringify(r))),t=[],yi.saveGrid(n).then((function(){i(!0)})))}))}))},this.doUndo=function(){if(this.canUndo()){var n=e.pop();return yi.getGrid(n.id).then((function(e){t.push(JSON.parse(JSON.stringify(e))),yi.saveGrid(n)})),n}},this.doRedo=function(){if(this.canRedo()){var n=t.pop();return yi.getGrid(n.id).then((function(t){e.push(JSON.parse(JSON.stringify(t))),yi.saveGrid(n)})),n}}}function xr(e,t,n){var r=this,a=(e=e,t=t,!1),o=!1,s=null,l=null,c=null,u=null,d=null,f=null,p=null,h=null,m=null,v=new Lr,g=!1;function _(e){return g=!1,(m=new Promise((function(t){e?(b(n,e),y(f).then((function(){t()}))):yi.getGrid(n.gridId).then((function(e){b(n,e),y(f).then((function(){t()}))}))}))).then((function(){g=!0})),m}function b(e,t){e&&(s=e.gridId||s,a=null!=e.enableResizing?e.enableResizing:a,o=e.dragAndDrop),p=(f=t).rowCount,h=f.minColumnCount}function y(s){var u=[];return n.dragAndDrop||(s.gridElements=s.gridElements.filter((function(e){return!e.hidden})),u.push(yi.getGlobalGrid().then((function(e){if(e){var t=n.globalGridHeightPercentage?n.globalGridHeightPercentage/100:.15,i=1,r=1;1===e.getHeight()&&(r=t*f.rowCount/(1-t),i=1/(f.rowCount*t)-1/f.rowCount,r>=1?(i=1,r=Math.round(r)):(r=1,i=Math.round(i)));var a=Ut.getOffset(e),o=e.getWidth()-a.x,s=f.getWidthWithBounds();e.gridElements.forEach((function(e){e.width*=s,e.x*=s,0===e.y&&(e.height*=r)})),f.gridElements.forEach((function(e){e.width*=o,e.x*=o,e.x+=a.x*s,e.y+=a.y*r+e.y*(i-1),e.height*=i})),f.rowCount*=i,f.rowCount+=a.y*r,p=f.rowCount,f.gridElements=e.gridElements.concat(f.gridElements)}return Promise.resolve()})))),Promise.all(u).then((function(){return Sr.initWithElements(f.gridElements,o),Yn.initWithElements(f.gridElements),W()(e).empty(),W()(e).append(fe.getGridBase(s.id)),c=W()("#"+s.id),s.gridElements.forEach((function(e){c.append(e.toHTML(f.locale))})),c.gridList({lanes:p,minColumns:h,widthHeightRatio:1,heightToFontSizeRatio:.25,dragAndDrop:o},{start:w,stop:S}),l=c.data("_gridList"),s.hasSetPositions()||(c.gridList("resize",p),r.toGridData().then((function(e){f=e,yi.updateGrid(f.id,f)}))),function(){var e=[];a&&e.push(W()(t).resizable(E()));return W()(document).on(i.EVENT_GRID_RESIZE,(function(){r.autosize()})),Promise.all(e)}().then((function(){r.autosize(200)})),Promise.resolve()}))}function E(){var e=l._cellHeight,t=l._cellWidth;return{autoHide:!1,handles:"se",disabled:!a,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?yi.getImage(t).then((function(t){if(t){var r=W()("#"+i)[0].getBoundingClientRect().width;pi.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(){S()}))},resize:function(n,i){var r=i.element.parent();r.css("z-index",1);var a=Math.max(Math.round(i.element.width()/t),1),o=Math.max(Math.round(i.element.height()/e),1);o=o<=p?o:p,ie.adaptFontSize(r),c.gridList("resizeItem",i.element.parent(),{w:a,h:o}),i.element.css("height",""),i.element.css("width","")}}}function w(){W.a.isFunction(u)&&u(f)}function C(){W.a.isFunction(d)&&setTimeout((function(){d(f)}),200)}function S(){return new Promise((function(e){r.toGridData().then((function(t){v.updateGrid(t).then((function(n){n&&(f=t,r.autosize(),C()),e()}))}))}))}r.autosize=function(e){e=e||0,ie.adaptFontSizeForGridElements(),setTimeout((function(){c.gridList("autosize"),setTimeout((function(){if(W()("#grid-layout-background-vertical")[0]){var e=l._cellWidth,t=l._cellHeight;W()("#grid-layout-background-vertical").css("margin-left","".concat(e-5,"px")),W()("#grid-layout-background-vertical").css("background-size","".concat(e,"px ").concat(e,"px")),W()("#grid-layout-background-horizontal").css("margin-top","".concat(t-5,"px")),W()("#grid-layout-background-horizontal").css("background-size","".concat(t,"px ").concat(t,"px")),W()("#grid-layout-background-wrapper").show()}}),0),setTimeout((function(){ie.adaptFontSizeForGridElements()}),200),a&&W()(t).resizable(E())}),e)},r.enableElementResizing=function(){W()(t).resizable("enable")},r.disableElementResizing=function(){W()(t).resizable("disable")},r.setDimensions=function(e,t){w(),e=Number.parseInt(e),t=Number.parseInt(t),e&&e>0&&(p=e,h=t,c.gridList("resize",p,t)),S()},r.removeElement=function(e){return w(),f.gridElements=f.gridElements.filter((function(t){return t.id!==e})),_(f).then((function(){return S()})).then((function(){return Promise.resolve(f)}))},r.duplicateElement=function(e){w();var t=f.gridElements.filter((function(t){return t.id===e}))[0].duplicate();f.gridElements.push(t),_(f).then((function(){l.resolveCollisions(t.id),S()}))},r.reinit=function(e){return w(),_(e).then((function(){C()})),m},r.fillGaps=function(){w(),c.gridList("fillGaps"),S()},r.undo=function(){if(v.canUndo()){var e=v.doUndo();_(f=new cn(e)).then((function(){C()}))}},r.redo=function(){if(v.canRedo()){var e=v.doRedo();_(f=new cn(e)).then((function(){C()}))}},r.updateGridWithUndo=function(e){return new Promise((function(t){v.updateGrid(e).then((function(e){e?(w(),_().then((function(){t(!0),C()}))):t(!1)}))}))},r.canUndo=function(){return v.canUndo()},r.canRedo=function(){return v.canRedo()},r.setLayoutChangedStartListener=function(e){u=e},r.setLayoutChangedEndListener=function(e){d=e},r.getCurrentGridId=function(){return f.id},r.toGridData=function(){return new Promise((function(e){var t=[];f.rowCount=p,f.minColumnCount=h,l.items.forEach((function(e){var n=e.$element.attr("data-id"),i=f.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)})),f.gridElements=t,e(f)}))},r.getInitPromise=function(){return m},r.isInitialized=function(){return g},r.destroy=function(){W()(document).off(i.EVENT_GRID_RESIZE),r.setLayoutChangedEndListener(null),r.setLayoutChangedStartListener(null)},_()}Sr.initWithElements=function(e,t){Tr=[];var n=0,i=0;if(Or=null,e.forEach((function(e){if(e&&e.type===wt.ELEMENT_TYPE_NORMAL){i++;var t=J.getTranslation(e.label);t&&1===t.length&&n++}if(e&&e.type===wt.ELEMENT_TYPE_COLLECT){var r=JSON.parse(JSON.stringify(e));Or=Or||r.actions.reduce((function(e,t){var n=Ye.getModelName()?t.dictionaryKey:null;return e||n}),null),Tr.push(r)}})),Ar=n/i,Tr.length>0)var r=setInterval((function(){$('.item[data-type="ELEMENT_TYPE_COLLECT"]').length>0&&(clearInterval(r),Ir(),t||Yn.predict(Nr,Or))}),100)},Sr.doAction=function(e){kr(e,"GridActionPredict")&&Yn.predict(Nr,Or);var t=e.actions.filter((function(e){return e.modelName===Ae.getModelName()}))[0],n=t&&t.speakLanguage?t.speakLanguage:J.getBrowserLang();vr.speak(Nr,n)},Sr.doCollectElementActions=function(e){if(e){switch(e){case tt.COLLECT_ACTION_CLEAR:Ir("");break;case tt.COLLECT_ACTION_REMOVE_WORD:var t=Nr.trim().split(" ");t.pop();var n=t.join(" ");Ir(""===n?"":n+" ");break;case tt.COLLECT_ACTION_REMOVE_CHAR:Ir(Nr.substring(0,Nr.length-1));break;case tt.COLLECT_ACTION_COPY_CLIPBOARD:ni.copyToClipboard(Nr);break;case tt.COLLECT_ACTION_APPEND_CLIPBOARD:ni.appendToClipboard(Nr);break;case tt.COLLECT_ACTION_CLEAR_CLIPBOARD:ni.copyToClipboard("")}Yn.predict(Nr,Or)}},$(window).on(i.ELEMENT_EVENT_ID,(function(e,t){if(0!==Tr.length&&!kr(t,tt.getModelName())&&!kr(t,de.getModelName())){if(!t.type||t.type===wt.ELEMENT_TYPE_NORMAL){if(!J.getTranslation(t.label))return;var n=J.getTranslation(t.label),i=1===n.length&&Ar>.5?n.toLowerCase():n+" ";Ir(Nr+i),Tr.forEach((function(e){var t=kr(e,"GridActionPredict");t&&t.suggestOnChange&&Yn.predict(Nr,Or)}))}if(t.type&&t.type===wt.ELEMENT_TYPE_PREDICTION){var r=$("#".concat(t.id," .text-container span")).text();if(r)Ir(Yn.applyPrediction(Nr||"",r,Or)),Tr.forEach((function(e){var t=kr(e,"GridActionPredict");t&&t.suggestOnChange&&Yn.predict(Nr,Or)}))}}}));var Dr=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.gridElement,"hidden",n.concat([null])):a>-1&&e.$set(e.gridElement,"hidden",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.gridElement,"hidden",r)}}}):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()])])])])])};Dr._withStripped=!0;var Rr={PROP_IMAGE_URL:"image_url",PROP_AUTHOR:"author",PROP_AUTHOR_URL:"author_url"},Mr=10,Pr=1,Ur=null,Gr=null,jr=!1;function Fr(e,t,n){n=n||Mr,t=t||1;var i=[];return new Promise((function(r){if(!e)return r([]);function a(a){a&&a.length&&0!==a.length||(a=[]);var o=t*n-n,s=o+n-1;jr=a.length>s+1;for(var l=o;l<=s;l++)a[l]&&function(){var e=JSON.parse(JSON.stringify(a[l])),t=pi.urlToBase64(e[Rr.PROP_IMAGE_URL]);e.promise=t,t.then((function(t){t?e.base64=t:e.failed=!0})),i.push(e)}();Ur=e,r(i)}Ur!==e?W.a.get("https://www.opensymbols.org/api/v1/symbols/search?q="+e,null,(function(e){Gr=e,a(e)})):a(Gr)}))}Rr.query=function(e,t,n){return Pr=t=t||1,Mr=n||Mr,Fr(e,t,n)},Rr.nextChunk=function(){return Pr++,Fr(Ur,Pr,Mr)},Rr.hasNextChunk=function(){return jr};var $r={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:J,currentLang:J.getBrowserLang()}},methods:{changedImg:function(){var e=this;e.clearImage(),pi.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");pi.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 cn(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=Ut.updateOrAddGridElement(e.gridData,e.gridElement);e.gridInstance.updateGridWithUndo(n).then((function(e){t(e)}))}else t(!1)}e.gridElement.image||(e.gridElement.image=new ye),e.tempImage.data&&e.tempImage.data!==e.gridElement.image.data?(e.gridElement.image=e.tempImage,pi.convertBase64(e.tempImage.data,Math.max(e.elementW,500)).then((function(e){var t=new ye({data:e});return yi.saveImage(t)})).then((function(t){return e.gridElement.image.id=t,pi.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 ye)),yi.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 ye(i.image)))),t.elementW=$("#"+e.gridElement.id)[0].getBoundingClientRect().width,t.originalGridElementJSON=JSON.stringify(i)}else{var r=n.getNewXYPos();log.debug("creating element: x "+r.x+" / y "+r.y),t.gridElement=JSON.parse(JSON.stringify(new wt({x:r.x,y:r.y})));var a=Math.round($("#grid-container")[0].getBoundingClientRect().height/n.rowCount);t.elementW=2*a,t.originalGridElementJSON=JSON.stringify(t.gridElement)}})),yi.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(){wi.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,ni.debounce((function(){Rr.query(n.searchText).then((function(e){n.processSearchResults(e)}))}),e)},searchMore:function(){var e=this;Rr.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=Rr.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(),wi.setHelpLocation("03_appearance_layout","#edit-modal")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation()}},Br=(n(60),Ki($r,Dr,[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));Br.options.__file="src/vue-components/modals/editGridModal.vue";var Vr=Br.exports,Hr=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")])])])])])])])])};Hr._withStripped=!0;var zr={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 cn(this.gridData);this.parsedElems.forEach((function(t){var n=new wt({label:J.getTranslationObject(t),x:e.getNewXYPos().x,y:e.getNewXYPos().y});e.gridElements.push(n)})),this.gridInstance.updateGridWithUndo(e),this.$emit("close")}}},mounted:function(){J.initDomI18n(),wi.setHelpLocation("03_appearance_layout","#adding-elements-and-layout-options")},beforeDestroy:function(){wi.revertToLastLocation()}},Wr=(n(62),Ki(zr,Hr,[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));Wr.options.__file="src/vue-components/modals/addMultipleModal.vue";var Kr=Wr.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"},[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",[e._v('("'+e._s(e._f("extractTranslation")(e.gridElement.label))+'")')]),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,r=n.target,a=!!r.checked;if(Array.isArray(i)){var o=e._i(i,null);r.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",a)}}}),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,r=n.target,a=!!r.checked;if(Array.isArray(i)){var o=e._i(i,null);r.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",a)}}}),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 elements // Aktion für Sammelelemente 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.webRadios,callback:function(t){e.$set(e.gridData,"webRadios",t)},expression:"gridData.webRadios"}})],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(" "),"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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.selectFromAllLanguages=n.concat([null])):a>-1&&(e.selectFromAllLanguages=n.slice(0,a).concat(n.slice(a+1)))}else e.selectFromAllLanguages=r}}}),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()])])])};Yr._withStripped=!0;var Jr="https://de1.api.radio-browser.info/json/",Xr=["name","country","state","language","tag","tagList","order"],qr={},Zr=document.getElementById("audioPlayer"),Qr=B.get("WEBRADIO_LAST_PLAYED_ID_KEY"),ea=parseFloat(B.get("WEBRADIO_LAST_VOLUME_KEY")||1),ta=!1;function na(){Xi.setTooltip(J.translate("Volume: {?} / 100 // Lautstärke: {?} / 100",Math.round(100*ea)),{revertOnClose:!0,timeout:5e3})}function ia(e,t){return new Promise((function(n,i){if(e.radioUrl)return n(e);function r(e,i){i.radioUrl=e.url,i.radioUrl.lastIndexOf("/")===i.radioUrl.length-1&&(i.radioUrl=i.radioUrl+";");var r=i.radioUrl.lastIndexOf(":");if(r>-1){var a=i.radioUrl.substring(r+1);parseInt(a)+""===a&&(i.radioUrl=i.radioUrl+"/;")}t&&yi.getGrid(t).then((function(e){var t=(e.webRadios||[]).filter((function(e){return i.radioId===e.radioId}))[0];t&&(t.radioUrl=i.radioUrl,yi.saveGrid(e))})),n(i)}W.a.ajax({type:"GET",url:Jr+"url/"+e.radioId,dataType:"json"}).then((function(t){r(t,e)}),(function(t,n){if("parsererror"===n){var a=t.responseText.substring(t.responseText.indexOf('"name":')+8,t.responseText.indexOf('"url":')-2),o=a.replace(new RegExp('"',"g"),"'"),s=t.responseText.replace(a,o);r(JSON.parse(s),e)}else Xi.setTooltip(J.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName)),i(t)}))}))}qr.doAction=function(e,t){yi.getGrid(e).then((function(n){var i=n.webRadios||[],r=t.radioId||Qr,a=i.filter((function(e){return r===e.radioId}))[0]||i[0];if(a)switch(t.action){case lt.WEBRADIO_ACTION_START:ia(a,e).then((function(e){qr.play(e)}));break;case lt.WEBRADIO_ACTION_TOGGLE:ia(a,e).then((function(e){qr.toggle(e)}));break;case lt.WEBRADIO_ACTION_STOP:qr.stop();break;case lt.WEBRADIO_ACTION_NEXT:var o=i.map((function(e){return e.radioId})).indexOf(a.radioId);if(o<0||i.length<2)return;ia(i[o=o+1=0?o-1:i.length-1],e).then((function(e){qr.play(e)}));break;case lt.WEBRADIO_ACTION_VOLUP:qr.volumeUp();break;case lt.WEBRADIO_ACTION_VOLDOWN:qr.volumeDown()}else log.info("no radio station to play found.")}))},qr.play=function(e){e&&(Zr.paused||Qr!==e.radioId)&&(Zr.paused||qr.stop(),Qr=e.radioId||Qr,B.save("WEBRADIO_LAST_PLAYED_ID_KEY",Qr),ia(e).then((function(t){log.debug("playing: "+t.radioUrl),Zr.src=t.radioUrl,Zr.volume=ea;var n=Zr.play(),i=J.translate("playing: {?} // Wiedergabe: {?}",t.radioName);Xi.setTooltip(i,{closeOnNavigate:!1,actionLink:J.translate("Stop // Stopp"),actionLinkFn:qr.stop,imageUrl:t.faviconUrl}),n&&n.then&&n.catch((function(){Qr===e.radioId&&Xi.setTooltip(J.translate("Error playing: {?}, no internet?! // Fehler bei Wiedergabe: {?}, kein Internet?!",e.radioName))}))})))},qr.stop=function(e){e&&e!==Qr||(Zr.pause(),Xi.clearTooltip())},qr.toggle=function(e){Zr.paused?qr.play(e):qr.stop()},qr.volumeUp=function(){ea=ea+.15<=1?ea+.15:1,ea=Math.round(100*ea)/100,B.save("WEBRADIO_LAST_VOLUME_KEY",ea),na(),Zr.volume=ea},qr.volumeDown=function(){ea=ea-.15>=0?ea-.15:0,ea=Math.round(100*ea)/100,B.save("WEBRADIO_LAST_VOLUME_KEY",ea),na(),Zr.volume=ea},qr.search=function(e,t,n){if(!e)return Promise.resolve([]);var i={},r=[];Xr.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,r){var a=r[n+1],o=a?a.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 a=t||20;return a++,i.limit=a,n&&(i.offset=n),new Promise((function(e,t){W.a.ajax({type:"POST",url:Jr+"stations/search",data:i,dataType:"json",contentType:"application/x-www-form-urlencoded"}).then((function(t){ta=t.length===a;var n=t.filter((function(e){return"0"!==e.lastcheckok}));n=n.slice(0,a-1),e(n.map((function(e){return{radioId:e.stationuuid,radioUUID:e.stationuuid,radioName:e.name,faviconUrl:e.favicon}})))}),(function(e){t(e)}))}))},qr.hasMoreSearchResults=function(){return ta};var ra={};function aa(e,t,n,i){switch(t.modelName){case"GridActionSpeak":log.debug("action speak");var r=J.getTranslation(e.label,null,!0);vr.speak(r.text,t.speakLanguage||r.lang);break;case"GridActionSpeakCustom":if(log.debug("action speak custom"),t.speakText){var a=J.getTranslation(t.speakText,null,!0);vr.speak(a.text,t.speakLanguage||a.lang)}break;case"GridActionNavigate":log.debug("action navigate"),t.toLastGrid?xs.toLastGrid():xs.isOnEditPage()?xs.toEditGrid(t.toGridId):xs.toGrid(t.toGridId);break;case"GridActionARE":log.debug("action are"),i?oa(t,i):yi.getGrid(n).then((function(e){oa(t,e)}));break;case"GridActionPredict":log.debug("action predict"),Yn.predict(J.getTranslation(e.label),t.dictionaryKey);break;case"GridActionCollectElement":log.debug("action collect element"),Sr.doCollectElementActions(t.action);break;case"GridActionWebradio":qr.doAction(n,t);break;case"GridActionChangeLang":J.setLanguage(t.language),J.initDomI18n()}}function oa(e,t){if(e.componentId){var n=t.getAdditionalFile(e.areModelGridFileName).dataBase64;Li.uploadAndStartModel(n,e.areURL,e.areModelGridFileName).then((function(){e.dataPortId&&e.dataPortSendData&&Li.sendDataToInputPort(e.componentId,e.dataPortId,e.dataPortSendData,e.areURL),e.eventPortId&&Li.triggerEvent(e.componentId,e.eventPortId,e.areURL)}))}}ra.doAction=function(e,t){e&&t&&yi.getGridElement(e,t).then((function(n){switch(log.debug("do actions for: "+J.getTranslation(n.label)+", "+t),n.type){case wt.ELEMENT_TYPE_COLLECT:Sr.doAction(n);break;case wt.ELEMENT_TYPE_PREDICTION:Yn.doAction(n.id)}!function(e,t){e.actions.forEach((function(n){aa(e,n,t)}))}(n,e),$(window).trigger(i.ELEMENT_EVENT_ID,[n])}))},ra.testAction=function(e,t,n){aa(e,t,n.id,n)};var sa=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")])])])])};sa._withStripped=!0;var la={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]}:{};ra.testAction(null,e,new cn(t,this.gridData))},reloadAREModel:function(e){var t=this;t.loading=!0,Li.downloadDeployedModelBase64(e.areURL).then((function(n){Li.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;Li.uploadModelBase64(t.areModelFile.dataBase64,e.areURL).then((function(){t.reloadComponentIds(e),t.reloadPorts(e),t.areModelSync=!0}))},reloadComponentIds:function(e){var t=this;Li.getRuntimeComponentIds(e.areURL).then((function(e){t.areComponentIds=e}))},reloadPorts:function(e){var t=this;Li.getPossibleEvents(e.componentId,this.areModelFile.dataBase64,e.areURL).then((function(e){t.areComponentEventPorts=e})),Li.getComponentInputPortIds(e.componentId,e.areURL).then((function(e){t.areComponentPorts=e}))},testAREUrl:function(e){var t=this;e.areURL=Li.getRestURL(e.areURL),t.areConnected=void 0,Li.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";ne.a.saveAs(t,n)},fixAreUrl:function(){this.action.areURL=Li.getRestURL(this.action.areURL)}},mounted:function(){this.action.areURL=this.action.areURL||Li.getRestURL(),this.modelFile?this.areModelFile=this.modelFile:(this.areModelFile=new cn(this.gridData).getAdditionalFile(this.action.areModelGridFileName),this.setGridFileFn(this.action,this.areModelFile)),this.areModelFile||(this.areModelFile=new It),wi.setHelpLocation("05_actions","#asterics-action")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation()}},ca=(n(64),Ki(la,sa,[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));ca.options.__file="src/vue-components/modals/editActionsSub/editAREAction.vue";var ua=ca.exports,da=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("h3",{attrs:{"data-i18n":""}},[e._v("Selected radio stations // Ausgewählte Radiosender")]),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"})])])])])};da._withStripped=!0;var fa={props:{value:Array},data:function(){return{selectedRadioList:[],webradioSearchResults:[],webradioSearch:null,webradioService:qr,webradioPlaying:null,webradioStartIndex:0,webradioSearching:!1,webradioSearchError:!1,hasMoreWebradios:!1}},methods:{modelChanged:function(){this.$emit("input",JSON.parse(JSON.stringify(this.selectedRadioList)))},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,ni.debounce((function(){qr.search(e.webradioSearch,10,e.webradioStartIndex).then((function(t){e.hasMoreWebradios=qr.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){qr.stop(e.radioId),this.selectedRadioList=this.selectedRadioList.filter((function(t){return t.radioId!==e.radioId})),this.modelChanged()}},mounted:function(){this.selectedRadioList=JSON.parse(JSON.stringify(this.value)),J.initDomI18n()},updated:function(){J.initDomI18n()}},pa=(n(66),Ki(fa,da,[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));pa.options.__file="src/vue-components/components/radioListSelector.vue";var ha={props:["editElementIdParam","gridIdParam"],data:function(){return{gridData:null,gridElement:null,GridElementClass:wt,editActionId:null,selectedNewAction:wt.getActionTypes()[0].getModelName(),gridLabels:null,actionTypes:wt.getActionTypes(),voiceLangs:vr.getVoicesLangs(),dictionaryKeys:Yn.getDictionaryKeys(),editElementId:null,additionalGridFiles:{},collectActions:tt.getActions(),webradioActions:lt.getActions(),currentLang:J.getBrowserLang(),allLanguages:J.getAllLanguages(),gridLanguages:null,selectFromAllLanguages:!1}},components:{RadioListSelector:pa.exports,Accordion:ir,EditAreAction:ua},methods:{selectedRadioChanged:function(e){var t=this,n=this.gridData.webRadios.filter((function(t){return t.radioId===e}))[0].faviconUrl;n&&pi.urlToBase64(n).then((function(e){e&&(t.gridElement.image=new ye({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]]}:{};ra.testAction(this.gridElement,e,new cn(t,this.gridData))},addAction:function(){var e=JSON.parse(JSON.stringify(wt.getActionInstance(this.selectedNewAction)));e.modelName===de.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(){wi.openHelp()},editNext:function(e){var t=this;t.saveInternal().then((function(){t.editElementId=new cn(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)})),yi.saveGrid(e.gridData).then((function(){return yi.saveAdditionalGridFiles(e.gridData.id,Object.values(e.additionalGridFiles)).then((function(){return e.$emit("reload"),Promise.resolve()}))}))},initInternal:function(){var e=this;yi.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]})),yi.getGridsAttribute("label").then((function(t){e.gridLabels=t}))}},mounted:function(){this.editElementId=this.editElementIdParam,this.initInternal(),wi.setHelpLocation("05_actions","#edit-actions-modal")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.setHelpLocation("02_navigation","#edit-view")}},ma=(n(68),Ki(ha,Yr,[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));ma.options.__file="src/vue-components/modals/editActionsModal.vue";var va=ma.exports,ga=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")])])])])])])])])};ga._withStripped=!0;var _a={props:["gridDataParam","isGlobalGrid"],data:function(){return{gridData:JSON.parse(JSON.stringify(this.gridDataParam)),gridHeight:new cn(this.gridDataParam).getHeight(),metadata:null}},methods:{save:function(){var e=this;B.saveLastGridDimensions({rowCount:this.gridData.rowCount,minColumnCount:this.gridData.minColumnCount});var t=[];this.metadata&&t.push(yi.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&&yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),setTimeout((function(){return J.initDomI18n()}),10)})),J.initDomI18n()}},ba=(n(70),Ki(_a,ga,[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));ba.options.__file="src/vue-components/modals/gridDimensionModal.vue";var ya=ba.exports,Ea=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.moveAllElements=n.concat([null])):a>-1&&(e.moveAllElements=n.slice(0,a).concat(n.slice(a+1)))}else e.moveAllElements=r}}}),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")])])])])])])])])};Ea._withStripped=!0;var wa={props:["gridId","gridElementId"],data:function(){return{gridData:null,gridElement:null,otherGrids:null,selectedGrid:null,moveAllElements:!1,i18nService:J,imageUtil:pi}},methods:{prev:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var r=i-1<0?e.otherGrids.length-1:i-1;t=e.otherGrids[r]}})),this.selectedGrid=t},next:function(){var e=this,t=null;this.otherGrids.forEach((function(n,i){if(e.selectedGrid===n){var r=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(yi.saveGrid(e.gridData)),n.push(yi.saveGrid(t)),Promise.all(n)}))}},mounted:function(){var e=this;yi.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],J.initDomI18n()})),yi.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(){J.initDomI18n()}},Ca=(n(72),Ki(wa,Ea,[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));Ca.options.__file="src/vue-components/modals/elementMoveModal.vue";var Sa=Ca.exports,Ta=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")])])])])])])])])};Ta._withStripped=!0,window.hideKeyboardTranslations=!1;var Na={props:["gridDataId"],data:function(){return{gridData:void 0,allGrids:void 0,currentLocale:J.getBrowserLang(),chosenLocale:J.isBrowserLangEN()?"de":"en",GridActionSpeakCustom:Re,allLanguages:J.getAllLanguages(),usedLocales:B.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];B.addUsedLocales(Object.keys(t.label)),yi.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 J.getTranslation(this.allLanguages.filter((function(t){return t.code===e}))[0])},copy:function(e){var t=W()("#translationList input[lang='".concat(e,"']")).toArray().reduce((function(e,t){return e+t.value+"\n"}),"");ni.copyToClipboard(t)},paste:function(e){var t=this;ni.getClipboardContent().then((function(n){if(n){t.changedGrid(t.gridData);var i=n.trim().split("\n");W()("#translationList input[lang='".concat(e,"']")).toArray().forEach((function(e,t){i[t]&&(W()(e).val(i[t]),W()(e)[0].dispatchEvent(new Event("input")))}))}}))},showGridElements:function(e){return!window.hideKeyboardTranslations||!((e=e.toLowerCase()).includes("keyboard")||e.includes("tastatur")||e.includes("zahlen")||e.includes("numbers"))}},mounted:function(){var e=this;yi.getGrids(!0).then((function(t){e.allGrids=JSON.parse(JSON.stringify(t)),e.allGrids.sort((function(e,t){return J.getTranslation(e.label).localeCompare(J.getTranslation(t.label))})),e.gridData=e.allGrids.filter((function(t){return t.id===e.gridDataId}))[0]})),J.initDomI18n()},updated:function(){J.initDomI18n()}},Aa=(n(74),Ki(Na,Ta,[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));Aa.options.__file="src/vue-components/modals/gridTranslateModal.vue";var Oa=Aa.exports,Ia=null,ka=null;var La=Ki({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:i,markedElement:null}},components:{GridTranslateModal:Oa,ElementMoveModal:Sa,GridDimensionModal:ya,EditGridModal:Vr,AddMultipleModal:Kr,EditActionsModal:va,HeaderIcon:Qi},methods:{setDimensions:function(e,t){ka.setDimensions(e,t)},fillGaps:function(){ka.fillGaps()},undo:function(){this.doingUndoRedo=!0,setTimeout((function(){ka.undo()}),10)},redo:function(){this.doingUndoRedo=!0,setTimeout((function(){ka.redo()}),10)},reload:function(e){ka.reinit(e),e&&(this.gridData=JSON.parse(JSON.stringify(e)))},back:function(){xs.toMain()},editElement:function(e){this.editElementId=e,this.showEditModal=!0},removeElement:function(e){var t=this;ka.removeElement(e).then((function(e){t.gridData=e}))},newElement:function(e){switch(e){case wt.ELEMENT_TYPE_PREDICTION:case wt.ELEMENT_TYPE_COLLECT:var t=new cn(this.gridData).getNewXYPos(),n=new wt({type:e,x:t.x,y:t.y});this.gridData.gridElements.push(n),ka.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(J.translate("CONFIRM_DELETE_ALL_ELEMS"))&&(this.gridData.gridElements=[],ka.updateGridWithUndo(this.gridData))},fillElements:function(){var e=Ut.getFillElements(this.gridData);this.gridData.gridElements=this.gridData.gridElements.concat(e),ka.updateGridWithUndo(this.gridData)},reloadFn:function(e,t,n){if(Ia&&t.includes(Ia.gridData.id)&&ka&&ka.isInitialized()){var i=new cn(n.filter((function(e){return e.id===Ia.gridData.id}))[0]);i.isEqual(Ia.gridData)||(log.debug("reloading on remote update..."),Ia.reload(i))}},markElement:function(e){var t=this;W()(".grid-item-content").removeClass("marked"),e&&setTimeout((function(){ni.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,W()("#"+e).addClass("marked"))}),null,200)}),10)},getGridInstance:function(){return ka}},created:function(){W()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn)},mounted:function(){var e=this,t=this;Ia=t,ji.global.stopListening(),yi.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),xs.toMain(),Promise.reject())})).then((function(){return yi.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,yi.saveMetadata(t.metadata))}))})).then((function(){return e=t.gridData,(ka=new xr("#grid-container",".grid-item-content",{enableResizing:!0,dragAndDrop:!0,gridId:e.id})).getInitPromise();var e})).then((function(){ka.setLayoutChangedEndListener((function(e){t.canUndo=ka.canUndo(),t.canRedo=ka.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"}}}},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!!Ia.markedElement},r={CONTEXT_ACTION_EDIT:{name:"Edit // Bearbeiten",icon:"fas fa-edit",visible:function(){return Ia.markedElement&&Ia.markedElement.type===wt.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 cn({},Ia.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:!!Ia.metadata.globalGridId&&Ia.metadata.globalGridActive&&Ia.metadata.globalGridId!==Ia.gridData.id},CONTEXT_END_EDIT_GLOBAL_GRID:{name:"End edit global grid // Bearbeitung globales Grid beenden",icon:"fas fa-globe",visible:Ia.metadata.globalGridId===Ia.gridData.id}};function a(e,t){switch(e){case"CONTEXT_EDIT":Ia.editElement(t);break;case"CONTEXT_DUPLICATE":ka.duplicateElement(t);break;case"CONTEXT_DO_ACTION":ra.doAction(Ia.gridData.id,t);break;case"CONTEXT_ACTIONS":Ia.editActions(t);break;case"CONTEXT_DELETE":Ia.removeElement(t);break;case"CONTEXT_NEW_SINGLE":Ia.newElement();break;case"CONTEXT_NEW_MASS":Ia.newElements();break;case"CONTEXT_NEW_COLLECT":Ia.newElement(wt.ELEMENT_TYPE_COLLECT);break;case"CONTEXT_NEW_PREDICT":Ia.newElement(wt.ELEMENT_TYPE_PREDICTION);break;case"CONTEXT_DELETE_ALL":Ia.clearElements();break;case"CONTEXT_FILL_EMPTY":Ia.fillElements();break;case"CONTEXT_LAYOUT_FILL":Ia.fillGaps();break;case"CONTEXT_GRID_DIMENSIONS":Ia.showDimensionsModal=!0;break;case"CONTEXT_GRID_TRANSLATION":Ia.showTranslateModal=!0;break;case"CONTEXT_ACTION_EDIT":Ia.editElement(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_EDIT_ACTIONS":Ia.editActions(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_DELETE":Ia.removeElement(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_DUPLICATE":ka.duplicateElement(Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_ACTION_DO_ACTION":ra.doAction(Ia.gridData.id,Ia.markedElement.id),Ia.markElement(null);break;case"CONTEXT_MOVE_TO":Ia.editElementId=t||Ia.markedElement.id,Ia.markElement(null),Ia.showMoveModal=!0;break;case"CONTEXT_EDIT_GLOBAL_GRID":xs.toEditGrid(Ia.metadata.globalGridId);break;case"CONTEXT_END_EDIT_GLOBAL_GRID":xs.toEditGrid(Ia.metadata.lastOpenedGridId)}}W()(".grid-container").on("click",(function(e){if(Ia){for(var t=null,n=e.target;!t&&n.parentNode;)t=W()(n).attr("data-id"),n=n.parentNode;Ia.markElement(t)}})),W.a.contextMenu({selector:'.item[data-type="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){a(e,W()(this).attr("data-id"))},items:t,zIndex:10}),W.a.contextMenu({selector:'.item[data-type!="ELEMENT_TYPE_NORMAL"]',callback:function(e,t){a(e,W()(this).attr("data-id"))},items:n,zIndex:10}),W.a.contextMenu({selector:".grid-container",callback:function(e,t){a(e)},items:e,zIndex:10}),W.a.contextMenu({selector:"#moreButton",callback:function(e,t){a(e)},trigger:"left",items:r,zIndex:10})}(),J.initDomI18n(),t.showGrid=!0}))},updated:function(){J.initDomI18n()},beforeDestroy:function(){W()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),Ia=null,ji.global.startListening(),ka&&(ka.destroy(),ka=null),W.a.contextMenu("destroy")}},fr,[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);La.options.__file="src/vue-components/views/gridEditView.vue";var xa=La.exports,Da=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(" "),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)};Da._withStripped=!0;var Ra=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 Ma(e){var t=e[0];if(e&&!(e.length<2))for(var n=1;n\n"+i),i},Ra.isLang=function(e){return(navigator.userLanguage||navigator.language).indexOf(e)>-1},Ra.getLang=function(){return(navigator.userLanguage||navigator.language).substring(0,2)},Ra.translate=function(e){for(var t=i18n[e]?i18n[e]:e,n=1;n0&&u<1e3;){u++;var d=N(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&&(r=e[n-1]),n+1=i(e)&&o<=r(e)||i(e)<=s&&r(e)>=s||i(e)>=o&&r(e)<=s}))}function A(e){return function(t,n){return e(t)-e(n)}}function O(){var e=arguments;return function(t,n){for(var i=0;i=s*n.length)i.restartScanning();else if(Ra.removeClass(e,t),Ra.addClass(e,r),h&&(Ra.addClass(n[l],t),Ra.removeClass(n,r),v=n[l],C=function(){D(n,!0,l+1,c+1)},f)){var u=0===l&&o&&n.length>2?a*d:a;g=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,r=e.length;i1?D(R(v),!0):Ra.flattenArray(v).length>1?D(R(Ra.flattenArray(v)),!0):(p&&p(Ra.flattenArray(v)[0]),i.restartScanning()))},i.next=function(){C&&(clearTimeout(g),C())},i.enableTouchScanning=function(){y||(y=function(){i.select()},(E=Ra(".area")[0]?Ra(".area")[0]:Ra("#grid-container")).addEventListener("click",y))},i.disableTouchScanning=function(){y&&(E.removeEventListener("click",y),y=null)},S(n)}Pa.getInstanceFromConfig=function(e,t,n,i){return new Ua(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 Ga={};function ja(e,t){var n=e,r=void 0!==t.timeoutMs?t.timeoutMs:1e3,a=t.demoMode,o=t.selectionListener,s=t.activeListener,l={},c=[],u=null,d=null,f=!1,p=null;function h(e,t){var n=t||this;e.preventDefault(),w(n),u=n,d=e}function m(e,t){if(f){var n=t||this;e.preventDefault(),C(n)}}function v(e){f||T(!1),ni.debounce((function(){T(!0)}),r+300,"hovering-mouseMove")}function g(){C(u)}function _(e){var t=S(e);w(t),u=t}function b(e){C(u)}function y(e){a||e.preventDefault(),ni.throttle((function(){var t=S(e);w(t),u=t,d=e}),[],50,"hovering-touchmove")}function E(e){vr.speak(J.translate("speech output activated // Sprachausgabe aktiviert")),Xi.clearTooltip(),pr.setState(i.STATE_ACTIVATED_TTS,!0),T(!0),c.forEach((function(e){e.removeEventListener("click",E)}))}function w(e){u&&u!==e&&C(u),e&&!l[e]&&(Ra.addClass(e,"mouseentered"),s&&e!==u&&s(e),0!==r&&(l[e]=setTimeout((function(){o&&o(e)}),r)))}function C(e){e&&(Ra.removeClass(e,"mouseentered"),clearTimeout(l[e]),l[e]=null,u=null)}function S(e){if(e.touches&&0===e.touches.length&&(e=d),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 ni.getElement(c,t,n)}log.warn("no event")}function T(e){f=!e,a||(e?W()("#touchElement").show():W()("#touchElement").hide())}this.startHovering=function(){t.hideCursor&&(W()(n).css("cursor","none"),W()("#touchElement").css("cursor","none"),t.containerClass&&W()(t.containerClass).css("cursor","none")),c=Ra.selectAsList(n);var e=pr.getState(i.STATE_ACTIVATED_TTS);!vr.nativeSpeechSupported()||e||a?T(!0):(Xi.setTooltip(J.translate("Tap/click on any element to activate speech output // Klicken/tippen Sie auf ein beliebiges Element um Sprachausgabe zu aktivieren")),pr.onStateChanged(i.STATE_ACTIVATED_TTS,(function(e){e&&Xi.clearTooltip()})),c.forEach((function(e){e.addEventListener("click",E)}))),c.forEach((function(e){e.addEventListener("mouseenter",h),e.addEventListener("mouseleave",m),e.addEventListener("mouseup",g)})),(p=ji.instance()).onTouchStart(_),p.onTouchEnd(b),p.onTouchMove(y),p.startListening(),document.addEventListener("mousemove",v)},this.destroy=function(){t.hideCursor&&(W()(n).css("cursor","default"),W()("#touchElement").css("cursor","default"),t.containerClass&&W()(t.containerClass).css("cursor","default")),ni.clearDebounce("hovering-mouseMove"),c.forEach((function(e){e.removeEventListener("mouseenter",h),e.removeEventListener("mouseleave",m),e.removeEventListener("mouseup",g),e.removeEventListener("click",E)})),p.destroy(),document.removeEventListener("mousemove",v),Object.keys(l).forEach((function(e){clearTimeout(l[e])})),pr.clearListeners(i.STATE_ACTIVATED_TTS)},this.setHoverTimeout=function(e){r=e},this.setSelectionListener=function(e){o=e}}function Fa(e){var t=e,n=null,i=[];function r(e){n&&n(e.currentTarget)}function a(e){var t=e.which||e.keyCode;13!==t&&32!==t||n&&n(e.currentTarget)}this.startClickcontrol=function(){(i=Ra.selectAsList(t)).forEach((function(e){e.addEventListener("click",r),e.addEventListener("keydown",a)}))},this.destroy=function(){i.forEach((function(e){e.removeEventListener("click",r),e.removeEventListener("keydown",a)}))},this.setSelectionListener=function(e){n=e}}Ga.getInstanceFromConfig=function(e,t,n){return new ja(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 $a=n(45),Ba=n.n($a),Va={};function Ha(e,t,n,i){var r=this,a=e,o=t,s=n,l=!1,c=!0,u=!1,d=0,f=1e3,p=!0,h=[],m=null,v=null,g=null,_=null,b="",y=null,E="",w=!1,C=null;function S(){if(y=ji.instance(),E="",function(e){if(!e||!e.inputEvents||!e.inputEvents.length||e.inputEvents.length<2)return void log.warn("huffman input: invalid options");W.a.isFunction(e.selectionListener)&&(m=e.selectionListener);l=void 0!==e.printCodes&&e.printCodes,c=void 0===e.printColors||e.printColors,u=void 0!==e.colorWholeElement&&e.colorWholeElement,p=void 0===e.markInactive||e.markInactive,h=e.colors||h,d=e.elementCount||0,f=e.timeout||1e3,e.inputEvents.forEach((function(e,t){E+=t+1,y.onInputEvent(e,(function(){r.input(t+1)}))}))}(i),0!==(v=W()(a)).length){var e=v.toArray().map((function(e){return e.id}));if(e.lengths?t.length:s})),o.assignCodeWords(E,(function(e,t){if(e.name&&(e.codeWord=t,e.element=document.getElementById(e.name),c||l)){var n="";e.codeWord.split("").forEach((function(e){var t=c?A(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),r=(100-5*s)/s+"%",a=l?e:" ";n+='').concat(a,"")}));var i=l?"10px":"3px",r=W()(e.element).width()+"px";W()(e.element).append('
    ').concat(n,"
    "))}})),_=_.filter((function(e){return e.name})),T()}}function T(){u&&_.forEach((function(e){if(0===e.codeWord.indexOf(b)){var t=e.codeWord.substring(b.length)[0];e.element.style.background=A(t)}}))}function N(e){v.removeClass(s);var t=e.map((function(e){return e.id})),n=v.toArray().filter((function(e){return-1===t.indexOf(e.id)}));W()(n).addClass(s)}function A(e){var t=parseInt(e)-1;return h[t]}r.start=function(){w=!0,u&&W()(v).addClass("noanimation"),y.startListening()},r.stop=function(){w=!1,W()(v).find(".huffman-code-visualization").remove(),u&&(W()(v).removeClass("noanimation"),W()(v).css("background","")),y.stopListening()},r.destroy=function(){r.stop(),y.destroy()},r.reinit=function(){w&&(r.stop(),S(),r.start())},r.input=function(e){if(e+="",clearTimeout(C),1===e.length){b+=e,T();var t,n=_.filter((function(e){return e.codeWord===b})).map((function(e){return e.element})),i=_.filter((function(e){return 0===e.codeWord.indexOf(b)})).map((function(e){return e.element}));v.removeClass(o),n[0]?(t=n[0],g=t||g,v.removeClass(o),W()(g).addClass(o),N(v.toArray()),m&&m(n[0])):p&&N(i),(n[0]||0===i.length)&&(N(v.toArray()),b="",T()),f>0&&(C=setTimeout((function(){N(v.toArray()),b="",T()}),f))}},r.getCurrentInput=function(){return b},S()}function za(e){return function(e){if(Array.isArray(e))return Wa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Wa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wa(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0&&t>0&&n>0&&i>0},r=function(e,t,n,i){return e<0&&t<0&&n<0&&i<0},a=t.map((function(e){var t=e.getBoundingClientRect(),a=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(a),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(a,o,s,l),right:r(a,o,s,l),up:i(c,u,d,f),down:r(c,u,d,f),absDiffX:p,absDiffY:h,absDiff:p+h}}));function s(e,t,n,i,r){var a=e.filter((function(e){return e[t]}));if(a.length>0)return a[0].element;if(o){var s=Math.min.apply(Math,za(e.map((function(e){return e[r]})))),l=e.filter((function(e){return e[r]===s&&e[n]})),c=Math.max.apply(Math,za(l.map((function(e){return e[i]})))),u=l.filter((function(e){return e[i]===c}))[0];return u?u.element:null}return null}var l=s(a=a.sort((function(e,t){return e.absDiff-t.absDiff})),"left","right","absDiffX","absDiffY"),u=s(a,"right","left","absDiffX","absDiffY"),f=s(a,"up","down","absDiffY","absDiffX"),p=s(a,"down","up","absDiffY","absDiffX");d[e.id]={element:e,left:l,right:u,up:f,down:p}}))}),200),function(e){e&&(W.a.isFunction(e.selectionListener)&&(l=e.selectionListener),o=void 0!==e.wrapAround&&e.wrapAround,s=void 0!==e.resetToStart&&e.resetToStart,f.onInputEvent(e.inputEventLeft,i.left),f.onInputEvent(e.inputEventRight,i.right),f.onInputEvent(e.inputEventUp,i.up),f.onInputEvent(e.inputEventDown,i.down),f.onInputEvent(e.inputEventSelect,i.select))}(n))}Ka.getInstanceFromConfig=function(e,t,n,i){return new Ya(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 Ja={};function Xa(e,t){var n=this,i=e,r=null,a=null,o=null,s=null,l=null,c=0;function u(e){s.removeClass(r),W()(e).addClass(r),o&&o(e)}n.start=function(){l.startListening(),u(s[0]),c=0},n.destroy=function(){l.destroy(),s.removeClass(r)},n.next=function(){++c>s.length-1&&(c=0),u(s[c])},n.select=function(){a&&a(s[c])},l=ji.instance(),function(e){e&&e.inputEventSelect&&e.inputEventNext&&(W.a.isFunction(e.selectionListener)&&(a=e.selectionListener),W.a.isFunction(e.activeListener)&&(o=e.activeListener),r=e.activeClass||"scanFocus",l.onInputEvent(e.inputEventSelect,(function(){n.select()})),l.onInputEvent(e.inputEventNext,(function(){n.next()})))}(t),s=W()(i)}Ja.getInstanceFromConfig=function(e,t,n){return new Xa(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]})};var qa=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanVertical",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanVertical",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanVertical",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanBinary",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanBinary",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanBinary",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.touchScanning=n.concat([null])):a>-1&&(e.touchScanning=n.slice(0,a).concat(n.slice(a+1)))}else e.touchScanning=r},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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"scanAuto",n.concat([null])):a>-1&&e.$set(e.inputConfig,"scanAuto",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"scanAuto",r)}}}),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")])])])])])])])])};qa._withStripped=!0;var Za=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,r){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,r)}}},[n("i",{staticClass:"fas fa-trash"})])])})),0)]):e._e()])})),0)])};Za._withStripped=!0;var Qa={components:{Accordion:ir},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:m,InputEventARE:w,InputConfig:I,keyRecording:{},areRecording:{},areError:{},lastEmitValue:null,localEventHandler:ji.instance(),lastInitTime:null,areService:Li}},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 r=I.getInputEventInstance(t,{label:n.label});ki.a.set(this.inputs,e,JSON.parse(JSON.stringify(r))),this.maxInputs&&this.inputs.length "+t.targetComponentId},changedAreURL:function(e){e.areURL&&(e.areURL=Li.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=J.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=Pa.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig)),e.touchScanning=!e.inputConfig.mouseclickEnabled})),wi.setHelpLocation("04_input_options","#scanning")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},so=(n(80),Ki(oo,qa,[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));so.options.__file="src/vue-components/modals/input/scanningModal.vue";var lo=so.exports,co=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"mouseclickEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"mouseclickEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"mouseclickEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"hoverEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"hoverEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"hoverEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"hoverHideCursor",n.concat([null])):a>-1&&e.$set(e.inputConfig,"hoverHideCursor",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"hoverHideCursor",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):a>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"globalReadActive",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.concat([null])):a>-1&&e.$set(e.inputConfig,"hoverDisableHoverpane",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"hoverDisableHoverpane",r)}}}),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")])])])])])])])])};co._withStripped=!0;var uo=Ki({props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")}))},cancel:function(){this.$emit("close")},openHelp:function(){wi.openHelp()},initTest:function(){var e=this;setTimeout((function(){var t=e;e.stopTest(),t.inputConfig.hoverEnabled&&(t.hover=Ga.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 Fa(".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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#mousetouch-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},co,[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);uo.options.__file="src/vue-components/modals/input/mouseModal.vue";var fo=uo.exports,po=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"dirEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"dirEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"dirEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"dirWrapAround",n.concat([null])):a>-1&&e.$set(e.inputConfig,"dirWrapAround",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"dirWrapAround",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"dirResetToStart",n.concat([null])):a>-1&&e.$set(e.inputConfig,"dirResetToStart",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"dirResetToStart",r)}}}),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")])])])])])])])])};po._withStripped=!0;var ho={props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){wi.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=J.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=Ka.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#direction-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},mo=(n(82),Ki(ho,po,[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));mo.options.__file="src/vue-components/modals/input/directionInputModal.vue";var vo=mo.exports,go=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffEnabled",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffShowNumbers",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffShowNumbers",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffShowNumbers",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffShowColors",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffShowColors",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffShowColors",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffColorWholeElement",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffColorWholeElement",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffColorWholeElement",r)}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"huffMarkInactive",n.concat([null])):a>-1&&e.$set(e.inputConfig,"huffMarkInactive",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"huffMarkInactive",r)}}}),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")])])])])])])])])};go._withStripped=!0;var _o={props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){wi.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=J.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=Va.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#huffman-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},bo=(n(84),Ki(_o,go,[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));bo.options.__file="src/vue-components/modals/input/huffmanInputModal.vue";var yo=bo.exports,Eo=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"seqEnabled",n.concat([null])):a>-1&&e.$set(e.inputConfig,"seqEnabled",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"seqEnabled",r)}}}),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.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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&e.$set(e.inputConfig,"globalReadActive",n.concat([null])):a>-1&&e.$set(e.inputConfig,"globalReadActive",n.slice(0,a).concat(n.slice(a+1)))}else e.$set(e.inputConfig,"globalReadActive",r)}}}),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")])])])])])])])])};Eo._withStripped=!0;var wo={props:[],components:{Accordion:ir,InputEventList:to,TestArea:ao},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,yi.saveMetadata(this.metadata).then((function(){e.$emit("close")})))},cancel:function(){this.$emit("close")},openHelp:function(){wi.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=J.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=Ja.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;ji.pauseAll(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.inputConfig=JSON.parse(JSON.stringify(t.inputConfig))})),wi.setHelpLocation("04_input_options","#sequential-input")},updated:function(){J.initDomI18n()},beforeDestroy:function(){wi.revertToLastLocation(),this.stopTest(),ji.resumeAll()}},Co=(n(86),Ki(wo,Eo,[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));Co.options.__file="src/vue-components/modals/input/sequentialInputModal.vue";var So=Co.exports,To=null,No=null,Ao={MODAL_SCANNING:"MODAL_SCANNING",MODAL_MOUSE:"MODAL_MOUSE",MODAL_DIRECTION:"MODAL_DIRECTION",MODAL_HUFFMAN:"MODAL_HUFFMAN",MODAL_SEQUENTIAL:"MODAL_SEQUENTIAL"};function Oo(){To&&window.removeEventListener("resize",To.resizeListener,!0),To&&W()(document).off(i.EVENT_GRID_RESIZE,To.resizeListener),To&&To.scanner&&To.scanner.destroy(),To&&To.hover&&To.hover.destroy(),To&&To.clicker&&To.clicker.destroy(),To&&To.directionInput&&To.directionInput.destroy(),To&&To.huffmanInput&&To.huffmanInput.destroy(),To&&To.seqInput&&To.seqInput.destroy()}function Io(){W.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=To.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":""}};W.a.contextMenu({selector:"#inputConfigButton",callback:function(e,t){!function(e,t){switch(e){case"CONTEXT_MOUSE":To.openModal(Ao.MODAL_MOUSE);break;case"CONTEXT_SCANNING":To.openModal(Ao.MODAL_SCANNING);break;case"CONTEXT_DIRECTION":To.openModal(Ao.MODAL_DIRECTION);break;case"CONTEXT_HUFFMAN":To.openModal(Ao.MODAL_HUFFMAN);break;case"CONTEXT_SEQUENTIAL":To.openModal(Ao.MODAL_SEQUENTIAL)}}(e)},trigger:"left",items:r,zIndex:10})}var ko=Ki({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:Ao,viewInitialized:!1,unlockCount:8,unlockCounter:8}},components:{SequentialInputModal:So,HuffmanInputModal:yo,DirectionInputModal:vo,MouseModal:fo,ScanningModal:lo,HeaderIcon:Qi},methods:{openModal:function(e){this.showModal=e,Oo()},lock:function(){this.metadata.locked=!0,this.unlockCounter=8,yi.saveMetadata(this.metadata).then((function(){W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)}))},unlock:function(e){var t=this;t.unlockCounter--,ni.debounce((function(){t.unlockCounter=8}),3e3),(0===t.unlockCounter||e)&&(t.metadata.locked=!1,yi.saveMetadata(t.metadata).then((function(){W()(document).trigger(i.EVENT_SIDEBAR_OPEN)})))},applyFullscreen:function(e){ni.openFullscreen(),this.metadata.fullscreen=!0;var t=Promise.resolve();e||(t=yi.saveMetadata(this.metadata)),t.then((function(){W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)}))},initInputMethods:function(){var e=this;if(No){var t=e.metadata.inputConfig;window.addEventListener("resize",e.resizeListener,!0),W()(document).on(i.EVENT_GRID_RESIZE,e.resizeListener);var n=function(t){Ra.removeAddClass(t,"selected"),ra.doAction(e.gridData.id,t.id)},r=function(n){t.globalReadActive&&vr.speakLabel(e.gridData.id,n.id)};t.seqEnabled&&(e.seqInput=Ja.getInstanceFromConfig(t,".grid-item-content",{selectionListener:n,activeListener:r}),e.seqInput.start()),t.dirEnabled&&(e.directionInput=Ka.getInstanceFromConfig(t,".grid-item-content","scanFocus",n),e.directionInput.start()),t.huffEnabled&&(this.huffmanInput=Va.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive",n),this.huffmanInput.start()),t.scanEnabled&&(e.scanner=Pa.getInstanceFromConfig(t,".grid-item-content","scanFocus","scanInactive"),e.scanner.setSelectionListener(n),No.setLayoutChangedStartListener((function(){e.scanner.pauseScanning()})),No.setLayoutChangedEndListener((function(){e.scanner.resumeScanning()})),e.scanner.startScanning()),t.hoverEnabled?(e.hover=Ga.getInstanceFromConfig(t,".grid-item-content",{activeListener:r,containerClass:".grid-container li"}),e.hover.setSelectionListener(n),e.hover.startHovering()):W()("#touchElement").hide(),t.mouseclickEnabled&&(e.clicker=new Fa(".grid-item-content"),e.clicker.setSelectionListener(n),e.clicker.startClickcontrol())}},reinitInputMethods:function(){var e=this;Oo(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),Io(),e.initInputMethods()}))},reload:function(e){var t=this;No.reinit(e).then((function(){e&&(t.gridData=JSON.parse(JSON.stringify(e))),t.reinitInputMethods()}))},reloadOnLangChange:function(){this.reload()},toEditGrid:function(){xs.toEditGrid(this.gridData.id)},toManageGrids:function(){xs.toManageGrids()},toLogin:function(){xs.toLogin()},reloadFn:function(e,t,n){var r=this;if(To&&No&&No.isInitialized()){log.debug("got update event, ids updated:"+t);var a=n.filter((function(e){return To.gridData&&e.id===To.gridData.id}))[0];this.updatedMetadataDoc=n.filter((function(e){return To.metadata&&e.id===To.metadata.id}))[0]||this.updatedMetadataDoc,a&&To.reload(new cn(a)),B.shouldSyncNavigation()&&(this.updatedMetadataDoc&&this.updatedMetadataDoc.lastOpenedGridId!==To.gridData.id?yi.getGrid(this.updatedMetadataDoc.lastOpenedGridId).then((function(e){e.hasOutdatedThumbnail()||xs.toLastOpenedGrid()})):(this.updatedMetadataDoc&&this.updatedMetadataDoc.fullscreen!==To.metadata.fullscreen&&(this.updatedMetadataDoc.fullscreen?To.applyFullscreen(!0):W()(document).trigger(i.EVENT_SIDEBAR_OPEN)),this.updatedMetadataDoc&&this.updatedMetadataDoc.locked!==To.metadata.locked&&(this.updatedMetadataDoc.locked?To.lock():To.unlock(!0))))}else setTimeout((function(){r.reloadFn(e,t,n)}),500)},onSidebarOpen:function(){To&&To.metadata&&(To.metadata.fullscreen=!1,W()(document).trigger(i.EVENT_GRID_RESIZE))},resizeListener:function(){var e=this;ni.debounce((function(){e.huffmanInput&&e.huffmanInput.reinit()}),500)}},computed:{filteredGrids:function(){return[]}},created:function(){W()(document).on(i.EVENT_DB_PULL_UPDATED,this.reloadFn),W()(document).on(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),W()(document).on(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen)},mounted:function(){var e=this,t=this;To=t,yi.getGlobalGrid().then((function(e){return t.globalGridData=e,yi.getGrid(t.gridId)})).then((function(n){if(!n)return log.warn("grid not found! gridId: "+e.gridId),yi.getGrids(!1,!0).then((function(e){return e[0]?xs.toGrid(e[0].id):xs.toManageGrids(),Promise.reject()}));if(n.hasAREModel()){var i=n.getAREModel();Li.uploadAndStartModel(i.dataBase64,n.getAREURL(),i.fileName)}return t.gridData=JSON.parse(JSON.stringify(n)),xs.addToGridHistory(t.gridData.id),Promise.resolve()})).then((function(){return yi.getMetadata()})).then((function(n){var r=JSON.parse(JSON.stringify(n||new P));return r.lastOpenedGridId=e.gridId,r.locked=void 0===r.locked?un.isDemoMode()&&yi.getCurrentUser()===i.LOCAL_DEMO_USERNAME:r.locked,r.fullscreen=void 0===r.fullscreen?un.isDemoMode()&&yi.getCurrentUser()===i.LOCAL_DEMO_USERNAME:r.fullscreen,r.inputConfig.scanEnabled=!!un.isScanningEnabled()||r.inputConfig.scanEnabled,r.inputConfig.dirEnabled=!!un.isDirectionEnabled()||r.inputConfig.dirEnabled,r.inputConfig.huffEnabled=!!un.isHuffmanEnabled()||r.inputConfig.huffEnabled,yi.saveMetadata(r).then((function(){r.locked&&W()(document).trigger(i.EVENT_SIDEBAR_CLOSE)})),t.metadata=r,Promise.resolve()})).then((function(){return e=t.gridData.id,(No=new xr("#grid-container",".grid-item-content",{enableResizing:!1,dragAndDrop:!1,gridId:e,globalGridHeightPercentage:To.metadata.globalGridHeightPercentage})).getInitPromise();var e})).then((function(){Io(),t.viewInitialized=!0;var e=new cn(t.gridData);e.hasOutdatedThumbnail()&&pi.getScreenshot("#grid-container").then((function(n){var i={data:n,hash:e.getHash()};t.gridData.thumbnail=i,yi.saveGrid(t.gridData)})),t.initInputMethods()})).catch((function(e){e&&log.warn(e)}))},updated:function(){J.initDomI18n()},beforeDestroy:function(){W()(document).off(i.EVENT_DB_PULL_UPDATED,this.reloadFn),W()(document).off(i.EVENT_LANGUAGE_CHANGE,this.reloadOnLangChange),W()(document).off(i.EVENT_SIDEBAR_OPEN,this.onSidebarOpen),Oo(),W.a.contextMenu("destroy"),To=null,No&&(No.destroy(),No=null)}},Da,[],!1,null,"cc4f17d6",null);ko.options.__file="src/vue-components/views/gridView.vue";var Lo=ko.exports,xo=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.remember=n.concat([null])):a>-1&&(e.remember=n.slice(0,a).concat(n.slice(a+1)))}else e.remember=r}}}),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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.remember=n.concat([null])):a>-1&&(e.remember=n.slice(0,a).concat(n.slice(a+1)))}else e.remember=r}}}),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)};xo._withStripped=!0;var Do,Ro=n(6),Mo=n.n(Ro),Po={},Uo=null,Go=null,jo=null,Fo=null,$o=!1,Bo=null,Vo=null,Ho=i.IS_ENVIRONMENT_PROD?"https://couchdb.asterics-foundation.org:3001":"http://"+location.hostname+":3000";function zo(e,t,n){return jo!==e?Promise.reject():(Fo=e,Bo=t,Vo=n,e=e.trim(),Mo.a.login({username:e,password:t}).then((function(i){return log.info("login success!"),Po.stopAutoRetryLogin(),Uo=i,Go=e,B.setLastActiveUser(e),B.setAutologinUser(n?e:""),n&&B.saveUserPassword(e,t),Promise.resolve()})))}function Wo(e,t,n){return zo(e,t,n).then((function(){return oi.initForUser(e,t,Po.getLoggedInUserDatabase(),!n).then((function(){return Promise.resolve(!0)}))}),(function(i){return jo!==e?Promise.reject():(log.info("online login failed!"),log.debug(i),B.isDatabaseSynced(e)?(log.info("using offline local database..."),B.setLastActiveUser(e),B.setAutologinUser(n?e:""),Ko(i)!==Po.ERROR_CODE_UNAUTHORIZED&&Yo(e,t,n),oi.initForUser(e,t).then((function(){return Promise.resolve(!1)}))):Promise.reject(Ko(i)))}))}function Ko(e){return e&&e.error&&"unauthorized"===e.error.toLowerCase()&&e.message&&e.message.includes("locked")||e&&e.error&&"unauthorized"===e.error.toLowerCase()?Po.ERROR_CODE_UNAUTHORIZED:e&&e.message&&"network error"===e.message.toLowerCase()?Po.ERROR_CODE_NETWORK_ERROR:void 0}function Yo(e,t,n){Po.stopAutoRetryLogin(),Do=window.setTimeout((function(){log.info("auto-retry for online login with user: "+e),Wo(e,t,n)}),1e4)}Po.ERROR_CODE_UNAUTHORIZED="ERROR_CODE_UNAUTHORIZED",Po.ERROR_CODE_LOCKED="ERROR_CODE_LOCKED",Po.ERROR_CODE_NETWORK_ERROR="ERROR_CODE_NETWORK_ERROR",Mo.a.configure({serverUrl:Ho,baseUrl:"/auth",noDefaultEndpoint:!1,storage:"local",checkExpired:!1,refreshThreshold:.5,timeout:0}),Po.getLoggedInUsername=function(){return Go},Po.getLoggedInUserDatabase=function(){if(!Uo||!Uo.userDBs)return null;var e=Object.keys(Uo.userDBs);return Uo.userDBs[e[0]]},Po.loginPlainPassword=function(e,t,n){jo=e;var i=Xt.getUserPasswordHash(t);return Po.loginHashedPassword(e,i,n)},Po.loginHashedPassword=function(e,t,n){return jo=e,Wo(e,t,n)},Po.loginStoredUser=function(e,t){if(!e)return Promise.resolve();if($o)return log.warn("login currently in progress - aborting..."),Promise.reject();jo=e,$o=!0;var n=B.getSavedOnlineUsers(),i=B.getSavedLocalUsers(),r=new Promise((function(t,r){if(Po.getLoggedInUsername()===e)return t();if(Po.logout(),n.includes(e)&&B.isDatabaseSynced(e)){var a=B.getUserPassword(e);oi.initForUser(e,a).then((function(){Po.loginHashedPassword(e,a,!0),t()}))}else if(n.includes(e)){log.info("waiting for successful login because user wasn't completely synced before...");var o=B.getUserPassword(e);Po.loginHashedPassword(e,o,!0).then((function(){t()})).catch((function(e){r(e)}))}else i.includes(e)&&(B.setAutologinUser(e),oi.initForUser(e,e).then((function(){t()})))}));return r.then((function(){t||xs.toMain()})),r.finally((function(){$o=!1})),r},Po.logout=function(){Po.stopAutoRetryLogin(),Go&&(log.debug("logging out user: "+Go),oi.closeCurrentDatabase(),Mo.a.logout(Go),Go=null,Uo=null)},Po.register=function(e,t,n){jo=e,Po.stopAutoRetryLogin(),e=e.trim();var i=Xt.getUserPasswordHash(t);return log.debug("password hash: "+i),Mo.a.register({username:e,email:(new Date).getTime()+"."+Math.random()+"@norealmail.org",password:i,confirmPassword:i}).then((function(t){return zo(e,i,n)})).then((function(){return log.info("registration successful!"),oi.registerForUser(Go,i,Po.getLoggedInUserDatabase(),!n)})).then((function(){return yi.importDefaultGridset()})).catch((function(e){return log.info("registration failed!"),log.info(e),Promise.reject(e)}))},Po.registerOffline=function(e,t){return Po.logout(),B.saveLocalUser(e),B.setAutologinUser(e),oi.registerForUser(e,t).then((function(){return yi.importDefaultGridset()}))},Po.validateUsername=function(e){return new Promise((function(t,n){e&&i.USERNAME_REGEX.test(e)?B.isSavedLocalUser(e)||e===i.LOCAL_DEMO_USERNAME?t(i.VALIDATION_ERROR_EXISTING):Mo.a.validateUsername(e).then((function(){t(i.VALIDATION_VALID)}),(function(e){log.debug(e),t(i.VALIDATION_ERROR_EXISTING)})):t(i.VALIDATION_ERROR_REGEX)}))},Po.stopAutoRetryLogin=function(){Do&&(window.clearInterval(Do),Do=null)},Po.ping=function(){W.a.get(Ho+"/ping")},W()(document).on(i.EVENT_DB_CONNECTION_LOST,(function(e){log.info("connection lost! auto-retrying login after 10 seconds..."),Fo&&Bo&&Yo(Fo,Bo,Vo)})),W()(document).on(i.EVENT_DB_DATAMODEL_UPDATE,(function(){Po.logout(),B.setAutologinUser(""),xs.toLogin()}));var Jo={components:{HeaderIcon:Qi},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(){xs.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="",Po.loginPlainPassword(e,t,this.remember).then((function(){n.loginSuccess=!0,xs.toMain()})).catch((function(e){n.loginSuccess=!1,n.loginErrorCode=e})))},loginStored:function(e){var t=this;e&&(t.savedUsers.includes(e)||Po.getLoggedInUsername()===e)&&(t.loginSuccess=void 0,t.loginTryUser=e,t.loginErrorCode="",Po.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(J.translate(t,e)))return;B.unmarkSyncedDatabase(e),B.removeUserPassword(e),Po.getLoggedInUsername()===e&&Po.logout(),oi.deleteDatabase(e)}else Po.logout();this.allUsersList=B.getSavedUsers(this.activeUser),this.savedUsers=B.getSavedUsers(this.activeUser),this.savedOnlineUsers=B.getSavedOnlineUsers(),this.savedLocalUsers=B.getSavedLocalUsers()},hasValidMajorModelVersion:function(e){return B.getUserMajorModelVersion(e)<=r.getLatestModelVersion().major}},mounted:function(){var e=Po.getLoggedInUsername();this.activeUser=B.getAutologinUser()||e,this.savedUsers=B.getSavedUsers(this.activeUser),this.allUsersList=B.getSavedUsers(this.activeUser),this.savedOnlineUsers=B.getSavedOnlineUsers(),this.savedLocalUsers=B.getSavedLocalUsers(),e&&!this.allUsersList.includes(e)&&this.allUsersList.unshift(e),this.user=this.allUsersList&&this.allUsersList.length>0?null:B.getLastActiveUser(),this.user&&document.getElementById("inputPassword2").focus(),J.initDomI18n()},updated:function(){J.initDomI18n()}},Xo=(n(114),Ki(Jo,xo,[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));Xo.options.__file="src/vue-components/views/loginView.vue";var qo=Xo.exports,Zo=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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.remember=n.concat([null])):a>-1&&(e.remember=n.slice(0,a).concat(n.slice(a+1)))}else e.remember=r}}}),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)};Zo._withStripped=!0;var Qo=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)};Qo._withStripped=!0;var es={props:[],components:{Accordion:ir},data:function(){return{showInfo:!1}},methods:{},mounted:function(){J.initDomI18n()}},ts=(n(116),Ki(es,Qo,[],!1,null,"2a375b84",null));ts.options.__file="src/vue-components/components/comparisonComponent.vue";var ns=ts.exports,is={components:{ComparisonComponent:ns,HeaderIcon:Qi},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(){xs.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 ")])])])])};_s._withStripped=!0;var bs=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=Kn.instance(),this.predictionary.loadDictionary(e.data),this.totalWords=this.predictionary.getWords().length,this.inputSearchWord(""),wi.setHelpLocation("07_dictionaries","#edit-dictionaries")):this.editFinished()},editFinished:function(){this.editId=null,this.searchWord="",wi.setHelpLocation("02_navigation","#manage-dictionaries-view")},inputSearchWord:function(e){var t=this,n=void 0===e?200:0;ni.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,ni.DEFAULT_KEY2)},clone:function(e){var t=this;yi.getDictionary(e).then((function(e){yi.saveDictionary(e.clone()).then((function(){t.reload()}))}))},deleteWord:function(e,t){var n=this;n.predictionary.delete(e),this.totalWords=this.predictionary.getWords().length,ni.debounce((function(){t.data=n.predictionary.dictionaryToJSON(),yi.saveDictionary(t)}),2e3,ni.DEFAULT_KEY),n.inputSearchWord()},reload:function(e){var t=this,n=this;yi.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===jn.getModelName()&&this.reload(n[0])}},created:function(){var e=this;W()(document).on(i.EVENT_DB_PULL_UPDATED,e.updatedHandler),yi.getDictionaries().then((function(t){log.debug(t),e.dicts=JSON.parse(JSON.stringify(t)),e.showLoading=!1}))},mounted:function(){this,J.initDomI18n()},updated:function(){J.initDomI18n()},beforeDestroy:function(){Yn.init(),W()(document).off(i.EVENT_DB_PULL_UPDATED,this.updatedHandler),W.a.contextMenu("destroy")}},Ts=(n(128),Ki(Ss,_s,[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));Ts.options.__file="src/vue-components/views/dictionariesView.vue";var Ns=Ts.exports,As=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("Language // 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,r=!!i.checked;if(Array.isArray(n)){var a=e._i(n,null);i.checked?a<0&&(e.syncNavigation=n.concat([null])):a>-1&&(e.syncNavigation=n.slice(0,a).concat(n.slice(a+1)))}else e.syncNavigation=r},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._e()],1)};As._withStripped=!0;var Os={components:{HeaderIcon:Qi},props:[],data:function(){return{metadata:null,show:!1,langCode:"",gridLanguages:[],allLanguages:J.getAllLanguages(),currentLang:J.getBrowserLang(),saveSuccess:null,speechService:vr,syncNavigation:B.shouldSyncNavigation(),voices:vr.getVoices(),selectedVoiceName:vr.getPreferredVoiceName(),testText:J.translate("This is an english sentence. // Das ist ein deutscher Satz.")}},methods:{saveLangCode:function(){var e=this;this.saveSuccess=void 0,ni.debounce((function(){J.setLanguage(e.langCode),J.initDomI18n(),e.saveSuccess=!0}),300,"SAVE_LANG")},saveVoice:function(){var e=this;this.saveSuccess=void 0,ni.debounce((function(){vr.setPreferredVoiceName(e.selectedVoiceName),e.saveSuccess=!0}),300,"SAVE_VOICE")},saveSyncNavigation:function(){var e=this;this.saveSuccess=void 0,ni.debounce((function(){B.setShouldSyncNavigation(e.syncNavigation),e.saveSuccess=!0}),300,"SAVE_NAV")},testSpeak:function(){vr.speak(this.testText,null,this.selectedVoiceName)}},mounted:function(){var e=this;J.initDomI18n(),yi.getMetadata().then((function(t){e.metadata=JSON.parse(JSON.stringify(t)),e.show=!0})),yi.getGrids(!1,!0).then((function(t){e.gridLanguages=t[0]?Object.keys(t[0].label):[]})),e.langCode=J.getCustomLanguage()},updated:function(){J.initDomI18n()}},Is=(n(130),Ki(Os,As,[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));Is.options.__file="src/vue-components/views/settingsView.vue";var ks=Is.exports,Ls=["#login","#register","#welcome","#add","#about"],xs={},Ds=null,Rs=null,Ms=!1,Ps=null,Us=[];function Gs(){var e=location.hash,t=e.lastIndexOf("/");return t=t>-1?t:e.length,e.substring(0,t)}function js(e,t){Rs=t?null:location.hash,location.hash=e}function Fs(e,t,n){var i;Ps=e,e!==Lo&&W()("#touchElement").hide(),i=n||Gs(),W()("nav button").removeClass("selected"),W()("nav a[href='".concat(i,"'] button")).addClass("selected"),log.debug("loading view: "+e.__file),Xi.setViewComponent(e,t)}function $s(){yi.getMetadata().then((function(e){var t=e?e.lastOpenedGridId:null;Fs(Lo,{gridId:t})}))}xs.init=function(e,t){Ms=!0,e,(Ds=new Y.a(null,!0)).on({main:function(){wi.setHelpLocation("02_navigation","#main-view"),$s()},"grids/":function(){wi.setHelpLocation("02_navigation","#manage-grids-view"),Fs(dr)},"grid/:gridId":function(e){log.debug("route grid with ID: "+e.gridId),wi.setHelpLocation("02_navigation","#main-view"),Fs(Lo,{gridId:e.gridId},"#main")},"grid/name/:gridName":function(e){log.debug("route grid with Name: "+e.gridName),wi.setHelpLocation("02_navigation","#main-view"),yi.getGrids().then((function(t){var n=t.filter((function(t){return J.getTranslation(t.label)===e.gridName})),i=n[0]?n[0].id:null;i?Fs(Lo,{gridId:i},"#main"):(log.warn("no grid with name ".concat(e.gridName," found!")),$s())}))},"grid/edit/:gridId":function(e){log.debug("route edit grid with ID: "+e.gridId),wi.setHelpLocation("02_navigation","#edit-view"),Fs(xa,{gridId:e.gridId})},login:function(){wi.setHelpLocation("02_navigation","#change-user-view"),Fs(qo)},register:function(){wi.setHelpLocation("06_users","#online-users"),Fs(as)},add:function(){wi.setHelpLocation("06_users","#offline-users"),Fs(cs)},welcome:function(){wi.setHelpLocationIndex(),Fs(ps)},about:function(){wi.setHelpLocationIndex(),Fs(gs)},dictionaries:function(){wi.setHelpLocation("02_navigation","#manage-dictionaries-view"),Fs(Ns)},settings:function(){Fs(ks)},"*":function(){wi.setHelpLocation("02_navigation","#main-view"),xs.toMain()}}),Ds.hooks({before:function(e,t){Ps&&Ps.destroy&&(Ps.destroy(),Ps=null);var n=function(){var e=location.hash;if(!oi.getCurrentUsedDatabase()){var t=B.getLastActiveUser()||B.getSavedUsers().length>0;e=(e=Ls.includes(e)?e:null)||(t?"#login":"#welcome")}return e}();location.hash!==n?(e(!1),js(n)):e()},after:function(e){},leave:function(e){}}),t&&js(t),Ds.resolve()},xs.isInitialized=function(){return Ms},xs.toMain=function(){0===Gs().indexOf("#main")?js("#main?date="+(new Date).getTime()):js("#main")},xs.toRegister=function(){js("#register")},xs.toAddOffline=function(){js("#add")},xs.toAbout=function(){js("#about")},xs.toLogin=function(){js("#login")},xs.toLastOpenedGrid=function(){yi.getMetadata().then((function(e){xs.toGrid(e.lastOpenedGridId)}))},xs.toGrid=function(e){e&&js("#grid/"+e+"?date="+(new Date).getTime())},xs.toEditGrid=function(e){e&&js("#grid/edit/"+e)},xs.toManageGrids=function(){js("#grids")},xs.back=function(){Rs&&Rs!==location.hash?js(Rs,!0):this.toMain()},xs.isOnEditPage=function(){return-1!==window.location.hash.indexOf("#grid/edit")},xs.getCurrentView=function(){return Ps},xs.addToGridHistory=function(e){Us.length>0&&Us[Us.length-1]===e||(-1===Us.indexOf(e)?Us.push(e):Us=[e])},xs.toLastGrid=function(){if(1!==Us.length){Us.pop();var e=Us.pop();xs.toGrid(e)}};var Bs={},Vs=null;Bs.init=function(){ki.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())}}),ki.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)}}}),ki.a.filter("translate",(function(e){return J.translate(e)})),ki.a.filter("extractTranslation",(function(e){return J.getTranslation(e)}))};n(132),n(134),n(136);var Hs={init:function(){ji.global.onAnyKey((function(e,t,n){if(n.ctrlKey&&n.shiftKey&&39===e){var i=B.getSavedUsers(),r=yi.getCurrentUser(),a=i.indexOf(r),o=i[a=a+1r.getLatestModelVersion().major&&(log.info('data model version of user "'.concat(n,'" is newer than version of running AsTeRICS Grid -> prevent autologin.')),n=null,B.setAutologinUser("")),log.info("autologin user: "+n),un.isDemoMode()?(e.push(Po.registerOffline(i.LOCAL_DEMO_USERNAME,i.LOCAL_DEMO_USERNAME)),B.setAutologinUser("")):e.push(Po.loginStoredUser(n,!0)),Promise.all(e).finally((function(){Xi.init();var e=n||un.isDemoMode(),i=t||B.getSavedUsers().length>0;B.setLastActiveUser(n||t||"");var r=location.hash||(e?"#main":i?"#login":"#welcome");xs.isInitialized()||xs.init("#injectView",r)}))}()}]); \ No newline at end of file diff --git a/serviceWorker.js b/serviceWorker.js index 734ab241e..f69f162a5 100644 --- a/serviceWorker.js +++ b/serviceWorker.js @@ -18,7 +18,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-2020-09-14-11.33/+0200'); }); workbox.routing.registerRoute(({url, request, event}) => {