@livinglogic/livingapi 1.38.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +2 -2
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-npm/livingapi.js +1 -1
- package/dist/esm-npm/livingapi.js.map +1 -1
- package/dist/esm-static/livingapi.js +1 -1
- package/dist/esm-static/livingapi.js.map +1 -1
- package/dist/umd/livingapi.js +1 -1
- package/dist/umd/livingapi.js.map +1 -1
- package/package.json +8 -1
- package/src/livingapi.js +105 -10
- package/.claude/settings.local.json +0 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"/npm/@livinglogic/ul4@1.16.1/dist/esm/ul4.js";function _typeof(e){return(_typeof="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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var n,r=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,n){var r=_superPropBase(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function set(e,t,n,r){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,n,r){var o,l=_superPropBase(e,t);if(l){if((o=Object.getOwnPropertyDescriptor(l,t)).set)return o.set.call(r,n),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(r,t)){if(!o.writable)return!1;o.value=n,Object.defineProperty(r,t,o)}else!function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(r,t,n);return!0})(e,t,n,r)}function _set(e,t,n,r,o){if(!set(e,t,n,r||e)&&o)throw new Error("failed to set property");return n}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,l=[],a=!0,i=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(i)throw o}}return l}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}var t="1.38.0";function element(t){for(var n=document.createElement(t),r=arguments.length,o=new Array(r>1?r-1:0),l=1;l<r;l++)o[l-1]=arguments[l];for(var a=0,i=o;a<i.length;a++){var u=i[a];"string"==typeof u&&n.appendChild(document.createTextNode(u));var s=u instanceof Map,p=e._isobject(u);if(s||p){p&&(u=Object.entries(u));var c,_=_createForOfIteratorHelper(u);try{for(_.s();!(c=_.n()).done;){var h=_slicedToArray(c.value,2),y=h[0],d=h[1];null!==d&&n.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return n}function _append_param_to_url(t,n,r){if(e._islist(r)||e._isset(r)){var o,l=_createForOfIteratorHelper(r);try{for(l.s();!(o=l.n()).done;){_append_param_to_url(t,n,o.value)}}catch(e){l.e(e)}finally{l.f()}}else"string"==typeof r?t.append(n,r):null!==r&&t.append(n,e._str(r))}function url_with_params(t){for(var n=new URLSearchParams,r=arguments.length,o=new Array(r>1?r-1:0),l=1;l<r;l++)o[l-1]=arguments[l];for(var a=0,i=o;a<i.length;a++){var u=i[a];if(e._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[n].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof e.Proto){if(null!==u&&"object"===_typeof(u)&&"object"===_typeof(u.__proto__)&&u.__proto__===Map.prototype){var s,p=_createForOfIteratorHelper(u);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];_append_param_to_url(n,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(n,y,u[y])}return(n=n.toString().replace("+","%20")).length>0&&(t+="?"+n),t}var n=function(t){_inherits(Base,e.Proto);var n=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=n.call(this)).id=e,t}return _createClass(Base,[{key:"ul4onid",get:function get(){return this.id}},{key:"ul4ondump",value:function ul4ondump(e){for(var t=0;t<this._ul4onattrs.length;++t)e.dump(this._dumpUL4ONAttr(this._ul4onattrs[t]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return this[e]}},{key:"ul4onload",value:function ul4onload(e){for(var t=0,n=e.loadcontent();;++t){var r=n.next();if(r.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],r.value)}for(;t<this._ul4onattrs.length;++t)this._setDefaultUL4ONAttr(this._ul4onattrs[t])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){this[e]=null}},{key:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var n=value.bind(this);return n._ul4_name=value._ul4_name||value.name,n._ul4_signature=value._ul4_signature,n._ul4_needsobject=value._ul4_needsobject,n._ul4_needscontext=value._ul4_needscontext,n}return value}if(t.startsWith("x_"))return this.hasOwnProperty(t)?this[t]:null;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,n){if(!t.startsWith("x_"))throw new e.AttributeError(this,t);this[t]=n}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),r=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}(),o=new(function(t){_inherits(GlobalsType,e.Type);var n=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),n.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof l}}]),GlobalsType}())("la","Globals","Global information"),l=function(t){_inherits(Globals,n);var l=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=l.call(this,e)).version=null,t.hostname=null,t.free=!1,t.platform=null,t.user=null,t.lang=null,t.sys_lang=null,t.datasources=null,t.app=null,t.record=null,t.mode=null,t.groups=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.view_template_id=null,t.email_template_id=null,t.handler=new r,t._log_stack=[],t._current_geo=null,t._next_attachment_id=0,t}return _createClass(Globals,[{key:e.symbols.type,value:function value(){return o}},{key:"dist",value:function dist(e,t){var n=function sqsin(e){return(e=Math.sin(e))*e},r=function sqsos(e){return(e=Math.cos(e))*e},o=Math.PI/180,l=1/298.257223563,a=e.lat*o,i=e.long*o,u=t.lat*o,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*o)/2,_=n(p)*r(c)+r(s)*n(c),h=r(p)*r(c)+n(s)*n(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137;if(0===d)return d;var f=Math.sqrt(_*h)/y,v=(3*f+1)/(2*_);return d*(1+l*((3*f-1)/(2*h))*n(s)*r(p)-l*v*r(s)*n(p))}},{key:"scaled_url",value:function scaled_url(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"sm",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,p=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,c=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],_=null;e instanceof or&&(e=e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="https://"+this.hostname;return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==r&&(h+="/rt:"+r),null!=t&&(h+="/w:"+t),null!=n&&(h+="/h:"+n),o&&(h+="/el:1"),null!=l&&(h+="/g:"+l),null!=a&&(h+="/q:"+a),null!==i&&i%360!=0&&(h+="/rot:"+rotatet),null!=u&&(h+="/bl:"+u),null!=s&&(h+="/sh:"+s),null!=p&&(h+="/f:"+p),null!=_&&(h+="/fn:"+_),h+="/plain/"+encodeURIComponent(e)}},{key:"qrcode_url",value:function qrcode_url(e,t){return"https://"+this.hostname+"/qr/generate?data="+encodeURIComponent(e)+"&size="+encodeURIComponent(t)}},{key:e.symbols.repr,value:function value(){return"<Globals version="+e._repr(this.version)+" mode="+e._repr(this.mode)+">"}},{key:"current_geo",value:function current_geo(){return this._current_geo}},{key:"set_current_geo",value:function set_current_geo(e){this._current_geo=new ar(this,e.coords.latitude,e.coords.longitude)}},{key:"_in_form",value:function _in_form(){return null!==this.mode&&this.mode.startsWith("form/")}},{key:"msg_bool",value:function msg_bool(e){switch(e){case!0:return this.msg_bool_true();case!1:return this.msg_bool_false();default:return null}}},{key:"msg_bool_true",value:function msg_bool_true(e){switch(this.lang){case"de":return"Ja";default:return"Yes"}}},{key:"msg_bool_false",value:function msg_bool_false(e){switch(this.lang){case"de":return"Nein";default:return"No"}}},{key:"msg_no_fields",value:function msg_no_fields(){switch(this.lang){case"de":return"(Keine Felder gefunden)";default:return"(No fields found)"}}},{key:"msg_nothing_selected",value:function msg_nothing_selected(){switch(this.lang){case"de":return"(Nichts ausgewählt)";default:return"(Nothing selected)"}}},{key:"_make_log_message",value:function _make_log_message(t){return t.map((function(t){return"string"!=typeof t?e._repr(t):t})).join(" ")}},{key:"begin_logging",value:function begin_logging(e){this._log_stack.push({header:e,output:!1})}},{key:"end_logging",value:function end_logging(){this._log_stack&&(this._log_stack[this._log_stack.length-1].output&&console&&console.groupEnd&&console.groupEnd(),this._log_stack.pop())}},{key:"group_logging",value:function group_logging(e,t){this.begin_logging(e);try{t()}finally{this.end_logging()}}},{key:"_start_log_message",value:function _start_log_message(){var e,t=_createForOfIteratorHelper(this._log_stack);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.output||(console&&console.group&&console.group(n.header),n.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(e){this._start_log_message(),console&&console.debug&&console.debug(this._make_log_message(e))}},{key:"log_info",value:function log_info(e){this._start_log_message(),console&&console.info&&console.info(this._make_log_message(e))}},{key:"log_warning",value:function log_warning(e){this._start_log_message(),console&&console.warn&&console.warn(this._make_log_message(e))}},{key:"log_error",value:function log_error(e){this._start_log_message(),console&&console.error&&console.error(this._make_log_message(e))}},{key:"my_apps_url",value:function my_apps_url(){return"https://"+this.hostname+"/apps.htm"}},{key:"my_tasks_url",value:function my_tasks_url(){return"https://"+this.hostname+"/xist4c/web/aufgaben_id_393_.htm"}},{key:"catalog_url",value:function catalog_url(){return"https://"+this.hostname+"/katalog/home.htm"}},{key:"chats_url",value:function chats_url(){return"https://"+this.hostname+"/chats.htm"}},{key:"profile_url",value:function profile_url(){return"https://"+this.hostname+"/profil/index.htm"}},{key:"account_url",value:function account_url(){return"https://"+this.hostname+"/account.htm"}},{key:"logout_url",value:function logout_url(){return"https://"+this.hostname+"/login.htm?logout=standardCug"}}]),Globals}();l.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","sys_lang","datasources","hostname","free","app","record","mode","view_template_id","email_template_id","view_id"],l.prototype._ul4attrs=new Set(["id","version","hostname","platform","free","mode","form","app","record","datasources","externaldatasources","groups","user","lang","sys_lang","templates","pparams","geo","dist","maxdbactions","maxtemplateruntime","flashmessages","scaled_url","qrcode_url","current_geo","log_debug","log_info","log_warning","log_error","my_apps_url","my_tasks_url","catalog_url","chats_url","profile_url","account_url","logout_url"]),e.expose(l.prototype.log_debug,["message","*"]),e.expose(l.prototype.log_info,["message","*"]),e.expose(l.prototype.log_warning,["message","*"]),e.expose(l.prototype.log_error,["message","*"]),e.expose(l.prototype.dist,["geo1","pk","geo2","pk"]),e.expose(l.prototype.current_geo,[]),e.expose(l.prototype.scaled_url,["image","p","width","p","height","p","type","k=","fill","enlarge","k=",!0,"gravity","k=","sm","quality","k=",null,"rotate","k=",null,"blur","k=",null,"sharpen","k=",null,"format","k=",null,"cache","k=",!0]);var a=new(function(t){_inherits(FlashMessageType,e.Type);var n=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),n.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof i}}]),FlashMessageType}())("la","FlashMessage","A flash message in a web page"),i=function(t){_inherits(FlashMessage,n);var r=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),r.apply(this,arguments)}return _createClass(FlashMessage,[{key:e.symbols.type,value:function value(){return a}},{key:e.symbols.repr,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();i.prototype._ul4onattrs=["timestamp","type","title","message"],i.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var u=new(function(t){_inherits(PermissionType,e.Type);var n=_createSuper(PermissionType);function PermissionType(){return _classCallCheck(this,PermissionType),n.apply(this,arguments)}return _createClass(PermissionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof s}}]),PermissionType}())("la","Permission","Permission information"),s=function(t){_inherits(Permission,n);var r=_createSuper(Permission);function Permission(){return _classCallCheck(this,Permission),r.apply(this,arguments)}return _createClass(Permission,[{key:e.symbols.type,value:function value(){return u}},{key:e.symbols.repr,value:function value(){return"<Permission id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"edit",get:function get(){return"1"==this.permissions.charAt(0)}},{key:"config",get:function get(){return"1"==this.permissions.charAt(1)}},{key:"delete",get:function get(){return"1"==this.permissions.charAt(2)}},{key:"task_manage",get:function get(){return"1"==this.permissions.charAt(3)}},{key:"data_edit",get:function get(){return"1"==this.permissions.charAt(4)}},{key:"data_view",get:function get(){return"1"==this.permissions.charAt(5)}},{key:"task_view",get:function get(){return"1"==this.permissions.charAt(6)}},{key:"frontend",get:function get(){return"1"==this.permissions.charAt(7)}},{key:"data_connect_external",get:function get(){return"1"==this.permissions.charAt(8)}},{key:"perform_evaluation",get:function get(){return"1"==this.permissions.charAt(9)}},{key:"to_catalog",get:function get(){return"1"==this.permissions.charAt(10)}},{key:"data_import_export",get:function get(){return"1"==this.permissions.charAt(11)}},{key:"mydata_view",get:function get(){return"1"==this.permissions.charAt(12)}},{key:"mydata_edit",get:function get(){return"1"==this.permissions.charAt(13)}},{key:"user_admin",get:function get(){return"1"==this.permissions.charAt(14)}}]),Permission}();s.prototype._ul4onattrs=["permissions"],s.prototype._ul4attrs=new Set(["permissions","edit","config","delete","task_manage","data_edit","data_view","task_view","frontend","data_connect_external","perform_evaluation","to_catalog","data_import_export","mydata_view","mydata_edit","user_admin"]);var p=function(e){_inherits(WithAttachments,n);var t=_createSuper(WithAttachments);function WithAttachments(){return _classCallCheck(this,WithAttachments),t.apply(this,arguments)}return _createClass(WithAttachments,[{key:"_add_attachment",value:function _add_attachment(e,t,n,r,o){null===this.attachments&&(this.attachments=new Map);var l=new e(null,this,t,n,r,o);return this.attachments["attachment_".concat(this.globals._next_attachment_id+=1)]=l,l}},{key:"add_note_attachment",value:function add_note_attachment(e,t,n,r){return this._add_attachment(cr,e,t,n,r)}},{key:"add_url_attachment",value:function add_url_attachment(e,t,n,r){return this._add_attachment(hr,e,t,n,r)}},{key:"add_json_attachment",value:function add_json_attachment(e,t,n,r){return this._add_attachment(vr,e,t,n,r)}},{key:"add_file_attachment",value:function add_file_attachment(e,t,n,r){return this._add_attachment(fileAttachment,e,t,n,r)}}]),WithAttachments}(),c=new(function(t){_inherits(TranslationsType,e.Type);var n=_createSuper(TranslationsType);function TranslationsType(){return _classCallCheck(this,TranslationsType),n.apply(this,arguments)}return _createClass(TranslationsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof h}}]),TranslationsType}())("la","Translations","The translations of the multilingual attributes of a LivingAPI object (one attribute per language)"),_=new Set(["de","en","fr","it","es","cs"]),h=function(t){_inherits(Translations,e.Proto);var n=_createSuper(Translations);function Translations(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return _classCallCheck(this,Translations),(t=n.call(this)).owner=e,t.langs=r,t}return _createClass(Translations,[{key:e.symbols.type,value:function value(){return c}},{key:"get",value:function get(e){if(void 0===e){var t=this.owner.globals;if(null==t)return null;e=t.lang}if(null===this.langs||null===e)return null;var n=this.langs.get(e);return void 0!==n?n:null}},{key:"get_or_add",value:function get_or_add(e){if(!_.has(e))return null;null===this.langs&&(this.langs=new Map);var t=this.langs.get(e);return void 0===t&&(t=this.owner._create_translation(e),this.langs.set(e,t)),t}},{key:"de",get:function get(){return this.get_or_add("de")}},{key:"en",get:function get(){return this.get_or_add("en")}},{key:"fr",get:function get(){return this.get_or_add("fr")}},{key:"it",get:function get(){return this.get_or_add("it")}},{key:"es",get:function get(){return this.get_or_add("es")}},{key:"cs",get:function get(){return this.get_or_add("cs")}},{key:e.symbols.getattr,value:function value(t){var n=this.get_or_add(t);if(null!==n)return n;throw new e.AttributeError(this,t)}},{key:e.symbols.repr,value:function value(){return"<Translations owner="+e._repr(this.owner)+" langs="+e._repr(null!==this.langs?_toConsumableArray(this.langs.keys()):null)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Translations}(),y=function(t){_inherits(LangBase,n);var r=_createSuper(LangBase);function LangBase(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return _classCallCheck(this,LangBase),(t=r.call(this,e)).lang=n,t}return _createClass(LangBase,[{key:e.symbols.setattr,value:function value(t,n){if(this._settableattrs.has(t)){if(null!==n&&"string"!=typeof n)throw new e.ArgumentError(t+" must be None or a string");this[t]=n}else _get(_getPrototypeOf(LangBase.prototype),e.symbols.setattr,this).call(this,t,n)}}]),LangBase}();y.prototype._ul4attrs=new Set(["id","lang"]),y.prototype._settableattrs=new Set;var d=new(function(t){_inherits(AppLangType,e.Type);var n=_createSuper(AppLangType);function AppLangType(){return _classCallCheck(this,AppLangType),n.apply(this,arguments)}return _createClass(AppLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof f}}]),AppLangType}())("la","AppLang","The translations of the multilingual attributes of an app for one language"),f=function(t){_inherits(AppLang,y);var n=_createSuper(AppLang);function AppLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,AppLang),(t=n.call(this,e,o)).app=r,t.name=null,t.description=null,t.typename_grammatical_gender=null,t.typenames=new Map,t}return _createClass(AppLang,[{key:e.symbols.type,value:function value(){return d}},{key:e.symbols.setattr,value:function value(t,n){if("typenames"===t){if(e._isobject(n))n=new Map(Object.entries(n));else if(null!==n&&!(n instanceof Map))throw new e.ArgumentError(t+" must be None or a dict");this.typenames=n}else _get(_getPrototypeOf(AppLang.prototype),e.symbols.setattr,this).call(this,t,n)}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"typenames"===e?this.typenames=new Map:_get(_getPrototypeOf(AppLang.prototype),"_setDefaultUL4ONAttr",this).call(this,e)}},{key:e.symbols.repr,value:function value(){return"<AppLang lang="+e._repr(this.lang)+" name="+e._repr(this.name)+">"}}]),AppLang}();f.prototype._ul4onattrs=["app","lang","name","description","typename_grammatical_gender","typenames"],f.prototype._ul4attrs=new Set(["id","app","lang","name","description","typename_grammatical_gender","typenames"]),f.prototype._settableattrs=new Set(["name","description","typename_grammatical_gender","typenames"]);var v=new(function(t){_inherits(AppGroupLangType,e.Type);var n=_createSuper(AppGroupLangType);function AppGroupLangType(){return _classCallCheck(this,AppGroupLangType),n.apply(this,arguments)}return _createClass(AppGroupLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof k}}]),AppGroupLangType}())("la","AppGroupLang","The translations of the multilingual attributes of an app group for one language"),k=function(t){_inherits(AppGroupLang,y);var n=_createSuper(AppGroupLang);function AppGroupLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,AppGroupLang),(t=n.call(this,e,o)).appgroup=r,t.name=null,t.description=null,t}return _createClass(AppGroupLang,[{key:e.symbols.type,value:function value(){return v}},{key:e.symbols.repr,value:function value(){return"<AppGroupLang lang="+e._repr(this.lang)+" name="+e._repr(this.name)+">"}}]),AppGroupLang}();k.prototype._ul4onattrs=["appgroup","lang","name","description"],k.prototype._ul4attrs=new Set(["id","appgroup","lang","name","description"]),k.prototype._settableattrs=new Set(["name","description"]);var m=new(function(t){_inherits(ControlLangType,e.Type);var n=_createSuper(ControlLangType);function ControlLangType(){return _classCallCheck(this,ControlLangType),n.apply(this,arguments)}return _createClass(ControlLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof g}}]),ControlLangType}())("la","ControlLang","The translations of the multilingual attributes of a control for one language"),g=function(t){_inherits(ControlLang,y);var n=_createSuper(ControlLang);function ControlLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,ControlLang),(t=n.call(this,e,o)).control=r,t.label=null,t.description=null,t}return _createClass(ControlLang,[{key:e.symbols.type,value:function value(){return m}},{key:e.symbols.repr,value:function value(){return"<ControlLang lang="+e._repr(this.lang)+" label="+e._repr(this.label)+">"}}]),ControlLang}();g.prototype._ul4onattrs=["control","lang","label","description"],g.prototype._ul4attrs=new Set(["id","control","lang","label","description"]),g.prototype._settableattrs=new Set(["label","description"]);var C=new(function(t){_inherits(LookupItemLangType,e.Type);var n=_createSuper(LookupItemLangType);function LookupItemLangType(){return _classCallCheck(this,LookupItemLangType),n.apply(this,arguments)}return _createClass(LookupItemLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof b}}]),LookupItemLangType}())("la","LookupItemLang","The translations of the multilingual attributes of a lookup item for one language"),b=function(t){_inherits(LookupItemLang,y);var n=_createSuper(LookupItemLang);function LookupItemLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,LookupItemLang),(t=n.call(this,e,o)).lookup_item=r,t.label=null,t}return _createClass(LookupItemLang,[{key:e.symbols.type,value:function value(){return C}},{key:e.symbols.repr,value:function value(){return"<LookupItemLang lang="+e._repr(this.lang)+" label="+e._repr(this.label)+">"}}]),LookupItemLang}();b.prototype._ul4onattrs=["lookup_item","lang","label"],b.prototype._ul4attrs=new Set(["id","lookup_item","lang","label"]),b.prototype._settableattrs=new Set(["label"]);var T=function(t){_inherits(AppType,e.Type);var n=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),n.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof A}}]),AppType}(),L=new T("la","App","A LivingApps application"),A=function(t){_inherits(App,p);var n=_createSuper(App);function App(){return _classCallCheck(this,App),n.apply(this,arguments)}return _createClass(App,[{key:e.symbols.type,value:function value(){return L}},{key:e.symbols.repr,value:function value(){return"<App id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"group",get:function get(){return this.appgroup}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new h(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new f(null,this,e)}},{key:"name",get:function get(){var e=this.translations.get();return null!==e&&null!==e.name?e.name:this._name}},{key:"name",set:function set(e){this._name=e}},{key:"description",get:function get(){var e=this.translations.get();return null!==e&&null!==e.description?e.description:this._description}},{key:"description",set:function set(e){this._description=e}},{key:"typename_grammatical_gender",get:function get(){var e=this.translations.get();return null!==e&&null!==e.typename_grammatical_gender?e.typename_grammatical_gender:this._typename_grammatical_gender}},{key:"typename_grammatical_gender",set:function set(e){this._typename_grammatical_gender=e}},{key:"typename_nominative_singular",get:function get(){return this.typename("nom_sin")}},{key:"typename_nominative_singular",set:function set(e){this._typename_nominative_singular=e}},{key:"typename_genitive_singular",get:function get(){return this.typename("gen_sin")}},{key:"typename_genitive_singular",set:function set(e){this._typename_genitive_singular=e}},{key:"typename_dative_singular",get:function get(){return this.typename("dat_sin")}},{key:"typename_dative_singular",set:function set(e){this._typename_dative_singular=e}},{key:"typename_accusative_singular",get:function get(){return this.typename("acc_sin")}},{key:"typename_accusative_singular",set:function set(e){this._typename_accusative_singular=e}},{key:"typename_nominative_plural",get:function get(){return this.typename("nom_plu")}},{key:"typename_nominative_plural",set:function set(e){this._typename_nominative_plural=e}},{key:"typename_genitive_plural",get:function get(){return this.typename("gen_plu")}},{key:"typename_genitive_plural",set:function set(e){this._typename_genitive_plural=e}},{key:"typename_dative_plural",get:function get(){return this.typename("dat_plu")}},{key:"typename_dative_plural",set:function set(e){this._typename_dative_plural=e}},{key:"typename_accusative_plural",get:function get(){return this.typename("acc_plu")}},{key:"typename_accusative_plural",set:function set(e){this._typename_accusative_plural=e}},{key:"typename",value:function typename(t){if(null===t)return null;if("string"!=typeof t)throw new e.TypeError("form must be None or a string");var typename=this._translation_typename(this.translations.get(),t);return null===typename&&(typename=this._translation_typename(this.translations.get(this.lang),t)),null===typename&&(typename=this._legacy_typename(t)),typename}},{key:"_translation_typename",value:function _translation_typename(e,t){if(null===e||null===e.typenames)return null;var n=e.typenames.get(t);return void 0!==n?n:null}},{key:"_legacy_typename",value:function _legacy_typename(e){var t=App._legacy_typename_attrs.get(e);return void 0!==t?this[t]:null}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:this[e]=null}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this[e.symbols.call](t);return this.globals.handler.save(this),n}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r="https://"+this.globals.hostname+"/gateway/apps/"+this.id;return null!==t&&(r+="/"+t.id),url_with_params(r,["template",e],n)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("https://"+this.globals.hostname+"/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("https://"+this.globals.hostname+"/gateway/apps/"+this.id+"/new",e)}},{key:"home_url",value:function home_url(){return"https://"+this.globals.hostname+"/apps/"+this.id+".htm"}},{key:"datamanagement_url",value:function datamanagement_url(){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id}},{key:"import_url",value:function import_url(){return"https://"+this.globals.hostname+"/import-export/"+this.id+".htm"}},{key:"tasks_url",value:function tasks_url(){return"https://"+this.globals.hostname+"/_id_1073_.htm?uuid="+this.id+"&dId="+this.id+"&p_tpl_uuid="+this.id+"&resetInfo=true&templateIdentifier=created_task_"+this.id}},{key:"datamanagement_config_url",value:function datamanagement_config_url(){return"https://"+this.globals.hostname+"/datenmanagement-konfigurieren/"+this.id+".htm"}},{key:"permissions_url",value:function permissions_url(){return"https://"+this.globals.hostname+"/_id_833_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true"}},{key:"datamanageview_url",value:function datamanageview_url(e){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id+"_datamanage_master_"+e}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:e.symbols.call,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new B(null,this);if(e._ismap(t)){var r,o=_createForOfIteratorHelper(t.keys());try{for(o.s();!(r=o.n()).done;){var l=r.value;if(!n.fields.has(l))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(l))}}catch(e){o.e(e)}finally{o.f()}n._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!n.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));n._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return n}},{key:e.symbols.getattr,value:function value(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e.AttributeError(this,t);return this.controls.get(t.substr(2))}if(t.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(t.substr(3)))throw new e.AttributeError(this,t);return this.layout_controls.get(t.substr(3))}if(t.startsWith("p_")){var n=t.substr(2);if(null!==this.params&&this.params.has(n))return this.params.get(n);if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(n))return this.appgroup.params.get(n);throw new e.AttributeError(this,t)}if(t.startsWith("pv_")){var r=t.substr(3);if(null!==this.params&&this.params.has(r))return this.params.get(r).value;if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(r))return this.appgroup.params.get(r).value;throw new e.AttributeError(this,t)}return _get(_getPrototypeOf(App.prototype),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof x))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}},{key:"permissions",get:function get(){if("string"==typeof this._permissions){var e=this._permissions;this._permissions=new s,this._permissions.permissions=e}return this._permissions}}]),App}();A._legacy_typename_attrs=new Map([["nom_sin","_typename_nominative_singular"],["gen_sin","_typename_genitive_singular"],["dat_sin","_typename_dative_singular"],["acc_sin","_typename_accusative_singular"],["nom_plu","_typename_nominative_plural"],["gen_plu","_typename_genitive_plural"],["dat_plu","_typename_dative_plural"],["acc_plu","_typename_accusative_plural"]]),A.prototype._ul4onattrs=["globals","internal_id","_name","_description","lang","appgroup","_typename_grammatical_gender","_typename_nominative_singular","_typename_genitive_singular","_typename_dative_singular","_typename_accusative_singular","_typename_nominative_plural","_typename_genitive_plural","_typename_dative_plural","_typename_accusative_plural","startlink","image","createdby","controls","records","record_start","record_count","record_total","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view","datasource","main","ai_generated","viewtemplates","filter_default","sort_default","filter_owndata","_permissions","data_actions","attachments","order","translations"],A.prototype._ul4attrs=new Set(["id","globals","name","description","translations","lang","appgroup","group","main","order","ai_generated","typename_grammatical_gender","typename_nominative_singular","typename_genitive_singular","typename_dative_singular","typename_accusative_singular","typename_nominative_plural","typename_genitive_plural","typename_dative_plural","typename_accusative_plural","typename","startlink","image","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","record_start","record_count","record_total","installation","categories","params","views","menus","panels","datasource","datamanagement_identifier","insert","favorite","_active_view","filter_default","sort_default","filter_owndata","permissions","data_actions","attachments","template_url","new_embedded_url","new_standalone_url","home_url","datamanagement_url","import_url","tasks_url","datamanagement_config_url","permissions_url","datamanageview_url"]),e.expose(A.prototype[e.symbols.call],["values","**"],{needsobject:!0}),e.expose(A.prototype.insert,["values","**"],{needsobject:!0}),e.expose(A.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),e.expose(A.prototype.new_embedded_url,["params","**"]),e.expose(A.prototype.new_standalone_url,["params","**"]),e.expose(A.prototype.typename,["form","pk"]);var w=new T("la","AppGroup","A group of LivingApps"),S=function(t){_inherits(AppGroup,p);var n=_createSuper(AppGroup);function AppGroup(){return _classCallCheck(this,AppGroup),n.apply(this,arguments)}return _createClass(AppGroup,[{key:e.symbols.type,value:function value(){return w}},{key:e.symbols.repr,value:function value(){return"<AppGroup id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new h(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new k(null,this,e)}},{key:"name",get:function get(){var e=this.translations.get();return null!==e&&null!==e.name?e.name:this._name}},{key:"name",set:function set(e){this._name=e}},{key:"description",get:function get(){var e=this.translations.get();return null!==e&&null!==e.description?e.description:this._description}},{key:"description",set:function set(e){this._description=e}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:this[e]=null}}]),AppGroup}();S.prototype._ul4onattrs=["globals","_name","_description","image","apps","main_app","params","attachments","translations"],S.prototype._ul4attrs=new Set(["globals","id","name","description","translations","image","apps","main_app","params","attachments"]);var M=new(function(t){_inherits(ViewType,e.Type);var n=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),n.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof x}}]),ViewType}())("la","View","An input form for a LivingViews application"),x=function(t){_inherits(View,n);var r=_createSuper(View);function View(){return _classCallCheck(this,View),r.apply(this,arguments)}return _createClass(View,[{key:"globals",get:function get(){return this.app.globals}},{key:e.symbols.type,value:function value(){return M}},{key:e.symbols.repr,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();x.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],x.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"]);var I=new(function(t){_inherits(DataSourceType,e.Type);var n=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),n.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof O}}]),DataSourceType}())("la","DataSource","The data resulting from a data source configuration"),O=function(t){_inherits(DataSource,n);var r=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),r.apply(this,arguments)}return _createClass(DataSource,[{key:e.symbols.type,value:function value(){return I}},{key:e.symbols.repr,value:function value(){return"<DataSource id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSource}();O.prototype._ul4onattrs=["identifier","app","apps","filter","sort"],O.prototype._ul4attrs=new Set(["id","identifier","app","apps","filter","sort"]),new(function(t){_inherits(DataSourceChildrenType,e.Type);var n=_createSuper(DataSourceChildrenType);function DataSourceChildrenType(){return _classCallCheck(this,DataSourceChildrenType),n.apply(this,arguments)}return _createClass(DataSourceChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof D}}]),DataSourceChildrenType}())("la","DataSourceChildren","A master/detail specification in a data source");var D=function(t){_inherits(DataSourceChildren,n);var r=_createSuper(DataSourceChildren);function DataSourceChildren(){return _classCallCheck(this,DataSourceChildren),r.apply(this,arguments)}return _createClass(DataSourceChildren,[{key:e.symbols.type,value:function value(){return datasourcetypechildren}},{key:e.symbols.repr,value:function value(){return"<DataSourceChildren id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceChildren}();D.prototype._ul4onattrs=["datasource","identifier","control","filter","sort"],D.prototype._ul4attrs=new Set(["id","identifier","datasource","control","filter","sort"]);var H=new(function(t){_inherits(RecordChildrenType,e.Type);var n=_createSuper(RecordChildrenType);function RecordChildrenType(){return _classCallCheck(this,RecordChildrenType),n.apply(this,arguments)}return _createClass(RecordChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof R}}]),RecordChildrenType}())("la","RecordChildren","The child records of a master record"),R=function(t){_inherits(RecordChildren,n);var r=_createSuper(RecordChildren);function RecordChildren(){return _classCallCheck(this,RecordChildren),r.apply(this,arguments)}return _createClass(RecordChildren,[{key:e.symbols.type,value:function value(){return H}},{key:e.symbols.repr,value:function value(){return"<RecordChildren id="+e._repr(this.id)+">"}}]),RecordChildren}();R.prototype._ul4onattrs=["record","datasourcechildren","records","record_start","record_count","record_total"],R.prototype._ul4attrs=new Set(["id","record","datasourcechildren","records","record_start","record_count","record_total"]);var P=new(function(t){_inherits(RecordType,e.Type);var n=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),n.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof B}}]),RecordType}())("la","Record","A record of a LivingApp application"),B=function(t){_inherits(Record,p);var n=_createSuper(Record);function Record(e,t){var r;return _classCallCheck(this,Record),(r=n.call(this,e)).app=t,r.createdat=null,r.createdby=null,r.updatedat=null,r.updatedby=null,r.updatecount=0,r._sparsevalues=new Map,r._values=null,r._fields=null,r.details=new Map,r._children=null,r.attachments=null,r.errors=[],r._sparsefielderrors=null,r._sparsefieldlookupdata=null,r._is_deleted=!1,r._is_new=!0,r}return _createClass(Record,[{key:e.symbols.type,value:function value(){return P}},{key:"globals",get:function get(){return this.app.globals}},{key:"as_text",value:function as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0==e)return"...";var n,r=[],o=_createForOfIteratorHelper(t||this.app.controls);try{for(o.s();!(n=o.n()).done;){var l=_slicedToArray(n.value,2),a=l[0],i=l[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&r.push([i.label,u])}}}catch(e){o.e(e)}finally{o.f()}if(0===r.length)return this.globals.msg_no_fields();if(1===r.length)return r[0][1];for(var s=[],p=0,c=r;p<c.length;p++){var _=_slicedToArray(c[p],2),h=_[0],y=_[1];s.push(h+": "+y)}return s.join(", ")}},{key:"_make_fields",value:function _make_fields(e,t,n,r){var o,l=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(o=a.n()).done;){var i=o.value,u=i.identifier,s=null;null!==t&&(e&&!t.has(u)?s=i.default:t.has(u)&&(s=t.get(u)));var p=new i.fieldtype(i,this,s);l.set(u,p),null!==n&&n.has(u)&&(p.errors=n.get(u)),null!==r&&r.has(u)&&(p.lookupdata=r.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=l,this._sparsevalues=null,this._sparsefielderrors=null,this._sparselookupdata=null}},{key:"_in_form",value:function _in_form(){var e=this.app.globals;return e._in_form()&&this===e.record}},{key:e.symbols.repr,value:function value(){var t,n=["<Record id=",e._repr(this.id)],r=_createForOfIteratorHelper(this.fields.values());try{for(r.s();!(t=r.n()).done;){var o=t.value;o.control.priority&&!o.is_empty()&&(n.push(" v_"),n.push(o.control.identifier),n.push("="),n.push(e._repr(o.value)))}}catch(e){r.e(e)}finally{r.f()}return n.push(" state="),n.push(e._repr(this.state)),n.push(">"),n.join("")}},{key:"state",get:function get(){return this._is_deleted?"deleted":this._is_new?"new":this.is_dirty()?"dirty":"saved"}},{key:"values",get:function get(){if(null===this._values){this._values=new Map;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;this._values.set(n.control.identifier,n.value)}}catch(e){t.e(e)}finally{t.f()}}return this._values}},{key:"fields",get:function get(){return null===this._fields&&this._make_fields(!1,this._sparsevalues,this._sparsefielderrors,this._sparsefieldlookupdata),this._fields}},{key:"children",get:function get(){if(null===this._children){this._children=new Map;var e,t=_createForOfIteratorHelper(this.details.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;this._children.set(n.datasourcechildren.identifier,n.records)}}catch(e){t.e(e)}finally{t.f()}}return this._children}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.is_dirty())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.has_errors())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"delete",value:function _delete(){var e=this.app.globals.handler.delete(this);return this._is_deleted=!0,e}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._ismap(t)){var n,r=_createForOfIteratorHelper(t.entries());try{for(r.s();!(n=r.n()).done;){var o=_slicedToArray(n.value,2),l=o[0],a=o[1];if(!this.fields.has(l))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(l));fields.get(l).value=a}}catch(e){r.e(e)}finally{r.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var i in t){if(!this.fields.has(i))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(i));record.fields.get(i).value=t[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_url",value:function edit_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.edit_standalone_url(t):this.edit_embedded_url(t)}},{key:"display_embedded_url",value:function display_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_standalone_url",value:function display_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_url",value:function display_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.display_standalone_url(t):this.display_embedded_url(t)}},{key:"search",value:function search(t){for(var n in t){var r=t[n];if(e._bool(r)&&!this.fields.get(n).search(r))return!1}return!0}},{key:"ul4onload",value:function ul4onload(e){_get(_getPrototypeOf(Record.prototype),"ul4onload",this).call(this,e),this._is_new=!1}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"values"===e?this._sparsevalues:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"values"===e?(this._sparsevalues=t,this._values=null,this._fields=null):this[e]=t}},{key:e.symbols.getattr,value:function value(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("d_")?this.details.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.fields.get(t.substr(2)).value:_get(_getPrototypeOf(Record.prototype),e.symbols.getattr,this).call(this,t)}},{key:e.symbols.setattr,value:function value(t,n){t.startsWith("c_")?this.children[t.substr(2)]=n:t.startsWith("v_")?this.fields.get(t.substr(2)).value=n:_get(_getPrototypeOf(Record.prototype),e.symbols.setattr,this).call(this,t,n)}}]),Record}();B.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","details","errors","_sparsefielderrors","_sparsefieldlookupdata"],B.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","details","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),e.expose(B.prototype.is_dirty,[]),e.expose(B.prototype.has_errors,[]),e.expose(B.prototype.delete,[]),e.expose(B.prototype.save,[]),e.expose(B.prototype.update,["values","**"],{needsobject:!0}),e.expose(B.prototype.template_url,["identifier","p","params","**"]),e.expose(B.prototype.edit_embedded_url,["params","**"]),e.expose(B.prototype.edit_standalone_url,["params","**"]);var N=function(t){_inherits(FieldType,e.Type);var n=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),n.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof q}}]),FieldType}(),U=new N("la","Field","Holds the value of a field of a record (and related information)"),q=function(t){_inherits(Field,n);var r=_createSuper(Field);function Field(e,t,n){var o;return _classCallCheck(this,Field),(o=r.call(this,null)).control=e,o.record=t,o._label=null,o._description=null,o._lookupdata=null,o.errors=[],o._value=null,o._in_form()||(o.value=n),o._dirty=!1,o._enabled=!0,o._writable=!0,o._visible=!0,o._required=null,o._in_text=null,o._top=null,o._left=null,o}return _createClass(Field,[{key:e.symbols.type,value:function value(){return U}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(t){var n=this._value,r={value:t,errors:[]};this._validate(r),e._ne(n,r.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,r.value),this._value=r.value,this._dirty=!0),this.errors=r.errors,this._in_form()&&this._set_dom_value(this._value)}},{key:"value_as_text",value:function value_as_text(){return null}},{key:"_validate",value:function _validate(e){}},{key:"_set_dom_label",value:function _set_dom_label(){this._in_form()&&(this._dom_label.textContent=this.label)}},{key:"mode",get:function get(){var e;return null!==(e=this._mode)&&void 0!==e?e:this.control.mode}},{key:"mode",set:function set(e){this._mode=e}},{key:"label",get:function get(){var e;return null!==(e=this._label)&&void 0!==e?e:this.control.label}},{key:"label",set:function set(e){this._label=e,this._set_dom_label()}},{key:"description",get:function get(){var e;return null!==(e=this._description)&&void 0!==e?e:this.control.description}},{key:"description",set:function set(e){this._description=e}},{key:"globals",get:function get(){return this.control.globals}},{key:"is_empty",value:function is_empty(){return null===this._value}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"add_error",value:function add_error(e){this.errors.push(e)}},{key:"set_error",value:function set_error(e){this.errors=null!==e?[e]:[]}},{key:"top",get:function get(){var e;return null!==(e=this._top)&&void 0!==e?e:this.control.top}},{key:"top",set:function set(e){this._top=e,this._in_form()&&(this._dom_root.style.top=this.top+"px")}},{key:"left",get:function get(){var e;return null!==(e=this._left)&&void 0!==e?e:this.control.left}},{key:"left",set:function set(e){this._left=e,this._in_form()&&(this._dom_root.style.left=this.left+"px")}},{key:"width",get:function get(){return this.control.width}},{key:"height",get:function get(){return this.control.width}},{key:"search",value:function search(e){return this.control.search(this.value,e)}},{key:"msg_field_required",value:function msg_field_required(e){switch(this.globals.lang){case"de":return'"'.concat(this.label,'" wird benötigt!');default:return'"'.concat(this.label,'" is required!')}}},{key:"msg_field_wrong_type",value:function msg_field_wrong_type(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).name,"!")}},{key:"msg_bool_truerequired",value:function msg_bool_truerequired(e){return'"'.concat(this.label,'" only accepts "Yes"!')}},{key:"msg_string_tooshort",value:function msg_string_tooshort(e){return'"'.concat(this.label,'" is too short. You must use at least ').concat(this.control.minlength," characters!")}},{key:"msg_string_toolong",value:function msg_string_toolong(e){return'"'.concat(this.label,'" is too long. You may use at most ').concat(this.control.maxlength," characters!")}},{key:"msg_email_format",value:function msg_email_format(e){return'"'.concat(this.label,'" must be a valid email address!')}},{key:"msg_url_format",value:function msg_url_format(e){return'"'.concat(this.label,'" must be a valid URL!')}},{key:"msg_tel_format",value:function msg_tel_format(e){return'"'.concat(this.label,'" must be a valid phone number!')}},{key:"msg_date_format",value:function msg_date_format(e){return'"'.concat(this.label,"\" doesn't support this date format!")}},{key:"msg_number_format",value:function msg_number_format(e){return'"'.concat(this.label,"\" doesn't support this number format!")}},{key:"msg_lookup_wrongitem",value:function msg_lookup_wrongitem(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:"_in_form",value:function _in_form(){return this.record._in_form()}},{key:"_sel_root",get:function get(){return"#livingapps-form ."+this.control._cssclass_root+".llft-id-"+this.control.identifier}},{key:"_sel_label",get:function get(){return this._sel_root+" label span"}},{key:"_sel_control",get:function get(){return this._sel_root+" "+this.control._cssclass_control}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"_dom_label",get:function get(){return document.querySelector(this._sel_label)}},{key:"_dom_control",get:function get(){return document.querySelector(this._sel_control)}},{key:"_dom_controls",get:function get(){return document.querySelectorAll(this._sel_control)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.value}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.value=null!==e?e:""}},{key:"visible",get:function get(){return this._visible}},{key:"visible",set:function set(e){this._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:"required",get:function get(){var e;return null!==(e=this._required)&&void 0!==e?e:this.control.required}},{key:"required",set:function set(e){this._required=e}},{key:"in_list",get:function get(){return this.control.in_list}},{key:"in_mobile_list",get:function get(){return this.control.in_mobile_list}},{key:"in_text",get:function get(){var e;return null!==(e=this._in_text)&&void 0!==e?e:this.control.in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"enabled",get:function get(){return this._in_form()?!this._dom_root.classList.contains("llft-control-readonly"):this._enabled}},{key:"enabled",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.disabled=n}}catch(e){r.e(e)}finally{r.f()}this._dom_root.classList.toggle("llft-control-readonly",n)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:e.symbols.repr,value:function value(){var t="<"+this.constructor.name+" identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}},{key:e.symbols.setattr,value:function value(t,n){if("value"===t)this.value=n;else if("visible"===t)this.visible=e._bool(n);else if("enabled"===t)this.enabled=e._bool(n);else if("writable"===t)this.writable=e._bool(n);else if("required"===t)this.required=e._bool(n);else if("top"===t){if(null!==n&&"number"!=typeof n)throw new e.ArgumentError("top must be None or an int");this.top=n}else if("left"===t){if(null!==n&&"number"!=typeof n)throw new e.ArgumentError("left must be None or an int");this.left=n}else _get(_getPrototypeOf(Field.prototype),e.symbols.setattr,this).call(this,t,n)}}]),Field}();q.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable","_required"],q.prototype._ul4attrs=new Set(["control","record","label","description","value","mode","errors","visible","enabled","writable","required","in_text","top","left","width","height"]),q.prototype._inputevent="input";var G=new(function(e){_inherits(BoolFieldType,N);var t=_createSuper(BoolFieldType);function BoolFieldType(){return _classCallCheck(this,BoolFieldType),t.apply(this,arguments)}return _createClass(BoolFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof V}}]),BoolFieldType}())("la","BoolField","Holds the value of a bool field of a record (and related information)"),V=function(t){_inherits(BoolField,q);var n=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),n.apply(this,arguments)}return _createClass(BoolField,[{key:e.symbols.type,value:function value(){return G}},{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"string"==typeof e.value?0===e.value.length?(this.control.required&&e.errors.push(this.msg_bool_truerequired(e.value)),e.value=null):["false","no","0","off"].includes(e.value.toLowerCase())?e.value=!1:e.value=!0:"boolean"==typeof e.value?this.control.required&&!e.value&&e.errors.push(this.msg_bool_truerequired(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.checked}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.checked=e}},{key:"value_as_text",value:function value_as_text(){return this.globals.msg_bool(this.value)}}]),BoolField}(),E=new(function(e){_inherits(IntFieldType,N);var t=_createSuper(IntFieldType);function IntFieldType(){return _classCallCheck(this,IntFieldType),t.apply(this,arguments)}return _createClass(IntFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof j}}]),IntFieldType}())("la","IntField","Holds the value of an int field of a record (and related information)"),j=function(t){_inherits(IntField,q);var n=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),n.apply(this,arguments)}return _createClass(IntField,[{key:e.symbols.type,value:function value(){return E}},{key:"_parse",value:function _parse(e){return/^\s*[-+]?\d+\s*$/.test(e)?parseInt(e):null}},{key:"_validate",value:function _validate(e){if(null===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value));else if("string"==typeof e.value){var t=this._parse(e.value);null!==t?e.value=t:e.errors.push(this.msg_number_format(e.value))}else"number"==typeof e.value?Math.round(e.value)!==e.value&&e.errors.push(this.msg_field_wrong_type(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(IntField.prototype),"_get_dom_value",this).call(this);if(e){var t=this._parse(e);null!==t&&(e=t)}return e}},{key:"_set_dom_value",value:function _set_dom_value(e){_get(_getPrototypeOf(IntField.prototype),"_set_dom_value",this).call(this,null!==e?e+"":"")}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null!=e?e+"":null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=n}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(),W=new(function(e){_inherits(NumberFieldType,N);var t=_createSuper(NumberFieldType);function NumberFieldType(){return _classCallCheck(this,NumberFieldType),t.apply(this,arguments)}return _createClass(NumberFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof z}}]),NumberFieldType}())("la","NumberField","Holds the value of a number field of a record (and related information)"),z=function(t){_inherits(NumberField,q);var n=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),n.apply(this,arguments)}return _createClass(NumberField,[{key:e.symbols.type,value:function value(){return W}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,n="",r=0,o=0,l=0;l<e.length;++l){var a=e[l];","==a?(r++,n+=a):"."==a&&(o++,n+=a)}var i=null;if(0==r)o<=1||(i="de");else if(1==r)i=1==o?".,"==n?"de":"en":"de";else{if(!(o<=1))return null;i="en"}"de"===i?t=t.replace(/\./g,"").replace(/,/g,"."):"en"===i&&(t=t.replace(/,/g,""));var u=parseFloat(t);return isNaN(u)?e:u}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if("string"==typeof t.value){var n=this._parse(t.value);null!==n?(n=this._bound_value(n),null!==this.control.precision&&(n=e._round(n,this.control.precision)),t.value=n):t.errors.push(this.msg_number_format(t.value))}else if("number"==typeof t.value){var r=this._bound_value(t.value);null!==this.control.precision&&(r=e._round(r,this.control.precision)),t.value=r}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_bound_value",value:function _bound_value(e){return null!==this.control.minimum&&e<this.control.minimum&&(e=this.control.minimum),null!==this.control.maximum&&e>this.control.maximum&&(e=this.control.maximum),e}},{key:"_get_dom_value",value:function _get_dom_value(){var t=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(t){if("string"==typeof t){var n=this._parse(t);null!==n&&(t=n)}"number"==typeof t&&(null!==this.control.precision&&(t=e._round(t,this.control.precision)),t=this._bound_value(t))}else t=null;return t}},{key:"_set_dom_value",value:function _set_dom_value(e){"number"==typeof e?(e=this._bound_value(e),null!==this.control.precision&&(e=e.toFixed(this.control.precision))):null===e&&(e=""),e+="","de"==this.globals.lang&&null===this.control.precision&&(e=e.replace(".",",")),_get(_getPrototypeOf(NumberField.prototype),"_set_dom_value",this).call(this,e)}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:null!==this.control.precision?e.toFixed(this.control.precision):e.toString()}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=n}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(),Y=function(e){_inherits(StringFieldType,N);var t=_createSuper(StringFieldType);function StringFieldType(){return _classCallCheck(this,StringFieldType),t.apply(this,arguments)}return _createClass(StringFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof K}}]),StringFieldType}(),J=new Y("la","StringField","Holds the value of a string field of a record (and related information)"),K=function(t){_inherits(StringField,q);var n=_createSuper(StringField);function StringField(e,t,r){var o;return _classCallCheck(this,StringField),(o=n.call(this,e,t,r))._placeholder=null,o}return _createClass(StringField,[{key:e.symbols.type,value:function value(){return J}},{key:"placeholder",get:function get(){return null!==this._placeholder?this._placeholder:this.control.placeholder}},{key:"placeholder",set:function set(e){var t;this._placeholder=e,this._in_form()&&(this._dom_control.placeholder=null!==(t=this.placeholder)&&void 0!==t?t:"")}},{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if("string"==typeof e.value){var t=this.control.minlength,n=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==n&&e.value.length>n&&e.errors.push(this.msg_string_toolong(e.value))}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=n}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}();K.prototype._ul4onattrs=[].concat(_toConsumableArray(q.prototype._ul4onattrs),["_placeholder"]),K.prototype._ul4attrs=new Set([].concat(_toConsumableArray(q.prototype._ul4attrs),["placeholder"]));var $=new(function(e){_inherits(PasswordFieldType,Y);var t=_createSuper(PasswordFieldType);function PasswordFieldType(){return _classCallCheck(this,PasswordFieldType),t.apply(this,arguments)}return _createClass(PasswordFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Z}}]),PasswordFieldType}())("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),Z=function(t){_inherits(PasswordField,K);var n=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),n.apply(this,arguments)}return _createClass(PasswordField,[{key:e.symbols.type,value:function value(){return $}}]),PasswordField}(),Q=new(function(e){_inherits(EmailFieldType,Y);var t=_createSuper(EmailFieldType);function EmailFieldType(){return _classCallCheck(this,EmailFieldType),t.apply(this,arguments)}return _createClass(EmailFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof X}}]),EmailFieldType}())("la","EmailField","Holds the value of a string/email field of a record (and related information)"),X=function(t){_inherits(EmailField,K);var n=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),n.apply(this,arguments)}return _createClass(EmailField,[{key:e.symbols.type,value:function value(){return Q}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e.value)||e.errors.push(this.msg_email_format(e.value))}_get(_getPrototypeOf(EmailField.prototype),"_validate",this).call(this,e)}}]),EmailField}(),ee=new(function(e){_inherits(URLFieldType,Y);var t=_createSuper(URLFieldType);function URLFieldType(){return _classCallCheck(this,URLFieldType),t.apply(this,arguments)}return _createClass(URLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof te}}]),URLFieldType}())("la","URLField","Holds the value of a string/url field of a record (and related information)"),te=function(t){_inherits(URLField,K);var n=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),n.apply(this,arguments)}return _createClass(URLField,[{key:e.symbols.type,value:function value(){return ee}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){var t=null;try{t=new URL(e.value)}catch(t){e.errors.push(this.msg_url_format(e.value))}null!==t&&"http:"!==t.protocol&&"https:"!==t.protocol&&e.errors.push(this.msg_url_format(e.value))}_get(_getPrototypeOf(URLField.prototype),"_validate",this).call(this,e)}}]),URLField}(),ne=new(function(e){_inherits(TelFieldType,Y);var t=_createSuper(TelFieldType);function TelFieldType(){return _classCallCheck(this,TelFieldType),t.apply(this,arguments)}return _createClass(TelFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof re}}]),TelFieldType}())("la","TelField","Holds the value of a string/tel field of a record (and related information)"),re=function(t){_inherits(TelField,K);var n=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),n.apply(this,arguments)}return _createClass(TelField,[{key:e.symbols.type,value:function value(){return ne}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^\\+?[0-9 /()-]+$/.test(e.value)||e.errors.push(this.msg_tel_format(e.value))}_get(_getPrototypeOf(TelField.prototype),"_validate",this).call(this,e)}}]),TelField}(),oe=new(function(e){_inherits(TextAreaFieldType,Y);var t=_createSuper(TextAreaFieldType);function TextAreaFieldType(){return _classCallCheck(this,TextAreaFieldType),t.apply(this,arguments)}return _createClass(TextAreaFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof le}}]),TextAreaFieldType}())("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),le=function(t){_inherits(TextAreaField,K);var n=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),n.apply(this,arguments)}return _createClass(TextAreaField,[{key:e.symbols.type,value:function value(){return oe}}]),TextAreaField}(),ae=new(function(e){_inherits(HTMLFieldType,Y);var t=_createSuper(HTMLFieldType);function HTMLFieldType(){return _classCallCheck(this,HTMLFieldType),t.apply(this,arguments)}return _createClass(HTMLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ie}}]),HTMLFieldType}())("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),ie=function(t){_inherits(HTMLField,K);var n=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),n.apply(this,arguments)}return _createClass(HTMLField,[{key:e.symbols.type,value:function value(){return ae}}]),HTMLField}(),ue=new(function(e){_inherits(GeoFieldType,N);var t=_createSuper(GeoFieldType);function GeoFieldType(){return _classCallCheck(this,GeoFieldType),t.apply(this,arguments)}return _createClass(GeoFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof se}}]),GeoFieldType}())("la","GeoField","Holds the value of a geo field of a record (and related information)"),se=function(t){_inherits(GeoField,q);var n=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),n.apply(this,arguments)}return _createClass(GeoField,[{key:e.symbols.type,value:function value(){return ue}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.id.endsWith("_geoinfo")){var r=n.value;if(r)return r=JSON.parse(r),new ar(this.globals,r.geometry.coordinates[0],r.geometry.coordinates[1],r.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){if(null===t){var n,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(n=r.n()).done;){n.value.value=null}}catch(e){r.e(e)}finally{r.f()}}else{var o,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(o=l.n()).done;){var a=o.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[t.lat,t.long]},properties:{formatted_address:t.info}};a.value=e._asjson(i)}else a.value=t.info}}catch(e){l.e(e)}finally{l.f()}}}},{key:"value_as_text",value:function value_as_text(){var e=this.value;if(null===this.value)return null;var t=e.lat.toFixed(5)+", "+e.long.toFixed(5);return null!==e.info&&(t+=" ("+e.info+")"),t}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof ar||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();se.prototype._inputevent="llgeo";var pe=function(e){_inherits(FileFieldType,N);var t=_createSuper(FileFieldType);function FileFieldType(){return _classCallCheck(this,FileFieldType),t.apply(this,arguments)}return _createClass(FileFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _e}}]),FileFieldType}(),ce=new pe("la","FileField","Holds the value of a file field of a record (and related information)"),_e=function(t){_inherits(FileField,q);var n=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),n.apply(this,arguments)}return _createClass(FileField,[{key:e.symbols.type,value:function value(){return ce}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof or||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return null}},{key:"_set_dom_value",value:function _set_dom_value(){}}]),FileField}(),he=new(function(e){_inherits(FileSignatureFieldType,pe);var t=_createSuper(FileSignatureFieldType);function FileSignatureFieldType(){return _classCallCheck(this,FileSignatureFieldType),t.apply(this,arguments)}return _createClass(FileSignatureFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ye}}]),FileSignatureFieldType}())("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),ye=function(t){_inherits(FileSignatureField,_e);var n=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),n.apply(this,arguments)}return _createClass(FileSignatureField,[{key:e.symbols.type,value:function value(){return he}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(),de=function(e){_inherits(DateFieldBaseType,N);var t=_createSuper(DateFieldBaseType);function DateFieldBaseType(){return _classCallCheck(this,DateFieldBaseType),t.apply(this,arguments)}return _createClass(DateFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ve}}]),DateFieldBaseType}(),fe=new de("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),ve=function(t){_inherits(DateFieldBase,q);var n=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),n.apply(this,arguments)}return _createClass(DateFieldBase,[{key:e.symbols.type,value:function value(){return fe}},{key:"value_as_text",value:function value_as_text(){var t=this.value;return null===t?null:"string"==typeof t?t:e._format(t,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var n=null,r=null,o=null,l=0,a=0,i=0,u=null;function _int(e,t,n,r){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<n||e>r?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(n=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%M")){if(null===(a=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%S")){if(null===(i=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%p")){if(e.toLowerCase().startsWith("pm"))u=!0;else{if(!e.toLowerCase().startsWith("am"))return null;u=!1}e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%%")){if(!e.startsWith("%"))return null;e=e.substring(1),t=t.substring(2)}else if(t.startsWith("%z")){if(!e.startsWith("-")&&!e.startsWith("+"))return null;if(null===_int(e=e.substring(1),2))return null;if(!(e=e.substring(2)).startsWith(":"))return null;if(null===_int(e=e.substring(1),2))return null;e=e.substring(2),t=t.substring(2)}else{if(!e.startsWith(t.substring(0,1)))return null;e=e.substring(1),t=t.substring(1)}}if(t)return null;if(null===n)return null;if(null===r||r<1||r>12)return null;if(null===o||o<1||o>31)return null;if(null===u){if(l<0||l>23)return null}else{if(l<0||l>11)return null;u&&(l+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(n,r-1,o,l,a,i)}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if(t.value instanceof Date)t.value=this._convert(t.value);else if(t.value instanceof e.Date_)t.value=this._convert(t.value._date);else if("string"==typeof t.value){var n,r=null,o=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(o.s();!(n=o.n()).done;){var l=n.value;if(null!==(r=this._parse(t.value,l)))break}}catch(e){o.e(e)}finally{o.f()}null!==r?t.value=this._convert(r):t.errors.push(this.msg_date_format(t.value))}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,n=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(n.s();!(t=n.n()).done;){var r=t.value,o=this._parse(e,r);if(null!==o)return this._convert(o)}}catch(e){n.e(e)}finally{n.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){t=null!==t?e._format(t,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,t)}}]),DateFieldBase}(),ke=new(function(e){_inherits(DateFieldType,de);var t=_createSuper(DateFieldType);function DateFieldType(){return _classCallCheck(this,DateFieldType),t.apply(this,arguments)}return _createClass(DateFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof me}}]),DateFieldType}())("la","DateField","Holds the value of a date/date field of a record (and related information)"),me=function(t){_inherits(DateField,ve);var n=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),n.apply(this,arguments)}return _createClass(DateField,[{key:e.symbols.type,value:function value(){return ke}},{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}(),ge=new(function(e){_inherits(DatetimeMinuteFieldType,de);var t=_createSuper(DatetimeMinuteFieldType);function DatetimeMinuteFieldType(){return _classCallCheck(this,DatetimeMinuteFieldType),t.apply(this,arguments)}return _createClass(DatetimeMinuteFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ce}}]),DatetimeMinuteFieldType}())("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),Ce=function(t){_inherits(DatetimeMinuteField,ve);var n=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),n.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:e.symbols.type,value:function value(){return ge}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(),be=new(function(e){_inherits(DatetimeSecondFieldType,de);var t=_createSuper(DatetimeSecondFieldType);function DatetimeSecondFieldType(){return _classCallCheck(this,DatetimeSecondFieldType),t.apply(this,arguments)}return _createClass(DatetimeSecondFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Te}}]),DatetimeSecondFieldType}())("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),Te=function(t){_inherits(DatetimeSecondField,ve);var n=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),n.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:e.symbols.type,value:function value(){return be}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(),Le=function(t){_inherits(ChoiceFieldBase,q);var n=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),n.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,n){return element("option",n,{value:t,class:t===this.control.none_key?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(t){var n;null===t&&(t=this.control.lookup_data),e._isobject(t)&&(t=new Map(Object.entries(t)));var r,o=!1,l=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(r=a.n()).done;){var i=r.value.getAttribute("value");t.has(i)?l.add(i):i===this.control.none_key&&(o=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.none_key&&u.push(this._make_option(o,this.control.none_key,null!==this.control.none_label?this.control.none_label:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(t);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(l.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(n=this._dom_control).replaceChildren.apply(n,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(t){null===t?t=this.control.lookupdata:e._isobject(t)&&(t=new Map(Object.entries(t)));var n,r=!1,o=new Set,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(n=l.n()).done;){var a=n.value,i=a.getAttribute("value");a.checked&&(t.has(i)?o.add(i):i===this.control.none_key&&(r=!0))}}catch(e){l.e(e)}finally{l.f()}var u=this._dom_root.querySelector("input[value="+this.control.none_key+"]");null!==u&&(u.checked=r);var s,p=_createForOfIteratorHelper(this.control.lookupdata);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=(c[1],this._dom_root.querySelector("input[value="+_+"]")),y=this._dom_root.querySelector("label[for="+h.id+"]");t.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(t.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(),Ae=function(e){_inherits(LookupFieldBaseType,N);var t=_createSuper(LookupFieldBaseType);function LookupFieldBaseType(){return _classCallCheck(this,LookupFieldBaseType),t.apply(this,arguments)}return _createClass(LookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof we}}]),LookupFieldBaseType}(),Fe=new Ae("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),we=function(t){_inherits(LookupFieldBase,Le);var n=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),n.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:e.symbols.type,value:function value(){return Fe}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:this.control.lookupdata}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof qn?t.label:e._str(t)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var n=this.control.lookupdata.get(t);if(void 0===n)if(this.control.autoexpandable){var r,o=_createForOfIteratorHelper(this.lookupdata.values());try{for(o.s();!(r=o.n()).done;){var l=r.value;if(t===l.label)return void(e.value=l)}}catch(e){o.e(e)}finally{o.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=n}else if(t instanceof qn){this.control.lookupdata.get(t.key)!==t&&(e.errors.push(this.msg_lookup_wrongitem(t)),e.value=null)}else e.errors.push(this.msg_field_wrong_type(t)),e.value=null}}]),LookupFieldBase}(),Se=function(e){_inherits(LookupFieldType,Ae);var t=_createSuper(LookupFieldType);function LookupFieldType(){return _classCallCheck(this,LookupFieldType),t.apply(this,arguments)}return _createClass(LookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xe}}]),LookupFieldType}(),Me=new Se("la","LookupField","Holds the value of a lookup field of a record (and related information)"),xe=function(t){_inherits(LookupField,we);var n=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),n.apply(this,arguments)}return _createClass(LookupField,[{key:e.symbols.type,value:function value(){return Me}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:e.label}},{key:"_validate",value:function _validate(e){var t=e.value;null===t||""===t||this.control.none_key===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(),Ie=new(function(e){_inherits(LookupRadioFieldType,Se);var t=_createSuper(LookupRadioFieldType);function LookupRadioFieldType(){return _classCallCheck(this,LookupRadioFieldType),t.apply(this,arguments)}return _createClass(LookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Oe}}]),LookupRadioFieldType}())("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),Oe=function(t){_inherits(LookupRadioField,xe);var n=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),n.apply(this,arguments)}return _createClass(LookupRadioField,[{key:e.symbols.type,value:function value(){return Ie}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.checked){var r=n.getAttribute("value");return this.control.lookupdata.get(r)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof qn&&(e=e.key),null===e&&(e=this.control.none_key);var t,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.checked=r.getAttribute("value")===e}}catch(e){n.e(e)}finally{n.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(),De=new(function(e){_inherits(LookupSelectFieldType,Se);var t=_createSuper(LookupSelectFieldType);function LookupSelectFieldType(){return _classCallCheck(this,LookupSelectFieldType),t.apply(this,arguments)}return _createClass(LookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof He}}]),LookupSelectFieldType}())("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),He=function(t){_inherits(LookupSelectField,xe);var n=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),n.apply(this,arguments)}return _createClass(LookupSelectField,[{key:e.symbols.type,value:function value(){return De}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(LookupSelectField.prototype),"_get_dom_value",this).call(this);return e&&(e=e===this.control.none_key?null:this.control.lookupdata.get(e)),e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(LookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.key:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(),Re=new(function(e){_inherits(LookupChoiceFieldType,Se);var t=_createSuper(LookupChoiceFieldType);function LookupChoiceFieldType(){return _classCallCheck(this,LookupChoiceFieldType),t.apply(this,arguments)}return _createClass(LookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pe}}]),LookupChoiceFieldType}())("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),Pe=function(t){_inherits(LookupChoiceField,xe);var n=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),n.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:e.symbols.type,value:function value(){return Re}}]),LookupChoiceField}();Pe.prototype._inputevent="llchoice";var Be=function(e){_inherits(MultipleLookupFieldType,Ae);var t=_createSuper(MultipleLookupFieldType);function MultipleLookupFieldType(){return _classCallCheck(this,MultipleLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ue}}]),MultipleLookupFieldType}(),Ne=new Be("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),Ue=function(t){_inherits(MultipleLookupField,we);var n=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),n.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:e.symbols.type,value:function value(){return Ne}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e||0===e.length?null:e.map((function(e){return e.label})).join(", ")}},{key:"_validate",value:function _validate(e){var t=e.value,n="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||n&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(n){var r,o=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(r=l.n()).done;){var a={value:r.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):o.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=o}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(),qe=new(function(e){_inherits(MultipleLookupCheckboxFieldType,Be);var t=_createSuper(MultipleLookupCheckboxFieldType);function MultipleLookupCheckboxFieldType(){return _classCallCheck(this,MultipleLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ge}}]),MultipleLookupCheckboxFieldType}())("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),Ge=function(t){_inherits(MultipleLookupCheckboxField,Ue);var n=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),n.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:e.symbols.type,value:function value(){return qe}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.checked){var o=r.getAttribute("value");t.push(this.control.lookupdata.get(o))}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var n,r=new Set,o=_createForOfIteratorHelper(t.value);try{for(o.s();!(n=o.n()).done;){var l=n.value;r.add(l.key)}}catch(e){o.e(e)}finally{o.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),MultipleLookupCheckboxField}(),Ve=new(function(e){_inherits(MultipleLookupSelectFieldType,Be);var t=_createSuper(MultipleLookupSelectFieldType);function MultipleLookupSelectFieldType(){return _classCallCheck(this,MultipleLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ee}}]),MultipleLookupSelectFieldType}())("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),Ee=function(t){_inherits(MultipleLookupSelectField,Ue);var n=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),n.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:e.symbols.type,value:function value(){return Ve}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],n=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(n.s();!(e=n.n()).done;){var r=e.value;r.selected&&t.push(this.control.lookupdata.get(r.getAttribute("value")))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var n,r=new Set,o=_createForOfIteratorHelper(t.value);try{for(o.s();!(n=o.n()).done;){var l=n.value;r.add(l.key)}}catch(e){o.e(e)}finally{o.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleLookupSelectField}(),je=new(function(e){_inherits(MultipleLookupChoiceFieldType,Be);var t=_createSuper(MultipleLookupChoiceFieldType);function MultipleLookupChoiceFieldType(){return _classCallCheck(this,MultipleLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof We}}]),MultipleLookupChoiceFieldType}())("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),We=function(t){_inherits(MultipleLookupChoiceField,Ue);var n=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),n.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:e.symbols.type,value:function value(){return je}}]),MultipleLookupChoiceField}();We.prototype._inputevent="llchoice";var ze=function(e){_inherits(AppLookupFieldBaseType,N);var t=_createSuper(AppLookupFieldBaseType);function AppLookupFieldBaseType(){return _classCallCheck(this,AppLookupFieldBaseType),t.apply(this,arguments)}return _createClass(AppLookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Je}}]),AppLookupFieldBaseType}(),Ye=new ze("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),Je=function(t){_inherits(AppLookupFieldBase,Le);var n=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),n.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:e.symbols.type,value:function value(){return Ye}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof B?t.as_text(this.control.lookup_controls):e._str(t)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var n=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===n?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=n}else t instanceof B?t.app!==this.control.lookup_app&&(e.errors.push(this.msg_applookup_wrongrecord(t)),e.value=null):(e.errors.push(this.msg_field_wrong_type(t)),e.value=null)}},{key:e.symbols.setattr,value:function value(t,n){"lookupdata"===t?this.lookupdata=n:_get(_getPrototypeOf(AppLookupFieldBase.prototype),e.symbols.setattr,this).call(this,t,n)}}]),AppLookupFieldBase}();Je.prototype._ul4attrs=new Set([].concat(_toConsumableArray(q.prototype._ul4attrs),["lookupdata"]));var Ke=function(e){_inherits(AppLookupFieldType,ze);var t=_createSuper(AppLookupFieldType);function AppLookupFieldType(){return _classCallCheck(this,AppLookupFieldType),t.apply(this,arguments)}return _createClass(AppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ze}}]),AppLookupFieldType}(),$e=new Ke("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),Ze=function(t){_inherits(AppLookupField,Je);var n=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),n.apply(this,arguments)}return _createClass(AppLookupField,[{key:e.symbols.type,value:function value(){return $e}},{key:"value_as_text",value:function value_as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=this.value;return null===t?null:"("+this.value.as_text(e)+")"}},{key:"_validate",value:function _validate(e){this._find_record(e)}}]),AppLookupField}(),Qe=new(function(e){_inherits(AppLookupSelectFieldType,Ke);var t=_createSuper(AppLookupSelectFieldType);function AppLookupSelectFieldType(){return _classCallCheck(this,AppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(AppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xe}}]),AppLookupSelectFieldType}())("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),Xe=function(t){_inherits(AppLookupSelectField,Ze);var n=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),n.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:e.symbols.type,value:function value(){return Qe}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(AppLookupSelectField.prototype),"_get_dom_value",this).call(this);return null!==this.control.lookup_app.records?void 0===(e=this.control.lookup_app.records.get(e))&&(e=null):e=null,e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(AppLookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.id:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(),et=new(function(e){_inherits(AppLookupRadioFieldType,Ke);var t=_createSuper(AppLookupRadioFieldType);function AppLookupRadioFieldType(){return _classCallCheck(this,AppLookupRadioFieldType),t.apply(this,arguments)}return _createClass(AppLookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof tt}}]),AppLookupRadioFieldType}())("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),tt=function(t){_inherits(AppLookupRadioField,Ze);var n=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),n.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:e.symbols.type,value:function value(){return et}}]),AppLookupRadioField}(),nt=new(function(e){_inherits(AppLookupChoiceFieldType,Ke);var t=_createSuper(AppLookupChoiceFieldType);function AppLookupChoiceFieldType(){return _classCallCheck(this,AppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(AppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof rt}}]),AppLookupChoiceFieldType}())("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),rt=function(t){_inherits(AppLookupChoiceField,Ze);var n=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(e,t,r){var o;return _classCallCheck(this,AppLookupChoiceField),(o=n.call(this,e,t,r))._search_url=null,o._search_param_name=null,o._target_param_name=null,o}return _createClass(AppLookupChoiceField,[{key:e.symbols.type,value:function value(){return nt}},{key:"search_url",get:function get(){var e;return null!==(e=this._search_url)&&void 0!==e?e:this.control.search_url}},{key:"search_url",set:function set(e){this._search_url=e}},{key:"search_param_name",get:function get(){var e;return null!==(e=this._search_param_name)&&void 0!==e?e:this.control.search_param_name}},{key:"search_param_name",set:function set(e){this._search_param_name=e}},{key:"target_param_name",get:function get(){var e;return null!==(e=this._target_param_name)&&void 0!==e?e:this.control.target_param_name}},{key:"target_param_name",set:function set(e){this._target_param_name=e}}]),AppLookupChoiceField}();rt.prototype._inputevent="llchoice",rt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(q.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var ot=function(e){_inherits(MultipleAppLookupFieldType,ze);var t=_createSuper(MultipleAppLookupFieldType);function MultipleAppLookupFieldType(){return _classCallCheck(this,MultipleAppLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof at}}]),MultipleAppLookupFieldType}(),lt=new ot("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),at=function(t){_inherits(MultipleAppLookupField,Je);var n=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),n.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:e.symbols.type,value:function value(){return lt}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,n="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||n&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(n){var r,o=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(r=l.n()).done;){var a={value:r.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):o.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=o}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(),it=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,ot);var t=_createSuper(MultipleAppLookupCheckboxFieldType);function MultipleAppLookupCheckboxFieldType(){return _classCallCheck(this,MultipleAppLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ut}}]),MultipleAppLookupCheckboxFieldType}())("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),ut=function(t){_inherits(MultipleAppLookupCheckboxField,at);var n=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),n.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:e.symbols.type,value:function value(){return it}}]),MultipleAppLookupCheckboxField}(),st=new(function(e){_inherits(MultipleAppLookupSelectFieldType,ot);var t=_createSuper(MultipleAppLookupSelectFieldType);function MultipleAppLookupSelectFieldType(){return _classCallCheck(this,MultipleAppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof pt}}]),MultipleAppLookupSelectFieldType}())("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),pt=function(t){_inherits(MultipleAppLookupSelectField,at);var n=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),n.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:e.symbols.type,value:function value(){return st}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(),ct=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,ot);var t=_createSuper(MultipleAppLookupChoiceFieldType);function MultipleAppLookupChoiceFieldType(){return _classCallCheck(this,MultipleAppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _t}}]),MultipleAppLookupChoiceFieldType}())("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),_t=function(t){_inherits(MultipleAppLookupChoiceField,at);var n=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),n.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:e.symbols.type,value:function value(){return ct}}]),MultipleAppLookupChoiceField}();_t.prototype._inputevent="llchoice";var ht=function(t){_inherits(ControlType,e.Type);var n=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),n.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof dt}}]),ControlType}(),yt=new ht("la","Control","Metainformation about a field in a LivingApps application"),dt=function(t){_inherits(Control,n);var r=_createSuper(Control);function Control(e){var t;return _classCallCheck(this,Control),(t=r.call(this,e))._mode=null,t}return _createClass(Control,[{key:e.symbols.type,value:function value(){return yt}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.app.globals}},{key:"fulltype",get:function get(){return this.subtype?this.type+"/"+this.subtype:this.type}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new h(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new g(null,this,e)}},{key:"label",get:function get(){var e=this._view_control();if(null!==e){var t=e.label;if(null!==t)return t}var n=this.translations.get();return null!==n&&null!==n.label?n.label:this._label}},{key:"label",set:function set(e){this._label=e}},{key:"description",get:function get(){var e=this.translations.get();return null!==e&&null!==e.description?e.description:this._description}},{key:"description",set:function set(e){this._description=e}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:this[e]=null}},{key:"priority",get:function get(){return this._priority}},{key:"priority",set:function set(e){this._priority=e}},{key:"in_list",get:function get(){return this._priority}},{key:"in_list",set:function set(e){this._priority=e}},{key:"in_mobile_list",get:function get(){return this._in_mobile_list}},{key:"in_mobile_list",set:function set(e){this._in_mobile_list=e}},{key:"in_text",get:function get(){return this._in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"in_structured_search",get:function get(){return this._in_structured_search}},{key:"in_structured_search",set:function set(e){this._in_structured_search=e}},{key:"in_fulltext_search",get:function get(){return this._in_fulltext_search}},{key:"in_fulltext_search",set:function set(e){this._in_fulltext_search=e}},{key:"in_expert_search",get:function get(){return this._in_expert_search}},{key:"in_expert_search",set:function set(e){this._in_expert_search=e}},{key:"default",get:function get(){return null}},{key:"top",get:function get(){var e=this._view_control();return null!==e?e.top:null}},{key:"left",get:function get(){var e=this._view_control();return null!==e?e.left:null}},{key:"width",get:function get(){var e=this._view_control();return null!==e?e.width:null}},{key:"height",get:function get(){var e=this._view_control();return null!==e?e.height:null}},{key:"z_index",get:function get(){var e=this._view_control();return null!==e?e.z_index:null}},{key:"liveupdate",get:function get(){var e=this._view_control();return null!==e&&e.liveupdate}},{key:"tabindex",get:function get(){var e=this._view_control();return null!==e?e.tabindex:null}},{key:"required",get:function get(){var e;if(null===this.app._active_view)return null!==(e=this._required)&&void 0!==e?e:this._required_in_view;var t=this._view_control();return null!==t&&t.required}},{key:"required",set:function set(e){this._required=e}},{key:"mode",get:function get(){if(null!==this._mode)return this._mode;var e=this._view_control();return null!==this.app._active_view&&null===e?null:null===this.app.globals.mode?"display":null!==e?e.mode:"edit"}},{key:"mode",set:function set(e){this._mode=e}},{key:"labelpos",get:function get(){var e=this._view_control();return null!==e?e.labelpos:"left"}},{key:"labelwidth",get:function get(){var e=this._view_control();return null!==e?e.labelwidth:null}},{key:"autoalign",get:function get(){var e=this._view_control();return null===e||e.autoalign}},{key:"in_active_view",get:function get(){return null!==this._view_control()}},{key:"_view_control",value:function _view_control(){if(null===this.app._active_view)return null;var e=this.app._active_view.controls.get(this.identifier);return null!=e?e:null}},{key:"_logsearch",value:function _logsearch(e,t){}},{key:"search",value:function search(e,t){return!1}}]),Control}();dt.prototype.type=null,dt.prototype.subtype=null,dt.prototype._ul4onattrs=["identifier","fieldname","app","_label","_description","base_mode","in_sum","_priority","_in_mobile_list","_in_text","_in_structured_search","_in_fulltext_search","_in_expert_search","_required","_required_in_view","order","ininsertprocedure","inupdateprocedure","translations"],dt.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","base_mode","in_sum","priority","in_list","in_mobile_list","in_text","in_structured_search","in_fulltext_search","in_expert_search","order","ininsertprocedure","inupdateprocedure","fulltype","label","description","translations","top","left","width","height","z_index","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),dt.prototype._cssclass_root="llft-control",dt.prototype._cssclass_control="input";var ft=new(function(e){_inherits(BoolControlType,ht);var t=_createSuper(BoolControlType);function BoolControlType(){return _classCallCheck(this,BoolControlType),t.apply(this,arguments)}return _createClass(BoolControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof vt}}]),BoolControlType}())("la","BoolControl","A LivingApps boolean field (type 'bool')"),vt=function(t){_inherits(BoolControl,dt);var n=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),n.apply(this,arguments)}return _createClass(BoolControl,[{key:e.symbols.type,value:function value(){return ft}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}();vt.prototype.type="bool",vt.prototype.fieldtype=V;var kt=new(function(e){_inherits(IntControlType,ht);var t=_createSuper(IntControlType);function IntControlType(){return _classCallCheck(this,IntControlType),t.apply(this,arguments)}return _createClass(IntControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof mt}}]),IntControlType}())("la","IntControl","A LivingApps integer field (type 'int')"),mt=function(t){_inherits(IntControl,dt);var n=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),n.apply(this,arguments)}return _createClass(IntControl,[{key:e.symbols.type,value:function value(){return kt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}();mt.prototype.type="int",mt.prototype.fieldtype=j;var gt=new(function(e){_inherits(NumberControlType,ht);var t=_createSuper(NumberControlType);function NumberControlType(){return _classCallCheck(this,NumberControlType),t.apply(this,arguments)}return _createClass(NumberControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ct}}]),NumberControlType}())("la","NumberControl","A LivingApps number field (type 'number')"),Ct=function(t){_inherits(NumberControl,dt);var n=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),n.apply(this,arguments)}return _createClass(NumberControl,[{key:e.symbols.type,value:function value(){return gt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}();Ct.prototype.type="number",Ct.prototype.fieldtype=z,Ct.prototype._ul4onattrs=[].concat(_toConsumableArray(dt.prototype._ul4onattrs),["precision","minimum","maximum"]),Ct.prototype._ul4attrs=new Set([].concat(_toConsumableArray(dt.prototype._ul4attrs),["precision","minimum","maximum"]));var bt=function(e){_inherits(StringControlType,ht);var t=_createSuper(StringControlType);function StringControlType(){return _classCallCheck(this,StringControlType),t.apply(this,arguments)}return _createClass(StringControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Lt}}]),StringControlType}(),Tt=new bt("la","StringControl","A LivingApps number field (type 'string')"),Lt=function(t){_inherits(StringControl,dt);var n=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),n.apply(this,arguments)}return _createClass(StringControl,[{key:e.symbols.type,value:function value(){return Tt}},{key:"placeholder",get:function get(){var e=this._view_control();return null!==e?e.placeholder:this._placeholder}},{key:"placeholder",set:function set(e){this._placeholder=e;var t=this.app.globals;if(t._in_form()&&this.app===t.record.app){var n=t.record.fields.get(this.identifier);n._dom_control.placeholder=n.placeholder}}},{key:"_user_placeholder",value:function _user_placeholder(t,n){if(null===n)return null;switch(n){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return n}}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:this._user_placeholder(this.app.globals.user,e.default)}},{key:"minlength",get:function get(){var e=this._view_control();if(null===e)return 0;var t=e.minlength;return null===t||t<0?0:t}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return 4e3;var t=e.maxlength;return null===t||t<0||t>4e3?4e3:t}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"contains"===t.operator?null===t.value||null===e?t.value===e:e.toLowerCase().indexOf(t.value.toLowerCase())>=0:void 0}}]),StringControl}();Lt.prototype.type="string",Lt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(dt.prototype._ul4attrs),["minlength","maxlength","placeholder"]));var At=new(function(e){_inherits(TextControlType,bt);var t=_createSuper(TextControlType);function TextControlType(){return _classCallCheck(this,TextControlType),t.apply(this,arguments)}return _createClass(TextControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ft}}]),TextControlType}())("la","TextControl","A LivingApps text field (type 'string/text')"),Ft=function(t){_inherits(TextControl,Lt);var n=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),n.apply(this,arguments)}return _createClass(TextControl,[{key:e.symbols.type,value:function value(){return At}}]),TextControl}();Ft.prototype.subtype="text",Ft.prototype.fieldtype=K;var wt=new(function(e){_inherits(PasswordControlType,bt);var t=_createSuper(PasswordControlType);function PasswordControlType(){return _classCallCheck(this,PasswordControlType),t.apply(this,arguments)}return _createClass(PasswordControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof St}}]),PasswordControlType}())("la","PasswordControl","A LivingApps password field (type 'string/password')"),St=function(t){_inherits(PasswordControl,Lt);var n=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),n.apply(this,arguments)}return _createClass(PasswordControl,[{key:e.symbols.type,value:function value(){return wt}}]),PasswordControl}();St.prototype.subtype="password",St.prototype.fieldtype=Z;var Mt=new(function(e){_inherits(EmailControlType,bt);var t=_createSuper(EmailControlType);function EmailControlType(){return _classCallCheck(this,EmailControlType),t.apply(this,arguments)}return _createClass(EmailControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xt}}]),EmailControlType}())("la","EmailControl","A LivingApps email field (type 'string/email')"),xt=function(t){_inherits(EmailControl,Lt);var n=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),n.apply(this,arguments)}return _createClass(EmailControl,[{key:e.symbols.type,value:function value(){return Mt}}]),EmailControl}();xt.prototype.subtype="email",xt.prototype.fieldtype=X;var It=new(function(e){_inherits(URLControlType,bt);var t=_createSuper(URLControlType);function URLControlType(){return _classCallCheck(this,URLControlType),t.apply(this,arguments)}return _createClass(URLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ot}}]),URLControlType}())("la","URLControl","A LivingApps URL field (type 'string/url')"),Ot=function(t){_inherits(URLControl,Lt);var n=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),n.apply(this,arguments)}return _createClass(URLControl,[{key:e.symbols.type,value:function value(){return It}}]),URLControl}();Ot.prototype.subtype="url",Ot.prototype.fieldtype=te;var Dt=new(function(e){_inherits(TelControlType,bt);var t=_createSuper(TelControlType);function TelControlType(){return _classCallCheck(this,TelControlType),t.apply(this,arguments)}return _createClass(TelControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ht}}]),TelControlType}())("la","TelControl","A LivingApps phone number field (type 'string/tel')"),Ht=function(t){_inherits(TelControl,Lt);var n=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),n.apply(this,arguments)}return _createClass(TelControl,[{key:e.symbols.type,value:function value(){return Dt}}]),TelControl}();Ht.prototype.subtype="tel",Ht.prototype.fieldtype=re;var Rt=new(function(e){_inherits(TextAreaControlType,bt);var t=_createSuper(TextAreaControlType);function TextAreaControlType(){return _classCallCheck(this,TextAreaControlType),t.apply(this,arguments)}return _createClass(TextAreaControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pt}}]),TextAreaControlType}())("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Pt=function(t){_inherits(TextAreaControl,Lt);var n=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),n.apply(this,arguments)}return _createClass(TextAreaControl,[{key:e.symbols.type,value:function value(){return Rt}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return null;if(null!==this.encrypted)return null;var t=e.maxlength;return t<0?null:t}}]),TextAreaControl}();Pt.prototype.subtype="textarea",Pt.prototype.fieldtype=le,Pt.prototype._ul4onattrs=[].concat(_toConsumableArray(Lt.prototype._ul4onattrs),["encrypted"]),Pt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Lt.prototype._ul4attrs),["encrypted"])),Pt.prototype._cssclass_control="textarea";var Bt=new(function(e){_inherits(HTMLControlType,bt);var t=_createSuper(HTMLControlType);function HTMLControlType(){return _classCallCheck(this,HTMLControlType),t.apply(this,arguments)}return _createClass(HTMLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Nt}}]),HTMLControlType}())("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),Nt=function(t){_inherits(HTMLControl,Lt);var n=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),n.apply(this,arguments)}return _createClass(HTMLControl,[{key:e.symbols.type,value:function value(){return Bt}}]),HTMLControl}();Nt.prototype.subtype="html",Nt.prototype.fieldtype=ie;var Ut=function(e){_inherits(DateControlType,ht);var t=_createSuper(DateControlType);function DateControlType(){return _classCallCheck(this,DateControlType),t.apply(this,arguments)}return _createClass(DateControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Gt}}]),DateControlType}(),qt=new Ut("la","DateControl","A LivingApps date field (type 'date/date')"),Gt=function(t){_inherits(DateControl,dt);var n=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),n.apply(this,arguments)}return _createClass(DateControl,[{key:e.symbols.type,value:function value(){return qt}},{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.today():null}},{key:"formatstring",value:function formatstring(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),this._formatstrings[e]}},{key:"formatstrings_parse",value:function formatstrings_parse(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),[].concat(_toConsumableArray(this._formatstrings_parse[e]),_toConsumableArray(this._formatstrings_parse.intl))}},{key:"search",value:function search(t,n){this._logsearch(t,n);var r=n.value;return"[object Date]"==Object.prototype.toString.call(r)&&(r=e._format(r,this.formatstring(),this.app.language)),null!==t&&(t=e._format(t,this.formatstring(),this.app.language)),"equals"===n.operator?r===t:"contains"===n.operator&&(null===r||null===t?r===t:t.toLowerCase().indexOf(r.toLowerCase())>=0)}}]),DateControl}();Gt.prototype.type="date",Gt.prototype.subtype="date",Gt.prototype.fieldtype=me,Gt.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var Vt=[""," %H:%M","T%H:%M"," %H:%M:%S","T%H:%M:%S"," %H:%M:%S.%f","T%H:%M:%S.%f"," %H:%M%z","T%H:%M%z"," %H:%M:%S%z","T%H:%M:%S%z"," %H:%M:%S.%f%z","T%H:%M:%S.%f%z"," %H:%M %z","T%H:%M %z"," %H:%M:%S %z","T%H:%M:%S %z"," %H:%M:%S.%f %z","T%H:%M:%S.%f %z"];Gt.prototype._formatstrings_parse={en:Vt.map((function(e){return"%m/%d/%Y"+e})),de:Vt.map((function(e){return"%d.%m.%Y"+e})),fr:Vt.map((function(e){return"%d.%m.%Y"+e})),it:Vt.map((function(e){return"%d.%m.%Y"+e})),intl:Vt.map((function(e){return"%Y-%m-%d"+e}))};var Et=new(function(e){_inherits(DatetimeMinuteControlType,Ut);var t=_createSuper(DatetimeMinuteControlType);function DatetimeMinuteControlType(){return _classCallCheck(this,DatetimeMinuteControlType),t.apply(this,arguments)}return _createClass(DatetimeMinuteControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof jt}}]),DatetimeMinuteControlType}())("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),jt=function(t){_inherits(DatetimeMinuteControl,Gt);var n=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),n.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:e.symbols.type,value:function value(){return Et}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setSeconds(0),t.setMilliseconds(0),t}return null}}]),DatetimeMinuteControl}();jt.prototype.subtype="datetimeminute",jt.prototype.fieldtype=Ce,jt.prototype._formatstrings={de:"%d.%m.%Y %H:%M",fr:"%d.%m.%Y %H:%M",it:"%d.%m.%Y %H:%M",en:"%m/%d/%Y %H:%M",intl:"%Y-%m-%d %H:%M"};var Wt=new(function(e){_inherits(DatetimeSecondControlType,Ut);var t=_createSuper(DatetimeSecondControlType);function DatetimeSecondControlType(){return _classCallCheck(this,DatetimeSecondControlType),t.apply(this,arguments)}return _createClass(DatetimeSecondControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zt}}]),DatetimeSecondControlType}())("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),zt=function(t){_inherits(DatetimeSecondControl,Gt);var n=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),n.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:e.symbols.type,value:function value(){return Wt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setMilliseconds(0),t}return null}}]),DatetimeSecondControl}();zt.prototype.subtype="datetimesecond",zt.prototype.fieldtype=Te,zt.prototype._formatstrings={de:"%d.%m.%Y %H:%M:%S",fr:"%d.%m.%Y %H:%M:%S",it:"%d.%m.%Y %H:%M:%S",en:"%m/%d/%Y %H:%M:%S",intl:"%Y-%m-%d %H:%M:%S"};var Yt=function(e){_inherits(LookupControlType,ht);var t=_createSuper(LookupControlType);function LookupControlType(){return _classCallCheck(this,LookupControlType),t.apply(this,arguments)}return _createClass(LookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Kt}}]),LookupControlType}(),Jt=new Yt("la","LookupControl","A LivingApps date field (type 'lookup')"),Kt=function(t){_inherits(LookupControl,dt);var n=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),n.apply(this,arguments)}return _createClass(LookupControl,[{key:e.symbols.type,value:function value(){return Jt}},{key:"default",get:function get(){var e,t=this._view_control();return null===t?null:null!==(e=this.lookupdata.get(t))&&void 0!==e?e:null}},{key:"autoexpandable",get:function get(){var e=this._view_control();return null!==e&&e.autoexpandable}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return"equals"===t.operator&&(null===e?null===t.value:e.key===t.value)}}]),LookupControl}();Kt.prototype.type="lookup",Kt.prototype.fieldtype=xe,Kt.prototype._ul4onattrs=[].concat(_toConsumableArray(dt.prototype._ul4onattrs),["lookupdata"]),Kt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(dt.prototype._ul4attrs),["lookupdata"]));var $t=new(function(e){_inherits(LookupSelectControlType,Yt);var t=_createSuper(LookupSelectControlType);function LookupSelectControlType(){return _classCallCheck(this,LookupSelectControlType),t.apply(this,arguments)}return _createClass(LookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zt}}]),LookupSelectControlType}())("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Zt=function(t){_inherits(LookupSelectControl,Kt);var n=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),n.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:e.symbols.type,value:function value(){return $t}}]),LookupSelectControl}();Zt.prototype.subtype="select",Zt.prototype.fieldtype=He,Zt.prototype._cssclass_control="select";var Qt=new(function(e){_inherits(LookupRadioControlType,Yt);var t=_createSuper(LookupRadioControlType);function LookupRadioControlType(){return _classCallCheck(this,LookupRadioControlType),t.apply(this,arguments)}return _createClass(LookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xt}}]),LookupRadioControlType}())("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),Xt=function(t){_inherits(LookupRadioControl,Kt);var n=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),n.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:e.symbols.type,value:function value(){return Qt}}]),LookupRadioControl}();Xt.prototype.subtype="radio",Xt.prototype.fieldtype=Oe,Xt.prototype._cssclass_root="llft-element";var en=new(function(e){_inherits(LookupChoiceControlType,Yt);var t=_createSuper(LookupChoiceControlType);function LookupChoiceControlType(){return _classCallCheck(this,LookupChoiceControlType),t.apply(this,arguments)}return _createClass(LookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof tn}}]),LookupChoiceControlType}())("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),tn=function(t){_inherits(LookupChoiceControl,Kt);var n=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),n.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:e.symbols.type,value:function value(){return en}}]),LookupChoiceControl}();tn.prototype.subtype="choice",tn.prototype.fieldtype=Pe,tn.prototype._cssclass_control="select";var nn=function(e){_inherits(AppLookupControlType,ht);var t=_createSuper(AppLookupControlType);function AppLookupControlType(){return _classCallCheck(this,AppLookupControlType),t.apply(this,arguments)}return _createClass(AppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof on}}]),AppLookupControlType}(),rn=new nn("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),on=function(t){_inherits(AppLookupControl,dt);var n=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),n.apply(this,arguments)}return _createClass(AppLookupControl,[{key:e.symbols.type,value:function value(){return rn}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return null===e||null===t.value?e===t.value:e.search(t)}}]),AppLookupControl}();on.prototype.type="applookup",on.prototype.fieldtype=Ze,on.prototype._ul4onattrs=[].concat(_toConsumableArray(dt.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),on.prototype._ul4attrs=new Set([].concat(_toConsumableArray(dt.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var ln=new(function(e){_inherits(AppLookupSelectControlType,nn);var t=_createSuper(AppLookupSelectControlType);function AppLookupSelectControlType(){return _classCallCheck(this,AppLookupSelectControlType),t.apply(this,arguments)}return _createClass(AppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof an}}]),AppLookupSelectControlType}())("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),an=function(t){_inherits(AppLookupSelectControl,on);var n=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),n.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:e.symbols.type,value:function value(){return ln}}]),AppLookupSelectControl}();an.prototype.subtype="select",an.prototype.fieldtype=Xe,an.prototype._cssclass_control="select";var un=new(function(e){_inherits(AppLookupRadioControlType,nn);var t=_createSuper(AppLookupRadioControlType);function AppLookupRadioControlType(){return _classCallCheck(this,AppLookupRadioControlType),t.apply(this,arguments)}return _createClass(AppLookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sn}}]),AppLookupRadioControlType}())("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),sn=function(t){_inherits(AppLookupRadioControl,on);var n=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),n.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:e.symbols.type,value:function value(){return un}}]),AppLookupRadioControl}();sn.prototype.subtype="radio",sn.prototype.fieldtype=tt;var pn=new(function(e){_inherits(AppLookupChoiceControlType,nn);var t=_createSuper(AppLookupChoiceControlType);function AppLookupChoiceControlType(){return _classCallCheck(this,AppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(AppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cn}}]),AppLookupChoiceControlType}())("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),cn=function(t){_inherits(AppLookupChoiceControl,on);var n=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),n.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return pn}},{key:"search_url",get:function get(){return"field_"+this.identifier+"_search"}},{key:"search_param_name",get:function get(){return"q"}},{key:"target_param_name",get:function get(){return"target"}}]),AppLookupChoiceControl}();cn.prototype.subtype="choice",cn.prototype.fieldtype=rt,cn.prototype._cssclass_control="select",cn.prototype._ul4attrs=new Set([].concat(_toConsumableArray(on.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var _n=function(e){_inherits(MultipleLookupControlType,Yt);var t=_createSuper(MultipleLookupControlType);function MultipleLookupControlType(){return _classCallCheck(this,MultipleLookupControlType),t.apply(this,arguments)}return _createClass(MultipleLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yn}}]),MultipleLookupControlType}(),hn=new _n("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),yn=function(t){_inherits(MultipleLookupControl,Kt);var n=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),n.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:e.symbols.type,value:function value(){return hn}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;var t=this.lookupdata.get(e);return void 0!==t?[t]:[]}},{key:"search",value:function search(e,t){if("equals"===t.operator){var n,r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){if(n.value.key===t.value)return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleLookupControl}();yn.prototype.type="multiplelookup",yn.prototype.fieldtype=Ue;var dn=new(function(e){_inherits(MultipleLookupCheckboxControlType,_n);var t=_createSuper(MultipleLookupCheckboxControlType);function MultipleLookupCheckboxControlType(){return _classCallCheck(this,MultipleLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof fn}}]),MultipleLookupCheckboxControlType}())("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),fn=function(t){_inherits(MultipleLookupCheckboxControl,yn);var n=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),n.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return dn}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}();fn.prototype.subtype="checkbox",fn.prototype.fieldtype=Ge,fn.prototype._cssclass_root="llft-element";var vn=new(function(e){_inherits(MultipleLookupSelectControlType,_n);var t=_createSuper(MultipleLookupSelectControlType);function MultipleLookupSelectControlType(){return _classCallCheck(this,MultipleLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kn}}]),MultipleLookupSelectControlType}())("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),kn=function(t){_inherits(MultipleLookupSelectControl,yn);var n=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),n.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:e.symbols.type,value:function value(){return vn}}]),MultipleLookupSelectControl}();kn.prototype.subtype="select",kn.prototype.fieldtype=Ee,kn.prototype._cssclass_control="select";var mn=new(function(e){_inherits(MultipleLookupChoiceControlType,_n);var t=_createSuper(MultipleLookupChoiceControlType);function MultipleLookupChoiceControlType(){return _classCallCheck(this,MultipleLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof gn}}]),MultipleLookupChoiceControlType}())("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),gn=function(t){_inherits(MultipleLookupChoiceControl,yn);var n=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),n.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:e.symbols.type,value:function value(){return mn}}]),MultipleLookupChoiceControl}();gn.prototype.subtype="choice",gn.prototype.fieldtype=We,gn.prototype._cssclass_control="select";var Cn=function(e){_inherits(MultipleAppLookupControlType,nn);var t=_createSuper(MultipleAppLookupControlType);function MultipleAppLookupControlType(){return _classCallCheck(this,MultipleAppLookupControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Tn}}]),MultipleAppLookupControlType}(),bn=new Cn("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),Tn=function(t){_inherits(MultipleAppLookupControl,on);var n=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:e.symbols.type,value:function value(){return bn}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var n,r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){if(n.value.search(t.value))return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleAppLookupControl}();Tn.prototype.type="multipleapplookup",Tn.prototype.fieldtype=at;var Ln=new(function(e){_inherits(MultipleAppLookupSelectControlType,Cn);var t=_createSuper(MultipleAppLookupSelectControlType);function MultipleAppLookupSelectControlType(){return _classCallCheck(this,MultipleAppLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof An}}]),MultipleAppLookupSelectControlType}())("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),An=function(t){_inherits(MultipleAppLookupSelectControl,Tn);var n=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:e.symbols.type,value:function value(){return Ln}}]),MultipleAppLookupSelectControl}();An.prototype.subtype="select",An.prototype.fieldtype=pt,An.prototype._cssclass_control="select";var Fn=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,Cn);var t=_createSuper(MultipleAppLookupCheckboxControlType);function MultipleAppLookupCheckboxControlType(){return _classCallCheck(this,MultipleAppLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof wn}}]),MultipleAppLookupCheckboxControlType}())("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),wn=function(t){_inherits(MultipleAppLookupCheckboxControl,Tn);var n=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return Fn}}]),MultipleAppLookupCheckboxControl}();wn.prototype.subtype="checkbox",wn.prototype.fieldtype=ut;var Sn=new(function(e){_inherits(MultipleAppLookupChoiceControlType,Cn);var t=_createSuper(MultipleAppLookupChoiceControlType);function MultipleAppLookupChoiceControlType(){return _classCallCheck(this,MultipleAppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Mn}}]),MultipleAppLookupChoiceControlType}())("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),Mn=function(t){_inherits(MultipleAppLookupChoiceControl,Tn);var n=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return Sn}}]),MultipleAppLookupChoiceControl}();Mn.prototype.subtype="choice",Mn.prototype.fieldtype=_t,Mn.prototype._cssclass_control="select";var xn=new(function(e){_inherits(GeoControlType,ht);var t=_createSuper(GeoControlType);function GeoControlType(){return _classCallCheck(this,GeoControlType),t.apply(this,arguments)}return _createClass(GeoControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof In}}]),GeoControlType}())("la","GeoControl","A LivingApps geo field (type 'geo')"),In=function(t){_inherits(GeoControl,dt);var n=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),n.apply(this,arguments)}return _createClass(GeoControl,[{key:e.symbols.type,value:function value(){return xn}}]),GeoControl}();In.prototype.type="geo",In.prototype.fieldtype=se,In.prototype._cssclass_root="llft-element";var On=function(e){_inherits(FileControlType,ht);var t=_createSuper(FileControlType);function FileControlType(){return _classCallCheck(this,FileControlType),t.apply(this,arguments)}return _createClass(FileControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Hn}}]),FileControlType}(),Dn=new On("la","FileControl","A LivingApps upload field (type 'file')"),Hn=function(t){_inherits(FileControl,dt);var n=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),n.apply(this,arguments)}return _createClass(FileControl,[{key:e.symbols.type,value:function value(){return Dn}}]),FileControl}();Hn.prototype.type="file",Hn.prototype.fieldtype=_e,Hn.prototype._cssclass_root="llft-element";var Rn=new(function(e){_inherits(FileSignatureControlType,On);var t=_createSuper(FileSignatureControlType);function FileSignatureControlType(){return _classCallCheck(this,FileSignatureControlType),t.apply(this,arguments)}return _createClass(FileSignatureControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pn}}]),FileSignatureControlType}())("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),Pn=function(t){_inherits(FileSignatureControl,Hn);var n=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),n.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:e.symbols.type,value:function value(){return Rn}}]),FileSignatureControl}();Pn.prototype.subtype="signature",Pn.prototype.fieldtype=ye;var Bn=new(function(e){_inherits(ButtonControlType,ht);var t=_createSuper(ButtonControlType);function ButtonControlType(){return _classCallCheck(this,ButtonControlType),t.apply(this,arguments)}return _createClass(ButtonControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Nn}}]),ButtonControlType}())("la","ButtonControl","A submit button"),Nn=function(t){_inherits(ButtonControl,dt);var n=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),n.apply(this,arguments)}return _createClass(ButtonControl,[{key:e.symbols.type,value:function value(){return Bn}}]),ButtonControl}();Nn.prototype.type="button";var Un=new(function(t){_inherits(LookupItemType,e.Type);var n=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),n.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof qn}}]),LookupItemType}())("la","LookupItem","An option in a lookup control/field"),qn=function(t){_inherits(LookupItem,n);var r=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),r.apply(this,arguments)}return _createClass(LookupItem,[{key:e.symbols.type,value:function value(){return Un}},{key:"globals",get:function get(){return null===this.control||null===this.control.app?null:this.control.app.globals}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new h(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new b(null,this,e)}},{key:"label",get:function get(){if(null!==this.control){var e=this._view_lookupitem();if(null!==e){var t=e.label;if(null!==t)return t}}var n=this.translations.get();return null!==n&&null!==n.label?n.label:this._label}},{key:"visible",get:function get(){if(null===this.control)return!0;var e=this._view_lookupitem();return null===e||e.visible}},{key:"_view_lookupitem",value:function _view_lookupitem(){var e=this.control.identifier,t=this.control.app.active_view;if(null!==t&&null!==t.controls){var n=t.controls.get(e);if(void 0!==n&&void 0!==n.lookupdata&&null!==n.lookupdata){var r=n.lookupdata.get(this.key);if(void 0!==r)return r}}return null}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:this[e]=null}},{key:e.symbols.repr,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();qn.prototype._ul4onattrs=["control","key","_label","translations"],qn.prototype._ul4attrs=new Set(["id","control","key","label","translations"]);var Gn=new(function(t){_inherits(ViewLookupItemType,e.Type);var n=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),n.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Vn}}]),ViewLookupItemType}())("la","ViewLookupItem","View specific information about a lookup item"),Vn=function(t){_inherits(ViewLookupItem,n);var r=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),r.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:e.symbols.type,value:function value(){return Gn}},{key:e.symbols.repr,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();Vn.prototype._ul4onattrs=["key","label","visible"],Vn.prototype._ul4attrs=new Set(["key","label","visible"]);var En=function(t){_inherits(LayoutControlType,e.Type);var n=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),n.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Wn}}]),LayoutControlType}(),jn=new En("la","LayoutControl","A decoration in an input form"),Wn=function(t){_inherits(LayoutControl,n);var r=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),r.apply(this,arguments)}return _createClass(LayoutControl,[{key:"LayoutControl",value:function LayoutControl(){this.label=null,this.identifier=null,this.view=null,this.top=null,this.left=null,this.width=null,this.height=null,this._visible=!0}},{key:e.symbols.type,value:function value(){return jn}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.view.globals}},{key:"_sel_root",get:function get(){return"#livingapps-form .llft-element.llft-id-"+this.identifier}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"visible",get:function get(){var e;return null===(e=this._visible)||void 0===e||e}},{key:"visible",set:function set(e){this.globals._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:e.symbols.setattr,value:function value(t,n){"visible"===t?this.visible=e._bool(n):_get(_getPrototypeOf(LayoutControl.prototype),e.symbols.setattr,this).call(this,t,n)}}]),LayoutControl}();Wn.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],Wn.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height","visible"]);var zn=new(function(e){_inherits(HTMLLayoutControlType,En);var t=_createSuper(HTMLLayoutControlType);function HTMLLayoutControlType(){return _classCallCheck(this,HTMLLayoutControlType),t.apply(this,arguments)}return _createClass(HTMLLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Yn}}]),HTMLLayoutControlType}())("la","HTMLLayoutControl","HTML decoration in an input form"),Yn=function(t){_inherits(HTMLLayoutControl,Wn);var n=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),n.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:e.symbols.type,value:function value(){return zn}},{key:"value",get:function get(){return this._value}},{key:"value",set:function set(e){this._value=e,this.globals._in_form()&&this._set_dom_value(this._value)}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_root.innerHTML=e}},{key:e.symbols.setattr,value:function value(t,n){"value"===t?this.value=n:_get(_getPrototypeOf(HTMLLayoutControl.prototype),e.symbols.setattr,this).call(this,t,n)}}]),HTMLLayoutControl}();Yn.prototype._ul4onattrs=[].concat(_toConsumableArray(Wn.prototype._ul4onattrs),["_value","_visible"]),Yn.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wn.prototype._ul4attrs),["value"]));var Jn=new(function(e){_inherits(ImageLayoutControlType,En);var t=_createSuper(ImageLayoutControlType);function ImageLayoutControlType(){return _classCallCheck(this,ImageLayoutControlType),t.apply(this,arguments)}return _createClass(ImageLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Kn}}]),ImageLayoutControlType}())("la","ImageLayoutControl","An image decoration in an input form"),Kn=function(t){_inherits(ImageLayoutControl,Wn);var n=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),n.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:e.symbols.type,value:function value(){return Jn}},{key:"image",get:function get(){return this._image}},{key:"image",set:function set(e){this._image=e,this.globals._in_form()&&this._set_dom_value(this._image)}},{key:"original",get:function get(){return this.image}},{key:"original",set:function set(e){this.image=image}},{key:"_set_dom_value",value:function _set_dom_value(e){var t=this._dom_root.querySelector("img");if(null!==t){var n=null===e?"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==":this.globals.scaled_url(e,this.width,this.height);t.setAttribute("src",n)}}},{key:e.symbols.setattr,value:function value(t,n){"original"===t?this.original=n:"image"===t?this.image=n:_get(_getPrototypeOf(ImageLayoutControl.prototype),e.symbols.setattr,this).call(this,t,n)}}]),ImageLayoutControl}();Kn.prototype._ul4onattrs=[].concat(_toConsumableArray(Wn.prototype._ul4onattrs),["_image","_visible"]),Kn.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Wn.prototype._ul4attrs),["image","original"]));var $n=new(function(e){_inherits(ButtonLayoutControlType,En);var t=_createSuper(ButtonLayoutControlType);function ButtonLayoutControlType(){return _classCallCheck(this,ButtonLayoutControlType),t.apply(this,arguments)}return _createClass(ButtonLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zn}}]),ButtonLayoutControlType}())("la","ButtonLayoutControl","A submit button in an input form"),Zn=function(t){_inherits(ButtonLayoutControl,Wn);var n=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),n.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:e.symbols.type,value:function value(){return $n}}]),ButtonLayoutControl}();Zn.prototype._ul4onattrs=[].concat(_toConsumableArray(Wn.prototype._ul4onattrs),["original","scaled","_visible"]);var Qn=new(function(t){_inherits(ViewControlType,e.Type);var n=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),n.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xn}}]),ViewControlType}())("la","ViewControl","Contains view specific information about a control"),Xn=function(t){_inherits(ViewControl,n);var r=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),r.apply(this,arguments)}return _createClass(ViewControl,[{key:e.symbols.type,value:function value(){return Qn}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}();Xn.prototype._ul4onattrs=["view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],Xn.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var er=function(t){_inherits(UserType,e.Type);var n=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),n.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof nr}}]),UserType}(),tr=new er("la","User","A LivingApps user/account"),nr=function(t){_inherits(User,n);var r=_createSuper(User);function User(){return _classCallCheck(this,User),r.apply(this,arguments)}return _createClass(User,[{key:e.symbols.type,value:function value(){return tr}},{key:e.symbols.repr,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();nr.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews","globals"],nr.prototype._ul4attrs=new Set(["id","globals","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]);var rr=new(function(t){_inherits(FileType,e.Type);var n=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),n.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof or}}]),FileType}())("la","File","An uploaded file"),or=function(t){_inherits(File,n);var r=_createSuper(File);function File(){return _classCallCheck(this,File),r.apply(this,arguments)}return _createClass(File,[{key:e.symbols.type,value:function value(){return rr}},{key:e.symbols.repr,value:function value(){return"<File url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}},{key:"url",get:function get(){return"https://"+this.globals.hostname+"/files/"+this.contextid+"/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}();or.prototype._ul4onattrs=["globals","filename","mimetype","width","height","internal_id","createdat","size","duration","geo","recordedat","storagefilename","archive","context_id"],or.prototype._ul4attrs=new Set(["globals","id","internal_id","url","archive_url","filename","mimetype","width","height","size","duration","geo","recordedat","archive","createdat","context_id"]);var lr=new(function(t){_inherits(GeoType,e.Type);var n=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),n.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ar}}]),GeoType}())("la","Geo","Geographical coordinates and location information"),ar=function(t){_inherits(Geo,n);var r=_createSuper(Geo);function Geo(e,t,n){var o,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,Geo),(o=r.call(this,null)).globals=e,o.lat=t,o.long=n,o.info=l,o}return _createClass(Geo,[{key:e.symbols.type,value:function value(){return lr}},{key:e.symbols.repr,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();ar.prototype._ul4onattrs=["globals","lat","long","info"],ar.prototype._ul4attrs=new Set(["globals","lat","long","info"]);var ir=function(t){_inherits(AttachmentType,e.Type);var n=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),n.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sr}}]),AttachmentType}(),ur=new ir("la","Attachment","An attachment of a record"),sr=function(t){_inherits(Attachment,n);var r=_createSuper(Attachment);function Attachment(e,t,n,o,l,a){var i;return _classCallCheck(this,Attachment),(i=r.call(this,e)).owner=t,i.label=n,i.namespace=o,i.active=l,i.value=a,i}return _createClass(Attachment,[{key:e.symbols.type,value:function value(){return ur}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}},{key:"app",get:function get(){return this.owner instanceof A?this.owner:null}},{key:"appgroup",get:function get(){return this.owner instanceof S?this.owner:null}},{key:"record",get:function get(){return this.owner instanceof B?this.owner:null}}]),Attachment}();sr.prototype._ul4onattrs=["owner","label","namespace","active"],sr.prototype._ul4attrs=new Set(["id","owner","label","namespace","active"]);var pr=new(function(e){_inherits(NoteAttachmentType,ir);var t=_createSuper(NoteAttachmentType);function NoteAttachmentType(){return _classCallCheck(this,NoteAttachmentType),t.apply(this,arguments)}return _createClass(NoteAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cr}}]),NoteAttachmentType}())("la","NoteAttachment","A note attachment of a record"),cr=function(t){_inherits(NoteAttachment,sr);var n=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),n.apply(this,arguments)}return _createClass(NoteAttachment,[{key:e.symbols.type,value:function value(){return pr}}]),NoteAttachment}();cr.prototype.type="noteattachment",cr.prototype._ul4onattrs=[].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]),cr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]));var _r=new(function(e){_inherits(URLAttachmentType,ir);var t=_createSuper(URLAttachmentType);function URLAttachmentType(){return _classCallCheck(this,URLAttachmentType),t.apply(this,arguments)}return _createClass(URLAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof hr}}]),URLAttachmentType}())("la","URLAttachment","A URL attachment of a record"),hr=function(t){_inherits(URLAttachment,sr);var n=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),n.apply(this,arguments)}return _createClass(URLAttachment,[{key:e.symbols.type,value:function value(){return _r}}]),URLAttachment}();hr.prototype.type="urlattachment",hr.prototype._ul4onattrs=[].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]),hr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]));var yr=new(function(e){_inherits(FileAttachmentType,ir);var t=_createSuper(FileAttachmentType);function FileAttachmentType(){return _classCallCheck(this,FileAttachmentType),t.apply(this,arguments)}return _createClass(FileAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof dr}}]),FileAttachmentType}())("la","FileAttachment","A file attachment of a record"),dr=function(t){_inherits(FileAttachment,sr);var n=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),n.apply(this,arguments)}return _createClass(FileAttachment,[{key:e.symbols.type,value:function value(){return yr}}]),FileAttachment}();dr.prototype.type="fileattachment",dr.prototype._ul4onattrs=[].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]),dr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]));var fr=new(function(e){_inherits(JSONAttachmentType,ir);var t=_createSuper(JSONAttachmentType);function JSONAttachmentType(){return _classCallCheck(this,JSONAttachmentType),t.apply(this,arguments)}return _createClass(JSONAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof vr}}]),JSONAttachmentType}())("la","JSONAttachment","A JSON attachment of a record"),vr=function(t){_inherits(JSONAttachment,sr);var n=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),n.apply(this,arguments)}return _createClass(JSONAttachment,[{key:e.symbols.type,value:function value(){return fr}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?e._asjson(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,n){"value"===t?this.value=e._fromjson(n):this[t]=n}}]),JSONAttachment}();vr.prototype.type="jsonattachment",vr.prototype._ul4onattrs=[].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]),vr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(sr.prototype._ul4onattrs),["value"]));var kr=new(function(t){_inherits(DataActionType,e.Type);var n=_createSuper(DataActionType);function DataActionType(){return _classCallCheck(this,DataActionType),n.apply(this,arguments)}return _createClass(DataActionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof mr}}]),DataActionType}())("la","DataAction","A data action configured for an app."),mr=function(t){_inherits(DataAction,n);var r=_createSuper(DataAction);function DataAction(){return _classCallCheck(this,DataAction),r.apply(this,arguments)}return _createClass(DataAction,[{key:e.symbols.type,value:function value(){return kr}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataAction}();mr.prototype._ul4onattrs=["app","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_mail_link","before_record_update_form","after_record_update","after_record_insert","before_record_delete"],mr.prototype._ul4attrs=new Set(["app","id","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_link","before_record_update_form","after_record_update","after_record_insert","before_record_delete"]);var gr=new(function(t){_inherits(InstallationType,e.Type);var n=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),n.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Cr}}]),InstallationType}())("la","Installation","The installation that created an app"),Cr=function(t){_inherits(Installation,n);var r=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),r.apply(this,arguments)}return _createClass(Installation,[{key:e.symbols.type,value:function value(){return gr}},{key:e.symbols.repr,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();Cr.prototype._ul4onattrs=["name"],Cr.prototype._ul4attrs=new Set(["id","name"]);var br=new(function(t){_inherits(CategoryType,e.Type);var n=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),n.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Tr}}]),CategoryType}())("la","Category","A navigation category"),Tr=function(t){_inherits(Category,n);var r=_createSuper(Category);function Category(){return _classCallCheck(this,Category),r.apply(this,arguments)}return _createClass(Category,[{key:e.symbols.type,value:function value(){return br}},{key:e.symbols.repr,value:function value(){for(var t=[],n=this;null!==n;)t.splice(0,0,n.identifier),n=n.parent;return"<Category id="+e._repr(this.id)+" identifierpath="+e._repr(t.join("/"))+NaN+e._repr(this.name)+">"}}]),Category}();Tr.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],Tr.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var Lr=new(function(t){_inherits(KeyViewType,e.Type);var n=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),n.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ar}}]),KeyViewType}())("la","KeyView","Object granting access to a view template"),Ar=function(t){_inherits(KeyView,n);var r=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),r.apply(this,arguments)}return _createClass(KeyView,[{key:e.symbols.type,value:function value(){return Lr}},{key:e.symbols.repr,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();Ar.prototype._ul4onattrs=["identifier","name","key","user"],Ar.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var Fr=function(t){_inherits(AppParameterType,e.Type);var n=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),n.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Sr}}]),AppParameterType}(),wr=new Fr("la","AppParameter","A parameter of a LivingApps application"),Sr=function(t){_inherits(AppParameter,n);var r=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),r.apply(this,arguments)}return _createClass(AppParameter,[{key:e.symbols.type,value:function value(){return wr}},{key:e.symbols.repr,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof A?this.owner:null}},{key:"appgroup",get:function get(){return this.owner instanceof S?this.owner:null}},{key:"full_identifier",get:function get(){return null===this.namespace||null===this.identifier?this.identifier:"".concat(this.namespace,".").concat(this.identifier)}}]),AppParameter}();Sr.prototype._ul4onattrs=["owner","parent","type","order","identifier","namespace","description","value","createdat","createdby","updatedat","updatedby"],Sr.prototype._ul4attrs=new Set(["id","owner","parent","app","type","order","identifier","namespace","full_identifier","description","value","createdat","createdby","updatedat","updatedby"]);var Mr=new(function(e){_inherits(MutableAppParameterType,Fr);var t=_createSuper(MutableAppParameterType);function MutableAppParameterType(){return _classCallCheck(this,MutableAppParameterType),t.apply(this,arguments)}return _createClass(MutableAppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xr}}]),MutableAppParameterType}())("la","MutableAppParameter","A mutable parameter of a LivingApps application"),xr=function(t){_inherits(MutableAppParameter,Sr);var n=_createSuper(MutableAppParameter);function MutableAppParameter(){return _classCallCheck(this,MutableAppParameter),n.apply(this,arguments)}return _createClass(MutableAppParameter,[{key:e.symbols.type,value:function value(){return Mr}},{key:e.symbols.repr,value:function value(){return"<MutableAppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),MutableAppParameter}(),Ir=function(t){_inherits(MenuItemType,e.Type);var n=_createSuper(MenuItemType);function MenuItemType(){return _classCallCheck(this,MenuItemType),n.apply(this,arguments)}return _createClass(MenuItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Dr}}]),MenuItemType}(),Or=new Ir("la","MenuItem","An additional menu item in an app that links to a target page."),Dr=function(t){_inherits(MenuItem,n);var r=_createSuper(MenuItem);function MenuItem(){return _classCallCheck(this,MenuItem),r.apply(this,arguments)}return _createClass(MenuItem,[{key:e.symbols.type,value:function value(){return Or}},{key:e.symbols.repr,value:function value(){return"<MenuItem id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),MenuItem}();Dr.prototype._ul4onattrs=["app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"],Dr.prototype._ul4attrs=new Set(["id","app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"]);var Hr=new Ir("la","Panel","An additional panel in an app that is displayed on various LivingApps pages and links to a target page."),Rr=function(t){_inherits(Panel,Dr);var n=_createSuper(Panel);function Panel(){return _classCallCheck(this,Panel),n.apply(this,arguments)}return _createClass(Panel,[{key:e.symbols.type,value:function value(){return Hr}},{key:e.symbols.repr,value:function value(){return"<Panel id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),Panel}();Rr.prototype._ul4onattrs=[].concat(_toConsumableArray(Dr.prototype._ul4onattrs),["description","description_url","image","row","column","width","height","header_type","header_background","text_color","background_color1","background_color2"]),Rr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Dr.prototype._ul4attrs),["description","description_url","image","row","column","width","height"]));var Pr=new er("la","ViewTemplateInfo","basic information about a view template"),Br=function(t){_inherits(ViewTemplateInfo,n);var r=_createSuper(ViewTemplateInfo);function ViewTemplateInfo(){return _classCallCheck(this,ViewTemplateInfo),r.apply(this,arguments)}return _createClass(ViewTemplateInfo,[{key:e.symbols.type,value:function value(){return Pr}},{key:e.symbols.repr,value:function value(){return"<ViewTemplateInfo id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+" name="+e._repr(this.name)+">"}}]),ViewTemplateInfo}();Br.prototype._ul4onattrs=["app","identifier","name","icon","type","mimetype","permission_level"],Br.prototype._ul4attrs=new Set(["app","id","identifier","name","icon","type","mimetype","permission_level"]);var Nr=new(function(t){_inherits(FormType,e.Type);var n=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),n.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ur}}]),FormType}())("la","Form","The input form."),Ur=function(t){_inherits(Form,e.Proto);var n=_createSuper(Form);function Form(e,t){var r;_classCallCheck(this,Form),(r=n.call(this)).globals=e,r.template=t,r._geo_wired=!1;var o,l=_createForOfIteratorHelper(e.record.fields.values());try{for(l.s();!(o=l.n()).done;){var a=o.value;r.wire_field(a)}}catch(e){l.e(e)}finally{l.f()}return r.render_template(null),r}return _createClass(Form,[{key:e.symbols.type,value:function value(){return Nr}},{key:"_dom_button",get:function get(){return document.querySelector(this._sel_form+" "+this._sel_button)}},{key:"enabled",get:function get(){return!this._dom_button.disabled}},{key:"enabled",set:function set(e){this._dom_button.disabled=!e}},{key:e.symbols.getattr,value:function value(t){if("enabled"===t)return this.enabled;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,n){if("enabled"!==t)throw new e.AttributeError(this,t);this.enabled=e._bool(n)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+e._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}},{key:"render_template",value:function render_template(t){var n=this,r={datasources:this.globals.datasources,record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:t},o={globals:this.globals,form:this,la:Er},l="LivingApps update template: ";l+=null===t?"Initialization":"Value change in "+e._repr(t),this.globals.group_logging(l,(function(){try{n.template.renders(r,o)}catch(t){console&&console.error&&(n.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),e.report_exc(t),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(t),console.groupEnd&&console.groupEnd())}}))}},{key:"wire_geo",value:function wire_geo(){var e=this;if(!this._geo_wired){if(null!==this.globals.app.active_view&&navigator.geolocation){var t=this.globals.app.active_view.use_geo;"once"!==t&&"watch"!==t||navigator.geolocation.getCurrentPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)})),"watch"===t&&navigator.geolocation.watchPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)}))}this._geo_wired=!0}}},{key:"wire_field",value:function wire_field(e){var t,n=this,r=_createForOfIteratorHelper(e._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.addEventListener(e._inputevent,(function(t){n.wire_geo(),n.globals.mode=n.globals.mode.substring(0,n.globals.mode.lastIndexOf("/")+1)+"input",n.render_template(e.control.identifier)}))}}catch(e){r.e(e)}finally{r.f()}}}]),Form}();Ur.prototype._ul4attrs=new Set(["enabled"]),Ur.prototype._sel_form="#livingapps-form form",Ur.prototype._sel_button="[type=submit]";for(var qr=0,Gr=[l,i,A,S,x,Dr,Rr,O,D,R,B,vt,mt,Ct,Ft,xt,Ot,Ht,Pt,Gt,jt,zt,Kt,Zt,Xt,tn,on,an,sn,cn,yn,kn,fn,gn,Tn,An,wn,Mn,In,Hn,Pn,Nn,q,V,K,X,te,re,le,ie,j,z,se,_e,ye,ve,me,Ce,Te,we,xe,Ue,Je,Ze,at,qn,Vn,f,k,g,b,Wn,Yn,Kn,Zn,Xn,nr,or,ar,cr,hr,dr,vr,mr,Cr,Tr,Ar,Sr,xr,Br];qr<Gr.length;qr++){var Vr=Gr[qr];e.register("de.livinglogic.livingapi."+Vr.name.toLowerCase(),Vr)}var Er=new e.Module("la","LivingAPI types",{FlashMessage:i,File:or,Geo:ar,User:nr,KeyView:Ar,Globals:l,App:A,AppGroup:S,TextControl:Ft,URLControl:Ot,EmailControl:xt,PasswordControl:St,TelControl:Ht,TextAreaControl:Pt,HTMLControl:Nt,IntControl:mt,NumberControl:Ct,DateControl:Gt,DatetimeMinuteControl:jt,DatetimeSecondControl:zt,BoolControl:vt,LookupSelectControl:Zt,LookupRadioControl:Xt,LookupChoiceControl:tn,AppLookupSelectControl:an,AppLookupRadioControl:sn,AppLookupChoiceControl:cn,MultipleLookupSelectControl:kn,MultipleLookupCheckboxControl:fn,MultipleLookupChoiceControl:gn,MultipleAppLookupSelectControl:An,MultipleAppLookupCheckboxControl:wn,MultipleAppLookupChoiceControl:Mn,FileControl:Hn,FileSignatureControl:Pn,GeoControl:In,ViewControl:Xn,RecordChildren:R,Record:B,FileAttachment:dr,URLAttachment:hr,NoteAttachment:cr,JSONAttachment:vr,DataAction:mr,Installation:Cr,HTMLLayoutControl:Yn,ImageLayoutControl:Kn,ButtonLayoutControl:Zn,View:x,DataSource:O,DataSourceChildren:D,LookupItem:qn,ViewLookupItem:Vn,Translations:h,AppLang:f,AppGroupLang:k,ControlLang:g,LookupItemLang:b,Category:Tr,AppParameter:Sr,MutableAppParameter:xr,MenuItem:Dr,Panel:Rr,ViewTemplateInfo:Br});export{A as App,S as AppGroup,k as AppGroupLang,f as AppLang,cn as AppLookupChoiceControl,rt as AppLookupChoiceField,on as AppLookupControl,Ze as AppLookupField,Je as AppLookupFieldBase,sn as AppLookupRadioControl,tt as AppLookupRadioField,an as AppLookupSelectControl,Xe as AppLookupSelectField,Sr as AppParameter,sr as Attachment,n as Base,vt as BoolControl,V as BoolField,Nn as ButtonControl,Zn as ButtonLayoutControl,Tr as Category,Le as ChoiceFieldBase,dt as Control,g as ControlLang,mr as DataAction,O as DataSource,D as DataSourceChildren,Gt as DateControl,me as DateField,ve as DateFieldBase,jt as DatetimeMinuteControl,Ce as DatetimeMinuteField,zt as DatetimeSecondControl,Te as DatetimeSecondField,xt as EmailControl,X as EmailField,q as Field,or as File,dr as FileAttachment,Hn as FileControl,_e as FileField,Pn as FileSignatureControl,ye as FileSignatureField,i as FlashMessage,Ur as Form,ar as Geo,In as GeoControl,se as GeoField,l as Globals,Nt as HTMLControl,ie as HTMLField,Yn as HTMLLayoutControl,r as Handler,Kn as ImageLayoutControl,Cr as Installation,mt as IntControl,j as IntField,vr as JSONAttachment,Ar as KeyView,y as LangBase,Wn as LayoutControl,tn as LookupChoiceControl,Pe as LookupChoiceField,Kt as LookupControl,xe as LookupField,we as LookupFieldBase,qn as LookupItem,b as LookupItemLang,Xt as LookupRadioControl,Oe as LookupRadioField,Zt as LookupSelectControl,He as LookupSelectField,Dr as MenuItem,wn as MultipleAppLookupCheckboxControl,ut as MultipleAppLookupCheckboxField,Mn as MultipleAppLookupChoiceControl,_t as MultipleAppLookupChoiceField,Tn as MultipleAppLookupControl,at as MultipleAppLookupField,An as MultipleAppLookupSelectControl,pt as MultipleAppLookupSelectField,fn as MultipleLookupCheckboxControl,Ge as MultipleLookupCheckboxField,gn as MultipleLookupChoiceControl,We as MultipleLookupChoiceField,yn as MultipleLookupControl,Ue as MultipleLookupField,kn as MultipleLookupSelectControl,Ee as MultipleLookupSelectField,xr as MutableAppParameter,cr as NoteAttachment,Ct as NumberControl,z as NumberField,Rr as Panel,St as PasswordControl,Z as PasswordField,s as Permission,B as Record,R as RecordChildren,Lt as StringControl,K as StringField,Ht as TelControl,re as TelField,Pt as TextAreaControl,le as TextAreaField,Ft as TextControl,h as Translations,hr as URLAttachment,Ot as URLControl,te as URLField,nr as User,x as View,Xn as ViewControl,Vn as ViewLookupItem,Br as ViewTemplateInfo,element,Er as module,url_with_params,t as version};
|
|
1
|
+
import*as e from"/npm/@livinglogic/ul4@1.16.1/dist/esm/ul4.js";function _typeof(e){return(_typeof="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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var n,r=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,n){var r=_superPropBase(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function set(e,t,n,r){return(set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,n,r){var o,l=_superPropBase(e,t);if(l){if((o=Object.getOwnPropertyDescriptor(l,t)).set)return o.set.call(r,n),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(r,t)){if(!o.writable)return!1;o.value=n,Object.defineProperty(r,t,o)}else!function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(r,t,n);return!0})(e,t,n,r)}function _set(e,t,n,r,o){if(!set(e,t,n,r||e)&&o)throw new Error("failed to set property");return n}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,l=[],a=!0,i=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(i)throw o}}return l}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,F=function(){};return{s:F,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}var t="1.40.0";function element(t){for(var n=document.createElement(t),r=arguments.length,o=new Array(r>1?r-1:0),l=1;l<r;l++)o[l-1]=arguments[l];for(var a=0,i=o;a<i.length;a++){var u=i[a];"string"==typeof u&&n.appendChild(document.createTextNode(u));var s=u instanceof Map,p=e._isobject(u);if(s||p){p&&(u=Object.entries(u));var c,_=_createForOfIteratorHelper(u);try{for(_.s();!(c=_.n()).done;){var h=_slicedToArray(c.value,2),y=h[0],d=h[1];null!==d&&n.setAttribute(y,d)}}catch(e){_.e(e)}finally{_.f()}}}return n}function _append_param_to_url(t,n,r){if(e._islist(r)||e._isset(r)){var o,l=_createForOfIteratorHelper(r);try{for(l.s();!(o=l.n()).done;){_append_param_to_url(t,n,o.value)}}catch(e){l.e(e)}finally{l.f()}}else"string"==typeof r?t.append(n,r):null!==r&&t.append(n,e._str(r))}function url_with_params(t){for(var n=new URLSearchParams,r=arguments.length,o=new Array(r>1?r-1:0),l=1;l<r;l++)o[l-1]=arguments[l];for(var a=0,i=o;a<i.length;a++){var u=i[a];if(e._islist(u)&&2==u.length)_append_param_to_url.apply(void 0,[n].concat(_toConsumableArray(u)));else if("[object Object]"!==Object.prototype.toString.call(u)||u instanceof e.Proto){if(null!==u&&"object"===_typeof(u)&&"object"===_typeof(u.__proto__)&&u.__proto__===Map.prototype){var s,p=_createForOfIteratorHelper(u);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];_append_param_to_url(n,_,h)}}catch(e){p.e(e)}finally{p.f()}}}else for(var y in u)_append_param_to_url(n,y,u[y])}return(n=n.toString().replace("+","%20")).length>0&&(t+="?"+n),t}var n=function(t){_inherits(Base,e.Proto);var n=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=n.call(this)).id=e,t}return _createClass(Base,[{key:"ul4onid",get:function get(){return this.id}},{key:"ul4ondump",value:function ul4ondump(e){for(var t=0;t<this._ul4onattrs.length;++t)e.dump(this._dumpUL4ONAttr(this._ul4onattrs[t]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return this[e]}},{key:"ul4onload",value:function ul4onload(e){for(var t=0,n=e.loadcontent();;++t){var r=n.next();if(r.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],r.value)}for(;t<this._ul4onattrs.length;++t)this._setDefaultUL4ONAttr(this._ul4onattrs[t])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){this[e]=null}},{key:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var n=value.bind(this);return n._ul4_name=value._ul4_name||value.name,n._ul4_signature=value._ul4_signature,n._ul4_needsobject=value._ul4_needsobject,n._ul4_needscontext=value._ul4_needscontext,n}return value}if(t.startsWith("x_"))return this.hasOwnProperty(t)?this[t]:null;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,n){if(!t.startsWith("x_"))throw new e.AttributeError(this,t);this[t]=n}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),r=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}(),o=new(function(t){_inherits(GlobalsType,e.Type);var n=_createSuper(GlobalsType);function GlobalsType(){return _classCallCheck(this,GlobalsType),n.apply(this,arguments)}return _createClass(GlobalsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof l}}]),GlobalsType}())("la","Globals","Global information"),l=function(t){_inherits(Globals,n);var l=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=l.call(this,e)).version=null,t.hostname=null,t.free=!1,t.platform=null,t.user=null,t.lang=null,t.sys_lang=null,t.datasources=null,t.app=null,t.record=null,t.mode=null,t.groups=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.form=null,t.view_template_id=null,t.email_template_id=null,t.view_id=null,t.externaldatasources=null,t.template_params=null,t.template_library_version=0,t.template_libraries=null,t.handler=new r,t._log_stack=[],t._current_geo=null,t._next_attachment_id=0,t}return _createClass(Globals,[{key:e.symbols.type,value:function value(){return o}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"template_library_version"===e?this.template_library_version=null!==this.app?this.app.template_library_version:0:_get(_getPrototypeOf(Globals.prototype),"_setDefaultUL4ONAttr",this).call(this,e)}},{key:"dist",value:function dist(e,t){var n=function sqsin(e){return(e=Math.sin(e))*e},r=function sqsos(e){return(e=Math.cos(e))*e},o=Math.PI/180,l=1/298.257223563,a=e.lat*o,i=e.long*o,u=t.lat*o,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*o)/2,_=n(p)*r(c)+r(s)*n(c),h=r(p)*r(c)+n(s)*n(c),y=Math.atan(Math.sqrt(_/h)),d=2*y*6378.137;if(0===d)return d;var f=Math.sqrt(_*h)/y,v=(3*f+1)/(2*_);return d*(1+l*((3*f-1)/(2*h))*n(s)*r(p)-l*v*r(s)*n(p))}},{key:"scaled_url",value:function scaled_url(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"sm",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,p=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,c=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],_=null;e instanceof ar&&(e=e.archive_url,(_=encodeURIComponent(e.filename))!=e.filename&&(_=null));var h="https://"+this.hostname;return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==r&&(h+="/rt:"+r),null!=t&&(h+="/w:"+t),null!=n&&(h+="/h:"+n),o&&(h+="/el:1"),null!=l&&(h+="/g:"+l),null!=a&&(h+="/q:"+a),null!==i&&i%360!=0&&(h+="/rot:"+rotatet),null!=u&&(h+="/bl:"+u),null!=s&&(h+="/sh:"+s),null!=p&&(h+="/f:"+p),null!=_&&(h+="/fn:"+_),h+="/plain/"+encodeURIComponent(e)}},{key:"qrcode_url",value:function qrcode_url(e,t){return"https://"+this.hostname+"/qr/generate?data="+encodeURIComponent(e)+"&size="+encodeURIComponent(t)}},{key:e.symbols.repr,value:function value(){return"<Globals version="+e._repr(this.version)+" mode="+e._repr(this.mode)+">"}},{key:"current_geo",value:function current_geo(){return this._current_geo}},{key:"set_current_geo",value:function set_current_geo(e){this._current_geo=new ur(this,e.coords.latitude,e.coords.longitude)}},{key:"_in_form",value:function _in_form(){return null!==this.mode&&this.mode.startsWith("form/")}},{key:"msg_bool",value:function msg_bool(e){switch(e){case!0:return this.msg_bool_true();case!1:return this.msg_bool_false();default:return null}}},{key:"msg_bool_true",value:function msg_bool_true(e){switch(this.lang){case"de":return"Ja";default:return"Yes"}}},{key:"msg_bool_false",value:function msg_bool_false(e){switch(this.lang){case"de":return"Nein";default:return"No"}}},{key:"msg_no_fields",value:function msg_no_fields(){switch(this.lang){case"de":return"(Keine Felder gefunden)";default:return"(No fields found)"}}},{key:"msg_nothing_selected",value:function msg_nothing_selected(){switch(this.lang){case"de":return"(Nichts ausgewählt)";default:return"(Nothing selected)"}}},{key:"_make_log_message",value:function _make_log_message(t){return t.map((function(t){return"string"!=typeof t?e._repr(t):t})).join(" ")}},{key:"begin_logging",value:function begin_logging(e){this._log_stack.push({header:e,output:!1})}},{key:"end_logging",value:function end_logging(){this._log_stack&&(this._log_stack[this._log_stack.length-1].output&&console&&console.groupEnd&&console.groupEnd(),this._log_stack.pop())}},{key:"group_logging",value:function group_logging(e,t){this.begin_logging(e);try{t()}finally{this.end_logging()}}},{key:"_start_log_message",value:function _start_log_message(){var e,t=_createForOfIteratorHelper(this._log_stack);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.output||(console&&console.group&&console.group(n.header),n.output=!0)}}catch(e){t.e(e)}finally{t.f()}}},{key:"log_debug",value:function log_debug(e){this._start_log_message(),console&&console.debug&&console.debug(this._make_log_message(e))}},{key:"log_info",value:function log_info(e){this._start_log_message(),console&&console.info&&console.info(this._make_log_message(e))}},{key:"log_warning",value:function log_warning(e){this._start_log_message(),console&&console.warn&&console.warn(this._make_log_message(e))}},{key:"log_error",value:function log_error(e){this._start_log_message(),console&&console.error&&console.error(this._make_log_message(e))}},{key:"my_apps_url",value:function my_apps_url(){return"https://"+this.hostname+"/apps.htm"}},{key:"my_tasks_url",value:function my_tasks_url(){return"https://"+this.hostname+"/xist4c/web/aufgaben_id_393_.htm"}},{key:"catalog_url",value:function catalog_url(){return"https://"+this.hostname+"/katalog/home.htm"}},{key:"chats_url",value:function chats_url(){return"https://"+this.hostname+"/chats.htm"}},{key:"profile_url",value:function profile_url(){return"https://"+this.hostname+"/profil/index.htm"}},{key:"account_url",value:function account_url(){return"https://"+this.hostname+"/account.htm"}},{key:"logout_url",value:function logout_url(){return"https://"+this.hostname+"/login.htm?logout=standardCug"}}]),Globals}();l.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","lang","sys_lang","datasources","hostname","free","app","record","mode","form","view_template_id","email_template_id","view_id","externaldatasources","template_params","template_library_version","template_libraries"],l.prototype._ul4attrs=new Set(["id","version","hostname","platform","free","mode","form","app","record","datasources","externaldatasources","groups","user","lang","sys_lang","templates","pparams","geo","dist","maxdbactions","maxtemplateruntime","flashmessages","template_library_version","template_libraries","scaled_url","qrcode_url","current_geo","log_debug","log_info","log_warning","log_error","my_apps_url","my_tasks_url","catalog_url","chats_url","profile_url","account_url","logout_url"]),e.expose(l.prototype.log_debug,["message","*"]),e.expose(l.prototype.log_info,["message","*"]),e.expose(l.prototype.log_warning,["message","*"]),e.expose(l.prototype.log_error,["message","*"]),e.expose(l.prototype.dist,["geo1","pk","geo2","pk"]),e.expose(l.prototype.current_geo,[]),e.expose(l.prototype.scaled_url,["image","p","width","p","height","p","type","k=","fill","enlarge","k=",!0,"gravity","k=","sm","quality","k=",null,"rotate","k=",null,"blur","k=",null,"sharpen","k=",null,"format","k=",null,"cache","k=",!0]);var a=new(function(t){_inherits(FlashMessageType,e.Type);var n=_createSuper(FlashMessageType);function FlashMessageType(){return _classCallCheck(this,FlashMessageType),n.apply(this,arguments)}return _createClass(FlashMessageType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof i}}]),FlashMessageType}())("la","FlashMessage","A flash message in a web page"),i=function(t){_inherits(FlashMessage,n);var r=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),r.apply(this,arguments)}return _createClass(FlashMessage,[{key:e.symbols.type,value:function value(){return a}},{key:e.symbols.repr,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();i.prototype._ul4onattrs=["timestamp","type","title","message"],i.prototype._ul4attrs=new Set(["timestamp","type","title","message"]);var u=new(function(t){_inherits(PermissionType,e.Type);var n=_createSuper(PermissionType);function PermissionType(){return _classCallCheck(this,PermissionType),n.apply(this,arguments)}return _createClass(PermissionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof s}}]),PermissionType}())("la","Permission","Permission information"),s=function(t){_inherits(Permission,n);var r=_createSuper(Permission);function Permission(){return _classCallCheck(this,Permission),r.apply(this,arguments)}return _createClass(Permission,[{key:e.symbols.type,value:function value(){return u}},{key:e.symbols.repr,value:function value(){return"<Permission id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"edit",get:function get(){return"1"==this.permissions.charAt(0)}},{key:"config",get:function get(){return"1"==this.permissions.charAt(1)}},{key:"delete",get:function get(){return"1"==this.permissions.charAt(2)}},{key:"task_manage",get:function get(){return"1"==this.permissions.charAt(3)}},{key:"data_edit",get:function get(){return"1"==this.permissions.charAt(4)}},{key:"data_view",get:function get(){return"1"==this.permissions.charAt(5)}},{key:"task_view",get:function get(){return"1"==this.permissions.charAt(6)}},{key:"frontend",get:function get(){return"1"==this.permissions.charAt(7)}},{key:"data_connect_external",get:function get(){return"1"==this.permissions.charAt(8)}},{key:"perform_evaluation",get:function get(){return"1"==this.permissions.charAt(9)}},{key:"to_catalog",get:function get(){return"1"==this.permissions.charAt(10)}},{key:"data_import_export",get:function get(){return"1"==this.permissions.charAt(11)}},{key:"mydata_view",get:function get(){return"1"==this.permissions.charAt(12)}},{key:"mydata_edit",get:function get(){return"1"==this.permissions.charAt(13)}},{key:"user_admin",get:function get(){return"1"==this.permissions.charAt(14)}}]),Permission}();s.prototype._ul4onattrs=["permissions"],s.prototype._ul4attrs=new Set(["permissions","edit","config","delete","task_manage","data_edit","data_view","task_view","frontend","data_connect_external","perform_evaluation","to_catalog","data_import_export","mydata_view","mydata_edit","user_admin"]);var p=new(function(t){_inherits(TemplateLibraryType,e.Type);var n=_createSuper(TemplateLibraryType);function TemplateLibraryType(){return _classCallCheck(this,TemplateLibraryType),n.apply(this,arguments)}return _createClass(TemplateLibraryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof c}}]),TemplateLibraryType}())("la","TemplateLibrary","A version of the template library"),c=function(t){_inherits(TemplateLibrary,n);var r=_createSuper(TemplateLibrary);function TemplateLibrary(e){var t;return _classCallCheck(this,TemplateLibrary),(t=r.call(this,e)).version=null,t.label=null,t.description=null,t.templates=null,t.parameters=null,t}return _createClass(TemplateLibrary,[{key:e.symbols.type,value:function value(){return p}},{key:e.symbols.repr,value:function value(){return"<TemplateLibrary version="+e._repr(this.version)+" label="+e._repr(this.label)+">"}}]),TemplateLibrary}();c.prototype._ul4onattrs=["version","label","description","templates","parameters"],c.prototype._ul4attrs=new Set(["id","version","label","description","templates","parameters"]);var _=function(e){_inherits(WithAttachments,n);var t=_createSuper(WithAttachments);function WithAttachments(){return _classCallCheck(this,WithAttachments),t.apply(this,arguments)}return _createClass(WithAttachments,[{key:"_add_attachment",value:function _add_attachment(e,t,n,r,o){null===this.attachments&&(this.attachments=new Map);var l=new e(null,this,t,n,r,o);return this.attachments["attachment_".concat(this.globals._next_attachment_id+=1)]=l,l}},{key:"add_note_attachment",value:function add_note_attachment(e,t,n,r){return this._add_attachment(hr,e,t,n,r)}},{key:"add_url_attachment",value:function add_url_attachment(e,t,n,r){return this._add_attachment(dr,e,t,n,r)}},{key:"add_json_attachment",value:function add_json_attachment(e,t,n,r){return this._add_attachment(mr,e,t,n,r)}},{key:"add_file_attachment",value:function add_file_attachment(e,t,n,r){return this._add_attachment(fileAttachment,e,t,n,r)}}]),WithAttachments}(),h=new(function(t){_inherits(TranslationsType,e.Type);var n=_createSuper(TranslationsType);function TranslationsType(){return _classCallCheck(this,TranslationsType),n.apply(this,arguments)}return _createClass(TranslationsType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof d}}]),TranslationsType}())("la","Translations","The translations of the multilingual attributes of a LivingAPI object (one attribute per language)"),y=new Set(["de","en","fr","it","es","cs"]),d=function(t){_inherits(Translations,e.Proto);var n=_createSuper(Translations);function Translations(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return _classCallCheck(this,Translations),(t=n.call(this)).owner=e,t.langs=r,t}return _createClass(Translations,[{key:e.symbols.type,value:function value(){return h}},{key:"get",value:function get(e){if(void 0===e){var t=this.owner.globals;if(null==t)return null;e=t.lang}if(null===this.langs||null===e)return null;var n=this.langs.get(e);return void 0!==n?n:null}},{key:"get_or_add",value:function get_or_add(e){if(!y.has(e))return null;null===this.langs&&(this.langs=new Map);var t=this.langs.get(e);return void 0===t&&(t=this.owner._create_translation(e),this.langs.set(e,t)),t}},{key:"de",get:function get(){return this.get_or_add("de")}},{key:"en",get:function get(){return this.get_or_add("en")}},{key:"fr",get:function get(){return this.get_or_add("fr")}},{key:"it",get:function get(){return this.get_or_add("it")}},{key:"es",get:function get(){return this.get_or_add("es")}},{key:"cs",get:function get(){return this.get_or_add("cs")}},{key:e.symbols.getattr,value:function value(t){var n=this.get_or_add(t);if(null!==n)return n;throw new e.AttributeError(this,t)}},{key:e.symbols.repr,value:function value(){return"<Translations owner="+e._repr(this.owner)+" langs="+e._repr(null!==this.langs?_toConsumableArray(this.langs.keys()):null)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Translations}(),f=function(t){_inherits(LangBase,n);var r=_createSuper(LangBase);function LangBase(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return _classCallCheck(this,LangBase),(t=r.call(this,e)).lang=n,t}return _createClass(LangBase,[{key:e.symbols.setattr,value:function value(t,n){if(this._settableattrs.has(t)){if(null!==n&&"string"!=typeof n)throw new e.ArgumentError(t+" must be None or a string");this[t]=n}else _get(_getPrototypeOf(LangBase.prototype),e.symbols.setattr,this).call(this,t,n)}}]),LangBase}();f.prototype._ul4attrs=new Set(["id","lang"]),f.prototype._settableattrs=new Set;var v=new(function(t){_inherits(AppLangType,e.Type);var n=_createSuper(AppLangType);function AppLangType(){return _classCallCheck(this,AppLangType),n.apply(this,arguments)}return _createClass(AppLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof k}}]),AppLangType}())("la","AppLang","The translations of the multilingual attributes of an app for one language"),k=function(t){_inherits(AppLang,f);var n=_createSuper(AppLang);function AppLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,AppLang),(t=n.call(this,e,o)).app=r,t.name=null,t.description=null,t.typename_grammatical_gender=null,t.typenames=new Map,t}return _createClass(AppLang,[{key:e.symbols.type,value:function value(){return v}},{key:e.symbols.setattr,value:function value(t,n){if("typenames"===t){if(e._isobject(n))n=new Map(Object.entries(n));else if(null!==n&&!(n instanceof Map))throw new e.ArgumentError(t+" must be None or a dict");this.typenames=n}else _get(_getPrototypeOf(AppLang.prototype),e.symbols.setattr,this).call(this,t,n)}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"typenames"===e?this.typenames=new Map:_get(_getPrototypeOf(AppLang.prototype),"_setDefaultUL4ONAttr",this).call(this,e)}},{key:e.symbols.repr,value:function value(){return"<AppLang lang="+e._repr(this.lang)+" name="+e._repr(this.name)+">"}}]),AppLang}();k.prototype._ul4onattrs=["app","lang","name","description","typename_grammatical_gender","typenames"],k.prototype._ul4attrs=new Set(["id","app","lang","name","description","typename_grammatical_gender","typenames"]),k.prototype._settableattrs=new Set(["name","description","typename_grammatical_gender","typenames"]);var m=new(function(t){_inherits(AppGroupLangType,e.Type);var n=_createSuper(AppGroupLangType);function AppGroupLangType(){return _classCallCheck(this,AppGroupLangType),n.apply(this,arguments)}return _createClass(AppGroupLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof g}}]),AppGroupLangType}())("la","AppGroupLang","The translations of the multilingual attributes of an app group for one language"),g=function(t){_inherits(AppGroupLang,f);var n=_createSuper(AppGroupLang);function AppGroupLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,AppGroupLang),(t=n.call(this,e,o)).appgroup=r,t.name=null,t.description=null,t}return _createClass(AppGroupLang,[{key:e.symbols.type,value:function value(){return m}},{key:e.symbols.repr,value:function value(){return"<AppGroupLang lang="+e._repr(this.lang)+" name="+e._repr(this.name)+">"}}]),AppGroupLang}();g.prototype._ul4onattrs=["appgroup","lang","name","description"],g.prototype._ul4attrs=new Set(["id","appgroup","lang","name","description"]),g.prototype._settableattrs=new Set(["name","description"]);var C=new(function(t){_inherits(ControlLangType,e.Type);var n=_createSuper(ControlLangType);function ControlLangType(){return _classCallCheck(this,ControlLangType),n.apply(this,arguments)}return _createClass(ControlLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof b}}]),ControlLangType}())("la","ControlLang","The translations of the multilingual attributes of a control for one language"),b=function(t){_inherits(ControlLang,f);var n=_createSuper(ControlLang);function ControlLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,ControlLang),(t=n.call(this,e,o)).control=r,t.label=null,t.description=null,t}return _createClass(ControlLang,[{key:e.symbols.type,value:function value(){return C}},{key:e.symbols.repr,value:function value(){return"<ControlLang lang="+e._repr(this.lang)+" label="+e._repr(this.label)+">"}}]),ControlLang}();b.prototype._ul4onattrs=["control","lang","label","description"],b.prototype._ul4attrs=new Set(["id","control","lang","label","description"]),b.prototype._settableattrs=new Set(["label","description"]);var T=new(function(t){_inherits(LookupItemLangType,e.Type);var n=_createSuper(LookupItemLangType);function LookupItemLangType(){return _classCallCheck(this,LookupItemLangType),n.apply(this,arguments)}return _createClass(LookupItemLangType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof L}}]),LookupItemLangType}())("la","LookupItemLang","The translations of the multilingual attributes of a lookup item for one language"),L=function(t){_inherits(LookupItemLang,f);var n=_createSuper(LookupItemLang);function LookupItemLang(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return _classCallCheck(this,LookupItemLang),(t=n.call(this,e,o)).lookup_item=r,t.label=null,t}return _createClass(LookupItemLang,[{key:e.symbols.type,value:function value(){return T}},{key:e.symbols.repr,value:function value(){return"<LookupItemLang lang="+e._repr(this.lang)+" label="+e._repr(this.label)+">"}}]),LookupItemLang}();L.prototype._ul4onattrs=["lookup_item","lang","label"],L.prototype._ul4attrs=new Set(["id","lookup_item","lang","label"]),L.prototype._settableattrs=new Set(["label"]);var A=function(t){_inherits(AppType,e.Type);var n=_createSuper(AppType);function AppType(){return _classCallCheck(this,AppType),n.apply(this,arguments)}return _createClass(AppType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof S}}]),AppType}(),w=new A("la","App","A LivingApps application"),S=function(t){_inherits(App,_);var n=_createSuper(App);function App(e){var t;return _classCallCheck(this,App),(t=n.call(this,e))._template_library_version=0,t}return _createClass(App,[{key:e.symbols.type,value:function value(){return w}},{key:e.symbols.repr,value:function value(){return"<App id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"template_library_version",get:function get(){return this._template_library_version}},{key:"template_library_version",set:function set(t){if("number"!=typeof t||!Number.isInteger(t))throw new e.TypeError("template_library_version must be an int");if(null!==this.globals&&void 0!==this.globals&&null!==this.globals.template_libraries&&!this.globals.template_libraries.has(t))throw new e.ValueError("Template library version "+e._repr(t)+" not found!");this._template_library_version=t}},{key:e.symbols.setattr,value:function value(t,n){"template_library_version"===t?this.template_library_version=n:_get(_getPrototypeOf(App.prototype),e.symbols.setattr,this).call(this,t,n)}},{key:"group",get:function get(){return this.appgroup}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new d(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new k(null,this,e)}},{key:"name",get:function get(){var e=this.translations.get();return null!==e&&null!==e.name?e.name:this._name}},{key:"name",set:function set(e){this._name=e}},{key:"description",get:function get(){var e=this.translations.get();return null!==e&&null!==e.description?e.description:this._description}},{key:"description",set:function set(e){this._description=e}},{key:"typename_grammatical_gender",get:function get(){var e=this.translations.get();return null!==e&&null!==e.typename_grammatical_gender?e.typename_grammatical_gender:this._typename_grammatical_gender}},{key:"typename_grammatical_gender",set:function set(e){this._typename_grammatical_gender=e}},{key:"typename_nominative_singular",get:function get(){return this.typename("nom_sin")}},{key:"typename_nominative_singular",set:function set(e){this._typename_nominative_singular=e}},{key:"typename_genitive_singular",get:function get(){return this.typename("gen_sin")}},{key:"typename_genitive_singular",set:function set(e){this._typename_genitive_singular=e}},{key:"typename_dative_singular",get:function get(){return this.typename("dat_sin")}},{key:"typename_dative_singular",set:function set(e){this._typename_dative_singular=e}},{key:"typename_accusative_singular",get:function get(){return this.typename("acc_sin")}},{key:"typename_accusative_singular",set:function set(e){this._typename_accusative_singular=e}},{key:"typename_nominative_plural",get:function get(){return this.typename("nom_plu")}},{key:"typename_nominative_plural",set:function set(e){this._typename_nominative_plural=e}},{key:"typename_genitive_plural",get:function get(){return this.typename("gen_plu")}},{key:"typename_genitive_plural",set:function set(e){this._typename_genitive_plural=e}},{key:"typename_dative_plural",get:function get(){return this.typename("dat_plu")}},{key:"typename_dative_plural",set:function set(e){this._typename_dative_plural=e}},{key:"typename_accusative_plural",get:function get(){return this.typename("acc_plu")}},{key:"typename_accusative_plural",set:function set(e){this._typename_accusative_plural=e}},{key:"typename",value:function typename(t){if(null===t)return null;if("string"!=typeof t)throw new e.TypeError("form must be None or a string");var typename=this._translation_typename(this.translations.get(),t);return null===typename&&(typename=this._translation_typename(this.translations.get(this.lang),t)),null===typename&&(typename=this._legacy_typename(t)),typename}},{key:"_translation_typename",value:function _translation_typename(e,t){if(null===e||null===e.typenames)return null;var n=e.typenames.get(t);return void 0!==n?n:null}},{key:"_legacy_typename",value:function _legacy_typename(e){var t=App._legacy_typename_attrs.get(e);return void 0!==t?this[t]:null}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:"template_library_version"===e?this._template_library_version=0:this[e]=null}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this[e.symbols.call](t);return this.globals.handler.save(this),n}},{key:"template_url",value:function template_url(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r="https://"+this.globals.hostname+"/gateway/apps/"+this.id;return null!==t&&(r+="/"+t.id),url_with_params(r,["template",e],n)}},{key:"new_embedded_url",value:function new_embedded_url(e){return url_with_params("https://"+this.globals.hostname+"/dateneingabe/"+this.id+"/new",e)}},{key:"new_standalone_url",value:function new_standalone_url(e){return url_with_params("https://"+this.globals.hostname+"/gateway/apps/"+this.id+"/new",e)}},{key:"home_url",value:function home_url(){return"https://"+this.globals.hostname+"/apps/"+this.id+".htm"}},{key:"datamanagement_url",value:function datamanagement_url(){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id}},{key:"import_url",value:function import_url(){return"https://"+this.globals.hostname+"/import-export/"+this.id+".htm"}},{key:"tasks_url",value:function tasks_url(){return"https://"+this.globals.hostname+"/_id_1073_.htm?uuid="+this.id+"&dId="+this.id+"&p_tpl_uuid="+this.id+"&resetInfo=true&templateIdentifier=created_task_"+this.id}},{key:"datamanagement_config_url",value:function datamanagement_config_url(){return"https://"+this.globals.hostname+"/datenmanagement-konfigurieren/"+this.id+".htm"}},{key:"permissions_url",value:function permissions_url(){return"https://"+this.globals.hostname+"/_id_833_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true"}},{key:"datamanageview_url",value:function datamanageview_url(e){return"https://"+this.globals.hostname+"/_id_36_.htm?uuid="+this.id+"&dId="+this.id+"&resetInfo=true&templateIdentifier=created_"+this.id+"_datamanage_master_"+e}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:e.symbols.call,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new U(null,this);if(e._ismap(t)){var r,o=_createForOfIteratorHelper(t.keys());try{for(o.s();!(r=o.n()).done;){var l=r.value;if(!n.fields.has(l))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(l))}}catch(e){o.e(e)}finally{o.f()}n._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!n.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));n._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return n}},{key:e.symbols.getattr,value:function value(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e.AttributeError(this,t);return this.controls.get(t.substr(2))}if(t.startsWith("lc_")){if(null===this.layout_controls||!this.layout_controls.has(t.substr(3)))throw new e.AttributeError(this,t);return this.layout_controls.get(t.substr(3))}if(t.startsWith("p_")){var n=t.substr(2);if(null!==this.params&&this.params.has(n))return this.params.get(n);if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(n))return this.appgroup.params.get(n);throw new e.AttributeError(this,t)}if(t.startsWith("pv_")){var r=t.substr(3);if(null!==this.params&&this.params.has(r))return this.params.get(r).value;if(null!==this.appgroup&&null!==this.appgroup.params&&this.appgroup.params.has(r))return this.appgroup.params.get(r).value;throw new e.AttributeError(this,t)}return _get(_getPrototypeOf(App.prototype),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof O))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}},{key:"layout_controls",get:function get(){return null===this.active_views?new Map:this.active_view.layout_controls}},{key:"permissions",get:function get(){if("string"==typeof this._permissions){var e=this._permissions;this._permissions=new s,this._permissions.permissions=e}return this._permissions}}]),App}();S._legacy_typename_attrs=new Map([["nom_sin","_typename_nominative_singular"],["gen_sin","_typename_genitive_singular"],["dat_sin","_typename_dative_singular"],["acc_sin","_typename_accusative_singular"],["nom_plu","_typename_nominative_plural"],["gen_plu","_typename_genitive_plural"],["dat_plu","_typename_dative_plural"],["acc_plu","_typename_accusative_plural"]]),S.prototype._ul4onattrs=["globals","internal_id","_name","_description","lang","appgroup","_typename_grammatical_gender","_typename_nominative_singular","_typename_genitive_singular","_typename_dative_singular","_typename_accusative_singular","_typename_nominative_plural","_typename_genitive_plural","_typename_dative_plural","_typename_accusative_plural","startlink","image","createdby","controls","records","record_start","record_count","record_total","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view","datasource","main","ai_generated","viewtemplates","filter_default","sort_default","filter_owndata","_permissions","data_actions","attachments","order","translations","template_library_version"],S.prototype._ul4attrs=new Set(["id","globals","name","description","translations","lang","appgroup","group","main","order","ai_generated","typename_grammatical_gender","typename_nominative_singular","typename_genitive_singular","typename_dative_singular","typename_accusative_singular","typename_nominative_plural","typename_genitive_plural","typename_dative_plural","typename_accusative_plural","typename","startlink","image","createdat","createdby","updatedat","updatedby","controls","layout_controls","records","record_start","record_count","record_total","installation","categories","params","views","menus","panels","datasource","datamanagement_identifier","insert","favorite","_active_view","filter_default","sort_default","filter_owndata","permissions","data_actions","attachments","template_library_version","template_url","new_embedded_url","new_standalone_url","home_url","datamanagement_url","import_url","tasks_url","datamanagement_config_url","permissions_url","datamanageview_url"]),e.expose(S.prototype[e.symbols.call],["values","**"],{needsobject:!0}),e.expose(S.prototype.insert,["values","**"],{needsobject:!0}),e.expose(S.prototype.template_url,["identifier","p","record","p=",null,"params","**"]),e.expose(S.prototype.new_embedded_url,["params","**"]),e.expose(S.prototype.new_standalone_url,["params","**"]),e.expose(S.prototype.typename,["form","pk"]);var M=new A("la","AppGroup","A group of LivingApps"),x=function(t){_inherits(AppGroup,_);var n=_createSuper(AppGroup);function AppGroup(){return _classCallCheck(this,AppGroup),n.apply(this,arguments)}return _createClass(AppGroup,[{key:e.symbols.type,value:function value(){return M}},{key:e.symbols.repr,value:function value(){return"<AppGroup id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new d(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new g(null,this,e)}},{key:"name",get:function get(){var e=this.translations.get();return null!==e&&null!==e.name?e.name:this._name}},{key:"name",set:function set(e){this._name=e}},{key:"description",get:function get(){var e=this.translations.get();return null!==e&&null!==e.description?e.description:this._description}},{key:"description",set:function set(e){this._description=e}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:this[e]=null}}]),AppGroup}();x.prototype._ul4onattrs=["globals","_name","_description","image","apps","main_app","params","attachments","translations"],x.prototype._ul4attrs=new Set(["globals","id","name","description","translations","image","apps","main_app","params","attachments"]);var I=new(function(t){_inherits(ViewType,e.Type);var n=_createSuper(ViewType);function ViewType(){return _classCallCheck(this,ViewType),n.apply(this,arguments)}return _createClass(ViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof O}}]),ViewType}())("la","View","An input form for a LivingViews application"),O=function(t){_inherits(View,n);var r=_createSuper(View);function View(){return _classCallCheck(this,View),r.apply(this,arguments)}return _createClass(View,[{key:"globals",get:function get(){return this.app.globals}},{key:e.symbols.type,value:function value(){return I}},{key:e.symbols.repr,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();O.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"],O.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang","login_required","result_page","use_geo"]);var D=new(function(t){_inherits(DataSourceType,e.Type);var n=_createSuper(DataSourceType);function DataSourceType(){return _classCallCheck(this,DataSourceType),n.apply(this,arguments)}return _createClass(DataSourceType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof H}}]),DataSourceType}())("la","DataSource","The data resulting from a data source configuration"),H=function(t){_inherits(DataSource,n);var r=_createSuper(DataSource);function DataSource(){return _classCallCheck(this,DataSource),r.apply(this,arguments)}return _createClass(DataSource,[{key:e.symbols.type,value:function value(){return D}},{key:e.symbols.repr,value:function value(){return"<DataSource id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSource}();H.prototype._ul4onattrs=["identifier","app","apps","filter","sort"],H.prototype._ul4attrs=new Set(["id","identifier","app","apps","filter","sort"]),new(function(t){_inherits(DataSourceChildrenType,e.Type);var n=_createSuper(DataSourceChildrenType);function DataSourceChildrenType(){return _classCallCheck(this,DataSourceChildrenType),n.apply(this,arguments)}return _createClass(DataSourceChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof R}}]),DataSourceChildrenType}())("la","DataSourceChildren","A master/detail specification in a data source");var R=function(t){_inherits(DataSourceChildren,n);var r=_createSuper(DataSourceChildren);function DataSourceChildren(){return _classCallCheck(this,DataSourceChildren),r.apply(this,arguments)}return _createClass(DataSourceChildren,[{key:e.symbols.type,value:function value(){return datasourcetypechildren}},{key:e.symbols.repr,value:function value(){return"<DataSourceChildren id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceChildren}();R.prototype._ul4onattrs=["datasource","identifier","control","filter","sort"],R.prototype._ul4attrs=new Set(["id","identifier","datasource","control","filter","sort"]);var P=new(function(t){_inherits(RecordChildrenType,e.Type);var n=_createSuper(RecordChildrenType);function RecordChildrenType(){return _classCallCheck(this,RecordChildrenType),n.apply(this,arguments)}return _createClass(RecordChildrenType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof N}}]),RecordChildrenType}())("la","RecordChildren","The child records of a master record"),N=function(t){_inherits(RecordChildren,n);var r=_createSuper(RecordChildren);function RecordChildren(){return _classCallCheck(this,RecordChildren),r.apply(this,arguments)}return _createClass(RecordChildren,[{key:e.symbols.type,value:function value(){return P}},{key:e.symbols.repr,value:function value(){return"<RecordChildren id="+e._repr(this.id)+">"}}]),RecordChildren}();N.prototype._ul4onattrs=["record","datasourcechildren","records","record_start","record_count","record_total"],N.prototype._ul4attrs=new Set(["id","record","datasourcechildren","records","record_start","record_count","record_total"]);var B=new(function(t){_inherits(RecordType,e.Type);var n=_createSuper(RecordType);function RecordType(){return _classCallCheck(this,RecordType),n.apply(this,arguments)}return _createClass(RecordType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof U}}]),RecordType}())("la","Record","A record of a LivingApp application"),U=function(t){_inherits(Record,_);var n=_createSuper(Record);function Record(e,t){var r;return _classCallCheck(this,Record),(r=n.call(this,e)).app=t,r.createdat=null,r.createdby=null,r.updatedat=null,r.updatedby=null,r.updatecount=0,r._sparsevalues=new Map,r._values=null,r._fields=null,r.details=new Map,r._children=null,r.attachments=null,r.errors=[],r._sparsefielderrors=null,r._sparsefieldlookupdata=null,r._is_deleted=!1,r._is_new=!0,r}return _createClass(Record,[{key:e.symbols.type,value:function value(){return B}},{key:"globals",get:function get(){return this.app.globals}},{key:"as_text",value:function as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0==e)return"...";var n,r=[],o=_createForOfIteratorHelper(t||this.app.controls);try{for(o.s();!(n=o.n()).done;){var l=_slicedToArray(n.value,2),a=l[0],i=l[1];if(null!==t||i.priority){var u=this.fields.get(a).value_as_text(e-1);null!==u&&r.push([i.label,u])}}}catch(e){o.e(e)}finally{o.f()}if(0===r.length)return this.globals.msg_no_fields();if(1===r.length)return r[0][1];for(var s=[],p=0,c=r;p<c.length;p++){var _=_slicedToArray(c[p],2),h=_[0],y=_[1];s.push(h+": "+y)}return s.join(", ")}},{key:"_make_fields",value:function _make_fields(e,t,n,r){var o,l=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(o=a.n()).done;){var i=o.value,u=i.identifier,s=null;null!==t&&(e&&!t.has(u)?s=i.default:t.has(u)&&(s=t.get(u)));var p=new i.fieldtype(i,this,s);l.set(u,p),null!==n&&n.has(u)&&(p.errors=n.get(u)),null!==r&&r.has(u)&&(p.lookupdata=r.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=l,this._sparsevalues=null,this._sparsefielderrors=null,this._sparselookupdata=null}},{key:"_in_form",value:function _in_form(){var e=this.app.globals;return e._in_form()&&this===e.record}},{key:e.symbols.repr,value:function value(){var t,n=["<Record id=",e._repr(this.id)],r=_createForOfIteratorHelper(this.fields.values());try{for(r.s();!(t=r.n()).done;){var o=t.value;o.control.priority&&!o.is_empty()&&(n.push(" v_"),n.push(o.control.identifier),n.push("="),n.push(e._repr(o.value)))}}catch(e){r.e(e)}finally{r.f()}return n.push(" state="),n.push(e._repr(this.state)),n.push(">"),n.join("")}},{key:"state",get:function get(){return this._is_deleted?"deleted":this._is_new?"new":this.is_dirty()?"dirty":"saved"}},{key:"values",get:function get(){if(null===this._values){this._values=new Map;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;this._values.set(n.control.identifier,n.value)}}catch(e){t.e(e)}finally{t.f()}}return this._values}},{key:"fields",get:function get(){return null===this._fields&&this._make_fields(!1,this._sparsevalues,this._sparsefielderrors,this._sparsefieldlookupdata),this._fields}},{key:"children",get:function get(){if(null===this._children){this._children=new Map;var e,t=_createForOfIteratorHelper(this.details.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;this._children.set(n.datasourcechildren.identifier,n.records)}}catch(e){t.e(e)}finally{t.f()}}return this._children}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.is_dirty())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.has_errors())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"delete",value:function _delete(){var e=this.app.globals.handler.delete(this);return this._is_deleted=!0,e}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._ismap(t)){var n,r=_createForOfIteratorHelper(t.entries());try{for(r.s();!(n=r.n()).done;){var o=_slicedToArray(n.value,2),l=o[0],a=o[1];if(!this.fields.has(l))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(l));fields.get(l).value=a}}catch(e){r.e(e)}finally{r.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var i in t){if(!this.fields.has(i))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(i));record.fields.get(i).value=t[i]}}this.app.globals.handler.save(this)}},{key:"template_url",value:function template_url(e,t){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id,["template",e],t)}},{key:"edit_embedded_url",value:function edit_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_standalone_url",value:function edit_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/edit",e)}},{key:"edit_url",value:function edit_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.edit_standalone_url(t):this.edit_embedded_url(t)}},{key:"display_embedded_url",value:function display_embedded_url(e){return url_with_params("https://"+this.app.globals.hostname+"/dateneingabe/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_standalone_url",value:function display_standalone_url(e){return url_with_params("https://"+this.app.globals.hostname+"/gateway/apps/"+this.app.id+"/"+this.id+"/display",e)}},{key:"display_url",value:function display_url(t){return"standalone"===this.app[e.symbols.getattr]("pv_la_default_form_variant")?this.display_standalone_url(t):this.display_embedded_url(t)}},{key:"search",value:function search(t){for(var n in t){var r=t[n];if(e._bool(r)&&!this.fields.get(n).search(r))return!1}return!0}},{key:"ul4onload",value:function ul4onload(e){_get(_getPrototypeOf(Record.prototype),"ul4onload",this).call(this,e),this._is_new=!1}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"values"===e?this._sparsevalues:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"values"===e?(this._sparsevalues=t,this._values=null,this._fields=null):this[e]=t}},{key:e.symbols.getattr,value:function value(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("d_")?this.details.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.fields.get(t.substr(2)).value:_get(_getPrototypeOf(Record.prototype),e.symbols.getattr,this).call(this,t)}},{key:e.symbols.setattr,value:function value(t,n){t.startsWith("c_")?this.children[t.substr(2)]=n:t.startsWith("v_")?this.fields.get(t.substr(2)).value=n:_get(_getPrototypeOf(Record.prototype),e.symbols.setattr,this).call(this,t,n)}}]),Record}();U.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","details","errors","_sparsefielderrors","_sparsefieldlookupdata"],U.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","fields","attachments","details","children","errors","template_url","edit_embedded_url","edit_standalone_url"]),e.expose(U.prototype.is_dirty,[]),e.expose(U.prototype.has_errors,[]),e.expose(U.prototype.delete,[]),e.expose(U.prototype.save,[]),e.expose(U.prototype.update,["values","**"],{needsobject:!0}),e.expose(U.prototype.template_url,["identifier","p","params","**"]),e.expose(U.prototype.edit_embedded_url,["params","**"]),e.expose(U.prototype.edit_standalone_url,["params","**"]);var G=function(t){_inherits(FieldType,e.Type);var n=_createSuper(FieldType);function FieldType(){return _classCallCheck(this,FieldType),n.apply(this,arguments)}return _createClass(FieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof V}}]),FieldType}(),q=new G("la","Field","Holds the value of a field of a record (and related information)"),V=function(t){_inherits(Field,n);var r=_createSuper(Field);function Field(e,t,n){var o;return _classCallCheck(this,Field),(o=r.call(this,null)).control=e,o.record=t,o._label=null,o._description=null,o._lookupdata=null,o.errors=[],o._value=null,o._in_form()||(o.value=n),o._dirty=!1,o._enabled=!0,o._writable=!0,o._visible=!0,o._required=null,o._in_text=null,o._top=null,o._left=null,o}return _createClass(Field,[{key:e.symbols.type,value:function value(){return q}},{key:"value",get:function get(){return this._in_form()?this._get_dom_value():this._value}},{key:"value",set:function set(t){var n=this._value,r={value:t,errors:[]};this._validate(r),e._ne(n,r.value)&&(null!==this.record._values&&this.record._values.set(this.control.identifier,r.value),this._value=r.value,this._dirty=!0),this.errors=r.errors,this._in_form()&&this._set_dom_value(this._value)}},{key:"value_as_text",value:function value_as_text(){return null}},{key:"_validate",value:function _validate(e){}},{key:"_set_dom_label",value:function _set_dom_label(){this._in_form()&&(this._dom_label.textContent=this.label)}},{key:"mode",get:function get(){var e;return null!==(e=this._mode)&&void 0!==e?e:this.control.mode}},{key:"mode",set:function set(e){this._mode=e}},{key:"label",get:function get(){var e;return null!==(e=this._label)&&void 0!==e?e:this.control.label}},{key:"label",set:function set(e){this._label=e,this._set_dom_label()}},{key:"description",get:function get(){var e;return null!==(e=this._description)&&void 0!==e?e:this.control.description}},{key:"description",set:function set(e){this._description=e}},{key:"globals",get:function get(){return this.control.globals}},{key:"is_empty",value:function is_empty(){return null===this._value}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"add_error",value:function add_error(e){this.errors.push(e)}},{key:"set_error",value:function set_error(e){this.errors=null!==e?[e]:[]}},{key:"top",get:function get(){var e;return null!==(e=this._top)&&void 0!==e?e:this.control.top}},{key:"top",set:function set(e){this._top=e,this._in_form()&&(this._dom_root.style.top=this.top+"px")}},{key:"left",get:function get(){var e;return null!==(e=this._left)&&void 0!==e?e:this.control.left}},{key:"left",set:function set(e){this._left=e,this._in_form()&&(this._dom_root.style.left=this.left+"px")}},{key:"width",get:function get(){return this.control.width}},{key:"height",get:function get(){return this.control.width}},{key:"search",value:function search(e){return this.control.search(this.value,e)}},{key:"msg_field_required",value:function msg_field_required(e){switch(this.globals.lang){case"de":return'"'.concat(this.label,'" wird benötigt!');default:return'"'.concat(this.label,'" is required!')}}},{key:"msg_field_wrong_type",value:function msg_field_wrong_type(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).name,"!")}},{key:"msg_bool_truerequired",value:function msg_bool_truerequired(e){return'"'.concat(this.label,'" only accepts "Yes"!')}},{key:"msg_string_tooshort",value:function msg_string_tooshort(e){return'"'.concat(this.label,'" is too short. You must use at least ').concat(this.control.minlength," characters!")}},{key:"msg_string_toolong",value:function msg_string_toolong(e){return'"'.concat(this.label,'" is too long. You may use at most ').concat(this.control.maxlength," characters!")}},{key:"msg_email_format",value:function msg_email_format(e){return'"'.concat(this.label,'" must be a valid email address!')}},{key:"msg_url_format",value:function msg_url_format(e){return'"'.concat(this.label,'" must be a valid URL!')}},{key:"msg_tel_format",value:function msg_tel_format(e){return'"'.concat(this.label,'" must be a valid phone number!')}},{key:"msg_date_format",value:function msg_date_format(e){return'"'.concat(this.label,"\" doesn't support this date format!")}},{key:"msg_number_format",value:function msg_number_format(e){return'"'.concat(this.label,"\" doesn't support this number format!")}},{key:"msg_lookup_wrongitem",value:function msg_lookup_wrongitem(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:"_in_form",value:function _in_form(){return this.record._in_form()}},{key:"_sel_root",get:function get(){return"#livingapps-form ."+this.control._cssclass_root+".llft-id-"+this.control.identifier}},{key:"_sel_label",get:function get(){return this._sel_root+" label span"}},{key:"_sel_control",get:function get(){return this._sel_root+" "+this.control._cssclass_control}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"_dom_label",get:function get(){return document.querySelector(this._sel_label)}},{key:"_dom_control",get:function get(){return document.querySelector(this._sel_control)}},{key:"_dom_controls",get:function get(){return document.querySelectorAll(this._sel_control)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.value}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.value=null!==e?e:""}},{key:"visible",get:function get(){return this._visible}},{key:"visible",set:function set(e){this._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:"required",get:function get(){var e;return null!==(e=this._required)&&void 0!==e?e:this.control.required}},{key:"required",set:function set(e){this._required=e}},{key:"in_list",get:function get(){return this.control.in_list}},{key:"in_mobile_list",get:function get(){return this.control.in_mobile_list}},{key:"in_text",get:function get(){var e;return null!==(e=this._in_text)&&void 0!==e?e:this.control.in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"enabled",get:function get(){return this._in_form()?!this._dom_root.classList.contains("llft-control-readonly"):this._enabled}},{key:"enabled",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.disabled=n}}catch(e){r.e(e)}finally{r.f()}this._dom_root.classList.toggle("llft-control-readonly",n)}this._enabled=e}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){this._writable=e}},{key:e.symbols.repr,value:function value(){var t="<"+this.constructor.name+" identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}},{key:e.symbols.setattr,value:function value(t,n){if("value"===t)this.value=n;else if("visible"===t)this.visible=e._bool(n);else if("enabled"===t)this.enabled=e._bool(n);else if("writable"===t)this.writable=e._bool(n);else if("required"===t)this.required=e._bool(n);else if("top"===t){if(null!==n&&"number"!=typeof n)throw new e.ArgumentError("top must be None or an int");this.top=n}else if("left"===t){if(null!==n&&"number"!=typeof n)throw new e.ArgumentError("left must be None or an int");this.left=n}else _get(_getPrototypeOf(Field.prototype),e.symbols.setattr,this).call(this,t,n)}}]),Field}();V.prototype._ul4onattrs=["control","record","label","value","errors","_visible","_enabled","_writable","_required"],V.prototype._ul4attrs=new Set(["control","record","label","description","value","mode","errors","visible","enabled","writable","required","in_text","top","left","width","height"]),V.prototype._inputevent="input";var E=new(function(e){_inherits(BoolFieldType,G);var t=_createSuper(BoolFieldType);function BoolFieldType(){return _classCallCheck(this,BoolFieldType),t.apply(this,arguments)}return _createClass(BoolFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof j}}]),BoolFieldType}())("la","BoolField","Holds the value of a bool field of a record (and related information)"),j=function(t){_inherits(BoolField,V);var n=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),n.apply(this,arguments)}return _createClass(BoolField,[{key:e.symbols.type,value:function value(){return E}},{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"string"==typeof e.value?0===e.value.length?(this.control.required&&e.errors.push(this.msg_bool_truerequired(e.value)),e.value=null):["false","no","0","off"].includes(e.value.toLowerCase())?e.value=!1:e.value=!0:"boolean"==typeof e.value?this.control.required&&!e.value&&e.errors.push(this.msg_bool_truerequired(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return this._dom_control.checked}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_control.checked=e}},{key:"value_as_text",value:function value_as_text(){return this.globals.msg_bool(this.value)}}]),BoolField}(),W=new(function(e){_inherits(IntFieldType,G);var t=_createSuper(IntFieldType);function IntFieldType(){return _classCallCheck(this,IntFieldType),t.apply(this,arguments)}return _createClass(IntFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof z}}]),IntFieldType}())("la","IntField","Holds the value of an int field of a record (and related information)"),z=function(t){_inherits(IntField,V);var n=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),n.apply(this,arguments)}return _createClass(IntField,[{key:e.symbols.type,value:function value(){return W}},{key:"_parse",value:function _parse(e){return/^\s*[-+]?\d+\s*$/.test(e)?parseInt(e):null}},{key:"_validate",value:function _validate(e){if(null===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value));else if("string"==typeof e.value){var t=this._parse(e.value);null!==t?e.value=t:e.errors.push(this.msg_number_format(e.value))}else"number"==typeof e.value?Math.round(e.value)!==e.value&&e.errors.push(this.msg_field_wrong_type(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(IntField.prototype),"_get_dom_value",this).call(this);if(e){var t=this._parse(e);null!==t&&(e=t)}return e}},{key:"_set_dom_value",value:function _set_dom_value(e){_get(_getPrototypeOf(IntField.prototype),"_set_dom_value",this).call(this,null!==e?e+"":"")}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null!=e?e+"":null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=n}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(IntField.prototype),"writable",e,this,!0)}}]),IntField}(),Y=new(function(e){_inherits(NumberFieldType,G);var t=_createSuper(NumberFieldType);function NumberFieldType(){return _classCallCheck(this,NumberFieldType),t.apply(this,arguments)}return _createClass(NumberFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof J}}]),NumberFieldType}())("la","NumberField","Holds the value of a number field of a record (and related information)"),J=function(t){_inherits(NumberField,V);var n=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),n.apply(this,arguments)}return _createClass(NumberField,[{key:e.symbols.type,value:function value(){return Y}},{key:"_parse",value:function _parse(e){if(null===e)return null;for(var t=e,n="",r=0,o=0,l=0;l<e.length;++l){var a=e[l];","==a?(r++,n+=a):"."==a&&(o++,n+=a)}var i=null;if(0==r)o<=1||(i="de");else if(1==r)i=1==o?".,"==n?"de":"en":"de";else{if(!(o<=1))return null;i="en"}"de"===i?t=t.replace(/\./g,"").replace(/,/g,"."):"en"===i&&(t=t.replace(/,/g,""));var u=parseFloat(t);return isNaN(u)?e:u}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if("string"==typeof t.value){var n=this._parse(t.value);null!==n?(n=this._bound_value(n),null!==this.control.precision&&(n=e._round(n,this.control.precision)),t.value=n):t.errors.push(this.msg_number_format(t.value))}else if("number"==typeof t.value){var r=this._bound_value(t.value);null!==this.control.precision&&(r=e._round(r,this.control.precision)),t.value=r}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_bound_value",value:function _bound_value(e){return null!==this.control.minimum&&e<this.control.minimum&&(e=this.control.minimum),null!==this.control.maximum&&e>this.control.maximum&&(e=this.control.maximum),e}},{key:"_get_dom_value",value:function _get_dom_value(){var t=_get(_getPrototypeOf(NumberField.prototype),"_get_dom_value",this).call(this);if(t){if("string"==typeof t){var n=this._parse(t);null!==n&&(t=n)}"number"==typeof t&&(null!==this.control.precision&&(t=e._round(t,this.control.precision)),t=this._bound_value(t))}else t=null;return t}},{key:"_set_dom_value",value:function _set_dom_value(e){"number"==typeof e?(e=this._bound_value(e),null!==this.control.precision&&(e=e.toFixed(this.control.precision))):null===e&&(e=""),e+="","de"==this.globals.lang&&null===this.control.precision&&(e=e.replace(".",",")),_get(_getPrototypeOf(NumberField.prototype),"_set_dom_value",this).call(this,e)}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:null!==this.control.precision?e.toFixed(this.control.precision):e.toString()}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=n}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(NumberField.prototype),"writable",e,this,!0)}}]),NumberField}(),K=function(e){_inherits(StringFieldType,G);var t=_createSuper(StringFieldType);function StringFieldType(){return _classCallCheck(this,StringFieldType),t.apply(this,arguments)}return _createClass(StringFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Z}}]),StringFieldType}(),$=new K("la","StringField","Holds the value of a string field of a record (and related information)"),Z=function(t){_inherits(StringField,V);var n=_createSuper(StringField);function StringField(e,t,r){var o;return _classCallCheck(this,StringField),(o=n.call(this,e,t,r))._placeholder=null,o}return _createClass(StringField,[{key:e.symbols.type,value:function value(){return $}},{key:"placeholder",get:function get(){return null!==this._placeholder?this._placeholder:this.control.placeholder}},{key:"placeholder",set:function set(e){var t;this._placeholder=e,this._in_form()&&(this._dom_control.placeholder=null!==(t=this.placeholder)&&void 0!==t?t:"")}},{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if("string"==typeof e.value){var t=this.control.minlength,n=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==n&&e.value.length>n&&e.errors.push(this.msg_string_toolong(e.value))}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}},{key:"writable",get:function get(){return this._writable}},{key:"writable",set:function set(e){if(this._in_form()){var t,n=!e,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.readOnly=n}}catch(e){r.e(e)}finally{r.f()}}_set(_getPrototypeOf(StringField.prototype),"writable",e,this,!0)}},{key:"value_as_text",value:function value_as_text(){return this.value}}]),StringField}();Z.prototype._ul4onattrs=[].concat(_toConsumableArray(V.prototype._ul4onattrs),["_placeholder"]),Z.prototype._ul4attrs=new Set([].concat(_toConsumableArray(V.prototype._ul4attrs),["placeholder"]));var Q=new(function(e){_inherits(PasswordFieldType,K);var t=_createSuper(PasswordFieldType);function PasswordFieldType(){return _classCallCheck(this,PasswordFieldType),t.apply(this,arguments)}return _createClass(PasswordFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof X}}]),PasswordFieldType}())("la","PasswordField","Holds the value of a string/password field of a record (and related information)"),X=function(t){_inherits(PasswordField,Z);var n=_createSuper(PasswordField);function PasswordField(){return _classCallCheck(this,PasswordField),n.apply(this,arguments)}return _createClass(PasswordField,[{key:e.symbols.type,value:function value(){return Q}}]),PasswordField}(),ee=new(function(e){_inherits(EmailFieldType,K);var t=_createSuper(EmailFieldType);function EmailFieldType(){return _classCallCheck(this,EmailFieldType),t.apply(this,arguments)}return _createClass(EmailFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof te}}]),EmailFieldType}())("la","EmailField","Holds the value of a string/email field of a record (and related information)"),te=function(t){_inherits(EmailField,Z);var n=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),n.apply(this,arguments)}return _createClass(EmailField,[{key:e.symbols.type,value:function value(){return ee}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e.value)||e.errors.push(this.msg_email_format(e.value))}_get(_getPrototypeOf(EmailField.prototype),"_validate",this).call(this,e)}}]),EmailField}(),ne=new(function(e){_inherits(URLFieldType,K);var t=_createSuper(URLFieldType);function URLFieldType(){return _classCallCheck(this,URLFieldType),t.apply(this,arguments)}return _createClass(URLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof re}}]),URLFieldType}())("la","URLField","Holds the value of a string/url field of a record (and related information)"),re=function(t){_inherits(URLField,Z);var n=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),n.apply(this,arguments)}return _createClass(URLField,[{key:e.symbols.type,value:function value(){return ne}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){var t=null;try{t=new URL(e.value)}catch(t){e.errors.push(this.msg_url_format(e.value))}null!==t&&"http:"!==t.protocol&&"https:"!==t.protocol&&e.errors.push(this.msg_url_format(e.value))}_get(_getPrototypeOf(URLField.prototype),"_validate",this).call(this,e)}}]),URLField}(),oe=new(function(e){_inherits(TelFieldType,K);var t=_createSuper(TelFieldType);function TelFieldType(){return _classCallCheck(this,TelFieldType),t.apply(this,arguments)}return _createClass(TelFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof le}}]),TelFieldType}())("la","TelField","Holds the value of a string/tel field of a record (and related information)"),le=function(t){_inherits(TelField,Z);var n=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),n.apply(this,arguments)}return _createClass(TelField,[{key:e.symbols.type,value:function value(){return oe}},{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^\\+?[0-9 /()-]+$/.test(e.value)||e.errors.push(this.msg_tel_format(e.value))}_get(_getPrototypeOf(TelField.prototype),"_validate",this).call(this,e)}}]),TelField}(),ae=new(function(e){_inherits(TextAreaFieldType,K);var t=_createSuper(TextAreaFieldType);function TextAreaFieldType(){return _classCallCheck(this,TextAreaFieldType),t.apply(this,arguments)}return _createClass(TextAreaFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ie}}]),TextAreaFieldType}())("la","TextAreaField","Holds the value of a string/textarea field of a record (and related information)"),ie=function(t){_inherits(TextAreaField,Z);var n=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),n.apply(this,arguments)}return _createClass(TextAreaField,[{key:e.symbols.type,value:function value(){return ae}}]),TextAreaField}(),ue=new(function(e){_inherits(HTMLFieldType,K);var t=_createSuper(HTMLFieldType);function HTMLFieldType(){return _classCallCheck(this,HTMLFieldType),t.apply(this,arguments)}return _createClass(HTMLFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof se}}]),HTMLFieldType}())("la","HTMLField","Holds the value of a string/html field of a record (and related information)"),se=function(t){_inherits(HTMLField,Z);var n=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),n.apply(this,arguments)}return _createClass(HTMLField,[{key:e.symbols.type,value:function value(){return ue}}]),HTMLField}(),pe=new(function(e){_inherits(GeoFieldType,G);var t=_createSuper(GeoFieldType);function GeoFieldType(){return _classCallCheck(this,GeoFieldType),t.apply(this,arguments)}return _createClass(GeoFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ce}}]),GeoFieldType}())("la","GeoField","Holds the value of a geo field of a record (and related information)"),ce=function(t){_inherits(GeoField,V);var n=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),n.apply(this,arguments)}return _createClass(GeoField,[{key:e.symbols.type,value:function value(){return pe}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.id.endsWith("_geoinfo")){var r=n.value;if(r)return r=JSON.parse(r),new ur(this.globals,r.geometry.coordinates[0],r.geometry.coordinates[1],r.properties.formatted_address)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){if(null===t){var n,r=_createForOfIteratorHelper(this._dom_controls);try{for(r.s();!(n=r.n()).done;){n.value.value=null}}catch(e){r.e(e)}finally{r.f()}}else{var o,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(o=l.n()).done;){var a=o.value;if(a.id.endsWith("_geoinfo")){var i={type:"Feature",geometry:{coordinates:[t.lat,t.long]},properties:{formatted_address:t.info}};a.value=e._asjson(i)}else a.value=t.info}}catch(e){l.e(e)}finally{l.f()}}}},{key:"value_as_text",value:function value_as_text(){var e=this.value;if(null===this.value)return null;var t=e.lat.toFixed(5)+", "+e.long.toFixed(5);return null!==e.info&&(t+=" ("+e.info+")"),t}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof ur||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();ce.prototype._inputevent="llgeo";var _e=function(e){_inherits(FileFieldType,G);var t=_createSuper(FileFieldType);function FileFieldType(){return _classCallCheck(this,FileFieldType),t.apply(this,arguments)}return _createClass(FileFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ye}}]),FileFieldType}(),he=new _e("la","FileField","Holds the value of a file field of a record (and related information)"),ye=function(t){_inherits(FileField,V);var n=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),n.apply(this,arguments)}return _createClass(FileField,[{key:e.symbols.type,value:function value(){return he}},{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof ar||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}},{key:"_get_dom_value",value:function _get_dom_value(){return null}},{key:"_set_dom_value",value:function _set_dom_value(){}}]),FileField}(),de=new(function(e){_inherits(FileSignatureFieldType,_e);var t=_createSuper(FileSignatureFieldType);function FileSignatureFieldType(){return _classCallCheck(this,FileSignatureFieldType),t.apply(this,arguments)}return _createClass(FileSignatureFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof fe}}]),FileSignatureFieldType}())("la","FileSignatureField","Holds the value of a file/signature field of a record (and related information)"),fe=function(t){_inherits(FileSignatureField,ye);var n=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),n.apply(this,arguments)}return _createClass(FileSignatureField,[{key:e.symbols.type,value:function value(){return de}},{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(),ve=function(e){_inherits(DateFieldBaseType,G);var t=_createSuper(DateFieldBaseType);function DateFieldBaseType(){return _classCallCheck(this,DateFieldBaseType),t.apply(this,arguments)}return _createClass(DateFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof me}}]),DateFieldBaseType}(),ke=new ve("la","DateFieldBase","Holds the value of a date field of a record (and related information)"),me=function(t){_inherits(DateFieldBase,V);var n=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),n.apply(this,arguments)}return _createClass(DateFieldBase,[{key:e.symbols.type,value:function value(){return ke}},{key:"value_as_text",value:function value_as_text(){var t=this.value;return null===t?null:"string"==typeof t?t:e._format(t,this.control.formatstring())}},{key:"_parse",value:function _parse(e,t){var n=null,r=null,o=null,l=0,a=0,i=0,u=null;function _int(e,t,n,r){return(e=e.substring(0,t)).length!=t?null:(e=parseInt(e,10),isNaN(e)||e<n||e>r?null:e)}for(;e;){if(!t)return null;if(t.startsWith("%Y")){if(null===(n=_int(e,4)))return null;e=e.substring(4),t=t.substring(2)}else if(t.startsWith("%y")){if(null===(n=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%m")){if(null===(r=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%d")){if(null===(o=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%H")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%I")){if(null===(l=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%M")){if(null===(a=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%S")){if(null===(i=_int(e,2)))return null;e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%p")){if(e.toLowerCase().startsWith("pm"))u=!0;else{if(!e.toLowerCase().startsWith("am"))return null;u=!1}e=e.substring(2),t=t.substring(2)}else if(t.startsWith("%%")){if(!e.startsWith("%"))return null;e=e.substring(1),t=t.substring(2)}else if(t.startsWith("%z")){if(!e.startsWith("-")&&!e.startsWith("+"))return null;if(null===_int(e=e.substring(1),2))return null;if(!(e=e.substring(2)).startsWith(":"))return null;if(null===_int(e=e.substring(1),2))return null;e=e.substring(2),t=t.substring(2)}else{if(!e.startsWith(t.substring(0,1)))return null;e=e.substring(1),t=t.substring(1)}}if(t)return null;if(null===n)return null;if(null===r||r<1||r>12)return null;if(null===o||o<1||o>31)return null;if(null===u){if(l<0||l>23)return null}else{if(l<0||l>11)return null;u&&(l+=12)}return a<0||a>59||a<0||a>59||i<0||i>60?null:new Date(n,r-1,o,l,a,i)}},{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if(t.value instanceof Date)t.value=this._convert(t.value);else if(t.value instanceof e.Date_)t.value=this._convert(t.value._date);else if("string"==typeof t.value){var n,r=null,o=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(o.s();!(n=o.n()).done;){var l=n.value;if(null!==(r=this._parse(t.value,l)))break}}catch(e){o.e(e)}finally{o.f()}null!==r?t.value=this._convert(r):t.errors.push(this.msg_date_format(t.value))}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(DateFieldBase.prototype),"_get_dom_value",this).call(this);if(!e)return null;var t,n=_createForOfIteratorHelper(this.control.formatstrings_parse());try{for(n.s();!(t=n.n()).done;){var r=t.value,o=this._parse(e,r);if(null!==o)return this._convert(o)}}catch(e){n.e(e)}finally{n.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(t){t=null!==t?e._format(t,this.control.formatstring(),this.globals.lang):"",_get(_getPrototypeOf(DateFieldBase.prototype),"_set_dom_value",this).call(this,t)}}]),DateFieldBase}(),ge=new(function(e){_inherits(DateFieldType,ve);var t=_createSuper(DateFieldType);function DateFieldType(){return _classCallCheck(this,DateFieldType),t.apply(this,arguments)}return _createClass(DateFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ce}}]),DateFieldType}())("la","DateField","Holds the value of a date/date field of a record (and related information)"),Ce=function(t){_inherits(DateField,me);var n=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),n.apply(this,arguments)}return _createClass(DateField,[{key:e.symbols.type,value:function value(){return ge}},{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}(),be=new(function(e){_inherits(DatetimeMinuteFieldType,ve);var t=_createSuper(DatetimeMinuteFieldType);function DatetimeMinuteFieldType(){return _classCallCheck(this,DatetimeMinuteFieldType),t.apply(this,arguments)}return _createClass(DatetimeMinuteFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Te}}]),DatetimeMinuteFieldType}())("la","DatetimeMinuteField","Holds the value of a date/datetimeminute field of a record (and related information)"),Te=function(t){_inherits(DatetimeMinuteField,me);var n=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),n.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:e.symbols.type,value:function value(){return be}},{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(),Le=new(function(e){_inherits(DatetimeSecondFieldType,ve);var t=_createSuper(DatetimeSecondFieldType);function DatetimeSecondFieldType(){return _classCallCheck(this,DatetimeSecondFieldType),t.apply(this,arguments)}return _createClass(DatetimeSecondFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ae}}]),DatetimeSecondFieldType}())("la","DatetimeSecondField","Holds the value of a date/datetimesecond field of a record (and related information)"),Ae=function(t){_inherits(DatetimeSecondField,me);var n=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),n.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:e.symbols.type,value:function value(){return Le}},{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(),we=function(t){_inherits(ChoiceFieldBase,V);var n=_createSuper(ChoiceFieldBase);function ChoiceFieldBase(){return _classCallCheck(this,ChoiceFieldBase),n.apply(this,arguments)}return _createClass(ChoiceFieldBase,[{key:"_make_option",value:function _make_option(e,t,n){return element("option",n,{value:t,class:t===this.control.none_key?"la-none-option":null,selected:e?"selected":null})}},{key:"_set_dom_lookupdata_select",value:function _set_dom_lookupdata_select(t){var n;null===t&&(t=this.control.lookup_data),e._isobject(t)&&(t=new Map(Object.entries(t)));var r,o=!1,l=new Set,a=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option:checked"));try{for(a.s();!(r=a.n()).done;){var i=r.value.getAttribute("value");t.has(i)?l.add(i):i===this.control.none_key&&(o=!0)}}catch(e){a.e(e)}finally{a.f()}var u=[];null!==this.control.none_key&&u.push(this._make_option(o,this.control.none_key,null!==this.control.none_label?this.control.none_label:this.globals.msg_nothing_selected()));var s,p=_createForOfIteratorHelper(t);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=c[1];u.push(this._make_option(l.has(_),_,this._make_label(h)))}}catch(e){p.e(e)}finally{p.f()}(n=this._dom_control).replaceChildren.apply(n,u)}},{key:"_set_dom_lookupdata_input",value:function _set_dom_lookupdata_input(t){null===t?t=this.control.lookupdata:e._isobject(t)&&(t=new Map(Object.entries(t)));var n,r=!1,o=new Set,l=_createForOfIteratorHelper(this._dom_controls);try{for(l.s();!(n=l.n()).done;){var a=n.value,i=a.getAttribute("value");a.checked&&(t.has(i)?o.add(i):i===this.control.none_key&&(r=!0))}}catch(e){l.e(e)}finally{l.f()}var u=this._dom_root.querySelector("input[value="+this.control.none_key+"]");null!==u&&(u.checked=r);var s,p=_createForOfIteratorHelper(this.control.lookupdata);try{for(p.s();!(s=p.n()).done;){var c=_slicedToArray(s.value,2),_=c[0],h=(c[1],this._dom_root.querySelector("input[value="+_+"]")),y=this._dom_root.querySelector("label[for="+h.id+"]");t.has(_)?(h.style.display="inline",y.style.display="inline",y.innerText=this._make_label(t.get(_))):(h.style.display="none",y.style.display="none",y.checked=!1)}}catch(e){p.e(e)}finally{p.f()}}}]),ChoiceFieldBase}(),Fe=function(e){_inherits(LookupFieldBaseType,G);var t=_createSuper(LookupFieldBaseType);function LookupFieldBaseType(){return _classCallCheck(this,LookupFieldBaseType),t.apply(this,arguments)}return _createClass(LookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Me}}]),LookupFieldBaseType}(),Se=new Fe("la","LookupFieldBase","Base type of LookupField and MultipleLookupField"),Me=function(t){_inherits(LookupFieldBase,we);var n=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),n.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:e.symbols.type,value:function value(){return Se}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:this.control.lookupdata}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof Vn?t.label:e._str(t)}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var n=this.control.lookupdata.get(t);if(void 0===n)if(this.control.autoexpandable){var r,o=_createForOfIteratorHelper(this.lookupdata.values());try{for(o.s();!(r=o.n()).done;){var l=r.value;if(t===l.label)return void(e.value=l)}}catch(e){o.e(e)}finally{o.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=n}else if(t instanceof Vn){this.control.lookupdata.get(t.key)!==t&&(e.errors.push(this.msg_lookup_wrongitem(t)),e.value=null)}else e.errors.push(this.msg_field_wrong_type(t)),e.value=null}}]),LookupFieldBase}(),xe=function(e){_inherits(LookupFieldType,Fe);var t=_createSuper(LookupFieldType);function LookupFieldType(){return _classCallCheck(this,LookupFieldType),t.apply(this,arguments)}return _createClass(LookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Oe}}]),LookupFieldType}(),Ie=new xe("la","LookupField","Holds the value of a lookup field of a record (and related information)"),Oe=function(t){_inherits(LookupField,Me);var n=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),n.apply(this,arguments)}return _createClass(LookupField,[{key:e.symbols.type,value:function value(){return Ie}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e?null:e.label}},{key:"_validate",value:function _validate(e){var t=e.value;null===t||""===t||this.control.none_key===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}(),De=new(function(e){_inherits(LookupRadioFieldType,xe);var t=_createSuper(LookupRadioFieldType);function LookupRadioFieldType(){return _classCallCheck(this,LookupRadioFieldType),t.apply(this,arguments)}return _createClass(LookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof He}}]),LookupRadioFieldType}())("la","LookupRadioField","Holds the value of a lookup/radio field of a record (and related information)"),He=function(t){_inherits(LookupRadioField,Oe);var n=_createSuper(LookupRadioField);function LookupRadioField(){return _classCallCheck(this,LookupRadioField),n.apply(this,arguments)}return _createClass(LookupRadioField,[{key:e.symbols.type,value:function value(){return De}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=_createForOfIteratorHelper(this._dom_controls);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.checked){var r=n.getAttribute("value");return this.control.lookupdata.get(r)}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:"_set_dom_value",value:function _set_dom_value(e){e instanceof Vn&&(e=e.key),null===e&&(e=this.control.none_key);var t,n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.checked=r.getAttribute("value")===e}}catch(e){n.e(e)}finally{n.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),LookupRadioField}(),Re=new(function(e){_inherits(LookupSelectFieldType,xe);var t=_createSuper(LookupSelectFieldType);function LookupSelectFieldType(){return _classCallCheck(this,LookupSelectFieldType),t.apply(this,arguments)}return _createClass(LookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pe}}]),LookupSelectFieldType}())("la","LookupSelectField","Holds the value of a lookup/select field of a record (and related information)"),Pe=function(t){_inherits(LookupSelectField,Oe);var n=_createSuper(LookupSelectField);function LookupSelectField(){return _classCallCheck(this,LookupSelectField),n.apply(this,arguments)}return _createClass(LookupSelectField,[{key:e.symbols.type,value:function value(){return Re}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(LookupSelectField.prototype),"_get_dom_value",this).call(this);return e&&(e=e===this.control.none_key?null:this.control.lookupdata.get(e)),e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(LookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.key:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),LookupSelectField}(),Ne=new(function(e){_inherits(LookupChoiceFieldType,xe);var t=_createSuper(LookupChoiceFieldType);function LookupChoiceFieldType(){return _classCallCheck(this,LookupChoiceFieldType),t.apply(this,arguments)}return _createClass(LookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Be}}]),LookupChoiceFieldType}())("la","LookupChoiceField","Holds the value of a lookup/choice field of a record (and related information)"),Be=function(t){_inherits(LookupChoiceField,Oe);var n=_createSuper(LookupChoiceField);function LookupChoiceField(){return _classCallCheck(this,LookupChoiceField),n.apply(this,arguments)}return _createClass(LookupChoiceField,[{key:e.symbols.type,value:function value(){return Ne}}]),LookupChoiceField}();Be.prototype._inputevent="llchoice";var Ue=function(e){_inherits(MultipleLookupFieldType,Fe);var t=_createSuper(MultipleLookupFieldType);function MultipleLookupFieldType(){return _classCallCheck(this,MultipleLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof qe}}]),MultipleLookupFieldType}(),Ge=new Ue("la","MultipleLookupField","Holds the value of a multiple lookup field of a record (and related information)"),qe=function(t){_inherits(MultipleLookupField,Me);var n=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),n.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:e.symbols.type,value:function value(){return Ge}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"value_as_text",value:function value_as_text(){var e=this.value;return null===e||0===e.length?null:e.map((function(e){return e.label})).join(", ")}},{key:"_validate",value:function _validate(e){var t=e.value,n="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||n&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(n){var r,o=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(r=l.n()).done;){var a={value:r.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):o.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=o}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}(),Ve=new(function(e){_inherits(MultipleLookupCheckboxFieldType,Ue);var t=_createSuper(MultipleLookupCheckboxFieldType);function MultipleLookupCheckboxFieldType(){return _classCallCheck(this,MultipleLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ee}}]),MultipleLookupCheckboxFieldType}())("la","MultipleLookupCheckboxField","Holds the value of a multiplelookup/radio field of a record (and related information)"),Ee=function(t){_inherits(MultipleLookupCheckboxField,qe);var n=_createSuper(MultipleLookupCheckboxField);function MultipleLookupCheckboxField(){return _classCallCheck(this,MultipleLookupCheckboxField),n.apply(this,arguments)}return _createClass(MultipleLookupCheckboxField,[{key:e.symbols.type,value:function value(){return Ve}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],n=_createForOfIteratorHelper(this._dom_controls);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.checked){var o=r.getAttribute("value");t.push(this.control.lookupdata.get(o))}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var n,r=new Set,o=_createForOfIteratorHelper(t.value);try{for(o.s();!(n=o.n()).done;){var l=n.value;r.add(l.key)}}catch(e){o.e(e)}finally{o.f()}var a,i=_createForOfIteratorHelper(this._dom_controls);try{for(i.s();!(a=i.n()).done;){var u=a.value;u.checked=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_input(e)}}]),MultipleLookupCheckboxField}(),je=new(function(e){_inherits(MultipleLookupSelectFieldType,Ue);var t=_createSuper(MultipleLookupSelectFieldType);function MultipleLookupSelectFieldType(){return _classCallCheck(this,MultipleLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof We}}]),MultipleLookupSelectFieldType}())("la","MultipleLookupSelectField","Holds the value of a multiplelookup/select field of a record (and related information)"),We=function(t){_inherits(MultipleLookupSelectField,qe);var n=_createSuper(MultipleLookupSelectField);function MultipleLookupSelectField(){return _classCallCheck(this,MultipleLookupSelectField),n.apply(this,arguments)}return _createClass(MultipleLookupSelectField,[{key:e.symbols.type,value:function value(){return je}},{key:"_get_dom_value",value:function _get_dom_value(){var e,t=[],n=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(n.s();!(e=n.n()).done;){var r=e.value;r.selected&&t.push(this.control.lookupdata.get(r.getAttribute("value")))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t);var n,r=new Set,o=_createForOfIteratorHelper(t.value);try{for(o.s();!(n=o.n()).done;){var l=n.value;r.add(l.key)}}catch(e){o.e(e)}finally{o.f()}var a,i=_createForOfIteratorHelper(this._dom_control.querySelectorAll("option"));try{for(i.s();!(a=i.n()).done;){var u=a.value;u.selected=r.has(u.getAttribute("value"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleLookupSelectField}(),ze=new(function(e){_inherits(MultipleLookupChoiceFieldType,Ue);var t=_createSuper(MultipleLookupChoiceFieldType);function MultipleLookupChoiceFieldType(){return _classCallCheck(this,MultipleLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ye}}]),MultipleLookupChoiceFieldType}())("la","MultipleLookupChoiceField","Holds the value of a multiplelookup/choice field of a record (and related information)"),Ye=function(t){_inherits(MultipleLookupChoiceField,qe);var n=_createSuper(MultipleLookupChoiceField);function MultipleLookupChoiceField(){return _classCallCheck(this,MultipleLookupChoiceField),n.apply(this,arguments)}return _createClass(MultipleLookupChoiceField,[{key:e.symbols.type,value:function value(){return ze}}]),MultipleLookupChoiceField}();Ye.prototype._inputevent="llchoice";var Je=function(e){_inherits(AppLookupFieldBaseType,G);var t=_createSuper(AppLookupFieldBaseType);function AppLookupFieldBaseType(){return _classCallCheck(this,AppLookupFieldBaseType),t.apply(this,arguments)}return _createClass(AppLookupFieldBaseType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof $e}}]),AppLookupFieldBaseType}(),Ke=new Je("la","AppLookupFieldBase","Base type of AppLookupField and MultipleAppLookupField"),$e=function(t){_inherits(AppLookupFieldBase,we);var n=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),n.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:e.symbols.type,value:function value(){return Ke}},{key:"lookupdata",get:function get(){return null!==this._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map}},{key:"lookupdata",set:function set(e){this._in_form()&&this._set_dom_lookupdata(e),this._lookupdata=e}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){}},{key:"_make_label",value:function _make_label(t){return"string"==typeof t?t:t instanceof U?t.as_text(this.control.lookup_controls):e._str(t)}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var n=null!==this.control.lookup_app.records?this.control.lookup_app.records.get(t):void 0;void 0===n?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=n}else t instanceof U?t.app!==this.control.lookup_app&&(e.errors.push(this.msg_applookup_wrongrecord(t)),e.value=null):(e.errors.push(this.msg_field_wrong_type(t)),e.value=null)}},{key:e.symbols.setattr,value:function value(t,n){"lookupdata"===t?this.lookupdata=n:_get(_getPrototypeOf(AppLookupFieldBase.prototype),e.symbols.setattr,this).call(this,t,n)}}]),AppLookupFieldBase}();$e.prototype._ul4attrs=new Set([].concat(_toConsumableArray(V.prototype._ul4attrs),["lookupdata"]));var Ze=function(e){_inherits(AppLookupFieldType,Je);var t=_createSuper(AppLookupFieldType);function AppLookupFieldType(){return _classCallCheck(this,AppLookupFieldType),t.apply(this,arguments)}return _createClass(AppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xe}}]),AppLookupFieldType}(),Qe=new Ze("la","AppLookupField","Holds the value of a applookup field of a record (and related information)"),Xe=function(t){_inherits(AppLookupField,$e);var n=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),n.apply(this,arguments)}return _createClass(AppLookupField,[{key:e.symbols.type,value:function value(){return Qe}},{key:"value_as_text",value:function value_as_text(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=this.value;return null===t?null:"("+this.value.as_text(e)+")"}},{key:"_validate",value:function _validate(e){this._find_record(e)}}]),AppLookupField}(),et=new(function(e){_inherits(AppLookupSelectFieldType,Ze);var t=_createSuper(AppLookupSelectFieldType);function AppLookupSelectFieldType(){return _classCallCheck(this,AppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(AppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof tt}}]),AppLookupSelectFieldType}())("la","AppLookupSelectField","Holds the value of a `applookup`/`select` field of a record (and related information)"),tt=function(t){_inherits(AppLookupSelectField,Xe);var n=_createSuper(AppLookupSelectField);function AppLookupSelectField(){return _classCallCheck(this,AppLookupSelectField),n.apply(this,arguments)}return _createClass(AppLookupSelectField,[{key:e.symbols.type,value:function value(){return et}},{key:"_get_dom_value",value:function _get_dom_value(){var e=_get(_getPrototypeOf(AppLookupSelectField.prototype),"_get_dom_value",this).call(this);return null!==this.control.lookup_app.records?void 0===(e=this.control.lookup_app.records.get(e))&&(e=null):e=null,e}},{key:"_set_dom_value",value:function _set_dom_value(e){var t={value:e,errors:[]};this._validate(t),_get(_getPrototypeOf(AppLookupSelectField.prototype),"_set_dom_value",this).call(this,null!=t.value?t.value.id:this.control.none_key)}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),AppLookupSelectField}(),nt=new(function(e){_inherits(AppLookupRadioFieldType,Ze);var t=_createSuper(AppLookupRadioFieldType);function AppLookupRadioFieldType(){return _classCallCheck(this,AppLookupRadioFieldType),t.apply(this,arguments)}return _createClass(AppLookupRadioFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof rt}}]),AppLookupRadioFieldType}())("la","AppLookupRadioField","Holds the value of a `applookup`/`radio` field of a record (and related information)"),rt=function(t){_inherits(AppLookupRadioField,Xe);var n=_createSuper(AppLookupRadioField);function AppLookupRadioField(){return _classCallCheck(this,AppLookupRadioField),n.apply(this,arguments)}return _createClass(AppLookupRadioField,[{key:e.symbols.type,value:function value(){return nt}}]),AppLookupRadioField}(),ot=new(function(e){_inherits(AppLookupChoiceFieldType,Ze);var t=_createSuper(AppLookupChoiceFieldType);function AppLookupChoiceFieldType(){return _classCallCheck(this,AppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(AppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof lt}}]),AppLookupChoiceFieldType}())("la","AppLookupChoiceField","Holds the value of a `applookup`/`choice` field of a record (and related information)"),lt=function(t){_inherits(AppLookupChoiceField,Xe);var n=_createSuper(AppLookupChoiceField);function AppLookupChoiceField(e,t,r){var o;return _classCallCheck(this,AppLookupChoiceField),(o=n.call(this,e,t,r))._search_url=null,o._search_param_name=null,o._target_param_name=null,o}return _createClass(AppLookupChoiceField,[{key:e.symbols.type,value:function value(){return ot}},{key:"search_url",get:function get(){var e;return null!==(e=this._search_url)&&void 0!==e?e:this.control.search_url}},{key:"search_url",set:function set(e){this._search_url=e}},{key:"search_param_name",get:function get(){var e;return null!==(e=this._search_param_name)&&void 0!==e?e:this.control.search_param_name}},{key:"search_param_name",set:function set(e){this._search_param_name=e}},{key:"target_param_name",get:function get(){var e;return null!==(e=this._target_param_name)&&void 0!==e?e:this.control.target_param_name}},{key:"target_param_name",set:function set(e){this._target_param_name=e}}]),AppLookupChoiceField}();lt.prototype._inputevent="llchoice",lt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(V.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var at=function(e){_inherits(MultipleAppLookupFieldType,Je);var t=_createSuper(MultipleAppLookupFieldType);function MultipleAppLookupFieldType(){return _classCallCheck(this,MultipleAppLookupFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ut}}]),MultipleAppLookupFieldType}(),it=new at("la","MultipleAppLookupField","Holds the value of a multiple applookup field of a record (and related information)"),ut=function(t){_inherits(MultipleAppLookupField,$e);var n=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),n.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:e.symbols.type,value:function value(){return it}},{key:"is_empty",value:function is_empty(){return 0===this._value.length}},{key:"_validate",value:function _validate(e){var t=e.value,n="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.none_key===t||n&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(n){var r,o=[],l=_createForOfIteratorHelper(t);try{for(l.s();!(r=l.n()).done;){var a={value:r.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):o.push(a.value)}}catch(e){l.e(e)}finally{l.f()}e.value=o}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(),st=new(function(e){_inherits(MultipleAppLookupCheckboxFieldType,at);var t=_createSuper(MultipleAppLookupCheckboxFieldType);function MultipleAppLookupCheckboxFieldType(){return _classCallCheck(this,MultipleAppLookupCheckboxFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof pt}}]),MultipleAppLookupCheckboxFieldType}())("la","MultipleAppLookupCheckboxField","Holds the value of a `multipleapplookup`/`checkbox` field of a record (and related information)"),pt=function(t){_inherits(MultipleAppLookupCheckboxField,ut);var n=_createSuper(MultipleAppLookupCheckboxField);function MultipleAppLookupCheckboxField(){return _classCallCheck(this,MultipleAppLookupCheckboxField),n.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxField,[{key:e.symbols.type,value:function value(){return st}}]),MultipleAppLookupCheckboxField}(),ct=new(function(e){_inherits(MultipleAppLookupSelectFieldType,at);var t=_createSuper(MultipleAppLookupSelectFieldType);function MultipleAppLookupSelectFieldType(){return _classCallCheck(this,MultipleAppLookupSelectFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof _t}}]),MultipleAppLookupSelectFieldType}())("la","MultipleAppLookupSelectField","Holds the value of a `multipleapplookup`/`select` field of a record (and related information)"),_t=function(t){_inherits(MultipleAppLookupSelectField,ut);var n=_createSuper(MultipleAppLookupSelectField);function MultipleAppLookupSelectField(){return _classCallCheck(this,MultipleAppLookupSelectField),n.apply(this,arguments)}return _createClass(MultipleAppLookupSelectField,[{key:e.symbols.type,value:function value(){return ct}},{key:"_set_dom_lookupdata",value:function _set_dom_lookupdata(e){this._set_dom_lookupdata_select(e)}}]),MultipleAppLookupSelectField}(),ht=new(function(e){_inherits(MultipleAppLookupChoiceFieldType,at);var t=_createSuper(MultipleAppLookupChoiceFieldType);function MultipleAppLookupChoiceFieldType(){return _classCallCheck(this,MultipleAppLookupChoiceFieldType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceFieldType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof yt}}]),MultipleAppLookupChoiceFieldType}())("la","MultipleAppLookupChoiceField","Holds the value of a `multipleapplookup`/`choice` field of a record (and related information)"),yt=function(t){_inherits(MultipleAppLookupChoiceField,ut);var n=_createSuper(MultipleAppLookupChoiceField);function MultipleAppLookupChoiceField(){return _classCallCheck(this,MultipleAppLookupChoiceField),n.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceField,[{key:e.symbols.type,value:function value(){return ht}}]),MultipleAppLookupChoiceField}();yt.prototype._inputevent="llchoice";var dt=function(t){_inherits(ControlType,e.Type);var n=_createSuper(ControlType);function ControlType(){return _classCallCheck(this,ControlType),n.apply(this,arguments)}return _createClass(ControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof vt}}]),ControlType}(),ft=new dt("la","Control","Metainformation about a field in a LivingApps application"),vt=function(t){_inherits(Control,n);var r=_createSuper(Control);function Control(e){var t;return _classCallCheck(this,Control),(t=r.call(this,e))._mode=null,t}return _createClass(Control,[{key:e.symbols.type,value:function value(){return ft}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.app.globals}},{key:"fulltype",get:function get(){return this.subtype?this.type+"/"+this.subtype:this.type}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new d(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new b(null,this,e)}},{key:"label",get:function get(){var e=this._view_control();if(null!==e){var t=e.label;if(null!==t)return t}var n=this.translations.get();return null!==n&&null!==n.label?n.label:this._label}},{key:"label",set:function set(e){this._label=e}},{key:"description",get:function get(){var e=this.translations.get();return null!==e&&null!==e.description?e.description:this._description}},{key:"description",set:function set(e){this._description=e}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:this[e]=null}},{key:"priority",get:function get(){return this._priority}},{key:"priority",set:function set(e){this._priority=e}},{key:"in_list",get:function get(){return this._priority}},{key:"in_list",set:function set(e){this._priority=e}},{key:"in_mobile_list",get:function get(){return this._in_mobile_list}},{key:"in_mobile_list",set:function set(e){this._in_mobile_list=e}},{key:"in_text",get:function get(){return this._in_text}},{key:"in_text",set:function set(e){this._in_text=e}},{key:"in_structured_search",get:function get(){return this._in_structured_search}},{key:"in_structured_search",set:function set(e){this._in_structured_search=e}},{key:"in_fulltext_search",get:function get(){return this._in_fulltext_search}},{key:"in_fulltext_search",set:function set(e){this._in_fulltext_search=e}},{key:"in_expert_search",get:function get(){return this._in_expert_search}},{key:"in_expert_search",set:function set(e){this._in_expert_search=e}},{key:"default",get:function get(){return null}},{key:"top",get:function get(){var e=this._view_control();return null!==e?e.top:null}},{key:"left",get:function get(){var e=this._view_control();return null!==e?e.left:null}},{key:"width",get:function get(){var e=this._view_control();return null!==e?e.width:null}},{key:"height",get:function get(){var e=this._view_control();return null!==e?e.height:null}},{key:"z_index",get:function get(){var e=this._view_control();return null!==e?e.z_index:null}},{key:"liveupdate",get:function get(){var e=this._view_control();return null!==e&&e.liveupdate}},{key:"tabindex",get:function get(){var e=this._view_control();return null!==e?e.tabindex:null}},{key:"required",get:function get(){var e;if(null===this.app._active_view)return null!==(e=this._required)&&void 0!==e?e:this._required_in_view;var t=this._view_control();return null!==t&&t.required}},{key:"required",set:function set(e){this._required=e}},{key:"mode",get:function get(){if(null!==this._mode)return this._mode;var e=this._view_control();return null!==this.app._active_view&&null===e?null:null===this.app.globals.mode?"display":null!==e?e.mode:"edit"}},{key:"mode",set:function set(e){this._mode=e}},{key:"labelpos",get:function get(){var e=this._view_control();return null!==e?e.labelpos:"left"}},{key:"labelwidth",get:function get(){var e=this._view_control();return null!==e?e.labelwidth:null}},{key:"autoalign",get:function get(){var e=this._view_control();return null===e||e.autoalign}},{key:"in_active_view",get:function get(){return null!==this._view_control()}},{key:"_view_control",value:function _view_control(){if(null===this.app._active_view)return null;var e=this.app._active_view.controls.get(this.identifier);return null!=e?e:null}},{key:"_logsearch",value:function _logsearch(e,t){}},{key:"search",value:function search(e,t){return!1}}]),Control}();vt.prototype.type=null,vt.prototype.subtype=null,vt.prototype._ul4onattrs=["identifier","fieldname","app","_label","_description","base_mode","in_sum","_priority","_in_mobile_list","_in_text","_in_structured_search","_in_fulltext_search","_in_expert_search","_required","_required_in_view","order","ininsertprocedure","inupdateprocedure","translations"],vt.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","base_mode","in_sum","priority","in_list","in_mobile_list","in_text","in_structured_search","in_fulltext_search","in_expert_search","order","ininsertprocedure","inupdateprocedure","fulltype","label","description","translations","top","left","width","height","z_index","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]),vt.prototype._cssclass_root="llft-control",vt.prototype._cssclass_control="input";var kt=new(function(e){_inherits(BoolControlType,dt);var t=_createSuper(BoolControlType);function BoolControlType(){return _classCallCheck(this,BoolControlType),t.apply(this,arguments)}return _createClass(BoolControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof mt}}]),BoolControlType}())("la","BoolControl","A LivingApps boolean field (type 'bool')"),mt=function(t){_inherits(BoolControl,vt);var n=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),n.apply(this,arguments)}return _createClass(BoolControl,[{key:e.symbols.type,value:function value(){return kt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}();mt.prototype.type="bool",mt.prototype.fieldtype=j;var gt=new(function(e){_inherits(IntControlType,dt);var t=_createSuper(IntControlType);function IntControlType(){return _classCallCheck(this,IntControlType),t.apply(this,arguments)}return _createClass(IntControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ct}}]),IntControlType}())("la","IntControl","A LivingApps integer field (type 'int')"),Ct=function(t){_inherits(IntControl,vt);var n=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),n.apply(this,arguments)}return _createClass(IntControl,[{key:e.symbols.type,value:function value(){return gt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}();Ct.prototype.type="int",Ct.prototype.fieldtype=z;var bt=new(function(e){_inherits(NumberControlType,dt);var t=_createSuper(NumberControlType);function NumberControlType(){return _classCallCheck(this,NumberControlType),t.apply(this,arguments)}return _createClass(NumberControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Tt}}]),NumberControlType}())("la","NumberControl","A LivingApps number field (type 'number')"),Tt=function(t){_inherits(NumberControl,vt);var n=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),n.apply(this,arguments)}return _createClass(NumberControl,[{key:e.symbols.type,value:function value(){return bt}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}();Tt.prototype.type="number",Tt.prototype.fieldtype=J,Tt.prototype._ul4onattrs=[].concat(_toConsumableArray(vt.prototype._ul4onattrs),["precision","minimum","maximum"]),Tt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(vt.prototype._ul4attrs),["precision","minimum","maximum"]));var Lt=function(e){_inherits(StringControlType,dt);var t=_createSuper(StringControlType);function StringControlType(){return _classCallCheck(this,StringControlType),t.apply(this,arguments)}return _createClass(StringControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof wt}}]),StringControlType}(),At=new Lt("la","StringControl","A LivingApps number field (type 'string')"),wt=function(t){_inherits(StringControl,vt);var n=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),n.apply(this,arguments)}return _createClass(StringControl,[{key:e.symbols.type,value:function value(){return At}},{key:"placeholder",get:function get(){var e=this._view_control();return null!==e?e.placeholder:this._placeholder}},{key:"placeholder",set:function set(e){this._placeholder=e;var t=this.app.globals;if(t._in_form()&&this.app===t.record.app){var n=t.record.fields.get(this.identifier);n._dom_control.placeholder=n.placeholder}}},{key:"_user_placeholder",value:function _user_placeholder(t,n){if(null===n)return null;switch(n){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return n}}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:this._user_placeholder(this.app.globals.user,e.default)}},{key:"minlength",get:function get(){var e=this._view_control();if(null===e)return 0;var t=e.minlength;return null===t||t<0?0:t}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return 4e3;var t=e.maxlength;return null===t||t<0||t>4e3?4e3:t}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"contains"===t.operator?null===t.value||null===e?t.value===e:e.toLowerCase().indexOf(t.value.toLowerCase())>=0:void 0}}]),StringControl}();wt.prototype.type="string",wt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(vt.prototype._ul4attrs),["minlength","maxlength","placeholder"]));var Ft=new(function(e){_inherits(TextControlType,Lt);var t=_createSuper(TextControlType);function TextControlType(){return _classCallCheck(this,TextControlType),t.apply(this,arguments)}return _createClass(TextControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof St}}]),TextControlType}())("la","TextControl","A LivingApps text field (type 'string/text')"),St=function(t){_inherits(TextControl,wt);var n=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),n.apply(this,arguments)}return _createClass(TextControl,[{key:e.symbols.type,value:function value(){return Ft}}]),TextControl}();St.prototype.subtype="text",St.prototype.fieldtype=Z;var Mt=new(function(e){_inherits(PasswordControlType,Lt);var t=_createSuper(PasswordControlType);function PasswordControlType(){return _classCallCheck(this,PasswordControlType),t.apply(this,arguments)}return _createClass(PasswordControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xt}}]),PasswordControlType}())("la","PasswordControl","A LivingApps password field (type 'string/password')"),xt=function(t){_inherits(PasswordControl,wt);var n=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),n.apply(this,arguments)}return _createClass(PasswordControl,[{key:e.symbols.type,value:function value(){return Mt}}]),PasswordControl}();xt.prototype.subtype="password",xt.prototype.fieldtype=X;var It=new(function(e){_inherits(EmailControlType,Lt);var t=_createSuper(EmailControlType);function EmailControlType(){return _classCallCheck(this,EmailControlType),t.apply(this,arguments)}return _createClass(EmailControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ot}}]),EmailControlType}())("la","EmailControl","A LivingApps email field (type 'string/email')"),Ot=function(t){_inherits(EmailControl,wt);var n=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),n.apply(this,arguments)}return _createClass(EmailControl,[{key:e.symbols.type,value:function value(){return It}}]),EmailControl}();Ot.prototype.subtype="email",Ot.prototype.fieldtype=te;var Dt=new(function(e){_inherits(URLControlType,Lt);var t=_createSuper(URLControlType);function URLControlType(){return _classCallCheck(this,URLControlType),t.apply(this,arguments)}return _createClass(URLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ht}}]),URLControlType}())("la","URLControl","A LivingApps URL field (type 'string/url')"),Ht=function(t){_inherits(URLControl,wt);var n=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),n.apply(this,arguments)}return _createClass(URLControl,[{key:e.symbols.type,value:function value(){return Dt}}]),URLControl}();Ht.prototype.subtype="url",Ht.prototype.fieldtype=re;var Rt=new(function(e){_inherits(TelControlType,Lt);var t=_createSuper(TelControlType);function TelControlType(){return _classCallCheck(this,TelControlType),t.apply(this,arguments)}return _createClass(TelControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pt}}]),TelControlType}())("la","TelControl","A LivingApps phone number field (type 'string/tel')"),Pt=function(t){_inherits(TelControl,wt);var n=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),n.apply(this,arguments)}return _createClass(TelControl,[{key:e.symbols.type,value:function value(){return Rt}}]),TelControl}();Pt.prototype.subtype="tel",Pt.prototype.fieldtype=le;var Nt=new(function(e){_inherits(TextAreaControlType,Lt);var t=_createSuper(TextAreaControlType);function TextAreaControlType(){return _classCallCheck(this,TextAreaControlType),t.apply(this,arguments)}return _createClass(TextAreaControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bt}}]),TextAreaControlType}())("la","TextAreaControl","A LivingApps textarea field (type 'string/textarea')"),Bt=function(t){_inherits(TextAreaControl,wt);var n=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),n.apply(this,arguments)}return _createClass(TextAreaControl,[{key:e.symbols.type,value:function value(){return Nt}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return null;if(null!==this.encrypted)return null;var t=e.maxlength;return t<0?null:t}}]),TextAreaControl}();Bt.prototype.subtype="textarea",Bt.prototype.fieldtype=ie,Bt.prototype._ul4onattrs=[].concat(_toConsumableArray(wt.prototype._ul4onattrs),["encrypted"]),Bt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(wt.prototype._ul4attrs),["encrypted"])),Bt.prototype._cssclass_control="textarea";var Ut=new(function(e){_inherits(HTMLControlType,Lt);var t=_createSuper(HTMLControlType);function HTMLControlType(){return _classCallCheck(this,HTMLControlType),t.apply(this,arguments)}return _createClass(HTMLControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Gt}}]),HTMLControlType}())("la","HTMLControl","A LivingApps HTML field (type 'string/html')"),Gt=function(t){_inherits(HTMLControl,wt);var n=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),n.apply(this,arguments)}return _createClass(HTMLControl,[{key:e.symbols.type,value:function value(){return Ut}}]),HTMLControl}();Gt.prototype.subtype="html",Gt.prototype.fieldtype=se;var qt=function(e){_inherits(DateControlType,dt);var t=_createSuper(DateControlType);function DateControlType(){return _classCallCheck(this,DateControlType),t.apply(this,arguments)}return _createClass(DateControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Et}}]),DateControlType}(),Vt=new qt("la","DateControl","A LivingApps date field (type 'date/date')"),Et=function(t){_inherits(DateControl,vt);var n=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),n.apply(this,arguments)}return _createClass(DateControl,[{key:e.symbols.type,value:function value(){return Vt}},{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.today():null}},{key:"formatstring",value:function formatstring(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),this._formatstrings[e]}},{key:"formatstrings_parse",value:function formatstrings_parse(e){return"de"!==(e=e||this.globals.lang)&&"fr"!==e&&"it"!==e&&(e="en"),[].concat(_toConsumableArray(this._formatstrings_parse[e]),_toConsumableArray(this._formatstrings_parse.intl))}},{key:"search",value:function search(t,n){this._logsearch(t,n);var r=n.value;return"[object Date]"==Object.prototype.toString.call(r)&&(r=e._format(r,this.formatstring(),this.app.language)),null!==t&&(t=e._format(t,this.formatstring(),this.app.language)),"equals"===n.operator?r===t:"contains"===n.operator&&(null===r||null===t?r===t:t.toLowerCase().indexOf(r.toLowerCase())>=0)}}]),DateControl}();Et.prototype.type="date",Et.prototype.subtype="date",Et.prototype.fieldtype=Ce,Et.prototype._formatstrings={de:"%d.%m.%Y",fr:"%d.%m.%Y",it:"%d.%m.%Y",en:"%m/%d/%Y",intl:"%Y-%m-%d"};var jt=[""," %H:%M","T%H:%M"," %H:%M:%S","T%H:%M:%S"," %H:%M:%S.%f","T%H:%M:%S.%f"," %H:%M%z","T%H:%M%z"," %H:%M:%S%z","T%H:%M:%S%z"," %H:%M:%S.%f%z","T%H:%M:%S.%f%z"," %H:%M %z","T%H:%M %z"," %H:%M:%S %z","T%H:%M:%S %z"," %H:%M:%S.%f %z","T%H:%M:%S.%f %z"];Et.prototype._formatstrings_parse={en:jt.map((function(e){return"%m/%d/%Y"+e})),de:jt.map((function(e){return"%d.%m.%Y"+e})),fr:jt.map((function(e){return"%d.%m.%Y"+e})),it:jt.map((function(e){return"%d.%m.%Y"+e})),intl:jt.map((function(e){return"%Y-%m-%d"+e}))};var Wt=new(function(e){_inherits(DatetimeMinuteControlType,qt);var t=_createSuper(DatetimeMinuteControlType);function DatetimeMinuteControlType(){return _classCallCheck(this,DatetimeMinuteControlType),t.apply(this,arguments)}return _createClass(DatetimeMinuteControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof zt}}]),DatetimeMinuteControlType}())("la","DatetimeMinuteControl","A LivingApps date field (type 'date/datetimeminute')"),zt=function(t){_inherits(DatetimeMinuteControl,Et);var n=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),n.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:e.symbols.type,value:function value(){return Wt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setSeconds(0),t.setMilliseconds(0),t}return null}}]),DatetimeMinuteControl}();zt.prototype.subtype="datetimeminute",zt.prototype.fieldtype=Te,zt.prototype._formatstrings={de:"%d.%m.%Y %H:%M",fr:"%d.%m.%Y %H:%M",it:"%d.%m.%Y %H:%M",en:"%m/%d/%Y %H:%M",intl:"%Y-%m-%d %H:%M"};var Yt=new(function(e){_inherits(DatetimeSecondControlType,qt);var t=_createSuper(DatetimeSecondControlType);function DatetimeSecondControlType(){return _classCallCheck(this,DatetimeSecondControlType),t.apply(this,arguments)}return _createClass(DatetimeSecondControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Jt}}]),DatetimeSecondControlType}())("la","DatetimeSecondControl","A LivingApps date field (type 'date/datetimesecond')"),Jt=function(t){_inherits(DatetimeSecondControl,Et);var n=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),n.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:e.symbols.type,value:function value(){return Yt}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setMilliseconds(0),t}return null}}]),DatetimeSecondControl}();Jt.prototype.subtype="datetimesecond",Jt.prototype.fieldtype=Ae,Jt.prototype._formatstrings={de:"%d.%m.%Y %H:%M:%S",fr:"%d.%m.%Y %H:%M:%S",it:"%d.%m.%Y %H:%M:%S",en:"%m/%d/%Y %H:%M:%S",intl:"%Y-%m-%d %H:%M:%S"};var Kt=function(e){_inherits(LookupControlType,dt);var t=_createSuper(LookupControlType);function LookupControlType(){return _classCallCheck(this,LookupControlType),t.apply(this,arguments)}return _createClass(LookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zt}}]),LookupControlType}(),$t=new Kt("la","LookupControl","A LivingApps date field (type 'lookup')"),Zt=function(t){_inherits(LookupControl,vt);var n=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),n.apply(this,arguments)}return _createClass(LookupControl,[{key:e.symbols.type,value:function value(){return $t}},{key:"default",get:function get(){var e,t=this._view_control();return null===t?null:null!==(e=this.lookupdata.get(t))&&void 0!==e?e:null}},{key:"autoexpandable",get:function get(){var e=this._view_control();return null!==e&&e.autoexpandable}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return"equals"===t.operator&&(null===e?null===t.value:e.key===t.value)}}]),LookupControl}();Zt.prototype.type="lookup",Zt.prototype.fieldtype=Oe,Zt.prototype._ul4onattrs=[].concat(_toConsumableArray(vt.prototype._ul4onattrs),["lookupdata"]),Zt.prototype._ul4attrs=new Set([].concat(_toConsumableArray(vt.prototype._ul4attrs),["lookupdata"]));var Qt=new(function(e){_inherits(LookupSelectControlType,Kt);var t=_createSuper(LookupSelectControlType);function LookupSelectControlType(){return _classCallCheck(this,LookupSelectControlType),t.apply(this,arguments)}return _createClass(LookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xt}}]),LookupSelectControlType}())("la","LookupSelectControl","A LivingApps lookup field (type 'lookup/select')"),Xt=function(t){_inherits(LookupSelectControl,Zt);var n=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),n.apply(this,arguments)}return _createClass(LookupSelectControl,[{key:e.symbols.type,value:function value(){return Qt}}]),LookupSelectControl}();Xt.prototype.subtype="select",Xt.prototype.fieldtype=Pe,Xt.prototype._cssclass_control="select";var en=new(function(e){_inherits(LookupRadioControlType,Kt);var t=_createSuper(LookupRadioControlType);function LookupRadioControlType(){return _classCallCheck(this,LookupRadioControlType),t.apply(this,arguments)}return _createClass(LookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof tn}}]),LookupRadioControlType}())("la","LookupRadioControl","A LivingApps lookup field (type 'lookup/radio')"),tn=function(t){_inherits(LookupRadioControl,Zt);var n=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),n.apply(this,arguments)}return _createClass(LookupRadioControl,[{key:e.symbols.type,value:function value(){return en}}]),LookupRadioControl}();tn.prototype.subtype="radio",tn.prototype.fieldtype=He,tn.prototype._cssclass_root="llft-element";var nn=new(function(e){_inherits(LookupChoiceControlType,Kt);var t=_createSuper(LookupChoiceControlType);function LookupChoiceControlType(){return _classCallCheck(this,LookupChoiceControlType),t.apply(this,arguments)}return _createClass(LookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof rn}}]),LookupChoiceControlType}())("la","LookupChoiceControl","A LivingApps lookup field (type 'lookup/choice')"),rn=function(t){_inherits(LookupChoiceControl,Zt);var n=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),n.apply(this,arguments)}return _createClass(LookupChoiceControl,[{key:e.symbols.type,value:function value(){return nn}}]),LookupChoiceControl}();rn.prototype.subtype="choice",rn.prototype.fieldtype=Be,rn.prototype._cssclass_control="select";var on=function(e){_inherits(AppLookupControlType,dt);var t=_createSuper(AppLookupControlType);function AppLookupControlType(){return _classCallCheck(this,AppLookupControlType),t.apply(this,arguments)}return _createClass(AppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof an}}]),AppLookupControlType}(),ln=new on("la","AppLookupControl","A LivingApps lookup field (type 'applookup')"),an=function(t){_inherits(AppLookupControl,vt);var n=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),n.apply(this,arguments)}return _createClass(AppLookupControl,[{key:e.symbols.type,value:function value(){return ln}},{key:"lookupdata",get:function get(){return null!==this.lookup_app&&null!==this.lookup_app.records?this.lookup_app.records:new Map}},{key:"none_key",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"none_label",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return null===e||null===t.value?e===t.value:e.search(t)}}]),AppLookupControl}();an.prototype.type="applookup",an.prototype.fieldtype=Xe,an.prototype._ul4onattrs=[].concat(_toConsumableArray(vt.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control","on_delete"]),an.prototype._ul4attrs=new Set([].concat(_toConsumableArray(vt.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control","on_delete"]));var un=new(function(e){_inherits(AppLookupSelectControlType,on);var t=_createSuper(AppLookupSelectControlType);function AppLookupSelectControlType(){return _classCallCheck(this,AppLookupSelectControlType),t.apply(this,arguments)}return _createClass(AppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof sn}}]),AppLookupSelectControlType}())("la","AppLookupSelectControl","A LivingApps applookup field (type 'applookup/select')"),sn=function(t){_inherits(AppLookupSelectControl,an);var n=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),n.apply(this,arguments)}return _createClass(AppLookupSelectControl,[{key:e.symbols.type,value:function value(){return un}}]),AppLookupSelectControl}();sn.prototype.subtype="select",sn.prototype.fieldtype=tt,sn.prototype._cssclass_control="select";var pn=new(function(e){_inherits(AppLookupRadioControlType,on);var t=_createSuper(AppLookupRadioControlType);function AppLookupRadioControlType(){return _classCallCheck(this,AppLookupRadioControlType),t.apply(this,arguments)}return _createClass(AppLookupRadioControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cn}}]),AppLookupRadioControlType}())("la","AppLookupRadioControl","A LivingApps applookup field (type 'applookup/radio')"),cn=function(t){_inherits(AppLookupRadioControl,an);var n=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),n.apply(this,arguments)}return _createClass(AppLookupRadioControl,[{key:e.symbols.type,value:function value(){return pn}}]),AppLookupRadioControl}();cn.prototype.subtype="radio",cn.prototype.fieldtype=rt;var _n=new(function(e){_inherits(AppLookupChoiceControlType,on);var t=_createSuper(AppLookupChoiceControlType);function AppLookupChoiceControlType(){return _classCallCheck(this,AppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(AppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof hn}}]),AppLookupChoiceControlType}())("la","AppLookupChoiceControl","A LivingApps applookup field (type 'applookup/choice')"),hn=function(t){_inherits(AppLookupChoiceControl,an);var n=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),n.apply(this,arguments)}return _createClass(AppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return _n}},{key:"search_url",get:function get(){return"field_"+this.identifier+"_search"}},{key:"search_param_name",get:function get(){return"q"}},{key:"target_param_name",get:function get(){return"target"}}]),AppLookupChoiceControl}();hn.prototype.subtype="choice",hn.prototype.fieldtype=lt,hn.prototype._cssclass_control="select",hn.prototype._ul4attrs=new Set([].concat(_toConsumableArray(an.prototype._ul4attrs),["search_url","search_param_name","target_param_name"]));var yn=function(e){_inherits(MultipleLookupControlType,Kt);var t=_createSuper(MultipleLookupControlType);function MultipleLookupControlType(){return _classCallCheck(this,MultipleLookupControlType),t.apply(this,arguments)}return _createClass(MultipleLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof fn}}]),MultipleLookupControlType}(),dn=new yn("la","MultipleLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),fn=function(t){_inherits(MultipleLookupControl,Zt);var n=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),n.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:e.symbols.type,value:function value(){return dn}},{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;var t=this.lookupdata.get(e);return void 0!==t?[t]:[]}},{key:"search",value:function search(e,t){if("equals"===t.operator){var n,r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){if(n.value.key===t.value)return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleLookupControl}();fn.prototype.type="multiplelookup",fn.prototype.fieldtype=qe;var vn=new(function(e){_inherits(MultipleLookupCheckboxControlType,yn);var t=_createSuper(MultipleLookupCheckboxControlType);function MultipleLookupCheckboxControlType(){return _classCallCheck(this,MultipleLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof kn}}]),MultipleLookupCheckboxControlType}())("la","MultipleLookupCheckboxControl","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),kn=function(t){_inherits(MultipleLookupCheckboxControl,fn);var n=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),n.apply(this,arguments)}return _createClass(MultipleLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return vn}},{key:"_sel_label",get:function get(){return this._sel_root+" label:not([for]) > span"}}]),MultipleLookupCheckboxControl}();kn.prototype.subtype="checkbox",kn.prototype.fieldtype=Ee,kn.prototype._cssclass_root="llft-element";var mn=new(function(e){_inherits(MultipleLookupSelectControlType,yn);var t=_createSuper(MultipleLookupSelectControlType);function MultipleLookupSelectControlType(){return _classCallCheck(this,MultipleLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof gn}}]),MultipleLookupSelectControlType}())("la","MultipleLookupSelectControl","A LivingApps multiplelookup field (type 'multiplelookup/select')"),gn=function(t){_inherits(MultipleLookupSelectControl,fn);var n=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),n.apply(this,arguments)}return _createClass(MultipleLookupSelectControl,[{key:e.symbols.type,value:function value(){return mn}}]),MultipleLookupSelectControl}();gn.prototype.subtype="select",gn.prototype.fieldtype=We,gn.prototype._cssclass_control="select";var Cn=new(function(e){_inherits(MultipleLookupChoiceControlType,yn);var t=_createSuper(MultipleLookupChoiceControlType);function MultipleLookupChoiceControlType(){return _classCallCheck(this,MultipleLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof bn}}]),MultipleLookupChoiceControlType}())("la","MultipleLookupChoiceControl","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),bn=function(t){_inherits(MultipleLookupChoiceControl,fn);var n=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),n.apply(this,arguments)}return _createClass(MultipleLookupChoiceControl,[{key:e.symbols.type,value:function value(){return Cn}}]),MultipleLookupChoiceControl}();bn.prototype.subtype="choice",bn.prototype.fieldtype=Ye,bn.prototype._cssclass_control="select";var Tn=function(e){_inherits(MultipleAppLookupControlType,on);var t=_createSuper(MultipleAppLookupControlType);function MultipleAppLookupControlType(){return _classCallCheck(this,MultipleAppLookupControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof An}}]),MultipleAppLookupControlType}(),Ln=new Tn("la","MultipleAppLookupControl","A LivingApps multiple applookup field (type 'multipleapplookup')"),An=function(t){_inherits(MultipleAppLookupControl,an);var n=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:e.symbols.type,value:function value(){return Ln}},{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var n,r=_createForOfIteratorHelper(e);try{for(r.s();!(n=r.n()).done;){if(n.value.search(t.value))return!0}}catch(e){r.e(e)}finally{r.f()}return!1}return!1}}]),MultipleAppLookupControl}();An.prototype.type="multipleapplookup",An.prototype.fieldtype=ut;var wn=new(function(e){_inherits(MultipleAppLookupSelectControlType,Tn);var t=_createSuper(MultipleAppLookupSelectControlType);function MultipleAppLookupSelectControlType(){return _classCallCheck(this,MultipleAppLookupSelectControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Fn}}]),MultipleAppLookupSelectControlType}())("la","MultipleAppLookupSelectControl","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),Fn=function(t){_inherits(MultipleAppLookupSelectControl,An);var n=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupSelectControl,[{key:e.symbols.type,value:function value(){return wn}}]),MultipleAppLookupSelectControl}();Fn.prototype.subtype="select",Fn.prototype.fieldtype=_t,Fn.prototype._cssclass_control="select";var Sn=new(function(e){_inherits(MultipleAppLookupCheckboxControlType,Tn);var t=_createSuper(MultipleAppLookupCheckboxControlType);function MultipleAppLookupCheckboxControlType(){return _classCallCheck(this,MultipleAppLookupCheckboxControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Mn}}]),MultipleAppLookupCheckboxControlType}())("la","MultipleAppLookupCheckboxControl","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),Mn=function(t){_inherits(MultipleAppLookupCheckboxControl,An);var n=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupCheckboxControl,[{key:e.symbols.type,value:function value(){return Sn}}]),MultipleAppLookupCheckboxControl}();Mn.prototype.subtype="checkbox",Mn.prototype.fieldtype=pt;var xn=new(function(e){_inherits(MultipleAppLookupChoiceControlType,Tn);var t=_createSuper(MultipleAppLookupChoiceControlType);function MultipleAppLookupChoiceControlType(){return _classCallCheck(this,MultipleAppLookupChoiceControlType),t.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof In}}]),MultipleAppLookupChoiceControlType}())("la","MultipleAppLookupChoiceControl","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),In=function(t){_inherits(MultipleAppLookupChoiceControl,An);var n=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),n.apply(this,arguments)}return _createClass(MultipleAppLookupChoiceControl,[{key:e.symbols.type,value:function value(){return xn}}]),MultipleAppLookupChoiceControl}();In.prototype.subtype="choice",In.prototype.fieldtype=yt,In.prototype._cssclass_control="select";var On=new(function(e){_inherits(GeoControlType,dt);var t=_createSuper(GeoControlType);function GeoControlType(){return _classCallCheck(this,GeoControlType),t.apply(this,arguments)}return _createClass(GeoControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Dn}}]),GeoControlType}())("la","GeoControl","A LivingApps geo field (type 'geo')"),Dn=function(t){_inherits(GeoControl,vt);var n=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),n.apply(this,arguments)}return _createClass(GeoControl,[{key:e.symbols.type,value:function value(){return On}}]),GeoControl}();Dn.prototype.type="geo",Dn.prototype.fieldtype=ce,Dn.prototype._cssclass_root="llft-element";var Hn=function(e){_inherits(FileControlType,dt);var t=_createSuper(FileControlType);function FileControlType(){return _classCallCheck(this,FileControlType),t.apply(this,arguments)}return _createClass(FileControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Pn}}]),FileControlType}(),Rn=new Hn("la","FileControl","A LivingApps upload field (type 'file')"),Pn=function(t){_inherits(FileControl,vt);var n=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),n.apply(this,arguments)}return _createClass(FileControl,[{key:e.symbols.type,value:function value(){return Rn}}]),FileControl}();Pn.prototype.type="file",Pn.prototype.fieldtype=ye,Pn.prototype._cssclass_root="llft-element";var Nn=new(function(e){_inherits(FileSignatureControlType,Hn);var t=_createSuper(FileSignatureControlType);function FileSignatureControlType(){return _classCallCheck(this,FileSignatureControlType),t.apply(this,arguments)}return _createClass(FileSignatureControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Bn}}]),FileSignatureControlType}())("la","FileSignatureControl","A LivingApps signature image field (type 'file/signature')"),Bn=function(t){_inherits(FileSignatureControl,Pn);var n=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),n.apply(this,arguments)}return _createClass(FileSignatureControl,[{key:e.symbols.type,value:function value(){return Nn}}]),FileSignatureControl}();Bn.prototype.subtype="signature",Bn.prototype.fieldtype=fe;var Un=new(function(e){_inherits(ButtonControlType,dt);var t=_createSuper(ButtonControlType);function ButtonControlType(){return _classCallCheck(this,ButtonControlType),t.apply(this,arguments)}return _createClass(ButtonControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Gn}}]),ButtonControlType}())("la","ButtonControl","A submit button"),Gn=function(t){_inherits(ButtonControl,vt);var n=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),n.apply(this,arguments)}return _createClass(ButtonControl,[{key:e.symbols.type,value:function value(){return Un}}]),ButtonControl}();Gn.prototype.type="button";var qn=new(function(t){_inherits(LookupItemType,e.Type);var n=_createSuper(LookupItemType);function LookupItemType(){return _classCallCheck(this,LookupItemType),n.apply(this,arguments)}return _createClass(LookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Vn}}]),LookupItemType}())("la","LookupItem","An option in a lookup control/field"),Vn=function(t){_inherits(LookupItem,n);var r=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),r.apply(this,arguments)}return _createClass(LookupItem,[{key:e.symbols.type,value:function value(){return qn}},{key:"globals",get:function get(){return null===this.control||null===this.control.app?null:this.control.app.globals}},{key:"translations",get:function get(){return void 0===this._translations&&(this._translations=new d(this)),this._translations}},{key:"_create_translation",value:function _create_translation(e){return new L(null,this,e)}},{key:"label",get:function get(){if(null!==this.control){var e=this._view_lookupitem();if(null!==e){var t=e.label;if(null!==t)return t}}var n=this.translations.get();return null!==n&&null!==n.label?n.label:this._label}},{key:"visible",get:function get(){if(null===this.control)return!0;var e=this._view_lookupitem();return null===e||e.visible}},{key:"_view_lookupitem",value:function _view_lookupitem(){var e=this.control.identifier,t=this.control.app.active_view;if(null!==t&&null!==t.controls){var n=t.controls.get(e);if(void 0!==n&&void 0!==n.lookupdata&&null!==n.lookupdata){var r=n.lookupdata.get(this.key);if(void 0!==r)return r}}return null}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"translations"===e?this.translations.langs:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"translations"===e?this.translations.langs=t:this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"translations"===e?this.translations.langs=null:this[e]=null}},{key:e.symbols.repr,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();Vn.prototype._ul4onattrs=["control","key","_label","translations"],Vn.prototype._ul4attrs=new Set(["id","control","key","label","translations"]);var En=new(function(t){_inherits(ViewLookupItemType,e.Type);var n=_createSuper(ViewLookupItemType);function ViewLookupItemType(){return _classCallCheck(this,ViewLookupItemType),n.apply(this,arguments)}return _createClass(ViewLookupItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof jn}}]),ViewLookupItemType}())("la","ViewLookupItem","View specific information about a lookup item"),jn=function(t){_inherits(ViewLookupItem,n);var r=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),r.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:e.symbols.type,value:function value(){return En}},{key:e.symbols.repr,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();jn.prototype._ul4onattrs=["key","label","visible"],jn.prototype._ul4attrs=new Set(["key","label","visible"]);var Wn=function(t){_inherits(LayoutControlType,e.Type);var n=_createSuper(LayoutControlType);function LayoutControlType(){return _classCallCheck(this,LayoutControlType),n.apply(this,arguments)}return _createClass(LayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Yn}}]),LayoutControlType}(),zn=new Wn("la","LayoutControl","A decoration in an input form"),Yn=function(t){_inherits(LayoutControl,n);var r=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),r.apply(this,arguments)}return _createClass(LayoutControl,[{key:"LayoutControl",value:function LayoutControl(){this.label=null,this.identifier=null,this.view=null,this.top=null,this.left=null,this.width=null,this.height=null,this._visible=!0}},{key:e.symbols.type,value:function value(){return zn}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.view.globals}},{key:"_sel_root",get:function get(){return"#livingapps-form .llft-element.llft-id-"+this.identifier}},{key:"_dom_root",get:function get(){return document.querySelector(this._sel_root)}},{key:"visible",get:function get(){var e;return null===(e=this._visible)||void 0===e||e}},{key:"visible",set:function set(e){this.globals._in_form()&&(this._dom_root.hidden=!e),this._visible=e}},{key:e.symbols.setattr,value:function value(t,n){"visible"===t?this.visible=e._bool(n):_get(_getPrototypeOf(LayoutControl.prototype),e.symbols.setattr,this).call(this,t,n)}}]),LayoutControl}();Yn.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],Yn.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height","visible"]);var Jn=new(function(e){_inherits(HTMLLayoutControlType,Wn);var t=_createSuper(HTMLLayoutControlType);function HTMLLayoutControlType(){return _classCallCheck(this,HTMLLayoutControlType),t.apply(this,arguments)}return _createClass(HTMLLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Kn}}]),HTMLLayoutControlType}())("la","HTMLLayoutControl","HTML decoration in an input form"),Kn=function(t){_inherits(HTMLLayoutControl,Yn);var n=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),n.apply(this,arguments)}return _createClass(HTMLLayoutControl,[{key:e.symbols.type,value:function value(){return Jn}},{key:"value",get:function get(){return this._value}},{key:"value",set:function set(e){this._value=e,this.globals._in_form()&&this._set_dom_value(this._value)}},{key:"_set_dom_value",value:function _set_dom_value(e){this._dom_root.innerHTML=e}},{key:e.symbols.setattr,value:function value(t,n){"value"===t?this.value=n:_get(_getPrototypeOf(HTMLLayoutControl.prototype),e.symbols.setattr,this).call(this,t,n)}}]),HTMLLayoutControl}();Kn.prototype._ul4onattrs=[].concat(_toConsumableArray(Yn.prototype._ul4onattrs),["_value","_visible"]),Kn.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Yn.prototype._ul4attrs),["value"]));var $n=new(function(e){_inherits(ImageLayoutControlType,Wn);var t=_createSuper(ImageLayoutControlType);function ImageLayoutControlType(){return _classCallCheck(this,ImageLayoutControlType),t.apply(this,arguments)}return _createClass(ImageLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Zn}}]),ImageLayoutControlType}())("la","ImageLayoutControl","An image decoration in an input form"),Zn=function(t){_inherits(ImageLayoutControl,Yn);var n=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),n.apply(this,arguments)}return _createClass(ImageLayoutControl,[{key:e.symbols.type,value:function value(){return $n}},{key:"image",get:function get(){return this._image}},{key:"image",set:function set(e){this._image=e,this.globals._in_form()&&this._set_dom_value(this._image)}},{key:"original",get:function get(){return this.image}},{key:"original",set:function set(e){this.image=image}},{key:"_set_dom_value",value:function _set_dom_value(e){var t=this._dom_root.querySelector("img");if(null!==t){var n=null===e?"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==":this.globals.scaled_url(e,this.width,this.height);t.setAttribute("src",n)}}},{key:e.symbols.setattr,value:function value(t,n){"original"===t?this.original=n:"image"===t?this.image=n:_get(_getPrototypeOf(ImageLayoutControl.prototype),e.symbols.setattr,this).call(this,t,n)}}]),ImageLayoutControl}();Zn.prototype._ul4onattrs=[].concat(_toConsumableArray(Yn.prototype._ul4onattrs),["_image","_visible"]),Zn.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Yn.prototype._ul4attrs),["image","original"]));var Qn=new(function(e){_inherits(ButtonLayoutControlType,Wn);var t=_createSuper(ButtonLayoutControlType);function ButtonLayoutControlType(){return _classCallCheck(this,ButtonLayoutControlType),t.apply(this,arguments)}return _createClass(ButtonLayoutControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Xn}}]),ButtonLayoutControlType}())("la","ButtonLayoutControl","A submit button in an input form"),Xn=function(t){_inherits(ButtonLayoutControl,Yn);var n=_createSuper(ButtonLayoutControl);function ButtonLayoutControl(){return _classCallCheck(this,ButtonLayoutControl),n.apply(this,arguments)}return _createClass(ButtonLayoutControl,[{key:e.symbols.type,value:function value(){return Qn}}]),ButtonLayoutControl}();Xn.prototype._ul4onattrs=[].concat(_toConsumableArray(Yn.prototype._ul4onattrs),["original","scaled","_visible"]);var er=new(function(t){_inherits(ViewControlType,e.Type);var n=_createSuper(ViewControlType);function ViewControlType(){return _classCallCheck(this,ViewControlType),n.apply(this,arguments)}return _createClass(ViewControlType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof tr}}]),ViewControlType}())("la","ViewControl","Contains view specific information about a control"),tr=function(t){_inherits(ViewControl,n);var r=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),r.apply(this,arguments)}return _createClass(ViewControl,[{key:e.symbols.type,value:function value(){return er}},{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}();tr.prototype._ul4onattrs=["view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],tr.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","z_index","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]);var nr=function(t){_inherits(UserType,e.Type);var n=_createSuper(UserType);function UserType(){return _classCallCheck(this,UserType),n.apply(this,arguments)}return _createClass(UserType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof or}}]),UserType}(),rr=new nr("la","User","A LivingApps user/account"),or=function(t){_inherits(User,n);var r=_createSuper(User);function User(){return _classCallCheck(this,User),r.apply(this,arguments)}return _createClass(User,[{key:e.symbols.type,value:function value(){return rr}},{key:e.symbols.repr,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){"colorscheme"===e?this.colorscheme="auto":_get(_getPrototypeOf(User.prototype),"_setDefaultUL4ONAttr",this).call(this,e)}}]),User}();or.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews","globals","colorscheme"],or.prototype._ul4attrs=new Set(["id","globals","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","image","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews","colorscheme"]);var lr=new(function(t){_inherits(FileType,e.Type);var n=_createSuper(FileType);function FileType(){return _classCallCheck(this,FileType),n.apply(this,arguments)}return _createClass(FileType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ar}}]),FileType}())("la","File","An uploaded file"),ar=function(t){_inherits(File,n);var r=_createSuper(File);function File(){return _classCallCheck(this,File),r.apply(this,arguments)}return _createClass(File,[{key:e.symbols.type,value:function value(){return lr}},{key:e.symbols.repr,value:function value(){return"<File url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}},{key:"url",get:function get(){return"https://"+this.globals.hostname+"/files/"+this.contextid+"/"+this.id}},{key:"archive_url",get:function get(){return null===this.archive?this.url:this.archive.url+"/"+this.filename}}]),File}();ar.prototype._ul4onattrs=["globals","filename","mimetype","width","height","internal_id","createdat","size","duration","geo","recordedat","storagefilename","archive","context_id"],ar.prototype._ul4attrs=new Set(["globals","id","internal_id","url","archive_url","filename","mimetype","width","height","size","duration","geo","recordedat","archive","createdat","context_id"]);var ir=new(function(t){_inherits(GeoType,e.Type);var n=_createSuper(GeoType);function GeoType(){return _classCallCheck(this,GeoType),n.apply(this,arguments)}return _createClass(GeoType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof ur}}]),GeoType}())("la","Geo","Geographical coordinates and location information"),ur=function(t){_inherits(Geo,n);var r=_createSuper(Geo);function Geo(e,t,n){var o,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _classCallCheck(this,Geo),(o=r.call(this,null)).globals=e,o.lat=t,o.long=n,o.info=l,o}return _createClass(Geo,[{key:e.symbols.type,value:function value(){return ir}},{key:e.symbols.repr,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();ur.prototype._ul4onattrs=["globals","lat","long","info"],ur.prototype._ul4attrs=new Set(["globals","lat","long","info"]);var sr=function(t){_inherits(AttachmentType,e.Type);var n=_createSuper(AttachmentType);function AttachmentType(){return _classCallCheck(this,AttachmentType),n.apply(this,arguments)}return _createClass(AttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof cr}}]),AttachmentType}(),pr=new sr("la","Attachment","An attachment of a record"),cr=function(t){_inherits(Attachment,n);var r=_createSuper(Attachment);function Attachment(e,t,n,o,l,a){var i;return _classCallCheck(this,Attachment),(i=r.call(this,e)).owner=t,i.label=n,i.namespace=o,i.active=l,i.value=a,i}return _createClass(Attachment,[{key:e.symbols.type,value:function value(){return pr}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}},{key:"app",get:function get(){return this.owner instanceof S?this.owner:null}},{key:"appgroup",get:function get(){return this.owner instanceof x?this.owner:null}},{key:"record",get:function get(){return this.owner instanceof U?this.owner:null}}]),Attachment}();cr.prototype._ul4onattrs=["owner","label","namespace","active"],cr.prototype._ul4attrs=new Set(["id","owner","label","namespace","active"]);var _r=new(function(e){_inherits(NoteAttachmentType,sr);var t=_createSuper(NoteAttachmentType);function NoteAttachmentType(){return _classCallCheck(this,NoteAttachmentType),t.apply(this,arguments)}return _createClass(NoteAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof hr}}]),NoteAttachmentType}())("la","NoteAttachment","A note attachment of a record"),hr=function(t){_inherits(NoteAttachment,cr);var n=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),n.apply(this,arguments)}return _createClass(NoteAttachment,[{key:e.symbols.type,value:function value(){return _r}}]),NoteAttachment}();hr.prototype.type="noteattachment",hr.prototype._ul4onattrs=[].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]),hr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]));var yr=new(function(e){_inherits(URLAttachmentType,sr);var t=_createSuper(URLAttachmentType);function URLAttachmentType(){return _classCallCheck(this,URLAttachmentType),t.apply(this,arguments)}return _createClass(URLAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof dr}}]),URLAttachmentType}())("la","URLAttachment","A URL attachment of a record"),dr=function(t){_inherits(URLAttachment,cr);var n=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),n.apply(this,arguments)}return _createClass(URLAttachment,[{key:e.symbols.type,value:function value(){return yr}}]),URLAttachment}();dr.prototype.type="urlattachment",dr.prototype._ul4onattrs=[].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]),dr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]));var fr=new(function(e){_inherits(FileAttachmentType,sr);var t=_createSuper(FileAttachmentType);function FileAttachmentType(){return _classCallCheck(this,FileAttachmentType),t.apply(this,arguments)}return _createClass(FileAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof vr}}]),FileAttachmentType}())("la","FileAttachment","A file attachment of a record"),vr=function(t){_inherits(FileAttachment,cr);var n=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),n.apply(this,arguments)}return _createClass(FileAttachment,[{key:e.symbols.type,value:function value(){return fr}}]),FileAttachment}();vr.prototype.type="fileattachment",vr.prototype._ul4onattrs=[].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]),vr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]));var kr=new(function(e){_inherits(JSONAttachmentType,sr);var t=_createSuper(JSONAttachmentType);function JSONAttachmentType(){return _classCallCheck(this,JSONAttachmentType),t.apply(this,arguments)}return _createClass(JSONAttachmentType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof mr}}]),JSONAttachmentType}())("la","JSONAttachment","A JSON attachment of a record"),mr=function(t){_inherits(JSONAttachment,cr);var n=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),n.apply(this,arguments)}return _createClass(JSONAttachment,[{key:e.symbols.type,value:function value(){return kr}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?e._asjson(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,n){"value"===t?this.value=e._fromjson(n):this[t]=n}}]),JSONAttachment}();mr.prototype.type="jsonattachment",mr.prototype._ul4onattrs=[].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]),mr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(cr.prototype._ul4onattrs),["value"]));var gr=new(function(t){_inherits(DataActionType,e.Type);var n=_createSuper(DataActionType);function DataActionType(){return _classCallCheck(this,DataActionType),n.apply(this,arguments)}return _createClass(DataActionType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Cr}}]),DataActionType}())("la","DataAction","A data action configured for an app."),Cr=function(t){_inherits(DataAction,n);var r=_createSuper(DataAction);function DataAction(){return _classCallCheck(this,DataAction),r.apply(this,arguments)}return _createClass(DataAction,[{key:e.symbols.type,value:function value(){return gr}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataAction}();Cr.prototype._ul4onattrs=["app","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_mail_link","before_record_update_form","after_record_update","after_record_insert","before_record_delete"],Cr.prototype._ul4attrs=new Set(["app","id","identifier","label","order","permission","active","icon","description","message","filter","as_multiple_action","as_single_action","as_link","before_record_update_form","after_record_update","after_record_insert","before_record_delete"]);var br=new(function(t){_inherits(InstallationType,e.Type);var n=_createSuper(InstallationType);function InstallationType(){return _classCallCheck(this,InstallationType),n.apply(this,arguments)}return _createClass(InstallationType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Tr}}]),InstallationType}())("la","Installation","The installation that created an app"),Tr=function(t){_inherits(Installation,n);var r=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),r.apply(this,arguments)}return _createClass(Installation,[{key:e.symbols.type,value:function value(){return br}},{key:e.symbols.repr,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();Tr.prototype._ul4onattrs=["name"],Tr.prototype._ul4attrs=new Set(["id","name"]);var Lr=new(function(t){_inherits(CategoryType,e.Type);var n=_createSuper(CategoryType);function CategoryType(){return _classCallCheck(this,CategoryType),n.apply(this,arguments)}return _createClass(CategoryType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Ar}}]),CategoryType}())("la","Category","A navigation category"),Ar=function(t){_inherits(Category,n);var r=_createSuper(Category);function Category(){return _classCallCheck(this,Category),r.apply(this,arguments)}return _createClass(Category,[{key:e.symbols.type,value:function value(){return Lr}},{key:e.symbols.repr,value:function value(){for(var t=[],n=this;null!==n;)t.splice(0,0,n.identifier),n=n.parent;return"<Category id="+e._repr(this.id)+" identifierpath="+e._repr(t.join("/"))+NaN+e._repr(this.name)+">"}}]),Category}();Ar.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],Ar.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]);var wr=new(function(t){_inherits(KeyViewType,e.Type);var n=_createSuper(KeyViewType);function KeyViewType(){return _classCallCheck(this,KeyViewType),n.apply(this,arguments)}return _createClass(KeyViewType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Fr}}]),KeyViewType}())("la","KeyView","Object granting access to a view template"),Fr=function(t){_inherits(KeyView,n);var r=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),r.apply(this,arguments)}return _createClass(KeyView,[{key:e.symbols.type,value:function value(){return wr}},{key:e.symbols.repr,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();Fr.prototype._ul4onattrs=["identifier","name","key","user"],Fr.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]);var Sr=function(t){_inherits(AppParameterType,e.Type);var n=_createSuper(AppParameterType);function AppParameterType(){return _classCallCheck(this,AppParameterType),n.apply(this,arguments)}return _createClass(AppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof xr}}]),AppParameterType}(),Mr=new Sr("la","AppParameter","A parameter of a LivingApps application"),xr=function(t){_inherits(AppParameter,n);var r=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),r.apply(this,arguments)}return _createClass(AppParameter,[{key:e.symbols.type,value:function value(){return Mr}},{key:e.symbols.repr,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"app",get:function get(){return this.owner instanceof S?this.owner:null}},{key:"appgroup",get:function get(){return this.owner instanceof x?this.owner:null}},{key:"full_identifier",get:function get(){return null===this.namespace||null===this.identifier?this.identifier:"".concat(this.namespace,".").concat(this.identifier)}}]),AppParameter}();xr.prototype._ul4onattrs=["owner","parent","type","order","identifier","namespace","description","value","createdat","createdby","updatedat","updatedby"],xr.prototype._ul4attrs=new Set(["id","owner","parent","app","type","order","identifier","namespace","full_identifier","description","value","createdat","createdby","updatedat","updatedby"]);var Ir=new(function(e){_inherits(MutableAppParameterType,Sr);var t=_createSuper(MutableAppParameterType);function MutableAppParameterType(){return _classCallCheck(this,MutableAppParameterType),t.apply(this,arguments)}return _createClass(MutableAppParameterType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Or}}]),MutableAppParameterType}())("la","MutableAppParameter","A mutable parameter of a LivingApps application"),Or=function(t){_inherits(MutableAppParameter,xr);var n=_createSuper(MutableAppParameter);function MutableAppParameter(){return _classCallCheck(this,MutableAppParameter),n.apply(this,arguments)}return _createClass(MutableAppParameter,[{key:e.symbols.type,value:function value(){return Ir}},{key:e.symbols.repr,value:function value(){return"<MutableAppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),MutableAppParameter}(),Dr=function(t){_inherits(MenuItemType,e.Type);var n=_createSuper(MenuItemType);function MenuItemType(){return _classCallCheck(this,MenuItemType),n.apply(this,arguments)}return _createClass(MenuItemType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof Rr}}]),MenuItemType}(),Hr=new Dr("la","MenuItem","An additional menu item in an app that links to a target page."),Rr=function(t){_inherits(MenuItem,n);var r=_createSuper(MenuItem);function MenuItem(){return _classCallCheck(this,MenuItem),r.apply(this,arguments)}return _createClass(MenuItem,[{key:e.symbols.type,value:function value(){return Hr}},{key:e.symbols.repr,value:function value(){return"<MenuItem id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),MenuItem}();Rr.prototype._ul4onattrs=["app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"],Rr.prototype._ul4attrs=new Set(["id","app","identifier","label","type","icon","title","target","cssclass","url","order","start_time","end_time","on_app_overview_page","on_app_detail_page","on_form_page","on_iframe_page","on_view_template","on_custom_overview_page","accessible","children","createdat","createdby","updatedat","updatedby"]);var Pr=new Dr("la","Panel","An additional panel in an app that is displayed on various LivingApps pages and links to a target page."),Nr=function(t){_inherits(Panel,Rr);var n=_createSuper(Panel);function Panel(){return _classCallCheck(this,Panel),n.apply(this,arguments)}return _createClass(Panel,[{key:e.symbols.type,value:function value(){return Pr}},{key:e.symbols.repr,value:function value(){return"<Panel id="+e._repr(this.id)+"identifier="+e._repr(this.identifier)+" label="+e._repr(this.label)+" type="+e._repr(this.type)+">"}}]),Panel}();Nr.prototype._ul4onattrs=[].concat(_toConsumableArray(Rr.prototype._ul4onattrs),["description","description_url","image","row","column","width","height","header_type","header_background","text_color","background_color1","background_color2"]),Nr.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Rr.prototype._ul4attrs),["description","description_url","image","row","column","width","height"]));var Br=new nr("la","ViewTemplateInfo","basic information about a view template"),Ur=function(t){_inherits(ViewTemplateInfo,n);var r=_createSuper(ViewTemplateInfo);function ViewTemplateInfo(){return _classCallCheck(this,ViewTemplateInfo),r.apply(this,arguments)}return _createClass(ViewTemplateInfo,[{key:e.symbols.type,value:function value(){return Br}},{key:e.symbols.repr,value:function value(){return"<ViewTemplateInfo id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+" name="+e._repr(this.name)+">"}}]),ViewTemplateInfo}();Ur.prototype._ul4onattrs=["app","identifier","name","icon","type","mimetype","permission_level"],Ur.prototype._ul4attrs=new Set(["app","id","identifier","name","icon","type","mimetype","permission_level"]);var Gr=new(function(t){_inherits(FormType,e.Type);var n=_createSuper(FormType);function FormType(){return _classCallCheck(this,FormType),n.apply(this,arguments)}return _createClass(FormType,[{key:"instancecheck",value:function instancecheck(e){return e instanceof qr}}]),FormType}())("la","Form","The input form."),qr=function(t){_inherits(Form,e.Proto);var n=_createSuper(Form);function Form(e,t){var r;_classCallCheck(this,Form),(r=n.call(this)).globals=e,r.template=t,r._geo_wired=!1;var o,l=_createForOfIteratorHelper(e.record.fields.values());try{for(l.s();!(o=l.n()).done;){var a=o.value;r.wire_field(a)}}catch(e){l.e(e)}finally{l.f()}return r.render_template(null),r}return _createClass(Form,[{key:e.symbols.type,value:function value(){return Gr}},{key:"_dom_button",get:function get(){return document.querySelector(this._sel_form+" "+this._sel_button)}},{key:"enabled",get:function get(){return!this._dom_button.disabled}},{key:"enabled",set:function set(e){this._dom_button.disabled=!e}},{key:e.symbols.getattr,value:function value(t){if("enabled"===t)return this.enabled;throw new e.AttributeError(this,t)}},{key:e.symbols.setattr,value:function value(t,n){if("enabled"!==t)throw new e.AttributeError(this,t);this.enabled=e._bool(n)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" enabled="+e._repr(this.enabled)+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}},{key:"render_template",value:function render_template(t){var n=this,r={datasources:this.globals.datasources,record:this.globals.record,app:this.globals.app,fields:this.globals.record.fields,identifier:t},o={globals:this.globals,form:this,la:Wr},l="LivingApps update template: ";l+=null===t?"Initialization":"Value change in "+e._repr(t),this.globals.group_logging(l,(function(){try{n.template.renders(r,o)}catch(t){console&&console.error&&(n.globals._start_log_message(),console.group&&console.group("UL4 stacktrace"),e.report_exc(t),console.groupEnd&&console.groupEnd(),console.groupCollapsed&&console.groupCollapsed("Javascript stacktrace"),console.error(t),console.groupEnd&&console.groupEnd())}}))}},{key:"wire_geo",value:function wire_geo(){var e=this;if(!this._geo_wired){if(null!==this.globals.app.active_view&&navigator.geolocation){var t=this.globals.app.active_view.use_geo;"once"!==t&&"watch"!==t||navigator.geolocation.getCurrentPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)})),"watch"===t&&navigator.geolocation.watchPosition((function(t){e.globals.mode=e.globals.mode.substring(0,e.globals.mode.lastIndexOf("/")+1)+"geo",e.globals.set_current_geo(t),e.render_template(null)}))}this._geo_wired=!0}}},{key:"wire_field",value:function wire_field(e){var t,n=this,r=_createForOfIteratorHelper(e._dom_controls);try{for(r.s();!(t=r.n()).done;){t.value.addEventListener(e._inputevent,(function(t){n.wire_geo(),n.globals.mode=n.globals.mode.substring(0,n.globals.mode.lastIndexOf("/")+1)+"input",n.render_template(e.control.identifier)}))}}catch(e){r.e(e)}finally{r.f()}}}]),Form}();qr.prototype._ul4attrs=new Set(["enabled"]),qr.prototype._sel_form="#livingapps-form form",qr.prototype._sel_button="[type=submit]";for(var Vr=0,Er=[l,i,S,x,O,Rr,Nr,H,R,N,U,mt,Ct,Tt,St,Ot,Ht,Pt,Bt,Et,zt,Jt,Zt,Xt,tn,rn,an,sn,cn,hn,fn,gn,kn,bn,An,Fn,Mn,In,Dn,Pn,Bn,Gn,V,j,Z,te,re,le,ie,se,z,J,ce,ye,fe,me,Ce,Te,Ae,Me,Oe,qe,$e,Xe,ut,Vn,jn,k,g,b,L,Yn,Kn,Zn,Xn,tr,or,ar,ur,hr,dr,vr,mr,Cr,Tr,Ar,Fr,xr,Or,Ur,c];Vr<Er.length;Vr++){var jr=Er[Vr];e.register("de.livinglogic.livingapi."+jr.name.toLowerCase(),jr)}var Wr=new e.Module("la","LivingAPI types",{FlashMessage:i,File:ar,Geo:ur,User:or,KeyView:Fr,Globals:l,App:S,AppGroup:x,TextControl:St,URLControl:Ht,EmailControl:Ot,PasswordControl:xt,TelControl:Pt,TextAreaControl:Bt,HTMLControl:Gt,IntControl:Ct,NumberControl:Tt,DateControl:Et,DatetimeMinuteControl:zt,DatetimeSecondControl:Jt,BoolControl:mt,LookupSelectControl:Xt,LookupRadioControl:tn,LookupChoiceControl:rn,AppLookupSelectControl:sn,AppLookupRadioControl:cn,AppLookupChoiceControl:hn,MultipleLookupSelectControl:gn,MultipleLookupCheckboxControl:kn,MultipleLookupChoiceControl:bn,MultipleAppLookupSelectControl:Fn,MultipleAppLookupCheckboxControl:Mn,MultipleAppLookupChoiceControl:In,FileControl:Pn,FileSignatureControl:Bn,GeoControl:Dn,ViewControl:tr,RecordChildren:N,Record:U,FileAttachment:vr,URLAttachment:dr,NoteAttachment:hr,JSONAttachment:mr,DataAction:Cr,Installation:Tr,HTMLLayoutControl:Kn,ImageLayoutControl:Zn,ButtonLayoutControl:Xn,View:O,DataSource:H,DataSourceChildren:R,LookupItem:Vn,ViewLookupItem:jn,Translations:d,AppLang:k,AppGroupLang:g,ControlLang:b,LookupItemLang:L,Category:Ar,AppParameter:xr,MutableAppParameter:Or,MenuItem:Rr,Panel:Nr,ViewTemplateInfo:Ur,TemplateLibrary:c});export{S as App,x as AppGroup,g as AppGroupLang,k as AppLang,hn as AppLookupChoiceControl,lt as AppLookupChoiceField,an as AppLookupControl,Xe as AppLookupField,$e as AppLookupFieldBase,cn as AppLookupRadioControl,rt as AppLookupRadioField,sn as AppLookupSelectControl,tt as AppLookupSelectField,xr as AppParameter,cr as Attachment,n as Base,mt as BoolControl,j as BoolField,Gn as ButtonControl,Xn as ButtonLayoutControl,Ar as Category,we as ChoiceFieldBase,vt as Control,b as ControlLang,Cr as DataAction,H as DataSource,R as DataSourceChildren,Et as DateControl,Ce as DateField,me as DateFieldBase,zt as DatetimeMinuteControl,Te as DatetimeMinuteField,Jt as DatetimeSecondControl,Ae as DatetimeSecondField,Ot as EmailControl,te as EmailField,V as Field,ar as File,vr as FileAttachment,Pn as FileControl,ye as FileField,Bn as FileSignatureControl,fe as FileSignatureField,i as FlashMessage,qr as Form,ur as Geo,Dn as GeoControl,ce as GeoField,l as Globals,Gt as HTMLControl,se as HTMLField,Kn as HTMLLayoutControl,r as Handler,Zn as ImageLayoutControl,Tr as Installation,Ct as IntControl,z as IntField,mr as JSONAttachment,Fr as KeyView,f as LangBase,Yn as LayoutControl,rn as LookupChoiceControl,Be as LookupChoiceField,Zt as LookupControl,Oe as LookupField,Me as LookupFieldBase,Vn as LookupItem,L as LookupItemLang,tn as LookupRadioControl,He as LookupRadioField,Xt as LookupSelectControl,Pe as LookupSelectField,Rr as MenuItem,Mn as MultipleAppLookupCheckboxControl,pt as MultipleAppLookupCheckboxField,In as MultipleAppLookupChoiceControl,yt as MultipleAppLookupChoiceField,An as MultipleAppLookupControl,ut as MultipleAppLookupField,Fn as MultipleAppLookupSelectControl,_t as MultipleAppLookupSelectField,kn as MultipleLookupCheckboxControl,Ee as MultipleLookupCheckboxField,bn as MultipleLookupChoiceControl,Ye as MultipleLookupChoiceField,fn as MultipleLookupControl,qe as MultipleLookupField,gn as MultipleLookupSelectControl,We as MultipleLookupSelectField,Or as MutableAppParameter,hr as NoteAttachment,Tt as NumberControl,J as NumberField,Nr as Panel,xt as PasswordControl,X as PasswordField,s as Permission,U as Record,N as RecordChildren,wt as StringControl,Z as StringField,Pt as TelControl,le as TelField,c as TemplateLibrary,Bt as TextAreaControl,ie as TextAreaField,St as TextControl,d as Translations,dr as URLAttachment,Ht as URLControl,re as URLField,or as User,O as View,tr as ViewControl,jn as ViewLookupItem,Ur as ViewTemplateInfo,element,Wr as module,url_with_params,t as version};
|
|
2
2
|
//# sourceMappingURL=livingapi.js.map
|