section");$(window).scroll((function(e){let n=$(window).scrollTop(),r=$("body");r.toggleClass("unfocus",n>vh()-1.2*t),r.toggleClass("btb",n>.5*vh()-t)}))},$ocms.cf_reset=function(){return $("#contentframe").empty()},function(t){t.fn.scrollTo=function(e){if(t(this).length>0){var n=t(this).offset().top||0;n>0&&t("html, body").animate({scrollTop:n-hh()},2e3)}},t.fn.ldng=function(e){var n=!0;return"boolean"==typeof e?n=e:"number"==typeof e&&(n=e>0),t(this).toggleClass("loading",n)},"function"!=typeof t.noop&&(t.noop=function(){}),t.fn.hasAttr=function(e){var n=t(this).attr(e);return void 0!==n&&!1!==n},t.fn.parseCssPx=function(e){try{return parseFloat(t(this).css(e).replace("px","")||0)}catch(t){return 0}},t.max=function(t,e){return isNaN(t)&&isNaN(e)?null:isNaN(t)&&!isNaN(e)?e:!isNaN(e)&&isNaN(e)||t>=e?t:e},t.min=function(t,e){return isNaN(t)&&isNaN(e)?null:isNaN(t)&&!isNaN(e)?e:!isNaN(e)&&isNaN(e)||t<=e?t:e},t.lim=function(t,e){return isNaN(t)?null:isNaN(e)?t:e<=t?e:t},t.fn.enterKey=function(e){return this.each((function(){t(this).keypress((function(t){"13"===(t.keyCode?t.keyCode:t.which).toString()&&e.call(this,t)}))}))}}(jQuery),$ocms.defaultTimeout=3e4,$ocms.AjaxEX=function(t){var e=this;e.responseText=e.responseText||"";var n=e.getResponseHeader("x-ocms-code")||"";e.internalCode=""!==n&&!1===isNaN(n)?parseInt(n):-1,e.isInternal=e.internalCode>-1,e.internalText=decodeURIComponent((e.getResponseHeader("x-ocms-desc")||"").replace(/\+/g,"%20")||"");var r=e.internalText||t,i=e.internalCode||e.status;e.logtext=r+" ("+i+")"},$ocms.postXTS=function(t){$ocms.postXT.call(this,$.extend(t,{sync:!0}))},$ocms.postXT=function(t){if((t=t||{}).trycount=t.trycount||0,""!==(t.url||"")){t.url=-1!==t.url.indexOf("&yy=")?t.url:t.url.indexOf("?")>-1?t.url+"&yy="+(new Date).getTime():t.url+"?yy="+(new Date).getTime();var e=t.context||this;switch(t.context=e,t.retryLimit=t.retryLimit||0,t.timeout=t.timeout||$ocms.defaultTimeout,t.timeout<100&&(t.timeout=1e3*t.timeout),t.data=t.data||{},t.contentType=t.contentType||"multipart/form-data; charset=UTF-8",t.islogin="boolean"==typeof t.islogin&&t.islogin,t.contentType){case"":case"json":t.contentType="application/json; charset=utf-8";break;case"form":t.contentType="application/x-www-form-urlencoded; charset=UTF-8";break;case"multi":t.contentType="multipart/form-data";break;case"text":t.contentType="text/plain; charset=UTF-8"}if(t.form instanceof jQuery?(t.data=t.form.serializeObject(),t.contentType="form-data"):t.lzw instanceof jQuery&&(t.data.lzw=$.ccLZW(t.lzw.serializeAnything(!0)).join(",")),"multipart/form-data"!==t.contentType.substr(0,19)&&"form-data"!==t.contentType.substr(0,9)||t.data instanceof FormData!=!1)t.data instanceof FormData&&(t.contentType=!1,t.processData=!1);else{t.contentType=!1;var n=new FormData;$.each(t.files||[],(function(t,e){n.append("upload_file",e)})),$.each(t.data||{},(function(t,e){n.append(t,e)})),t.data=n,t.processData=!1}var r={type:t.method||"post",url:t.url,data:t.data,processData:"boolean"!=typeof t.processData||t.processData,contentType:t.contentType,cache:t.cache||!1,timeout:t.timeout,beforeSend:function(n){$(t.loading).ldng(),$("body").addClass("ldng"),"function"==typeof t.beforesend&&t.beforesend.apply(e,[n])},success:function(n,r,i){"false"===n||"not authorized"===n?("function"==typeof t.error&&t.error.apply(e,[i,r,n]),"function"==typeof $.status&&$.status(r+" - "+n)):"function"==typeof t.success&&t.success.apply(e,[n,r,i])},error:function(n,r,i){if($ocms.AjaxEX.call(n,r),-1===t.url.indexOf("doc.ashx")||-1!==t.url.indexOf("ftest")){if(401===n.status&&111===n.internalCode&&!1===t.islogin&&"function"==typeof $ocms.login.dlg)$ocms.login.dlg({ajo:t});else if("timeout"===r||302===n.status)return t.tryCount++,t.tryCount<=t.retryLimit?void $ocms.postXT(t):void 0;"function"==typeof t.error?t.error.apply(e,[n,r,i]):"function"==typeof $ocms.failure?$ocms.failure.apply(e,[n]):"function"==typeof $.status&&$.status("Server error: "+r+" - "+i)}},dataType:t.datatype||"json",complete:function(n,r){"function"==typeof t.complete&&t.complete.apply(e,[n,r]),$(t.loading).ldng(0),$("body").removeClass("ldng");let i=$("body > .timer");if(i.length>0){let t=new Date(n.getResponseHeader("ocms_cec")||""),e=new Date(n.getResponseHeader("ocms_cex")||"");if(t.isValid()&&e.isValid()){let n=new Date,r=Math.abs(e-t);n.setMilliseconds(n.getMilliseconds()+r),i.data({cex:n,ctt:r}),$ocms.cex_timer()}}},context:e,async:!0};"boolean"==typeof t.sync&&(r.async=!1===t.sync),!0==("boolean"==typeof t.contentType&&!1===t.contentType)&&(r.contentType=!1),$.ajax(r)}},$ocms.cex_timer=function(){$ocms.cexi||($ocms.cexi=setInterval($ocms.cex_timer,15e3));let t=$("body > .timer"),e=t.data("cex"),n=t.data("ctt"),r=new Date;if(e instanceof Date&&e.isValid()&&"number"==typeof n&&n>0&&e>r){let i=Math.abs(r-e)/n*100;t.css("width",i.toString()+"%"),i<98&&(!$ocms.cex_lp||Math.abs(r-$ocms.cex_lp)>6e5)&&$ocms.postXT({url:$ocms.url("ping"),success:()=>{$ocms.cex_lp=r},timeout:5e3,error:()=>{}})}},$ocms.vbl_send=function(t){var e=t.data||{};if(""!==(e.url||"")){var n=$("#contentframe form:first"),r={url:e.url,data:new FormData,success:function(t){"function"==typeof e.success?e.success(t):"string"==typeof e.success&&alert(e.success)},error:function(t,n,r){"function"==typeof e.error?e.error(r):"string"==typeof e.error&&alert(e.error)},complete:function(){n.ldng(0)}},i=!0;n.find("input").each((function(){var t=$(this),e=t.nza("name"),n=t.val(),o=$(this).prop("required")||!1;if(""!==e){var a=""!==n||!1===o;i=i&&a,!0===a?(r.data.append(e,n),t[0].setCustomValidity("")):""!==$(this).nza("ocms-nvnote")&&t[0].setCustomValidity($(this).nza("ocms-nvnote"))}})),!0===i&&(n.ldng(1),$ocms.postXT.call(this,r))}},function(t){t.fn.nza=function(e,n){var r=t(this).attr(e);return void 0!==r&&!1!==r?r:n||""},t.fn.serializeObject=function(e,n){var r=/\r?\n/g,i=/^(?:submit|button|image|reset|file)$/i,o=/^(?:input|select|textarea|keygen)/i,a=/^(?:checkbox|radio)$/i,s=bool((n=n||{}).typedvalues,!1),l={},c=t(this),d=c.find(':input:not([nosend],[type="file"])').addBack(":input"),u=!0;return t.each(d.not(".tinymce").get(),(function(n,c){var d=t(this),p=this,f=(this.type||"").toLowerCase(),m=d.prop("required")||!1;if(!0===(p.name&&!d.is(":disabled")&&o.test(p.nodeName)&&!i.test(f))){var h=d.val(),g=p.name,$=d.nza("data-format").split(":"),y=d.nza("pattern")||".*";if(!0===a.test(f)&&(h=p.checked?""!==h?h:"true":""),"date"===$[0].substr(0,4)&&$.length>1)"boolean"==typeof(h=parseDt(h,$.slice(1).join(":")))&&(h=null),null===h&&"date"===d.prop("type").substr(0,4)&&!1===isNaN(new Date(d.val()))&&(h=new Date(d.val())),h instanceof Date==!0&&"function"==typeof h.getMonth?!1===s&&(h=fdt(h,"date"===$[0]?"dts":"iso")):h=null;else if("number"===f&&!0===s){let t;t="integer"===$[0]?parseInt(h):parseFloat(h),h=isNaN(t)?h:t}if(!0!==m||""!==(h||"")&&null!==h.match(y)?!0===bool(e,!1)&&p.setCustomValidity(""):(!0===bool(e,!1)&&p.setCustomValidity(d.nza("ocms-nvnote",$ocms.t.inv||"Invalid field")),h=null),null!=h&&"string"==typeof h){let t=l[g];null!=t?Array.isArray(t)?t.push(h.replace(r,"\r\n")):l[g]=[t,h.replace(r,"\r\n")]:l[g]=h.replace(r,"\r\n")}else if(null!=h){let t=l[g];null!=t?Array.isArray(t)?t.push(h):l[g]=[t,h]:l[g]=h}else u=!1}})),d.filter(".tinymce").each((function(e,n){var r=t(this),i=((this.type||"").toLowerCase(),r.prop("required")||!1);try{var o=tinymce.get(t(n).attr("id"));if(o){var a=t(n).attr("name"),s=o.getContent();!1===i||""!==(s||"")?l[a]=s:u=!1}}catch(e){t.noop()}})),c.toggleClass("invalid",!u),u?l:null},t.fn.sendForm=function(e,n,r){var i=t(this);r=r||{};var o={url:e,success:function(t){if(r.response=t,"function"==typeof n)n(t);i.closest("div.modal").remove()},error:function(t,e,n){"function"==typeof r.error?r.error.call(this,t):$ocms.failure.call(this,t)},complete:function(){i.ldng(0),"function"==typeof r.complete&&r.complete.call(this,jqXHR)}},a=i.find('input[type="file"]');o.data=new FormData,a.length>0&&t.each(a[0].files,(function(t,e){o.data.append(t,e),o.data.append("file_lastmodified",$ocms.isodt(e.lastModifiedDate))}));var s=i.serializeObject();t.each(s||{},(function(t,e){o.data.append(t,e)})),i.ldng(),$ocms.postXT.call(this,o)},t.fn.checkValidity=function(){var e=t(this),n=!0;return e.each((function(t,e){n=n&&e.checkValidity()})),n},t.fn.wrap=function(e,n){var r=t(this),i=$$.dc(e).attr(n||{}).insertAfter(r);return r.append(i),i}}(jQuery),$ocms.logout=function(){$ocms.postXT({url:$ocms.url("logout"),complete:function(){window.location.reload()}})},$ocms.login={send:function(t){t.preventDefault();var e=$(this);if(!0===e.find("#dbtn-confirm").hasClass("disabled"))return!1;var n=e.serializeObject();return n.loginaccount=ne(n.loginaccount,$ocms.auth.account||$ocms.auth.requestedaccount||""),n.loginaccount=ne(n.loginaccount,$ocms.auth.account||$ocms.auth.requestedaccount||""),""===ne(n.loginaccount)&&!0===bool($ocms.auth.accountrequired,!0)?(alert($t.l16),!1):($ocms.postXT({url:$ocms.url("login"),data:n,success:function(){window.location.reload()}}),!1)},uichange:function(){let t=$(this),e=t.closest("form"),n=bool($ocms.auth.accountrequired,!0),r=ne(e.find('[name="loginaccount"]').val(),$ocms.auth.account||$ocms.auth.requestedaccount||"");if(""!==r||!1===n){var i=e.find('[name="userlogin"]').empty().val(""),o=e.find('[name="username"]').empty().val(""),a=$("#dlg_userlogin_sel").empty().val(""),s=t.val()||"";if(!1===t.checkValidity()&&""===s)return;var l=t.closest("table").ldng();$ocms.postXT.call(this,{url:$ocms.url("auth"),data:{userinfo:s,account:r||""},success:function(t,e,n){if(1===t.length){var r=t[0];i.val(r.login).change().attr("required","").removeAttr("nosend"),o.val(r.name).change().attr("required","").show(),a.removeAttr("required").attr("nosend","").hide()}else t.length>0?(o.hide().removeAttr("required"),i.removeAttr("required").attr("nosend",""),0===a.length&&(a=$(" ").attr({name:"userlogin",size:t.length,id:"dlg_userlogin_sel",class:"form-control",required:""}).css({width:"100%","max-width":"100%",padding:"2px"}).insertAfter(o)),$.each(t,(function(t,e){var n=$(" ").attr({value:e.login,style:"padding-top: 2px; padding-bottom: 5px;","border-bottom":"1px solid #EEE;"}).text(e.name).appendTo(a);t%2==0&&n.css({"background-color":"#F9F9F9"})})),a.attr("required","").removeAttr("nosend")):(a.hide().attr("nosend",""),o.attr("required","").show(),i.attr("required","").removeAttr("nosend"),alert($t.l9))},error:function(t){$ocms.failure.call(this,t)},complete:function(){l.ldng(0)}})}else alert($t.l18)},sendpassword:function(t){var e=$(''),n=e.find(".form-body"),r=null;e.find("form").submit((function(t){t.preventDefault();var i=$(this).serializeObject(!0),o=null===r,a=o?"spwc":"spw";return $ocms.postXT.call(this,{url:$ocms.url(a),data:i,complete:function(){o?(n.append(''),r=$('').appendTo(n)):(alert($t.l13),e.remove())},error:()=>{}}),!1})),e.find(".modal-close").click((function(){e.remove()}));var i=[];$.each($t.l7a.split("\n"),((t,e)=>{Array.prototype.push.apply(i,[$(" "),$(" ").text(e)])})),e.find(".modal-note").append($(' ').text($t.alert)).append(i),e.appendTo("body"),setTimeout((function(){$(".modal").find('input[name="lastname"]').focus()}),600)}};var $$={s:function(t){return $(" ").text(t)},br:function(){return $(" ")},sc:function(t,e){return $(" ").addClass(t).text(e)},td:function(t,e){var n=$(" ");return t instanceof jQuery==!0?n.appendTo(t):"object"==typeof t?n.attr(t):"string"==typeof t&&n.text(t),"object"==typeof e?n.attr(e):"string"==typeof e&&n.text(e),n},th:function(t,e){var n=$(" ");return t instanceof jQuery==!0?n.appendTo(t):"object"==typeof t?n.attr(t):"string"==typeof t&&n.text(t),"object"==typeof e?n.attr(e):"string"==typeof e&&n.text(e),n},tdc:function(t,e,n){return $$.td(e,n).addClass(t)},td2:function(t){var e=$(' ');return"string"===$.type(t)?e.text(t):t instanceof jQuery?e.append(t):"function"==typeof t?t.call(e):e.html(" "),e},td3:function(t){var e=$(' ');return"string"===$.type(t)?e.text(t):t instanceof jQuery?e.append(t):"function"==typeof t?t.call(e):e.html(" "),e},tdtr:function(t,e){var n=$$.tr().appendTo(e);return t instanceof jQuery==!0||"string"==typeof t?t.appendTo($$.td().appendTo(n)):!0===Array.isArray(t)&&$.each(t,(function(t,e){$(e).appendTo($$.td().appendTo(n))})),n},tr:function(t,e){var n=$(" ");return t instanceof jQuery==!0?n.appendTo(t):"object"==typeof t&&n.attr(t),"object"==typeof e&&n.attr(e),n},trc:function(t,e){var n=$(" ").addClass(t);return e instanceof jQuery==!0?n.appendTo(e):"object"==typeof e&&n.attr(e),n},d:function(t){return $("
").attr(t||{})},dc:function(t,e,n,r){var i=$("
").addClass(t);return e instanceof jQuery==!0?i.appendTo(e):"object"==typeof e?i.attr(e):"function"==typeof e?i.click(e):"string"==typeof e&&i.text(e),"string"==typeof n?i.text(n):"object"==typeof n?i.attr(n):"function"==typeof n&&i.click(n),"string"==typeof r?i.text(r):"object"==typeof r?i.attr(r):"function"==typeof r&&i.click(r),i},df:function(t){return $("
").attr(t||{})},opt:function(t,e,n){var r=$(" ");return"string"==typeof t?r.attr("value",t):"object"==typeof t&&r.attr(t),"string"==typeof e?r.text(e):"object"==typeof e&&r.attr(e),"object"==typeof n&&r.attr(n),r},eOpt:function(t){var e=$(' ');return t&&e.attr("selected","selected"),e},tbl:function(t){return $("").attr(t||{})},tblc:function(t){return $("").addClass(t)},thead:function(t){let e=$(" ");return t instanceof jQuery&&e.prependTo(t),e},tbody:function(t){let e=$(" ");return t instanceof jQuery&&e.appendTo(t),e},tblset:function(t,e){let n=$$.tbl(t||{});return e instanceof jQuery&&e.append(n),{tbl:n,hd:$$.thead().appendTo(n),bdy:$$.tbody().appendTo(n)}},i:function(t){return $(" ").attr(t||{})},img:function(t,e){return $(" ").attr("src",t).attr(e||{})},sel:function(t){return $(" ").attr(t||{})},btn:function(t){return $(" ").attr(t||{})},a:function(t){return $(" ").attr(t||{})},li:function(t){return $(" ").attr(t||{})},ul:function(t){return $("").attr(t||{})},nav:function(t){return $(" ").attr(t||{})},lbl:function(t,e){var n=$(" ");return"string"==typeof t&&n.text(t),"object"==typeof t?n.attr(t):"object"==typeof e&&n.attr(e),n},txt:function(t){return $("").attr(t||{})},0:function(t,e){return $("<"+t+">"+t+">").attr(e||{})},bbtn:function(t,e){return $$.btn({type:"button",class:"btn"}).addClass(e).text(t)},svg:t=>$(document.createElementNS("http://www.w3.org/2000/svg",t))};function getMonday(t){var e=(t=new Date(t)).getDay(),n=t.getDate()-e+(0==e?-6:1);return new Date(t.setDate(n))}function $lf(t){var e=void 0===t?null:"number"==typeof t&&1!==t||"boolean"==typeof cl&&!1===t;return $("#listframe").tC("hd",e).is(".hd")}function $nuf(t){if(t&&t.stopPropagation(),!$(this).is(".disabled")){var e=function(t){t.removeClass("vis").find("li.dropdown").removeClass("open").removeClass("vis").attr("aria-expanded","false")},n=$(this).parent("li.dropdown");if(n.length>0){n.tC("open"),navs=!0===n.is(".open")?"true":"false",n.attr("aria-expanded",navs);var r=n.closest("nav");r.find("li.dropdown").not(n.parentsUntil("nav")).not(n).removeClass("open").attr("aria-expanded","false"),!1===n.is(".open")&&n.find("li.dropdown").removeClass("open").attr("aria-expanded","false"),e($("nav").not(r))}else e($("nav"))}}function $tbr(){return $lf(0),$("#topbar").ocmsmenu([])}function $lfr(){return $("#sidebar").empty(),$("#listframe").removeClass("fix").addClass("hd").empty()}function $cfr(){return $tbr(),$("#contentframe").empty()}function jObj(t,e){let n={};if("{"===(t||"").substr(0,1))try{n=JSON.parse(t)}catch(t){n={}}return n[e]||""}function string(t,e){var n,r=t||"";return $.each(e||[],(function(t,e){n=new RegExp("\\{"+t.toString()+"\\}","ig"),r=r.replace(n,e)})),r}function init_tooltip(t){var e=!0===("boolean"==typeof t&&t)&&"mouse";$("[title]").qtip({position:{target:e,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden},effect:!1}),$("div.tooltiptext").each((function(){$(this).filter(":not(:empty)").parent().qtip({suppress:!1,content:{text:$(this).clone()},position:{target:e,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden}})}))}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")},String.prototype.left=function(t){if("string"===$.type(t)){var e=this.indexOf(t);return e>0?this.slice(0,e):""}return this.substring(0,t)},String.prototype.right=function(t){if("string"===$.type(t)){var e=this.indexOf(t);return e>0?this.substring(this.length-e):""}return this.substring(this.length-t)},Array.prototype.move=function(t,e){if(e>=this.length)for(var n=e-this.length;1+n--;)this.push(void 0);return this.splice(e,0,this.splice(t,1)[0]),this},function(t){t.fn.appendToIf=function(e,n){var r=t(this),i="function"==typeof n?n(r):n;return!0===("boolean"!=typeof i||i)&&r.appendTo(e),r},t.fn.appendIf=function(e,n){var r=t(this),i="function"==typeof n?n(r):n;return!0===("boolean"!=typeof i||i)&&r.append(e),r},t.fn.rwText=function(e,n,r){var i=t(this).empty();r=t.extend({wrap:!0},r);var o=!0===Array.isArray(e)?e:(null==e?"":String(e)).split("\n");return t.each(o,(function(t,e){""!==(e||"")&&(t>0&&i.append($$.br()),i.append(!0===r.wrap?$$.s(e):e))})),n&&i.attr("title",n),i},t.fn.loadSel=function(e,n,r){if("SELECT"===t(this).prop("tagName").toUpperCase()){var i=t(this);$ocms.postXT.call(this,{url:e,data:n||{},success:function(e){t.each(e,(function(){i.append($$.opt(e.value,e.text))}))},complete:function(){i.ldng(0),"function"==typeof r&&r.call(i)}})}},t.fn.emptyWithEditors=function(e){var n=t(this);return n.find(":input.tinymce").each((function(e,n){try{var r=tinymce.get(t(n).attr("id"));r&&r.remove()}catch(e){t.noop()}})),n.empty()},t.fn.cssValue=function(t){if(this.length>0){var e=this.css(t)||"";if(""===e)return 0;var n=/(^[\d\.]*)(\D{1,3}$)/gi.exec(e);return null!==n?"rem"===n[2]?$ocms.rpx(parseFloat(n[1])):parseFloat(n[1]):!1===isNaN(e)?parseFloat(e):0}return 0},t.fn.veryInnerHeight=function(){let e=e=>t(this).cssValue(e);return t(this).innerHeight()-e("padding-top")-e("padding-bottom")},t.fn.veryInnerWidth=function(){let e=e=>t(this).cssValue(e);return t(this).innerWidth()-e("padding-left")-e("padding-right")},t.fn.marginWidth=function(){let e=e=>t(this).cssValue(e);return e("margin-left")+e("margin-right")},t.fn.marginHeight=function(){let e=e=>t(this).cssValue(e);return e("margin-top")+e("margin-bottom")},t.inArrayRegEx=function(e,n,r){var i="regexp"===t.type(e)?e:new RegExp(e);if(!n)return-1;for(var o=r=r||0;o7){r=e.split(","),i=(n||(t<0?"rgb(0,0,0)":"rgb(255,255,255)")).split(",");var l=s(r[0].slice(4)),c=s(r[1]),d=s(r[2]);return"rgb("+(a((s(i[0].slice(4))-l)*o)+l)+","+(a((s(i[1])-c)*o)+c)+","+(a((s(i[2])-d)*o)+d)+")"}var u=(r=s(e.slice(1),16))>>16,p=r>>8&255,f=255&r;return"#"+(16777216+65536*(a((((i=s((n||(t<0?"#000000":"#FFFFFF")).slice(1),16))>>16)-u)*o)+u)+256*(a(((i>>8&255)-p)*o)+p)+(a(((255&i)-f)*o)+f)).toString(16).slice(1)},t.fn.IN=function(e){return t(this).fadeIn(400,e),t(this)},t.fn.OUT=function(e){return t(this).fadeOut(400,e),t(this)},t.fn.tooltip=function(e,n){var r=!0===("boolean"==typeof e&&e)&&"mouse",i="boolean"==typeof n&&n,o=t(this);return o.each((function(){var e=i?t(this).find(".tooltiptext"):t(this).children(".tooltiptext");t(e).length>0?e.each((function(){var e=t(this);t(this).filter(":not(:empty)").parent().qtip({suppress:!1,content:{text:e.clone()},position:{target:r,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden},show:{effect:!1},hide:{effect:!1}}),e.remove()})):t(this).qtip({position:{target:r,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden},effect:!1})})),o},t.fn.rC=function(e){return t(this).removeClass(e)},t.fn.aC=function(e){return t(this).addClass(e)},t.fn.tC=function(e,n){return t(this).toggleClass(e,n)}}(jQuery),function(t){t.fn.ocmsmenu=function(e,n){var r=t(this);return $ocms.menu.call(r,e,n),r},t.fn.activatemenu=function(){var e=t(this).filter("nav");return e.find("a").not(".on").addClass("on").click($nuf),e.find(".nav-btn").not(".on").addClass("on").click((function(e){e.stopPropagation();var n=t(this);t(n.attr("data-target")).tC(n.attr("data-toggle"))})),e}}(jQuery);class ObjectArray extends Array{isEmpty(){return 0===this[0].length}static get[Symbol.species](){return Array}filter(t){return"function"==typeof t?new ObjectArray(this[0].filter(t)):this}remove(t){if("function"!=typeof t)return this;{let e=this[0].findIndex(t);for(;e>-1;)this[0].splice(e),e=this[0].findIndex(t)}}sortBy(t){return"function"==typeof t&&this[0].sort(t),this}sortString(t){return this[0].sort(((e,n)=>{let r=(e[t]||"").toString().toUpperCase(),i=(n[t]||"").toString().toUpperCase();return console.debug(r.localeCompare(i)),r.localeCompare(i)})),this}sortNum(t){return this[0].sort(((e,n)=>{let r=e[t],i=n[t];return!0===isNaN(i)&&!1===isNaN(r)||ri?1:0})),this}sum(t){return this[0].reduce(((e,n)=>e+(!0===isNaN(n[t])?0:n[t])),0)}groupBy(t){return this[0].reduce((function(e,n){let r=n[t];return e[r]||(e[r]=[]),e[r].push(n),e}),{})}each(t){if("function"==typeof t){let e=!1;this[0].forEach(((n,r,i)=>{if(!1===e){let o=t(n,r,i);"boolean"==typeof o&&!1===o&&(e=!0)}}))}}get toArray(){return this[0]}}class NumArray extends Array{sum(){return this.reduce(((t,e)=>t+e))}first(){return this[0]}last(){return this[this.length-1]}average(){return this.sum()/this.length}range(){let t=this.map((t=>t)).sort();return{min:t[0],max:t[this.length-1]}}static get[Symbol.species](){return Array}}$ocms.ocmsmenu=[{lbl:"",id:"m_home",ico:"glyphicon glyphicon-home",fnc:"init:home"},{fnc:"separator"}],function(t){t.multline=function(t){let e=t.split("\n"),n=$$.d();return $.each(e,((t,e)=>{n.append($$.s(e))})),n.html()},t.tooltip_hidden=function(t,e){$(this).remove(),e.rendered=!1},t.isJSONDateString=function(t){return"string"==typeof t&&/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/.test(t)},t.failure=function(e){11110===(e.internalCode||-1)?t.login.dlg():alert($t.f1+"\n"+(e.internalText||""))},t.getScript=function(e,n){var r=[],i=[],o=function(t){return"string"==typeof t&&""!==(t||"")},a=function(t,e){!0===bool(e.condition,!0)&&(""!==(e.script||"")&&i.push({url:e.script,module:e.module||""}),!0===o(e.css||"")?r.push(e.css):!0===Array.isArray(e.css)&&Array.prototype.push.apply(r,e.css.filter(o)))};!0===o(e||"")?i.push(e):!0===Array.isArray(e)?$.each(e,a):"object"==typeof e&&""!==(e.script||"")&&a(0,e);let s=[];$.each(r,(function(t,e){""!==(e||"")&&s.push(loadCSS(e))}));let l=i.map((function(e,n){let r=e.url,o=e.module||"";if(""===o){return new Promise((function(t,e){try{!async function(){$.ajax({url:r,dataType:"script",success:function(){t(i)},error:function(){e(i)},timeout:3e4})}()}catch(t){console.debug(t.message+"%o",t)}}))}return t.loadmodule(o,r,e.alias)}));Promise.all(l).then(n)},t.loadmodule=function(e,n,r){return new Promise((function(i,o){!async function(){try{let a=(n.startsWith("/")||n.startsWith(".")?"":"/")+n;import(a).then((n=>{t[e]=n[r||"default"],i(e)})).catch((t=>{console.debug(t.message+"%o",t),o(e)}))}catch(t){console.debug(t.message+"%o",t)}}()}))},t.ocms_auth=function(e,n,r,i){!1===$.isPlainObject(t.auth.modules)&&(t.auth.modules={});var o=0;t.auth.modules[e+(r||"")]?((o=t.auth.modules[e+(r||"")])<2&&(r||"")===auth.guid&&(o=2),o>=(n||0)&&i(false)):t.postXT({url:t.url("auth"),data:{module:e,person_guid:r||""},success:function(a){o=a[e],t.auth.modules[e+(r||"")]=o,o<2&&(r||"")===t.auth.person_guid&&(o=2),o>=(n||0)&&i(false)},error:function(e){t.failure.call(this,e)}})},t.auth.locale="de",t.ocms_prepauth=function(e,n,r){t.postXT({url:t.url("auth"),data:{fn:"csv",modules:e,person_guid:n||""},success:function(e){t.ocms_regauth(e)},error:function(e){t.failure.call(this,e)},complete:function(){r()}})},t.ocms_regauth=function(t){$.each(t||{},(function(t,e){auth.modules[t]=parseInt(e)}))},t.init=function(e){var n="string"==typeof e?e:(e.data||{}).fn||"";""!==n&&("home"===n?($cfr(),$lfr(),$("#topbar").ocmsmenu([],!0),$("#activemodule").text($t.ov),t.ov.call($("#contentframe"))):($cfr(),$lfr(),$("#topbar").ocmsmenu([]),t.postXT({url:t.url(n+"/auth"),success:function(e){void 0===t[n]&&(t[n]={}),t[n].auth=e,e.manage>0&&t.getScript({module:n,script:["web/imdl",n,t.auth.locale||"de","js"].join("."),css:["web/imdl",n,"css"].join("."),condition:"function"!=typeof t[n].init2},(function(){t[n].init2()}))},error:function(){$("#contentframe").empty()}})))},t.menuarray=function(t){this.array=[],this.sep=function(){this.length>0&&"separator"!==this.array[array.length-1].fnc&&this.push({fnc:"separator"})},this.push=function(t){return void 0===t?null:(!0===Array.isArray(t)?Array.prototype.push.apply(this.array,t):"object"==typeof t&&this.array.push(t),t)},this.unshift=function(t){return void 0===t?null:(!0===Array.isArray(t)?Array.prototype.unshift.apply(this.array,t):"object"==typeof t&&this.array.unshift(t),t)},this.push(t)},t.menu=function(e,n){e=e||[];var r=$(this).removeClass("vis");if(!0===bool(n,!0)&&!1===r.is("#mainmenu")&&r.empty(),!1===bool(n,!1)&&r.is("#sidebar,#topbar")&&(e.unshift({id:"sbctrl",glyph:"glyphicon-th-list",aclass:"fbtn",fnc:function(){$lf()}}),$lf(0)),0===(e||[]).length)r.empty().addClass("hd");else{r.removeClass("hd");var i=!0===r.is("nav")?r:r.children("nav");1!==i.length&&(i=$(" ").tC("nv",r.is("#sidebar")).tC("ctxt",r.is("#topbar")).appendTo(r));var o,a=$$.ul().appendTo(i),s=function(t,e){var n=$(this).addClass("dropdown submenu");t.append($$.sc("caret dd")).addClass("dds dropdown-toggle").attr({"aria-expanded":"false"}),""!==(e.ico||"")&&t.prepend($$.sc("ico "+e.ico));var r=$$.ul({class:"dropdown-menu",role:"menu"}).appendTo(n);$.each(e.itm||[],(function(t,e){o.call(r,e)}))},l=function(t){$(this).tC("disabled","boolean"==typeof t.disabled?t.disabled:"string"==typeof t.disabled&&"subs"===t.disabled&&0===(t.itm||[]).length)};o=function(e){var n,r=$$.li({id:e.id}).attr(e.attr||{}).addClass(e.lclass).appendTo($(this)),i="string"==typeof e.fnc&&""!==e.fnc?e.fnc.split(":")[0]:"";""!==i&&"init"!==i?r.attr("role",i).appendIf($$.s(e.lbl),""!==ne(e.lbl)):(n=$$.a({class:"on",role:"button"}).addClass(e.aclass).appendTo(r).append($$.s(e.lbl)),l.call(n,e),(e.itm||[]).length>0&&s.call(r,n,e),n.click($nuf),"function"==typeof e.fnc?n.click(e.data||{},e.fnc):"init"===i&&n.click($.extend({},e.data||{},{fn:e.fnc.split(":")[1]}),t.init))},$.each(e,(function(e,n){var r,i=$$.li({id:n.id}).attr(n.attr||{}).addClass(n.lclass),s="string"==typeof n.fnc&&""!==n.fnc?n.fnc.split(":")[0]:"";if(""!==s&&"init"!==s)i.attr("role",s).appendIf($$.s(n.lbl),""!==ne(n.lbl));else{if(r=$$.a({class:"on",role:"button"}).addClass(n.aclass).appendTo(i),l.call(r,n),""!==(n.lbl||"")&&r.append($$.s(n.lbl)),""!==(n.ico||"")&&r.prepend($$.sc("ico "+n.ico)),""!==(n.glyph||"")&&r.prepend($$.sc("glyphicon "+n.glyph)),(n.itm||[]).length>0){i.addClass("dropdown"),r.append($$.sc("caret dd")).addClass("dds dropdown-toggle").attr({"aria-expanded":"false"});var c=$$.ul({class:"dropdown-menu",role:"menu"}).appendTo(i);$.each(n.itm||[],(function(t,e){o.call(c,e)}))}(n.sel||[]).length>0||(r.click($nuf),"function"==typeof n.fnc?r.click(n.data||{},n.fnc):"init"===s&&r.click($.extend({},n.data||{},{fn:n.fnc.split(":")[1]}),t.init))}i.appendTo(a)})),i.activatemenu()}},t.easytbl=(t,e)=>{e=e||{};let n=$$.tbl().addClass(e.class).css("border-collapse","collapse"),r=($$.tbody(n),!0===bool(e.frame,!1)?{padding:"5px",border:"1px solid #727272"}:{});if(!0===Array.isArray(e.header)){let t=$$.thead(n);$.each(e.header,((n,i)=>$$.th(t).css(e.cellcss||r).rwText(i)))}else if(!0===bool(e.header,!1)&&(t||[]).length>0){let i=$$.thead(n);$.each(Object.keys(t[0]),((t,n)=>$$.th(i).css(e.cellcss||r).rwText(n)))}return $.each(t||[],((t,i)=>{let o=$$.tr();$.each(i,((t,n)=>{n=n||"";let i=$$.td(o).css(e.cellcss||r);n instanceof jQuery?i.append(n):"string"==typeof n&&("<"===n.substring(0,1)?i.append(n):i.text(n))})),n.append(o)})),n},t.dlgtbl=(e,n,r)=>{r=r||{};let i=t.easytbl(e,r);t.dlg(i,$.extend({title:n},r))},t.dlg=function(t,n){n=n||{};let r=$("body > .modal").length>0,i=t=>typeof n[t],o=t=>"function"===i(t);if(!0===bool(n.exclusive,!0)&&!0===r)return void alert($t.dbldlg||"Es ist bereits ein Dialog geöffnet");let a=$$.dc("modal",$("body")),s=$$.dc("modal-dialog",a);!1===isNaN(n.zindex)?a.css("zIndex",n.zindex):!0===r&&a.css("zIndex",parseInt($("body > .modal:last").cssValue("zIndex"))+200),!1===isNaN(n.zindex_min)&&a.cssValue("zIndex")').appendTo(u)),""!==ne(n.title)&&(l=$$.dc("modal-header",u),$(" ").text(n.title).appendTo(l));let f=$$.dc("modal-body",u),m=$$.dc("modal-footer",u);t instanceof jQuery==!0&&f.append(t);let h=function(t){t&&"function"==typeof t.stopPropagation&&t.stopPropagation(),s.removeClass("in"),!0===o("closing")&&n.closing.call(u),f.hide().emptyWithEditors(),a.remove(),!0===o("close")&&n.close.call(u)};if(u.find(":input[required]").length>0&&($$.dc("note_required",m).append($$.sc("ind_required","*")).append($$.s($t.t1||"Eingabe erforderlich")),$$.dc("note_invalid",m).append($$.s($t.t2||"Bitte überprüfen Sie Ihre Eingaben im Formular."))),!0===o("cancel")){$$.bbtn(n.cancelbutton||"Abbrechen","cancel").attr({type:"button",role:"cancel"}).appendTo(m).click((function(t){n.cancel.call(u,t);t.stopPropagation(),h()}))}if(!0===o("confirm")){let t=$$.bbtn(n.button||"OK","confirm").attr({type:!0===bool(n.form,!1)?"submit":"button",role:"confirm"}).appendTo(m);!0===p?(u.submit((function(t){try{n.confirm.call(u,t)}finally{t.preventDefault()}return!1})),u.on("modal_submit",(function(){n.confirm.call(u,e)}))):(t.click((function(t){n.confirm.call(u,t);t.stopPropagation()})),u.on("modal_submit",(function(){t.click()})))}else!0===p&&u.submit((function(t){return t.preventDefault(),!1}));return u.on("modal_close",(function(){h()})),c.click(h),!0===o("opening")&&n.opening.call(u),s.addClass("in"),ne(n.mode).indexOf("maxbody")>-1&&f.css("min-height",(d.height()-l.outerHeight()-m.outerHeight()).toString()+"px"),!0===o("open")&&n.open.call(u),{hd:l,bdy:f,ft:m,ct:d,dlg:s,c:u}},t.mform=function(e){let n=$$.dc("form-body"),r=Array.isArray(e)?e:e instanceof fields_definition?e.fields:[];return $.each(r||[],(function(e,r){let i=r.type||"";if("ignore"===i)return!0;let o=$$.dc("form-group",n),a=r.id||"dlg_"+(r.name||"")+("html"===r.type?"_"+(65536*(1+Math.random())||0).toString(16).substr(9):""),s=$$.lbl(r.label||r.name,{for:a}).appendTo($$.dc("form-itm",o)),l=$$.dc("form-itm",o),c=$$.i({id:a,name:r.name,placeholder:r.placeholder,type:r.type});switch(i){case"email":r.pattern=ne(r.pattern,"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$");break;case"url":r.pattern=ne(r.pattern,"https?://.+");break;case"number":r.pattern=ne(r.pattern,"[-+]?[0-9]*[.,]?[0-9]*"),c.attr("step",r.precision||"any"),c.attr("data-format","float");break;case"integer":case"int":r.pattern=ne(r.pattern,"[-+]?[0-9]*"),c.attr("type","number"),c.attr("data-format","integer");break;case"date":if(""!==ne(r.pattern,$t.datepattern)&&(r.pattern=ne(r.pattern,"("+$t.datepattern+")|([0-9]{4}.(0[1-9]|1[012]).(0[1-9]|1[0-9]|2[0-9]|3[01]))")),""!==ne(r.placeholder,$t.dateplaceholder)&&c.attr("placeholder",ne(r.placeholder,$t.dateplaceholder)),"string"==typeof r.value){var d=r.value.substr(0,10);r.value="date"!==c.prop("type")?fdt(d+"T00:00:00",ne(r.dateformat,$t.dateformat)):d}c.attr("data-format","date:"+ne(r.dateformat,$t.dateformat)+";yyyy-MM-dd");break;case"datetime":c.attr("type","datetime-local"),""!==ne(r.pattern,$t.datetimepattern)&&(r.pattern=ne(r.pattern,"("+$t.datetimepattern+")|([0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])\\s([0-5][0-9]):([0-5][0-9]))")),""!==ne(r.placeholder,$t.datetimeplaceholder)&&c.attr("placeholder",ne(r.placeholder,$t.datetimeplaceholder)),"string"==typeof r.value&&"T"===r.value.substr(10,1)&&(r.value="datetime"!==c.prop("type").substr(0,8)?fdt(r.value,ne(r.datetimeformat,$t.datetimeformat)):r.value),c.attr("data-format","datetime:"+ne(r.datetimeformat,$t.datetimeformat)+";yyyy-MM-dd HH:mm:ss");break;case"hidden":o.addClass("hd");break;case"html":case"text":c=$$.txt({id:a,name:r.name,placeholder:r.placeholder,type:r.type}),c.tC("tinymce","html"===r.type);break;case"bool":case"boolean":r.url=[{value:"true",label:($t||{}).true||"Yes"},{value:"false",label:($t||{}).false||"No"}],"boolean"==typeof r.value&&(r.value=r.value?"true":"false");case"select":c=$$.sel({id:a,name:r.name,type:r.type}),!1===bool(r.required,!1)&&$$.eOpt().appendTo(c);try{var u=function(t){!0===Array.isArray(t)&&$.each(t,(function(t,e){"string"==typeof e?$$.opt(e,e).appendTo(c):!0===Array.isArray(e)?$$.opt(e[0],e[1]).appendTo(c):"object"==typeof e&&$$.opt(e.value,e.label||e.text).appendTo(c)}))};!0===Array.isArray(r.url)?u(r.url):"function"==typeof r.url?r.url.call(c):"string"==typeof r.url&&t.postXT({url:r.url,success:u})}catch(t){$.noop()}break;default:""!==ne(r["max-length"])&&c.attr("max-length",r["max-length"])}""!==ne(r.pattern)&&c.attr("pattern",r.pattern),c.val(r.value).change(),c.change((function(){$(this)[0].setCustomValidity("")})),c.addClass("form-control").prop("required",bool(r.required,!1)).prop("readonly",bool(r.readonly,!1)).appendTo(l),!0===bool(r.required,!1)&&s.append($$.sc("ind_required","*")),"object"==typeof r.attr&&c.attr(r.attr),"object"==typeof r.prop&&c.prop(r.prop),"string"==typeof r.class&&c.addClass(r.class),"function"==typeof r.change&&(c.change(r.change),!0===bool(r.applychange,!1)&&void 0!==r.value&&c.change()),""!==(r.note||"")&&$$.dc("form-note",l).rwText(r.note),"function"==typeof r.complete&&r.complete.call(c)})),n},t.initMCE=function(t,e){t=$(t),e=e||{};try{let n={target:t[0],inline:!1,width:e.width||"100%",statusbar:!1,document_base_url:window.location.origin+"/",content_style:"ph:before {content: '«'; color: #BBB; font-style:italic; } ph:after {content: '»'; color: #BBB; font-style:italic; } ph { color: #AAA; font-style:italic; }",relative_urls:!1,remove_script_host:!1};!0===bool(e.hidemenu,!1)&&(n.menubar=!1,n.menu={}),!0===bool(e.hidetoolbar,!1)&&(n.toolbar=!1),$.extend(n,e||{}),tinymce.init(n)}catch(t){alert(t.message)}},t.dlgform=function(e,n){n=n||{};let r,i=$$.dc("frm").append(t.mform(e||[]).addClass("stacked"));n.addcontent instanceof jQuery&&i.append(n.addcontent),"function"==typeof n.submit?r=n.submit:"function"==typeof n.success&&(r=function(e){var r=$(this).ldng(1),i=$.extend({loginaccount:t.auth.account||""},r.serializeObject(bool(n.checkvalidity,!0),{typedvalues:bool(n.typedvalues,!1)}));""!==(n.url||"")?t.postXT({url:n.url,data:i,success:function(t){n.success.call(this,t),r.trigger("modal_close")},error:function(){alert($t.l17)},complete:function(){r.ldng(0)},timeout:6e4}):(n.success.call(this,i),r.trigger("modal_close"))});let o={form:!0,title:n.title||"",button:n.button||$t.submit,confirm:r,size:n.size||[500,600],open:function(){let e=$(this).find(".tinymce");e.length>0&&t.initMCE(e,n.tinymce||{})}};return t.dlg.call(this,i,o)},t.login.dlg=function(e){e=e||{};let n=[{name:"userinfo",label:$t.l1,type:"string",value:t.auth.login,change:t.login.uichange,required:!0},{name:"userlogin",type:"hidden",required:!0,value:t.auth.login},{name:"username",type:"string",label:$t.l4,required:!0,readonly:!0,placeholder:$t.l5,value:t.auth.fullname_rev},{name:"userpass",type:"password",label:$t.l3,required:!0,placeholder:$t.l3}];""===(t.auth.account||"")&&n.unshift({id:"dlg_loginaccount",name:"loginaccount",type:"string",required:!0,value:t.auth.account});let r=$$.dc("frm").append(t.mform(n).addClass("stacked")),i=t.dlg.call(this,r,{form:!0,title:$t.l0,button:$t.submit,confirm:function(n){var r=$(this).ldng(1),i=$.extend({loginaccount:t.auth.account||""},r.serializeObject());t.postXT({url:"/vt/login",data:i,success:function(n){""!==((n||{}).login||"")&&(r.trigger("modal_close"),t.auth=n,"object"==typeof e.ajo&&(e.ajo.islogin,$.ajax(e.ajo)))},error:function(){alert($t.l17)},complete:function(){r.ldng(0)},timeout:6e4})},size:[500,600]}),o=$$.dc("modal-content").css("height","auto").attr("novalidate","true").append($$.dc("modal-header").appendIf($(" ").text(t.auth.accountname),""!==(t.auth.accountname||"")).append($("Vereinsmanager ")));i.dlg.prepend(o)},t.addNoEntryInfo=function(t){$(this).append($$.dc("noentryinfo").text(t||$t.t11))}}($ocms),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(Element.prototype.matches.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}),function(t,e){var n,r;"object"==typeof window&&(window[t]=(n=function(t){var e=window,n=document.body,r=document.documentElement,i=Math.max(0,e.pageXOffset||r.scrollLeft||n.scrollLeft||0)-(r.clientLeft||0),o=Math.max(0,e.pageYOffset||r.scrollTop||n.scrollTop||0)-(r.clientTop||0);return{x:t?Math.max(0,t.pageX||t.clientX||0)-i:0,y:t?Math.max(0,t.pageY||t.clientY||0)-o:0}},(r=function(t,e){t&&t instanceof Element&&(this._container=t,this._options=e||{},this._clickItem=null,this._dragItem=null,this._showDragItem="boolean"!=typeof this._options.dragItem||!1!==this._options.dragItem,this._hovItem=null,this._sortLists=[],this._click={},this._dragging=!1,this._dragHandleClass=this._options.dragHandleClass||"",this._parentident=this._options.parentident||"",this._swapdone="function"==typeof this._options.swapdone?this._options._swapdone:null,this._container.setAttribute("data-is-sortable",1),this._container.classList.add("sortable"),this._container.style.position="static",window.addEventListener("mousedown",this._onPress.bind(this),!0),window.addEventListener("touchstart",this._onPress.bind(this),!0),window.addEventListener("mouseup",this._onRelease.bind(this),!0),window.addEventListener("touchend",this._onRelease.bind(this),!0),window.addEventListener("mousemove",this._onMove.bind(this),!0),window.addEventListener("touchmove",this._onMove.bind(this),!0))}).prototype={constructor:r,toArray:function(t){t=t||"id";for(var e=[],n="",r=0;rr.left&&er.top&&n-1)&&e.className.indexOf("nosort")<0)&&(t.preventDefault(),this._dragging=!0,this._click=n(t),this._makeDragItem(e),this._onMove(t),!0)}t&&!1===e.call(this,t.target)&&""!==this._parentident&&t.target.closest(this._parentident)&&e.call(this,t.target.closest(this._parentident))},_onRelease:function(t){this._dragging=!1,this._trashDragItem()},_onMove:function(t){if(this._dragItem&&this._dragging){t.preventDefault();var e=n(t),r=this._container;!0===this._showDragItem&&this._moveItem(this._dragItem,e.x-this._click.x,e.y-this._click.y);for(var i=0;i0?s.mousedown(l).addClass("dctrl"):a.mousedown(l).addClass("dctrl"),t(this)}}(jQuery),$(document).ready((function(){$("html").click((function(t){$nuf()})),$("#listframe").click((function(t){t.stopPropagation(),$nuf()})),$("#mainmenu").ocmsmenu($ocms.ocmsmenu),$("#mainmenu").activatemenu()})),$.extend($t,{m_inv:"Rechnungen",m_req:"Aufträge",m_rep:"Berichte",m_todo:"ToDos",m_bcd:"BankBuchungen",rsp:"Passwort ändern",pnm:"Die Passwörter stimmen nicht überein",cps:"Das neue Passwort wurde gespeichert.",pwr:"Bitte wählen Sie ein starkes Passwort (min 8 Zeichen, davon jeweils min 2 Zahlen, kleine und große Buchstaben, Sonderzeichen sind optional).",smsc:"Sie beötigen für diese Funktion einen SMS-Code.\nSoll dieser nun versandt werden?",wdc:"Doppelt klicken, um die Box zu aktualisieren.",wdg:{}}),$t.rspf={sms:"Der SMS-Code konnte nicht bestätigt werden",valid:"Das alte Passwort ist nicht korrekt",requirements:"Das Passwort entspricht nicht den Anforderungen.\n"+$t.pwr},$fd={rsp:new fields_definition("","",[{name:"opw",label:"aktuelles Passwort",type:"password",required:!0,attr:{"auto-complete":"current-password"}},{name:"npw",label:"neues Passwort",type:"password",required:!0,pattern:"(.{6,})",attr:{"auto-complete":"new-password"}},{name:"npwc",label:"neues Passwort (Bestätigung)",type:"password",required:!0,attr:{"auto-complete":"new-password"},note:$t.pwr},{name:"code",label:"SMS-Code",type:"string",required:!0,attr:{"auto-complete":"one-time-code"}}])},$ocms.init=function(t){var e="string"==typeof t?t:(t.data||{}).fn||"";""!==e&&("home"===e?($cfr(),$lfr(),$("#topbar").ocmsmenu([],!0),$("#activemodule").text($t.ov),$fis.ov()):($cfr(),$lfr(),$("#topbar").ocmsmenu([]),$ocms.postXT({url:$ocms.url(e+"/auth"),success:function(t){void 0===$ocms[e]&&($ocms[e]={}),$ocms[e].auth=t,t.manage>0&&$ocms.getScript({module:e,script:["/web/fis",e,$ocms.auth.locale||"de","js"].join("."),css:["/web/fis",e,"css"].join("."),condition:"function"!=typeof $ocms[e].init2},(function(){$ocms[e].init2()}))},error:function(){$("#contentframe").empty()}})))};var $fis={auth:{},db:function(){$("#mainmenu_activemodule").text($t.ov);let t=$(this).empty(),e=$$.d({id:"dashboard_frame"}).appendTo(t);$ocms.postXT({url:$ocms.url("wdg/my"),success:function(t){$.each(t,(function(t,n){var r=$$.dc("wdg_frame",e,{"data-wdg":n}).ldng(1);$ocms.wdg.call(r,{wdg:n})}))},loading:e})},ValidateEmail:function(t){return!!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(t)},cf:t=>{let e=$("#contentframe");return!0===bool(t,!1)&&e.empty().rC("hd"),e},lf:t=>{let e=$("#listframe");return!0===bool(t,!1)&&e.empty().aC("hd").rC("fix"),e},frm_edit:function(t){let e=$fis.cf(!1),n=e.children(".cfrm"),r=e.children(".edit_frm");return n.length<1?n=$$.dc("cfrm hd").prependTo(e):!0===bool(t,!1)&&n.empty(),r.length<1&&(r=$$.dc("edit_frm").insertAfter(n)),r.empty()},frm_list:function(t,e){let n=$fis.cf(!1),r=n.children(".cfrm"),i=n.children(".list_frm");return r.length<1?r=$$.dc("cfrm hd").prependTo(n):!0===bool(t,!1)&&r.empty(),!0===bool(e,!1)&&n.children(".edit_frm").remove(),i.length<1&&(i=$$.dc("list_frm").appendTo(n)),i.empty()},lfm:()=>{let t=$fis.lf(!1),e=t.children(".lfrm");return e.length<1&&(e=$$.dc("lfrm").prependTo(t)),e},getAuth:(t,e)=>new Promise(((n,r)=>{$fis.auth[t]&&!1===bool(e,!1)?n($fis.auth[t]||-1):$ocms.postXT({url:$ocms.url("auth"),data:{module:t},success:e=>{$fis.auth[t]=e.auth||-1,n($fis.auth[t]||-1)},error:()=>{r()}})})),prepAuth:t=>new Promise(((e,n)=>{$ocms.postXT({url:$ocms.url("auth"),data:{module:t,array:1},success:t=>{$.extend($fis.auth,t||{})},complete:()=>{e()}})})),isAuth:(t,e)=>($fis.auth[t]||-1)>=(e||1),resetPass:function(t,e){confirm($t.smsc)&&($ocms.postXT({url:$ocms.url("account/sms"),data:{fn:"pwc"}}),$ocms.dlgform($fd.rsp.clone(),{title:$t.rsp||"",submit:function(t){var e=$(this).ldng(1),n=$.extend({loginaccount:$ocms.auth.account||""},e.serializeObject(!0,{typedvalues:!0}));(n.npw||"")!==(n.npwc||"")?e.find('input[name="npw"]:first')[0].setCustomValidity($t.pnm):$ocms.postXT({url:$ocms.url("account/changepassword"),data:n,success:function(t){alert($t.cps),e.trigger("modal_close")},error:function(t){alert($t.rspf[t.getResponseHeader("x-ocms-std")])},complete:function(){e.ldng(0)},timeout:6e4})}}))},wdg:function(t){let e=$(this).empty();$ocms.postXT({url:$ocms.url("wdg/one"),data:{short_name:t.wdg},timeout:9e4,success:function(n,r,i){let o=t.wdg,a=n[o];if(!a)return void e.ldng(0);let s=$.inArrayRegEx("dblwidth",a.rendering_options)>-1,l=$.inArrayRegEx("tiny",a.rendering_options)>-1;e.toggleClass("dbl",s&&!l).toggleClass("tny",l);$$.dc("wdg_hd",e,{title:ne(a.description,$t.wdc)}).toggleClass("dbl",s).text(ne(a.name,t.wdg)).dblclick((function(t){t.stopPropagation(),$fis.wdg.call(e,{wdg:o})}));let c=$$.dc("wdg_cnt",e).toggleClass("dbl",s).hide(),d=$.inArrayRegEx("bgcolor",a.rendering_options);switch(d>-1&&c.css("backgroundColor",a.rendering_options[d].toString().right(":")),a.type){case"table":var u=$$.tblset({},c),p=$$.tr().appendTo(u.hd),f=$t.wdg[o.indexOf("wdg_ev_")>=0?"wdg_ev_":o]||{};$.each(a.columns,(function(t,e){var n=f[e]?f[e].label:e;$$.th().text(n).appendTo(p)})),$.each(a.data,(function(t,e){var n=$$.tr().appendTo(u.bdy);$.each(a.columns,(function(t,r){var i=$$.td().appendTo(n);e[r]instanceof Date||!0===$ocms.isJSONDateString(e[r])?i.text(fdt(e[r],$t.dateformat)):i.rwText(e[r])}))})),$.inArray("firstrow_bold",a.rendering_options)>-1&&p.nextAll("tr:first").css("font-weight","bold");break;case"ind":$$.dc("ind",c).addClass("sts_"+(a.data.status||"")).append([$$.dc("ind").text(a.data.value),$$.lbl(a.data.label)]);break;case"image_url":c.css("background","url('"+a.url+"') no-repeat center center transparent");break;case"image_base64":c.css("background","url('data:image/png;base64,"+a.image+"') no-repeat center center transparent");break;case"html":if(c.html(a.html),$.inArray("reload_10min",a.rendering_options)>-1){var m=c.find("iframe");setTimeout((function(){m.attr("src",(function(t,e){return e}))}),6e5)}}$.inArray("reload_30min",a.rendering_options)>-1&&"html"!==a.type&&setTimeout((function(){$fis.wdg.call(e,{wdg:o})}),18e5),c.slideDown(150)},error:function(t){e.slideUp(150),$fis.failure.call(this,t)},complete:function(){e.ldng(0)}})},ov:function(){$fis.lf(!0);let t=$("#contentframe").empty(),e=$$.d({id:"dashboard_frame"}).appendTo(t);$ocms.postXT({url:$ocms.url("wdg/my"),success:function(t){$.each(t,(function(t,n){var r=$$.dc("wdg_frame",e,{"data-wdg":n}).ldng(1);$fis.wdg.call(r,{wdg:n})}))},loading:e})}};Array.prototype.push.apply($ocms.ocmsmenu,[{lbl:$t.m_inv,id:"m_inv",fnc:"init:inv",ico:"glyphicon glyphicon-list-alt"},{lbl:$t.m_req,id:"m_req",fnc:"init:req",ico:"glyphicon glyphicon-eur"},{lbl:$t.m_bcd,id:"m_bcd",fnc:"init:bam",ico:"glyphicon glyphicon-indent-right"},{fnc:"separator"},{lbl:$t.m_rep,id:"m_rep",fnc:"init:rep",ico:"glyphicon glyphicon-dashboard"},{fnc:"separator"},{lbl:$t.m_todo,id:"m_todo",fnc:()=>{$("#contentframe").empty().load($ocms.url("todos")),$("#listframe").rC("fix").aC("hd")},ico:"glyphicon glyphicon-sunglasses"}]),$(document).ready((function(){$fis.ov()}));
\ No newline at end of file
+function onloadCSS(t,e){e=e||{};let n=function(e){return new Promise(((n,o)=>{t.addEventListener?e.addEventListener("load",newcb):t.attachEvent&&e.attachEvent("onload",newcb),"isApplicationInstalled"in navigator&&"onloadcssdefined"in t&&e.onloadcssdefined(newcb)}))};if(Array.isArray(t)){let o=t.length;Promise.all(t.map(n)).then((function(t){var n=t.reduce(((t,e)=>t+(!0===e?1:0)));!async function(t){!0===t&&"function"==typeof e.success?e.success():!0===t&&"object"==typeof e.success&&e.success instanceof Promise&&await e.success(),e.complete()}(o===n)}))}else n(t)}!function(t){"use strict";var e=function(e,n,o,i){var r,s=t.document,a=s.createElement("link");if(n)r=n;else{var c=(s.body||s.getElementsByTagName("head")[0]).childNodes;r=c[c.length-1]}var l=s.styleSheets;if(i)for(var u in i)i.hasOwnProperty(u)&&a.setAttribute(u,i[u]);a.rel="stylesheet",a.href=e,a.media="only x",function t(e){if(s.body)return e();setTimeout((function(){t(e)}))}((function(){r.parentNode.insertBefore(a,n?r:r.nextSibling)}));var d=function(t){for(var e=a.href,n=l.length;n--;)if(l[n].href===e)return t();setTimeout((function(){d(t)}))};function h(){a.addEventListener&&a.removeEventListener("load",h),a.media=o||"all"}return a.addEventListener&&a.addEventListener("load",h),a.onloadcssdefined=d,d(h),a};"undefined"!=typeof exports?exports.loadCSS=e:t.loadCSS=e}("undefined"!=typeof global?global:this);const isIE=/MSIE\/|Trident/gi.test(window.navigator.userAgent)||void 0!==window.document.documentMode,isfileapi=!!(window.File&&window.FileReader&&window.FileList&&window.Blob);var $ocms={auth:{},no:function(t){t.stopPropagation()},vmin:function(t){var e=$(window).width*(t||1),n=$(window).height*(t||1);return e($ocms.baseurl+"/"+(t||"")).replace(/\/\//,"/"),cexi:null};function deepCopy(t){var e,n,o;if("object"!=typeof t||null===t)return t;for(o in e=Array.isArray(t)?[]:{},t)n=t[o],e[o]=deepCopy(n);return e}function fields_definition(t,e,n){this.label_sng=!0===Array.isArray(t)?"":t||"",this.label_pl=!0===Array.isArray(t)?"":e||"",this.fields=!0===Array.isArray(t)?t:n||[],this.itm=function(t){for(var e=0;e0)for(var n=0;nt||"")).filter(((t,e)=>""!==t)).join(e)}function parseDt(t,e,n){t=(t||"").substr(0,e.length);var o=e,i=t.length>0&&e.split(";").some((function(e){for(var n,i=/[^yMdhms0-9]/gi,r=!0;null!==(n=i.exec(e));)r=r&&e.substr(n.index,1)===t.substr(n.index,1);var s=t.length===e.length&&r;return!0===s&&(o=e),s}));if(!0===i){for(var r,s=[0,0,0,0,0,0,0],a=/(mm{1,2}|dd{1,2}|MM{1,2}|(yy){2,4}|ss{1,2}|hh{1,2})(?!\w)/g;null!==(r=a.exec(o));)s["yMdhms".indexOf(r[0].substr(0,1))]=parseInt(("yy"===r[0]?"20":"")+t.substr(r.index,r[0].length))-("M"===r[0].substr(0,1)?1:0);var c=new(Function.prototype.bind.apply(Date,[null].concat(s)));return"string"==typeof n?fdt(c,n):c}return!1}function bool(t,e){return"boolean"==typeof t?t:"boolean"==typeof e&&e}function booln(t,e){return"boolean"==typeof t?t:"number"==typeof t?1===t:"boolean"==typeof e&&e}Date.prototype.isValid=function(){return!isNaN(this)},Date.prototype.format=function(t){return fdt(this,t)},Date.prototype.addDays=function(t){return this.setDate(this.getDate()+t),this},Date.prototype.isBetween=function(t,e){return this>t&&this section");$(window).scroll((function(e){let n=$(window).scrollTop(),o=$("body");o.toggleClass("unfocus",n>vh()-1.2*t),o.toggleClass("btb",n>.5*vh()-t)}))},$ocms.cf_reset=function(){return $("#contentframe").empty()},function(t){t.fn.scrollTo=function(e){if(t(this).length>0){var n=t(this).offset().top||0;n>0&&t("html, body").animate({scrollTop:n-hh()},2e3)}},t.fn.ldng=function(e){var n=!0;return"boolean"==typeof e?n=e:"number"==typeof e&&(n=e>0),t(this).toggleClass("loading",n)},"function"!=typeof t.noop&&(t.noop=function(){}),t.fn.hasAttr=function(e){var n=t(this).attr(e);return void 0!==n&&!1!==n},t.fn.parseCssPx=function(e){try{return parseFloat(t(this).css(e).replace("px","")||0)}catch(t){return 0}},t.max=function(t,e){return isNaN(t)&&isNaN(e)?null:isNaN(t)&&!isNaN(e)?e:!isNaN(e)&&isNaN(e)||t>=e?t:e},t.min=function(t,e){return isNaN(t)&&isNaN(e)?null:isNaN(t)&&!isNaN(e)?e:!isNaN(e)&&isNaN(e)||t<=e?t:e},t.lim=function(t,e){return isNaN(t)?null:isNaN(e)?t:e<=t?e:t},t.fn.enterKey=function(e){return this.each((function(){t(this).keypress((function(t){"13"===(t.keyCode?t.keyCode:t.which).toString()&&e.call(this,t)}))}))}}(jQuery),$ocms.defaultTimeout=3e4,$ocms.AjaxEX=function(t){var e=this;e.responseText=e.responseText||"";var n=e.getResponseHeader("x-ocms-code")||"";e.internalCode=""!==n&&!1===isNaN(n)?parseInt(n):-1,e.isInternal=e.internalCode>-1,e.internalText=decodeURIComponent((e.getResponseHeader("x-ocms-desc")||"").replace(/\+/g,"%20")||"");var o=e.internalText||t,i=e.internalCode||e.status;e.logtext=o+" ("+i+")"},$ocms.postXTS=function(t){$ocms.postXT.call(this,$.extend(t,{sync:!0}))},$ocms.postXT=function(t){if((t=t||{}).trycount=t.trycount||0,""!==(t.url||"")){t.url=-1!==t.url.indexOf("&yy=")?t.url:t.url.indexOf("?")>-1?t.url+"&yy="+(new Date).getTime():t.url+"?yy="+(new Date).getTime();var e=t.context||this;switch(t.context=e,t.retryLimit=t.retryLimit||0,t.timeout=t.timeout||$ocms.defaultTimeout,t.timeout<100&&(t.timeout=1e3*t.timeout),t.data=t.data||{},t.contentType=t.contentType||"multipart/form-data; charset=UTF-8",t.islogin="boolean"==typeof t.islogin&&t.islogin,t.contentType){case"":case"json":t.contentType="application/json; charset=utf-8";break;case"form":t.contentType="application/x-www-form-urlencoded; charset=UTF-8";break;case"multi":t.contentType="multipart/form-data";break;case"text":t.contentType="text/plain; charset=UTF-8"}if(t.form instanceof jQuery?(t.data=t.form.serializeObject(),t.contentType="form-data"):t.lzw instanceof jQuery&&(t.data.lzw=$.ccLZW(t.lzw.serializeAnything(!0)).join(",")),"multipart/form-data"!==t.contentType.substr(0,19)&&"form-data"!==t.contentType.substr(0,9)||t.data instanceof FormData!=!1)t.data instanceof FormData&&(t.contentType=!1,t.processData=!1);else{t.contentType=!1;var n=new FormData;$.each(t.files||[],(function(t,e){n.append("upload_file",e)})),$.each(t.data||{},(function(t,e){n.append(t,e)})),t.data=n,t.processData=!1}var o={type:t.method||"post",url:t.url,data:t.data,processData:"boolean"!=typeof t.processData||t.processData,contentType:t.contentType,cache:t.cache||!1,timeout:t.timeout,beforeSend:function(n){$(t.loading).ldng(),$("body").addClass("ldng"),"function"==typeof t.beforesend&&t.beforesend.apply(e,[n])},success:function(n,o,i){"false"===n||"not authorized"===n?("function"==typeof t.error&&t.error.apply(e,[i,o,n]),"function"==typeof $.status&&$.status(o+" - "+n)):"function"==typeof t.success&&t.success.apply(e,[n,o,i])},error:function(n,o,i){if($ocms.AjaxEX.call(n,o),-1===t.url.indexOf("doc.ashx")||-1!==t.url.indexOf("ftest")){if(401===n.status&&111===n.internalCode&&!1===t.islogin&&"function"==typeof $ocms.login.dlg)$ocms.login.dlg({ajo:t});else if("timeout"===o||302===n.status)return t.tryCount++,t.tryCount<=t.retryLimit?void $ocms.postXT(t):void 0;"function"==typeof t.error?t.error.apply(e,[n,o,i]):"function"==typeof $ocms.failure?$ocms.failure.apply(e,[n]):"function"==typeof $.status&&$.status("Server error: "+o+" - "+i)}},dataType:t.datatype||"json",complete:function(n,o){"function"==typeof t.complete&&t.complete.apply(e,[n,o]),$(t.loading).ldng(0),$("body").removeClass("ldng");let i=$("body > .timer");if(i.length>0){let t=new Date(n.getResponseHeader("ocms_cec")||""),e=new Date(n.getResponseHeader("ocms_cex")||"");if(t.isValid()&&e.isValid()){let n=new Date,o=Math.abs(e-t);n.setMilliseconds(n.getMilliseconds()+o),i.data({cex:n,ctt:o}),$ocms.cex_timer()}}},context:e,async:!0};"boolean"==typeof t.sync&&(o.async=!1===t.sync),!0==("boolean"==typeof t.contentType&&!1===t.contentType)&&(o.contentType=!1),$.ajax(o)}},$ocms.cex_timer=function(){$ocms.cexi||($ocms.cexi=setInterval($ocms.cex_timer,15e3));let t=$("body > .timer"),e=t.data("cex"),n=t.data("ctt"),o=new Date;if(e instanceof Date&&e.isValid()&&"number"==typeof n&&n>0&&e>o){let i=Math.abs(o-e)/n*100;t.css("width",i.toString()+"%"),i<98&&(!$ocms.cex_lp||Math.abs(o-$ocms.cex_lp)>6e5)&&$ocms.postXT({url:$ocms.url("ping"),success:()=>{$ocms.cex_lp=o},timeout:5e3,error:()=>{}})}},$ocms.vbl_send=function(t){var e=t.data||{};if(""!==(e.url||"")){var n=$("#contentframe form:first"),o={url:e.url,data:new FormData,success:function(t){"function"==typeof e.success?e.success(t):"string"==typeof e.success&&alert(e.success)},error:function(t,n,o){"function"==typeof e.error?e.error(o):"string"==typeof e.error&&alert(e.error)},complete:function(){n.ldng(0)}},i=!0;n.find("input").each((function(){var t=$(this),e=t.nza("name"),n=t.val(),r=$(this).prop("required")||!1;if(""!==e){var s=""!==n||!1===r;i=i&&s,!0===s?(o.data.append(e,n),t[0].setCustomValidity("")):""!==$(this).nza("ocms-nvnote")&&t[0].setCustomValidity($(this).nza("ocms-nvnote"))}})),!0===i&&(n.ldng(1),$ocms.postXT.call(this,o))}},function(t){t.fn.nza=function(e,n){var o=t(this).attr(e);return void 0!==o&&!1!==o?o:n||""},t.fn.serializeObject=function(e,n){var o=/\r?\n/g,i=/^(?:submit|button|image|reset|file)$/i,r=/^(?:input|select|textarea|keygen)/i,s=/^(?:checkbox|radio)$/i,a=bool((n=n||{}).typedvalues,!1),c={},l=t(this),u=l.find(':input:not([nosend],[type="file"])').addBack(":input"),d=!0;return t.each(u.not(".tinymce").get(),(function(n,l){var u=t(this),h=this,p=(this.type||"").toLowerCase(),f=u.prop("required")||!1;if(!0===(h.name&&!u.is(":disabled")&&r.test(h.nodeName)&&!i.test(p))){var m=u.val(),g=h.name,y=u.nza("data-format").split(":"),b=u.nza("pattern")||".*";if(!0===s.test(p)&&(m=h.checked?""!==m?m:"true":""),"date"===y[0].substr(0,4)&&y.length>1)"boolean"==typeof(m=parseDt(m,y.slice(1).join(":")))&&(m=null),null===m&&"date"===u.prop("type").substr(0,4)&&!1===isNaN(new Date(u.val()))&&(m=new Date(u.val())),m instanceof Date==!0&&"function"==typeof m.getMonth?!1===a&&(m=fdt(m,"date"===y[0]?"dts":"iso")):m=null;else if("number"===p&&!0===a){let t;t="integer"===y[0]?parseInt(m):parseFloat(m),m=isNaN(t)?m:t}if(!0!==f||""!==(m||"")&&null!==m.match(b)?!0===bool(e,!1)&&h.setCustomValidity(""):(!0===bool(e,!1)&&h.setCustomValidity(u.nza("ocms-nvnote",$ocms.t.inv||"Invalid field")),m=null),null!=m&&"string"==typeof m){let t=c[g];null!=t?Array.isArray(t)?t.push(m.replace(o,"\r\n")):c[g]=[t,m.replace(o,"\r\n")]:c[g]=m.replace(o,"\r\n")}else if(null!=m){let t=c[g];null!=t?Array.isArray(t)?t.push(m):c[g]=[t,m]:c[g]=m}else d=!1}})),u.filter(".tinymce").each((function(e,n){var o=t(this),i=((this.type||"").toLowerCase(),o.prop("required")||!1);try{var r=tinymce.get(t(n).attr("id"));if(r){var s=t(n).attr("name"),a=r.getContent();!1===i||""!==(a||"")?c[s]=a:d=!1}}catch(e){t.noop()}})),l.toggleClass("invalid",!d),d?c:null},t.fn.sendForm=function(e,n,o){var i=t(this);o=o||{};var r={url:e,success:function(t){if(o.response=t,"function"==typeof n)n(t);i.closest("div.modal").remove()},error:function(t,e,n){"function"==typeof o.error?o.error.call(this,t):$ocms.failure.call(this,t)},complete:function(){i.ldng(0),"function"==typeof o.complete&&o.complete.call(this,jqXHR)}},s=i.find('input[type="file"]');r.data=new FormData,s.length>0&&t.each(s[0].files,(function(t,e){r.data.append(t,e),r.data.append("file_lastmodified",$ocms.isodt(e.lastModifiedDate))}));var a=i.serializeObject();t.each(a||{},(function(t,e){r.data.append(t,e)})),i.ldng(),$ocms.postXT.call(this,r)},t.fn.checkValidity=function(){var e=t(this),n=!0;return e.each((function(t,e){n=n&&e.checkValidity()})),n},t.fn.wrap=function(e,n){var o=t(this),i=$$.dc(e).attr(n||{}).insertAfter(o);return o.append(i),i}}(jQuery),$ocms.logout=function(){$ocms.postXT({url:$ocms.url("logout"),complete:function(){window.location.reload()}})},$ocms.login={send:function(t){t.preventDefault();var e=$(this);if(!0===e.find("#dbtn-confirm").hasClass("disabled"))return!1;var n=e.serializeObject();return n.loginaccount=ne(n.loginaccount,$ocms.auth.account||$ocms.auth.requestedaccount||""),n.loginaccount=ne(n.loginaccount,$ocms.auth.account||$ocms.auth.requestedaccount||""),""===ne(n.loginaccount)&&!0===bool($ocms.auth.accountrequired,!0)?(alert($t.l16),!1):($ocms.postXT({url:$ocms.url("login"),data:n,success:function(){window.location.reload()}}),!1)},uichange:function(){let t=$(this),e=t.closest("form"),n=bool($ocms.auth.accountrequired,!0),o=ne(e.find('[name="loginaccount"]').val(),$ocms.auth.account||$ocms.auth.requestedaccount||"");if(""!==o||!1===n){var i=e.find('[name="userlogin"]').empty().val(""),r=e.find('[name="username"]').empty().val(""),s=$("#dlg_userlogin_sel").empty().val(""),a=t.val()||"";if(!1===t.checkValidity()&&""===a)return;var c=t.closest("table").ldng();$ocms.postXT.call(this,{url:$ocms.url("auth"),data:{userinfo:a,account:o||""},success:function(t,e,n){if(1===t.length){var o=t[0];i.val(o.login).change().attr("required","").removeAttr("nosend"),r.val(o.name).change().attr("required","").show(),s.removeAttr("required").attr("nosend","").hide()}else t.length>0?(r.hide().removeAttr("required"),i.removeAttr("required").attr("nosend",""),0===s.length&&(s=$(" ").attr({name:"userlogin",size:t.length,id:"dlg_userlogin_sel",class:"form-control",required:""}).css({width:"100%","max-width":"100%",padding:"2px"}).insertAfter(r)),$.each(t,(function(t,e){var n=$(" ").attr({value:e.login,style:"padding-top: 2px; padding-bottom: 5px;","border-bottom":"1px solid #EEE;"}).text(e.name).appendTo(s);t%2==0&&n.css({"background-color":"#F9F9F9"})})),s.attr("required","").removeAttr("nosend")):(s.hide().attr("nosend",""),r.attr("required","").show(),i.attr("required","").removeAttr("nosend"),alert($t.l9))},error:function(t){$ocms.failure.call(this,t)},complete:function(){c.ldng(0)}})}else alert($t.l18)},sendpassword:function(t){var e=$(''),n=e.find(".form-body"),o=null;e.find("form").submit((function(t){t.preventDefault();var i=$(this).serializeObject(!0),r=null===o,s=r?"spwc":"spw";return $ocms.postXT.call(this,{url:$ocms.url(s),data:i,complete:function(){r?(n.append(''),o=$('').appendTo(n)):(alert($t.l13),e.remove())},error:()=>{}}),!1})),e.find(".modal-close").click((function(){e.remove()}));var i=[];$.each($t.l7a.split("\n"),((t,e)=>{Array.prototype.push.apply(i,[$(" "),$(" ").text(e)])})),e.find(".modal-note").append($(' ').text($t.alert)).append(i),e.appendTo("body"),setTimeout((function(){$(".modal").find('input[name="lastname"]').focus()}),600)}};var $$={s:function(t){return $(" ").text(t)},br:function(){return $(" ")},sc:function(t,e){return $(" ").addClass(t).text(e)},td:function(t,e){var n=$(" ");return t instanceof jQuery==!0?n.appendTo(t):"object"==typeof t?n.attr(t):"string"==typeof t&&n.text(t),"object"==typeof e?n.attr(e):"string"==typeof e&&n.text(e),n},th:function(t,e){var n=$(" ");return t instanceof jQuery==!0?n.appendTo(t):"object"==typeof t?n.attr(t):"string"==typeof t&&n.text(t),"object"==typeof e?n.attr(e):"string"==typeof e&&n.text(e),n},tdc:function(t,e,n){return $$.td(e,n).addClass(t)},td2:function(t){var e=$(' ');return"string"===$.type(t)?e.text(t):t instanceof jQuery?e.append(t):"function"==typeof t?t.call(e):e.html(" "),e},td3:function(t){var e=$(' ');return"string"===$.type(t)?e.text(t):t instanceof jQuery?e.append(t):"function"==typeof t?t.call(e):e.html(" "),e},tdtr:function(t,e){var n=$$.tr().appendTo(e);return t instanceof jQuery==!0||"string"==typeof t?t.appendTo($$.td().appendTo(n)):!0===Array.isArray(t)&&$.each(t,(function(t,e){$(e).appendTo($$.td().appendTo(n))})),n},tr:function(t,e){var n=$(" ");return t instanceof jQuery==!0?n.appendTo(t):"object"==typeof t&&n.attr(t),"object"==typeof e&&n.attr(e),n},trc:function(t,e){var n=$(" ").addClass(t);return e instanceof jQuery==!0?n.appendTo(e):"object"==typeof e&&n.attr(e),n},d:function(t){return $("
").attr(t||{})},dc:function(t,e,n,o){var i=$("
").addClass(t);return e instanceof jQuery==!0?i.appendTo(e):"object"==typeof e?i.attr(e):"function"==typeof e?i.click(e):"string"==typeof e&&i.text(e),"string"==typeof n?i.text(n):"object"==typeof n?i.attr(n):"function"==typeof n&&i.click(n),"string"==typeof o?i.text(o):"object"==typeof o?i.attr(o):"function"==typeof o&&i.click(o),i},df:function(t){return $("
").attr(t||{})},opt:function(t,e,n){var o=$(" ");return"string"==typeof t?o.attr("value",t):"object"==typeof t&&o.attr(t),"string"==typeof e?o.text(e):"object"==typeof e&&o.attr(e),"object"==typeof n&&o.attr(n),o},eOpt:function(t){var e=$(' ');return t&&e.attr("selected","selected"),e},tbl:function(t){return $("").attr(t||{})},tblc:function(t){return $("").addClass(t)},thead:function(t){let e=$(" ");return t instanceof jQuery&&e.prependTo(t),e},tbody:function(t){let e=$(" ");return t instanceof jQuery&&e.appendTo(t),e},tblset:function(t,e){let n=$$.tbl(t||{});return e instanceof jQuery&&e.append(n),{tbl:n,hd:$$.thead().appendTo(n),bdy:$$.tbody().appendTo(n)}},i:function(t){return $(" ").attr(t||{})},img:function(t,e){return $(" ").attr("src",t).attr(e||{})},sel:function(t){return $(" ").attr(t||{})},btn:function(t){return $(" ").attr(t||{})},a:function(t){return $(" ").attr(t||{})},li:function(t){return $(" ").attr(t||{})},ul:function(t){return $("").attr(t||{})},nav:function(t){return $(" ").attr(t||{})},lbl:function(t,e){var n=$(" ");return"string"==typeof t&&n.text(t),"object"==typeof t?n.attr(t):"object"==typeof e&&n.attr(e),n},txt:function(t){return $("").attr(t||{})},0:function(t,e){return $("<"+t+">"+t+">").attr(e||{})},bbtn:function(t,e){return $$.btn({type:"button",class:"btn"}).addClass(e).text(t)},svg:t=>$(document.createElementNS("http://www.w3.org/2000/svg",t))};function getMonday(t){var e=(t=new Date(t)).getDay(),n=t.getDate()-e+(0==e?-6:1);return new Date(t.setDate(n))}function $lf(t){var e=void 0===t?null:"number"==typeof t&&1!==t||"boolean"==typeof cl&&!1===t;return $("#listframe").tC("hd",e).is(".hd")}function $nuf(t){if(t&&t.stopPropagation(),!$(this).is(".disabled")){var e=function(t){t.removeClass("vis").find("li.dropdown").removeClass("open").removeClass("vis").attr("aria-expanded","false")},n=$(this).parent("li.dropdown");if(n.length>0){n.tC("open"),navs=!0===n.is(".open")?"true":"false",n.attr("aria-expanded",navs);var o=n.closest("nav");o.find("li.dropdown").not(n.parentsUntil("nav")).not(n).removeClass("open").attr("aria-expanded","false"),!1===n.is(".open")&&n.find("li.dropdown").removeClass("open").attr("aria-expanded","false"),e($("nav").not(o))}else e($("nav"))}}function $tbr(){return $lf(0),$("#topbar").ocmsmenu([])}function $lfr(){return $("#sidebar").empty(),$("#listframe").removeClass("fix").addClass("hd").empty()}function $cfr(){return $tbr(),$("#contentframe").empty()}function jObj(t,e){let n={};if("{"===(t||"").substr(0,1))try{n=JSON.parse(t)}catch(t){n={}}return n[e]||""}function string(t,e){var n,o=t||"";return $.each(e||[],(function(t,e){n=new RegExp("\\{"+t.toString()+"\\}","ig"),o=o.replace(n,e)})),o}function init_tooltip(t){var e=!0===("boolean"==typeof t&&t)&&"mouse";$("[title]").qtip({position:{target:e,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden},effect:!1}),$("div.tooltiptext").each((function(){$(this).filter(":not(:empty)").parent().qtip({suppress:!1,content:{text:$(this).clone()},position:{target:e,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden}})}))}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")},String.prototype.left=function(t){if("string"===$.type(t)){var e=this.indexOf(t);return e>0?this.slice(0,e):""}return this.substring(0,t)},String.prototype.right=function(t){if("string"===$.type(t)){var e=this.indexOf(t);return e>0?this.substring(this.length-e):""}return this.substring(this.length-t)},Array.prototype.move=function(t,e){if(e>=this.length)for(var n=e-this.length;1+n--;)this.push(void 0);return this.splice(e,0,this.splice(t,1)[0]),this},function(t){t.fn.appendToIf=function(e,n){var o=t(this),i="function"==typeof n?n(o):n;return!0===("boolean"!=typeof i||i)&&o.appendTo(e),o},t.fn.appendIf=function(e,n){var o=t(this),i="function"==typeof n?n(o):n;return!0===("boolean"!=typeof i||i)&&o.append(e),o},t.fn.rwText=function(e,n,o){var i=t(this).empty();o=t.extend({wrap:!0},o);var r=!0===Array.isArray(e)?e:(null==e?"":String(e)).split("\n");return t.each(r,(function(t,e){""!==(e||"")&&(t>0&&i.append($$.br()),i.append(!0===o.wrap?$$.s(e):e))})),n&&i.attr("title",n),i},t.fn.loadSel=function(e,n,o){if("SELECT"===t(this).prop("tagName").toUpperCase()){var i=t(this);$ocms.postXT.call(this,{url:e,data:n||{},success:function(e){t.each(e,(function(){i.append($$.opt(e.value,e.text))}))},complete:function(){i.ldng(0),"function"==typeof o&&o.call(i)}})}},t.fn.emptyWithEditors=function(e){var n=t(this);return n.find(":input.tinymce").each((function(e,n){try{var o=tinymce.get(t(n).attr("id"));o&&o.remove()}catch(e){t.noop()}})),n.empty()},t.fn.cssValue=function(t){if(this.length>0){var e=this.css(t)||"";if(""===e)return 0;var n=/(^[\d\.]*)(\D{1,3}$)/gi.exec(e);return null!==n?"rem"===n[2]?$ocms.rpx(parseFloat(n[1])):parseFloat(n[1]):!1===isNaN(e)?parseFloat(e):0}return 0},t.fn.veryInnerHeight=function(){let e=e=>t(this).cssValue(e);return t(this).innerHeight()-e("padding-top")-e("padding-bottom")},t.fn.veryInnerWidth=function(){let e=e=>t(this).cssValue(e);return t(this).innerWidth()-e("padding-left")-e("padding-right")},t.fn.marginWidth=function(){let e=e=>t(this).cssValue(e);return e("margin-left")+e("margin-right")},t.fn.marginHeight=function(){let e=e=>t(this).cssValue(e);return e("margin-top")+e("margin-bottom")},t.inArrayRegEx=function(e,n,o){var i="regexp"===t.type(e)?e:new RegExp(e);if(!n)return-1;for(var r=o=o||0;r7){o=e.split(","),i=(n||(t<0?"rgb(0,0,0)":"rgb(255,255,255)")).split(",");var c=a(o[0].slice(4)),l=a(o[1]),u=a(o[2]);return"rgb("+(s((a(i[0].slice(4))-c)*r)+c)+","+(s((a(i[1])-l)*r)+l)+","+(s((a(i[2])-u)*r)+u)+")"}var d=(o=a(e.slice(1),16))>>16,h=o>>8&255,p=255&o;return"#"+(16777216+65536*(s((((i=a((n||(t<0?"#000000":"#FFFFFF")).slice(1),16))>>16)-d)*r)+d)+256*(s(((i>>8&255)-h)*r)+h)+(s(((255&i)-p)*r)+p)).toString(16).slice(1)},t.fn.IN=function(e){return t(this).fadeIn(400,e),t(this)},t.fn.OUT=function(e){return t(this).fadeOut(400,e),t(this)},t.fn.tooltip=function(e,n){var o=!0===("boolean"==typeof e&&e)&&"mouse",i="boolean"==typeof n&&n,r=t(this);return r.each((function(){var e=i?t(this).find(".tooltiptext"):t(this).children(".tooltiptext");t(e).length>0?e.each((function(){var e=t(this);t(this).filter(":not(:empty)").parent().qtip({suppress:!1,content:{text:e.clone()},position:{target:o,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden},show:{effect:!1},hide:{effect:!1}}),e.remove()})):t(this).qtip({position:{target:o,adjust:{x:2,y:2},viewport:!0},events:{hidden:$ocms.tooltip_hidden},effect:!1})})),r},t.fn.rC=function(e){return t(this).removeClass(e)},t.fn.aC=function(e){return t(this).addClass(e)},t.fn.tC=function(e,n){return t(this).toggleClass(e,n)}}(jQuery),function(t){t.fn.ocmsmenu=function(e,n){var o=t(this);return $ocms.menu.call(o,e,n),o},t.fn.activatemenu=function(){var e=t(this).filter("nav");return e.find("a").not(".on").addClass("on").click($nuf),e.find(".nav-btn").not(".on").addClass("on").click((function(e){e.stopPropagation();var n=t(this);t(n.attr("data-target")).tC(n.attr("data-toggle"))})),e}}(jQuery);class ObjectArray extends Array{isEmpty(){return 0===this[0].length}static get[Symbol.species](){return Array}filter(t){return"function"==typeof t?new ObjectArray(this[0].filter(t)):this}remove(t){if("function"!=typeof t)return this;{let e=this[0].findIndex(t);for(;e>-1;)this[0].splice(e),e=this[0].findIndex(t)}}sortBy(t){return"function"==typeof t&&this[0].sort(t),this}sortString(t){return this[0].sort(((e,n)=>{let o=(e[t]||"").toString().toUpperCase(),i=(n[t]||"").toString().toUpperCase();return console.debug(o.localeCompare(i)),o.localeCompare(i)})),this}sortNum(t){return this[0].sort(((e,n)=>{let o=e[t],i=n[t];return!0===isNaN(i)&&!1===isNaN(o)||oi?1:0})),this}sum(t){return this[0].reduce(((e,n)=>e+(!0===isNaN(n[t])?0:n[t])),0)}groupBy(t){return this[0].reduce((function(e,n){let o=n[t];return e[o]||(e[o]=[]),e[o].push(n),e}),{})}each(t){if("function"==typeof t){let e=!1;this[0].forEach(((n,o,i)=>{if(!1===e){let r=t(n,o,i);"boolean"==typeof r&&!1===r&&(e=!0)}}))}}get toArray(){return this[0]}}class NumArray extends Array{sum(){return this.reduce(((t,e)=>t+e))}first(){return this[0]}last(){return this[this.length-1]}average(){return this.sum()/this.length}range(){let t=this.map((t=>t)).sort();return{min:t[0],max:t[this.length-1]}}static get[Symbol.species](){return Array}}$ocms.ocmsmenu=[{lbl:"",id:"m_home",ico:"glyphicon glyphicon-home",fnc:"init:home"},{fnc:"separator"}],function(t){t.multline=function(t){let e=t.split("\n"),n=$$.d();return $.each(e,((t,e)=>{n.append($$.s(e))})),n.html()},t.tooltip_hidden=function(t,e){$(this).remove(),e.rendered=!1},t.isJSONDateString=function(t){return"string"==typeof t&&/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/.test(t)},t.failure=function(e){11110===(e.internalCode||-1)?t.login.dlg():alert($t.f1+"\n"+(e.internalText||""))},t.getScript=function(e,n){var o=[],i=[],r=function(t){return"string"==typeof t&&""!==(t||"")},s=function(t,e){!0===bool(e.condition,!0)&&(""!==(e.script||"")&&i.push({url:e.script,module:e.module||""}),!0===r(e.css||"")?o.push(e.css):!0===Array.isArray(e.css)&&Array.prototype.push.apply(o,e.css.filter(r)))};!0===r(e||"")?i.push(e):!0===Array.isArray(e)?$.each(e,s):"object"==typeof e&&""!==(e.script||"")&&s(0,e);let a=[];$.each(o,(function(t,e){""!==(e||"")&&a.push(loadCSS(e))}));let c=i.map((function(e,n){let o=e.url,r=e.module||"";if(""===r){let t=new Promise((function(t,e){try{!async function(){$.ajax({url:o,dataType:"script",success:function(){t(i)},error:function(){e(i)},timeout:3e4})}()}catch(t){console.debug(t.message+"%o",t)}}));return t}return t.loadmodule(r,o,e.alias)}));Promise.all(c).then(n)},t.loadmodule=function(e,n,o){let i=new Promise((function(i,r){!async function(){try{let s=(n.startsWith("/")||n.startsWith(".")?"":"/")+n;import(s).then((n=>{t[e]=n[o||"default"],i(e)})).catch((t=>{console.debug(t.message+"%o",t),r(e)}))}catch(t){console.debug(t.message+"%o",t)}}()}));return i},t.ocms_auth=function(e,n,o,i){!1===$.isPlainObject(t.auth.modules)&&(t.auth.modules={});var r=0;t.auth.modules[e+(o||"")]?((r=t.auth.modules[e+(o||"")])<2&&(o||"")===auth.guid&&(r=2),r>=(n||0)&&i(false)):t.postXT({url:t.url("auth"),data:{module:e,person_guid:o||""},success:function(s){r=s[e],t.auth.modules[e+(o||"")]=r,r<2&&(o||"")===t.auth.person_guid&&(r=2),r>=(n||0)&&i(false)},error:function(e){t.failure.call(this,e)}})},t.auth.locale="de",t.ocms_prepauth=function(e,n,o){t.postXT({url:t.url("auth"),data:{fn:"csv",modules:e,person_guid:n||""},success:function(e){t.ocms_regauth(e)},error:function(e){t.failure.call(this,e)},complete:function(){o()}})},t.ocms_regauth=function(t){$.each(t||{},(function(t,e){auth.modules[t]=parseInt(e)}))},t.init=function(e){var n="string"==typeof e?e:(e.data||{}).fn||"";""!==n&&("home"===n?($cfr(),$lfr(),$("#topbar").ocmsmenu([],!0),$("#activemodule").text($t.ov),t.ov.call($("#contentframe"))):($cfr(),$lfr(),$("#topbar").ocmsmenu([]),t.postXT({url:t.url(n+"/auth"),success:function(e){void 0===t[n]&&(t[n]={}),t[n].auth=e,e.manage>0&&t.getScript({module:n,script:["web/imdl",n,t.auth.locale||"de","js"].join("."),css:["web/imdl",n,"css"].join("."),condition:"function"!=typeof t[n].init2},(function(){t[n].init2()}))},error:function(){$("#contentframe").empty()}})))},t.menuarray=function(t){this.array=[],this.sep=function(){this.length>0&&"separator"!==this.array[array.length-1].fnc&&this.push({fnc:"separator"})},this.push=function(t){return void 0===t?null:(!0===Array.isArray(t)?Array.prototype.push.apply(this.array,t):"object"==typeof t&&this.array.push(t),t)},this.unshift=function(t){return void 0===t?null:(!0===Array.isArray(t)?Array.prototype.unshift.apply(this.array,t):"object"==typeof t&&this.array.unshift(t),t)},this.push(t)},t.menu=function(e,n){e=e||[];var o=$(this).removeClass("vis");if(!0===bool(n,!0)&&!1===o.is("#mainmenu")&&o.empty(),!1===bool(n,!1)&&o.is("#sidebar,#topbar")&&(e.unshift({id:"sbctrl",glyph:"glyphicon-th-list",aclass:"fbtn",fnc:function(){$lf()}}),$lf(0)),0===(e||[]).length)o.empty().addClass("hd");else{o.removeClass("hd");var i=!0===o.is("nav")?o:o.children("nav");1!==i.length&&(i=$(" ").tC("nv",o.is("#sidebar")).tC("ctxt",o.is("#topbar")).appendTo(o));var r,s=$$.ul().appendTo(i),a=function(t,e){var n=$(this).addClass("dropdown submenu");t.append($$.sc("caret dd")).addClass("dds dropdown-toggle").attr({"aria-expanded":"false"}),""!==(e.ico||"")&&t.prepend($$.sc("ico "+e.ico));var o=$$.ul({class:"dropdown-menu",role:"menu"}).appendTo(n);$.each(e.itm||[],(function(t,e){r.call(o,e)}))},c=function(t){$(this).tC("disabled","boolean"==typeof t.disabled?t.disabled:"string"==typeof t.disabled&&"subs"===t.disabled&&0===(t.itm||[]).length)};r=function(e){var n,o=$$.li({id:e.id}).attr(e.attr||{}).addClass(e.lclass).appendTo($(this)),i="string"==typeof e.fnc&&""!==e.fnc?e.fnc.split(":")[0]:"";""!==i&&"init"!==i?o.attr("role",i).appendIf($$.s(e.lbl),""!==ne(e.lbl)):(n=$$.a({class:"on",role:"button"}).addClass(e.aclass).appendTo(o).append($$.s(e.lbl)),c.call(n,e),(e.itm||[]).length>0&&a.call(o,n,e),n.click($nuf),"function"==typeof e.fnc?n.click(e.data||{},e.fnc):"init"===i&&n.click($.extend({},e.data||{},{fn:e.fnc.split(":")[1]}),t.init))},$.each(e,(function(e,n){var o,i=$$.li({id:n.id}).attr(n.attr||{}).addClass(n.lclass),a="string"==typeof n.fnc&&""!==n.fnc?n.fnc.split(":")[0]:"";if(""!==a&&"init"!==a)i.attr("role",a).appendIf($$.s(n.lbl),""!==ne(n.lbl));else{if(o=$$.a({class:"on",role:"button"}).addClass(n.aclass).appendTo(i),c.call(o,n),""!==(n.lbl||"")&&o.append($$.s(n.lbl)),""!==(n.ico||"")&&o.prepend($$.sc("ico "+n.ico)),""!==(n.glyph||"")&&o.prepend($$.sc("glyphicon "+n.glyph)),(n.itm||[]).length>0){i.addClass("dropdown"),o.append($$.sc("caret dd")).addClass("dds dropdown-toggle").attr({"aria-expanded":"false"});var l=$$.ul({class:"dropdown-menu",role:"menu"}).appendTo(i);$.each(n.itm||[],(function(t,e){r.call(l,e)}))}(n.sel||[]).length>0||(o.click($nuf),"function"==typeof n.fnc?o.click(n.data||{},n.fnc):"init"===a&&o.click($.extend({},n.data||{},{fn:n.fnc.split(":")[1]}),t.init))}i.appendTo(s)})),i.activatemenu()}},t.easytbl=(t,e)=>{e=e||{};let n=$$.tbl().addClass(e.class).css("border-collapse","collapse"),o=($$.tbody(n),!0===bool(e.frame,!1)?{padding:"5px",border:"1px solid #727272"}:{});if(!0===Array.isArray(e.header)){let t=$$.thead(n);$.each(e.header,((n,i)=>$$.th(t).css(e.cellcss||o).rwText(i)))}else if(!0===bool(e.header,!1)&&(t||[]).length>0){let i=$$.thead(n);$.each(Object.keys(t[0]),((t,n)=>$$.th(i).css(e.cellcss||o).rwText(n)))}return $.each(t||[],((t,i)=>{let r=$$.tr();$.each(i,((t,n)=>{n=n||"";let i=$$.td(r).css(e.cellcss||o);n instanceof jQuery?i.append(n):"string"==typeof n&&("<"===n.substring(0,1)?i.append(n):i.text(n))})),n.append(r)})),n},t.dlgtbl=(e,n,o)=>{o=o||{};let i=t.easytbl(e,o);t.dlg(i,$.extend({title:n},o))},t.dlg=function(t,n){n=n||{};let o=$("body > .modal").length>0,i=t=>typeof n[t],r=t=>"function"===i(t);if(!0===bool(n.exclusive,!0)&&!0===o)return void alert($t.dbldlg||"Es ist bereits ein Dialog geöffnet");let s=$$.dc("modal",$("body")),a=$$.dc("modal-dialog",s);!1===isNaN(n.zindex)?s.css("zIndex",n.zindex):!0===o&&s.css("zIndex",parseInt($("body > .modal:last").cssValue("zIndex"))+200),!1===isNaN(n.zindex_min)&&s.cssValue("zIndex")').appendTo(d)),""!==ne(n.title)&&(c=$$.dc("modal-header",d),$(" ").text(n.title).appendTo(c));let p=$$.dc("modal-body",d),f=$$.dc("modal-footer",d);t instanceof jQuery==!0&&p.append(t);let m=function(t){t&&"function"==typeof t.stopPropagation&&t.stopPropagation(),a.removeClass("in"),!0===r("closing")&&n.closing.call(d),p.hide().emptyWithEditors(),s.remove(),!0===r("close")&&n.close.call(d)};if(d.find(":input[required]").length>0&&($$.dc("note_required",f).append($$.sc("ind_required","*")).append($$.s($t.t1||"Eingabe erforderlich")),$$.dc("note_invalid",f).append($$.s($t.t2||"Bitte überprüfen Sie Ihre Eingaben im Formular."))),!0===r("cancel")){$$.bbtn(n.cancelbutton||"Abbrechen","cancel").attr({type:"button",role:"cancel"}).appendTo(f).click((function(t){n.cancel.call(d,t);t.stopPropagation(),m()}))}if(!0===r("confirm")){let t=$$.bbtn(n.button||"OK","confirm").attr({type:!0===bool(n.form,!1)?"submit":"button",role:"confirm"}).appendTo(f);!0===h?(d.submit((function(t){try{n.confirm.call(d,t)}finally{t.preventDefault()}return!1})),d.on("modal_submit",(function(){n.confirm.call(d,e)}))):(t.click((function(t){n.confirm.call(d,t);t.stopPropagation()})),d.on("modal_submit",(function(){t.click()})))}else!0===h&&d.submit((function(t){return t.preventDefault(),!1}));return d.on("modal_close",(function(){m()})),l.click(m),!0===r("opening")&&n.opening.call(d),a.addClass("in"),ne(n.mode).indexOf("maxbody")>-1&&p.css("min-height",(u.height()-c.outerHeight()-f.outerHeight()).toString()+"px"),!0===r("open")&&n.open.call(d),{hd:c,bdy:p,ft:f,ct:u,dlg:a,c:d}},t.mform=function(e){let n=$$.dc("form-body"),o=Array.isArray(e)?e:e instanceof fields_definition?e.fields:[];return $.each(o||[],(function(e,o){let i=o.type||"";if("ignore"===i)return!0;let r=$$.dc("form-group",n),s=o.id||"dlg_"+(o.name||"")+("html"===o.type?"_"+(65536*(1+Math.random())||0).toString(16).substr(9):""),a=$$.lbl(o.label||o.name,{for:s}).appendTo($$.dc("form-itm",r)),c=$$.dc("form-itm",r),l=$$.i({id:s,name:o.name,placeholder:o.placeholder,type:o.type});switch(i){case"email":o.pattern=ne(o.pattern,"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$");break;case"url":o.pattern=ne(o.pattern,"https?://.+");break;case"number":o.pattern=ne(o.pattern,"[-+]?[0-9]*[.,]?[0-9]*"),l.attr("step",o.precision||"any"),l.attr("data-format","float");break;case"integer":case"int":o.pattern=ne(o.pattern,"[-+]?[0-9]*"),l.attr("type","number"),l.attr("data-format","integer");break;case"date":if(""!==ne(o.pattern,$t.datepattern)&&(o.pattern=ne(o.pattern,"("+$t.datepattern+")|([0-9]{4}.(0[1-9]|1[012]).(0[1-9]|1[0-9]|2[0-9]|3[01]))")),""!==ne(o.placeholder,$t.dateplaceholder)&&l.attr("placeholder",ne(o.placeholder,$t.dateplaceholder)),"string"==typeof o.value){var u=o.value.substr(0,10);o.value="date"!==l.prop("type")?fdt(u+"T00:00:00",ne(o.dateformat,$t.dateformat)):u}l.attr("data-format","date:"+ne(o.dateformat,$t.dateformat)+";yyyy-MM-dd");break;case"datetime":l.attr("type","datetime-local"),""!==ne(o.pattern,$t.datetimepattern)&&(o.pattern=ne(o.pattern,"("+$t.datetimepattern+")|([0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])\\s([0-5][0-9]):([0-5][0-9]))")),""!==ne(o.placeholder,$t.datetimeplaceholder)&&l.attr("placeholder",ne(o.placeholder,$t.datetimeplaceholder)),"string"==typeof o.value&&"T"===o.value.substr(10,1)&&(o.value="datetime"!==l.prop("type").substr(0,8)?fdt(o.value,ne(o.datetimeformat,$t.datetimeformat)):o.value),l.attr("data-format","datetime:"+ne(o.datetimeformat,$t.datetimeformat)+";yyyy-MM-dd HH:mm:ss");break;case"hidden":r.addClass("hd");break;case"html":case"text":l=$$.txt({id:s,name:o.name,placeholder:o.placeholder,type:o.type}),l.tC("tinymce","html"===o.type);break;case"bool":case"boolean":o.url=[{value:"true",label:($t||{}).true||"Yes"},{value:"false",label:($t||{}).false||"No"}],"boolean"==typeof o.value&&(o.value=o.value?"true":"false");case"select":l=$$.sel({id:s,name:o.name,type:o.type}),!1===bool(o.required,!1)&&$$.eOpt().appendTo(l);try{var d=function(t){!0===Array.isArray(t)&&$.each(t,(function(t,e){"string"==typeof e?$$.opt(e,e).appendTo(l):!0===Array.isArray(e)?$$.opt(e[0],e[1]).appendTo(l):"object"==typeof e&&$$.opt(e.value,e.label||e.text).appendTo(l)}))};!0===Array.isArray(o.url)?d(o.url):"function"==typeof o.url?o.url.call(l):"string"==typeof o.url&&t.postXT({url:o.url,success:d})}catch(t){$.noop()}break;default:""!==ne(o["max-length"])&&l.attr("max-length",o["max-length"])}""!==ne(o.pattern)&&l.attr("pattern",o.pattern),l.val(o.value).change(),l.change((function(){$(this)[0].setCustomValidity("")})),l.addClass("form-control").prop("required",bool(o.required,!1)).prop("readonly",bool(o.readonly,!1)).appendTo(c),!0===bool(o.required,!1)&&a.append($$.sc("ind_required","*")),"object"==typeof o.attr&&l.attr(o.attr),"object"==typeof o.prop&&l.prop(o.prop),"string"==typeof o.class&&l.addClass(o.class),"function"==typeof o.change&&(l.change(o.change),!0===bool(o.applychange,!1)&&void 0!==o.value&&l.change()),""!==(o.note||"")&&$$.dc("form-note",c).rwText(o.note),"function"==typeof o.complete&&o.complete.call(l)})),n},t.initMCE=function(t,e){t=$(t),e=e||{};try{let n={target:t[0],inline:!1,width:e.width||"100%",statusbar:!1,document_base_url:window.location.origin+"/",content_style:"ph:before {content: '«'; color: #BBB; font-style:italic; } ph:after {content: '»'; color: #BBB; font-style:italic; } ph { color: #AAA; font-style:italic; }",relative_urls:!1,remove_script_host:!1};!0===bool(e.hidemenu,!1)&&(n.menubar=!1,n.menu={}),!0===bool(e.hidetoolbar,!1)&&(n.toolbar=!1),$.extend(n,e||{}),tinymce.init(n)}catch(t){alert(t.message)}},t.dlgform=function(e,n){n=n||{};let o,i=$$.dc("frm").append(t.mform(e||[]).addClass("stacked"));n.addcontent instanceof jQuery&&i.append(n.addcontent),"function"==typeof n.submit?o=n.submit:"function"==typeof n.success&&(o=function(e){var o=$(this).ldng(1),i=$.extend({loginaccount:t.auth.account||""},o.serializeObject(bool(n.checkvalidity,!0),{typedvalues:bool(n.typedvalues,!1)}));""!==(n.url||"")?t.postXT({url:n.url,data:i,success:function(t){n.success.call(this,t),o.trigger("modal_close")},error:function(){alert($t.l17)},complete:function(){o.ldng(0)},timeout:6e4}):(n.success.call(this,i),o.trigger("modal_close"))});let r={form:!0,title:n.title||"",button:n.button||$t.submit,confirm:o,size:n.size||[500,600],open:function(){let e=$(this).find(".tinymce");e.length>0&&t.initMCE(e,n.tinymce||{})}};return t.dlg.call(this,i,r)},t.login.dlg=function(e){e=e||{};let n=[{name:"userinfo",label:$t.l1,type:"string",value:t.auth.login,change:t.login.uichange,required:!0},{name:"userlogin",type:"hidden",required:!0,value:t.auth.login},{name:"username",type:"string",label:$t.l4,required:!0,readonly:!0,placeholder:$t.l5,value:t.auth.fullname_rev},{name:"userpass",type:"password",label:$t.l3,required:!0,placeholder:$t.l3}];""===(t.auth.account||"")&&n.unshift({id:"dlg_loginaccount",name:"loginaccount",type:"string",required:!0,value:t.auth.account});let o=$$.dc("frm").append(t.mform(n).addClass("stacked")),i=t.dlg.call(this,o,{form:!0,title:$t.l0,button:$t.submit,confirm:function(n){var o=$(this).ldng(1),i=$.extend({loginaccount:t.auth.account||""},o.serializeObject());t.postXT({url:"/vt/login",data:i,success:function(n){""!==((n||{}).login||"")&&(o.trigger("modal_close"),t.auth=n,"object"==typeof e.ajo&&(e.ajo.islogin,$.ajax(e.ajo)))},error:function(){alert($t.l17)},complete:function(){o.ldng(0)},timeout:6e4})},size:[500,600]}),r=$$.dc("modal-content").css("height","auto").attr("novalidate","true").append($$.dc("modal-header").appendIf($(" ").text(t.auth.accountname),""!==(t.auth.accountname||"")).append($("Vereinsmanager ")));i.dlg.prepend(r)},t.addNoEntryInfo=function(t){$(this).append($$.dc("noentryinfo").text(t||$t.t11))}}($ocms),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(Element.prototype.matches.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}),function(t,e){var n,o;"object"==typeof window&&(window[t]=(n=function(t){var e=window,n=document.body,o=document.documentElement,i=Math.max(0,e.pageXOffset||o.scrollLeft||n.scrollLeft||0)-(o.clientLeft||0),r=Math.max(0,e.pageYOffset||o.scrollTop||n.scrollTop||0)-(o.clientTop||0);return{x:t?Math.max(0,t.pageX||t.clientX||0)-i:0,y:t?Math.max(0,t.pageY||t.clientY||0)-r:0}},(o=function(t,e){t&&t instanceof Element&&(this._container=t,this._options=e||{},this._clickItem=null,this._dragItem=null,this._showDragItem="boolean"!=typeof this._options.dragItem||!1!==this._options.dragItem,this._hovItem=null,this._sortLists=[],this._click={},this._dragging=!1,this._dragHandleClass=this._options.dragHandleClass||"",this._parentident=this._options.parentident||"",this._swapdone="function"==typeof this._options.swapdone?this._options._swapdone:null,this._container.setAttribute("data-is-sortable",1),this._container.classList.add("sortable"),this._container.style.position="static",window.addEventListener("mousedown",this._onPress.bind(this),!0),window.addEventListener("touchstart",this._onPress.bind(this),!0),window.addEventListener("mouseup",this._onRelease.bind(this),!0),window.addEventListener("touchend",this._onRelease.bind(this),!0),window.addEventListener("mousemove",this._onMove.bind(this),!0),window.addEventListener("touchmove",this._onMove.bind(this),!0))}).prototype={constructor:o,toArray:function(t){t=t||"id";for(var e=[],n="",o=0;oo.left&&eo.top&&n-1)&&e.className.indexOf("nosort")<0)&&(t.preventDefault(),this._dragging=!0,this._click=n(t),this._makeDragItem(e),this._onMove(t),!0)}t&&!1===e.call(this,t.target)&&""!==this._parentident&&t.target.closest(this._parentident)&&e.call(this,t.target.closest(this._parentident))},_onRelease:function(t){this._dragging=!1,this._trashDragItem()},_onMove:function(t){if(this._dragItem&&this._dragging){t.preventDefault();var e=n(t),o=this._container;!0===this._showDragItem&&this._moveItem(this._dragItem,e.x-this._click.x,e.y-this._click.y);for(var i=0;i0?a.mousedown(c).addClass("dctrl"):s.mousedown(c).addClass("dctrl"),t(this)}}(jQuery),$(document).ready((function(){$("html").click((function(t){$nuf()})),$("#listframe").click((function(t){t.stopPropagation(),$nuf()})),$("#mainmenu").ocmsmenu($ocms.ocmsmenu),$("#mainmenu").activatemenu()})),$.extend($t,{m_inv:"Rechnungen",m_req:"Aufträge",m_rep:"Berichte",m_todo:"ToDos",m_bcd:"BankBuchungen",rsp:"Passwort ändern",pnm:"Die Passwörter stimmen nicht überein",cps:"Das neue Passwort wurde gespeichert.",pwr:"Bitte wählen Sie ein starkes Passwort (min 8 Zeichen, davon jeweils min 2 Zahlen, kleine und große Buchstaben, Sonderzeichen sind optional).",smsc:"Sie beötigen für diese Funktion einen SMS-Code.\nSoll dieser nun versandt werden?",wdc:"Doppelt klicken, um die Box zu aktualisieren.",wdg:{}}),$t.rspf={sms:"Der SMS-Code konnte nicht bestätigt werden",valid:"Das alte Passwort ist nicht korrekt",requirements:"Das Passwort entspricht nicht den Anforderungen.\n"+$t.pwr},$fd={rsp:new fields_definition("","",[{name:"opw",label:"aktuelles Passwort",type:"password",required:!0,attr:{"auto-complete":"current-password"}},{name:"npw",label:"neues Passwort",type:"password",required:!0,pattern:"(.{6,})",attr:{"auto-complete":"new-password"}},{name:"npwc",label:"neues Passwort (Bestätigung)",type:"password",required:!0,attr:{"auto-complete":"new-password"},note:$t.pwr},{name:"code",label:"SMS-Code",type:"string",required:!0,attr:{"auto-complete":"one-time-code"}}])},$ocms.init=function(t){var e="string"==typeof t?t:(t.data||{}).fn||"";""!==e&&("home"===e?($cfr(),$lfr(),$("#topbar").ocmsmenu([],!0),$("#activemodule").text($t.ov),$fis.ov()):($cfr(),$lfr(),$("#topbar").ocmsmenu([]),$ocms.postXT({url:$ocms.url(e+"/auth"),success:function(t){void 0===$ocms[e]&&($ocms[e]={}),$ocms[e].auth=t,t.manage>0&&$ocms.getScript({module:e,script:["/web/fis",e,$ocms.auth.locale||"de","js"].join("."),css:["/web/fis",e,"css"].join("."),condition:"function"!=typeof $ocms[e].init2},(function(){$ocms[e].init2()}))},error:function(){$("#contentframe").empty()}})))};var $fis={auth:{},db:function(){$("#mainmenu_activemodule").text($t.ov);let t=$(this).empty(),e=$$.d({id:"dashboard_frame"}).appendTo(t);$ocms.postXT({url:$ocms.url("wdg/my"),success:function(t){$.each(t,(function(t,n){var o=$$.dc("wdg_frame",e,{"data-wdg":n}).ldng(1);$ocms.wdg.call(o,{wdg:n})}))},loading:e})},ValidateEmail:function(t){return!!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(t)},cf:t=>{let e=$("#contentframe");return!0===bool(t,!1)&&e.empty().rC("hd"),e},lf:t=>{let e=$("#listframe");return!0===bool(t,!1)&&e.empty().aC("hd").rC("fix"),e},frm_edit:function(t){let e=$fis.cf(!1),n=e.children(".cfrm"),o=e.children(".edit_frm");return n.length<1?n=$$.dc("cfrm hd").prependTo(e):!0===bool(t,!1)&&n.empty(),o.length<1&&(o=$$.dc("edit_frm").insertAfter(n)),o.empty()},frm_list:function(t,e){let n=$fis.cf(!1),o=n.children(".cfrm"),i=n.children(".list_frm");return o.length<1?o=$$.dc("cfrm hd").prependTo(n):!0===bool(t,!1)&&o.empty(),!0===bool(e,!1)&&n.children(".edit_frm").remove(),i.length<1&&(i=$$.dc("list_frm").appendTo(n)),i.empty()},lfm:()=>{let t=$fis.lf(!1),e=t.children(".lfrm");return e.length<1&&(e=$$.dc("lfrm").prependTo(t)),e},getAuth:(t,e)=>new Promise(((n,o)=>{$fis.auth[t]&&!1===bool(e,!1)?n($fis.auth[t]||-1):$ocms.postXT({url:$ocms.url("auth"),data:{module:t},success:e=>{$fis.auth[t]=e.auth||-1,n($fis.auth[t]||-1)},error:()=>{o()}})})),prepAuth:t=>new Promise(((e,n)=>{$ocms.postXT({url:$ocms.url("auth"),data:{module:t,array:1},success:t=>{$.extend($fis.auth,t||{})},complete:()=>{e()}})})),isAuth:(t,e)=>($fis.auth[t]||-1)>=(e||1),resetPass:function(t,e){confirm($t.smsc)&&($ocms.postXT({url:$ocms.url("account/sms"),data:{fn:"pwc"}}),$ocms.dlgform($fd.rsp.clone(),{title:$t.rsp||"",submit:function(t){var e=$(this).ldng(1),n=$.extend({loginaccount:$ocms.auth.account||""},e.serializeObject(!0,{typedvalues:!0}));(n.npw||"")!==(n.npwc||"")?e.find('input[name="npw"]:first')[0].setCustomValidity($t.pnm):$ocms.postXT({url:$ocms.url("account/changepassword"),data:n,success:function(t){alert($t.cps),e.trigger("modal_close")},error:function(t){alert($t.rspf[t.getResponseHeader("x-ocms-std")])},complete:function(){e.ldng(0)},timeout:6e4})}}))},wdg:function(t){let e=$(this).empty();$ocms.postXT({url:$ocms.url("wdg/one"),data:{short_name:t.wdg},timeout:9e4,success:function(n,o,i){let r=t.wdg,s=n[r];if(!s)return void e.ldng(0);let a=$.inArrayRegEx("dblwidth",s.rendering_options)>-1,c=$.inArrayRegEx("tiny",s.rendering_options)>-1;e.toggleClass("dbl",a&&!c).toggleClass("tny",c);$$.dc("wdg_hd",e,{title:ne(s.description,$t.wdc)}).toggleClass("dbl",a).text(ne(s.name,t.wdg)).dblclick((function(t){t.stopPropagation(),$fis.wdg.call(e,{wdg:r})}));let l=$$.dc("wdg_cnt",e).toggleClass("dbl",a).hide(),u=$.inArrayRegEx("bgcolor",s.rendering_options);switch(u>-1&&l.css("backgroundColor",s.rendering_options[u].toString().right(":")),s.type){case"table":var d=$$.tblset({},l),h=$$.tr().appendTo(d.hd),p=$t.wdg[r.indexOf("wdg_ev_")>=0?"wdg_ev_":r]||{};$.each(s.columns,(function(t,e){var n=p[e]?p[e].label:e;$$.th().text(n).appendTo(h)})),$.each(s.data,(function(t,e){var n=$$.tr().appendTo(d.bdy);$.each(s.columns,(function(t,o){var i=$$.td().appendTo(n);e[o]instanceof Date||!0===$ocms.isJSONDateString(e[o])?i.text(fdt(e[o],$t.dateformat)):i.rwText(e[o])}))})),$.inArray("firstrow_bold",s.rendering_options)>-1&&h.nextAll("tr:first").css("font-weight","bold");break;case"ind":$$.dc("ind",l).addClass("sts_"+(s.data.status||"")).append([$$.dc("ind").text(s.data.value),$$.lbl(s.data.label)]);break;case"image_url":l.css("background","url('"+s.url+"') no-repeat center center transparent");break;case"image_base64":l.css("background","url('data:image/png;base64,"+s.image+"') no-repeat center center transparent");break;case"html":if(l.html(s.html),$.inArray("reload_10min",s.rendering_options)>-1){var f=l.find("iframe");setTimeout((function(){f.attr("src",(function(t,e){return e}))}),6e5)}}$.inArray("reload_30min",s.rendering_options)>-1&&"html"!==s.type&&setTimeout((function(){$fis.wdg.call(e,{wdg:r})}),18e5),l.slideDown(150)},error:function(t){e.slideUp(150),$fis.failure.call(this,t)},complete:function(){e.ldng(0)}})},ov:function(){$fis.lf(!0);let t=$("#contentframe").empty(),e=$$.d({id:"dashboard_frame"}).appendTo(t);$ocms.postXT({url:$ocms.url("wdg/my"),success:function(t){$.each(t,(function(t,n){var o=$$.dc("wdg_frame",e,{"data-wdg":n}).ldng(1);$fis.wdg.call(o,{wdg:n})}))},loading:e})}};$fis.notifications={connection:null,init:function(){"undefined"!=typeof signalR&&null===this.connection&&$ocms.auth.useraccount_id&&(this.ensureFrame(),this.connection=(new signalR.HubConnectionBuilder).withUrl("/notifications").withAutomaticReconnect().build(),this.connection.on("notification",(t=>{this.push(t)})),this.connection.start().catch((()=>{this.connection=null})))},ensureFrame:function(){$("#notification_frame").length<1&&$("
",{id:"notification_frame"}).appendTo($("footer:first").length?"footer:first":"body")},push:function(t){this.ensureFrame(),t=t||{};let e=$("
",{class:"notification_item"}).addClass((t.severity||"info").toLowerCase()).append($(" ",{type:"button",class:"notification_close",text:"×"})).append($("
",{class:"notification_title",text:t.title||"Info"})).append($("
",{class:"notification_message",text:t.message||""}));e.find(".notification_close").on("click",(function(){e.remove()})),$("#notification_frame").prepend(e),setTimeout((function(){e.fadeOut(150,(function(){e.remove()}))}),9e3)}},Array.prototype.push.apply($ocms.ocmsmenu,[{lbl:$t.m_inv,id:"m_inv",fnc:"init:inv",ico:"glyphicon glyphicon-list-alt"},{lbl:$t.m_req,id:"m_req",fnc:"init:req",ico:"glyphicon glyphicon-eur"},{lbl:$t.m_bcd,id:"m_bcd",fnc:"init:bam",ico:"glyphicon glyphicon-indent-right"},{fnc:"separator"},{lbl:$t.m_rep,id:"m_rep",fnc:"init:rep",ico:"glyphicon glyphicon-dashboard"},{fnc:"separator"},{lbl:$t.m_todo,id:"m_todo",fnc:()=>{$("#contentframe").empty().load($ocms.url("todos")),$("#listframe").rC("fix").aC("hd")},ico:"glyphicon glyphicon-sunglasses"}]),$(document).ready((function(){$fis.notifications.init(),$fis.ov()}));
\ No newline at end of file
diff --git a/Fuchs/wwwroot/web/tools.js b/Fuchs/wwwroot/web/tools.js
index ceb47a5..f36c9c0 100644
--- a/Fuchs/wwwroot/web/tools.js
+++ b/Fuchs/wwwroot/web/tools.js
@@ -1,4 +1,5 @@
-/*! js-cookie v3.0.1 | MIT */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML=" ",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML=" ",le.option=!!xe.lastChild;var ke={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0
+/// Logs every SQL error both to the worker's structured (so it reaches
+/// whatever sink/OTel export is configured) and to (SQL/local-file
+/// debug trail). Passing is optional for call sites that don't have one
+/// in scope, but every caller that does have one in scope should pass it — otherwise a failing
+/// stored procedure only ever shows up in the debug trail, never in the worker's own logs.
+///
public class FdsSqlOptions : sqloptions
{
private Dictionary? _baseInfo;
- public FdsSqlOptions(Dictionary? dic = null)
+ public FdsSqlOptions(Dictionary? dic = null, ILogger? logger = null)
{
_baseInfo = dic;
OnError = (procedure, ex, data) =>
+ {
+ logger?.LogError(ex, "SQL error in {Procedure}: {Message} — ctrl_nfo={CtrlInfo} sql={Data}",
+ procedure, ex.Message, dic, data);
FdsDebug.DebugLog(procedure, exc: ex, data: $"ctrl_nfo={dic}, sql={data}");
+ };
}
}
@@ -88,7 +99,7 @@ public class FdsMfr : IFdsMfr
if (debugDetails) FdsDebug.DebugToFile("GetInvoiceFiles_async - start", filename: "DebugDetail.txt");
var dtbl = await getSQLDatatable_async(
"EXECUTE [dbo].[fds__fn_getMFRInvoicesWithoutfiles];",
- FdsShared.FDSConnectionString(), SqlParameterList: null, options: new FdsSqlOptions());
+ FdsShared.FDSConnectionString(), SqlParameterList: null, options: new FdsSqlOptions(logger: _logger));
if (dtbl.Count > 0)
{
var rows = dtbl.DataTable.Rows.Cast()
@@ -115,7 +126,7 @@ public class FdsMfr : IFdsMfr
SQL_VarChar("@Id", r.id),
SQL_VarChar("@filename", r.docName),
new SqlParameter("@file", fl) { SqlDbType = SqlDbType.VarBinary }),
- options: new FdsSqlOptions());
+ options: new FdsSqlOptions(logger: _logger));
Interlocked.Increment(ref downloaded);
}
}
@@ -142,7 +153,7 @@ public class FdsMfr : IFdsMfr
var pl = new List { SQL_VarChar("@reportid", reportid) };
var sqldt = Task.Run(async () => await getSQLDatatable_async(
"EXECUTE [dbo].[fds__getReportDocument] @reportid;",
- FdsShared.FDSConnectionString(), SqlParameterList: pl, options: new FdsSqlOptions())).Result;
+ FdsShared.FDSConnectionString(), SqlParameterList: pl, options: new FdsSqlOptions(logger: _logger))).Result;
if (sqldt.Count > 0)
{
@@ -166,7 +177,7 @@ public class FdsMfr : IFdsMfr
SQL_VarChar("@Id", reportid),
SQL_VarChar("@filename", fln),
new SqlParameter("@file", fl) { SqlDbType = SqlDbType.VarBinary }),
- options: new FdsSqlOptions())).Wait();
+ options: new FdsSqlOptions(logger: _logger))).Wait();
}
catch (Exception fsex) { FdsDebug.DebugLog("getReportDoc - mfr storefile", exc: fsex); }
}
@@ -197,7 +208,7 @@ public class FdsMfr : IFdsMfr
var pl = new List { SQL_VarChar("@type", type), SQL_VarChar("@reportid", reportid) };
var sqldt = Task.Run(async () => await getSQLDatatable_async(
"EXECUTE [dbo].[fds__getFDSDocument] @type, @reportid;",
- FdsShared.FDSConnectionString(), SqlParameterList: pl, options: new FdsSqlOptions())).Result;
+ FdsShared.FDSConnectionString(), SqlParameterList: pl, options: new FdsSqlOptions(logger: _logger))).Result;
if (sqldt.Count > 0)
{
@@ -236,14 +247,14 @@ public class FdsMfr : IFdsMfr
SQL_Bit("@files", includeFiles), SQL_VarChar("@authuser", authUser)
},
tablenames: new[] { "admin", "inv", "buchungen", "debitoren" },
- options: new FdsSqlOptions())).Result;
+ options: new FdsSqlOptions(logger: _logger))).Result;
var bediFiles = new List();
if (dset.Count >= 4)
{
var admin = dset.Tables("admin").Rows[0].toObjectDictionary();
- DateTime startdate = (DateTime)admin["startdate"], enddate = (DateTime)admin["enddate"];
+ DateTime startdate = (DateTime)admin["startdate"]!, enddate = (DateTime)admin["enddate"]!;
string register = tgtdate.ToString("yyyy\\/MM") + (mode.ToLower() == "w" ? "_w" + tgtdate.ToString("dd") : "");
var fls = new Dictionary();
@@ -251,10 +262,10 @@ public class FdsMfr : IFdsMfr
{
Formatkategorie = DatevFormatkategorie.Buchungsstapel,
Formatversion = DatevFormatversion.Buchungsstapel_9,
- Beraternummer = (int)admin["beraternummer"],
- Mandantennummer = (int)admin["mandantennummer"],
- WJBeginn = (DateTime)admin["WJ-Beginn"],
- Sachkontenlänge = (int)admin["Sachkontenlänge"],
+ Beraternummer = (int)admin["beraternummer"]!,
+ Mandantennummer = (int)admin["mandantennummer"]!,
+ WJBeginn = (DateTime)admin["WJ-Beginn"]!,
+ Sachkontenlänge = (int)admin["Sachkontenlänge"]!,
DatumVon = startdate,
DatumBis = enddate,
Bezeichnung = "fds_" + mode + tgtdate.ToString("yyMMdd")
@@ -284,7 +295,14 @@ public class FdsMfr : IFdsMfr
else
fl = irow.no("file", null) as byte[];
}
- catch { }
+ catch (Exception ex)
+ {
+ // Silently omitting this file from the DATEV export previously left no
+ // trace at all — the export "succeeded" while quietly missing a document.
+ _logger.LogWarning(ex,
+ "getDatevZip: failed to fetch invoice file — invoiceId={InvoiceId} fileName={FileName}",
+ irow.nz("InvoiceId"), fln);
+ }
if (fl != null && !string.IsNullOrEmpty(fln))
{
fls.Add(fln, fl);
@@ -308,8 +326,18 @@ public class FdsMfr : IFdsMfr
stream!.Position = 0;
return archiveFile;
}
+ _logger.LogError(
+ "getDatevZip: CompressToStream returned false — archiveFile={ArchiveFile} fileCount={FileCount}",
+ archiveFile.FullName, fls.Count);
+ }
+ catch (Exception ex)
+ {
+ // Previously swallowed entirely: a DATEV export could fail at the archive
+ // step with zero trace anywhere, not even the DB debug log.
+ _logger.LogError(ex,
+ "getDatevZip: archive creation failed — archiveFile={ArchiveFile} fileCount={FileCount}",
+ archiveFile.FullName, fls.Count);
}
- catch { }
}
}
}
diff --git a/Fuchs_DataService/FdsMfrClient.cs b/Fuchs_DataService/FdsMfrClient.cs
index 6b00346..e3707ce 100644
--- a/Fuchs_DataService/FdsMfrClient.cs
+++ b/Fuchs_DataService/FdsMfrClient.cs
@@ -64,7 +64,7 @@ public class FdsMfrClient : IDisposable
public Dictionary> NavProperties { get; } = new();
private readonly DataSet _tableSet;
- public DatabaseSchema(EntityTypes et)
+ public DatabaseSchema(EntityTypes et, ILogger? logger = null)
{
_et = et;
var dset = Task.Run(async () => await getSQLDataSet_async(
@@ -72,7 +72,7 @@ public class FdsMfrClient : IDisposable
FdsShared.FDSConnectionString(),
SqlParameterList: new List { new("@tgttype", ThisEntityName) },
tablenames: new[] { "entity", "complex_types", "navigation_properties", "tables" },
- options: new FdsSqlOptions())).Result;
+ options: new FdsSqlOptions(logger: logger))).Result;
IsValid = dset.Count > 0;
HasEntity = dset.Tables("entity").Rows.Count == 1;
@@ -98,7 +98,7 @@ public class FdsMfrClient : IDisposable
string.Join(Environment.NewLine, sqlList),
FdsShared.FDSConnectionString(),
tablenames: tableNames.ToArray(),
- options: new FdsSqlOptions())).Result.DataSet;
+ options: new FdsSqlOptions(logger: logger))).Result.DataSet;
}
public DataSet TgtDataset(string setId)
@@ -147,7 +147,7 @@ public class FdsMfrClient : IDisposable
{
try
{
- var schema = schemaDic != null && schemaDic.TryGetValue(thisEntityName, out var s) ? s : new DatabaseSchema(et);
+ var schema = schemaDic != null && schemaDic.TryGetValue(thisEntityName, out var s) ? s : new DatabaseSchema(et, _logger);
if (!schema.IsValid)
{
dlg("Schema not found", "", "");
@@ -179,7 +179,7 @@ public class FdsMfrClient : IDisposable
{
var lastDate = await getSQLValue_async(
schema.EntityConfig.nz("DateSQL").ne($"SELECT MAX([{schema.EntityConfig["DateColumn"]}]) FROM [dbo].[{schema.EntityTableName}];"),
- FdsShared.FDSConnectionString(), options: new FdsSqlOptions());
+ FdsShared.FDSConnectionString(), options: new FdsSqlOptions(logger: _logger));
filter.Add(
updateNeed == FdsMfr.UpdateNeed.Short && lastDate.Result is DateTime dt
? $"$filter={schema.EntityConfig["DateColumn"]} gt DateTime'{dt:yyyy-MM-dd}T00:00:00'"
@@ -395,7 +395,7 @@ public class FdsMfrClient : IDisposable
{
string sql = "SELECT * FROM [dbo].[fds__getUpdateableTables]()"
+ (tgtEntityType.HasValue ? $" WHERE [entity_name] = '{tgtEntityType.Value}'" : "") + ";";
- var updateableTables = await getSQLDatatable_async(sql, FdsShared.FDSConnectionString(), options: new FdsSqlOptions());
+ var updateableTables = await getSQLDatatable_async(sql, FdsShared.FDSConnectionString(), options: new FdsSqlOptions(logger: _logger));
dtf("UpdateableTables", updateableTables.Exception ?? "", $"({(updateableTables.Count > 0 ? updateableTables.DataTable.Rows.Count.ToString() : " no")} Rows)", null);
if (updateableTables.Count > 0 && updateableTables.DataTable.Columns.Contains("updateneed"))
@@ -446,7 +446,7 @@ public class FdsMfrClient : IDisposable
{
var updateableRequests = await getSQLDatatable_async(
"SELECT * FROM [dbo].[fds__getUpdateableRequests]();",
- FdsShared.FDSConnectionString(), options: new FdsSqlOptions());
+ FdsShared.FDSConnectionString(), options: new FdsSqlOptions(logger: _logger));
dtf("UpdateableRequests", updateableRequests.Exception ?? "", $"({(updateableRequests.Count > 0 ? updateableRequests.DataTable.Rows.Count.ToString() : " no")} Rows)", null);
if (updateableRequests.Count > 0)
diff --git a/Fuchs_DataService/FdsShared.cs b/Fuchs_DataService/FdsShared.cs
index 49a7cc0..3bae247 100644
--- a/Fuchs_DataService/FdsShared.cs
+++ b/Fuchs_DataService/FdsShared.cs
@@ -9,7 +9,7 @@ namespace fds;
///
/// Holds the application built from appsettings.json.
-/// Call once at startup before accessing .
+/// Call once at startup before accessing .
///
public static class FdsConfig
{
diff --git a/Fuchs_DataService/FdsZip.cs b/Fuchs_DataService/FdsZip.cs
index bef18dd..c2a316c 100644
--- a/Fuchs_DataService/FdsZip.cs
+++ b/Fuchs_DataService/FdsZip.cs
@@ -5,7 +5,6 @@ namespace fds;
public class Archive : IDisposable
{
- public event Action? Saving;
public event Action? FileSaved;
public event Action? FileStreamCreated;
@@ -140,8 +139,12 @@ public class Archive : IDisposable
_zipIn = null;
ZipInOK = false;
}
- catch
+ catch (Exception ex)
{
+ // Previously silent: callers (e.g. HandleDatevZip) saw only a bare failed result
+ // with no way to tell a compression error from any other reason ExitOK is false.
+ _logger.LogError(ex, "Archive.Compress failed — archiveFile={ArchiveFile} fileCount={FileCount}",
+ archiveFile.FullName, files.Count);
ExitOK = false;
}
archiveFile.Refresh();
@@ -179,8 +182,11 @@ public class Archive : IDisposable
_zipIn = null;
ZipInOK = false;
}
- catch
+ catch (Exception ex)
{
+ // Previously silent: the DATEV export ZIP-to-stream path failed with no
+ // trace anywhere, only a bare false return.
+ _logger.LogError(ex, "Archive.CompressToStream failed — fileCount={FileCount}", files.Count);
ExitOK = false;
}
return ExitOK;
diff --git a/Fuchs_DataService/Fuchs_DataService.csproj b/Fuchs_DataService/Fuchs_DataService.csproj
index 530a636..65c3478 100644
--- a/Fuchs_DataService/Fuchs_DataService.csproj
+++ b/Fuchs_DataService/Fuchs_DataService.csproj
@@ -10,11 +10,13 @@
x64
Fuchs_DataService.xml
- 1591
+
+ 1591;NU1608
Fuchs_DataService.xml
- 1591
+
+ 1591;NU1608
diff --git a/Fuchs_DataService/Fuchs_DataService.xml b/Fuchs_DataService/Fuchs_DataService.xml
index 4ad774a..4f31510 100644
--- a/Fuchs_DataService/Fuchs_DataService.xml
+++ b/Fuchs_DataService/Fuchs_DataService.xml
@@ -4,6 +4,15 @@
Fuchs_DataService
+
+
+ Logs every SQL error both to the worker's structured (so it reaches
+ whatever sink/OTel export is configured) and to (SQL/local-file
+ debug trail). Passing is optional for call sites that don't have one
+ in scope, but every caller that does have one in scope should pass it — otherwise a failing
+ stored procedure only ever shows up in the debug trail, never in the worker's own logs.
+
+
Max parallel invoice-file downloads (independent per file).
diff --git a/Fuchs_Intranet.slnx b/Fuchs_Intranet.slnx
index b490604..6256fad 100644
--- a/Fuchs_Intranet.slnx
+++ b/Fuchs_Intranet.slnx
@@ -15,9 +15,6 @@
-
-
-
diff --git a/NuGet.config b/NuGet.config
new file mode 100644
index 0000000..765346e
--- /dev/null
+++ b/NuGet.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/OCORE b/OCORE
index 6a3926e..dd1d327 160000
--- a/OCORE
+++ b/OCORE
@@ -1 +1 @@
-Subproject commit 6a3926e3e1365c0dd9d28f9adefab18b5f053545
+Subproject commit dd1d327e365b0ac20ecc5e0285503094aea98da7
diff --git a/OCORE_Charting b/OCORE_Charting
index ff19fc3..696d93a 160000
--- a/OCORE_Charting
+++ b/OCORE_Charting
@@ -1 +1 @@
-Subproject commit ff19fc3494dac1158f5b7923f4ae2c78e3ffdd70
+Subproject commit 696d93abef14b35bcd3016bd5b4a40e2451b0892
diff --git a/OCORE_web b/OCORE_web
index a6593b2..678db21 160000
--- a/OCORE_web
+++ b/OCORE_web
@@ -1 +1 @@
-Subproject commit a6593b2a64a9ac4f2b8d06ce6b4880e52072b96c
+Subproject commit 678db212ab9379f71037a136c51933baab40e5b4
diff --git a/OCORE_web_pdf b/OCORE_web_pdf
index a94ddf9..cd8214e 160000
--- a/OCORE_web_pdf
+++ b/OCORE_web_pdf
@@ -1 +1 @@
-Subproject commit a94ddf90c31291bb3fd43388e055949807cffba0
+Subproject commit cd8214ed7b2f2d755303c51af61858d0b31c2301