1var _kc = window._kc = window._kc || [];_kc.push(['path_cms', '/']);var $=jQuery.noConflict();function kc_add_axcall(url){if(typeof url!=="string"||url===""){return url}if(url.indexOf("axcall=")!==-1){return url}return url+(url.indexOf("?")===-1?"?":"&")+"axcall=1"}function kc_run_callback(callback,params){if(typeof callback==="function"){callback(params);return}if(typeof callback!=="string"||callback===""){return}try{eval(callback)}catch(e){console.error("Keimeno callback failed:",callback,e)}}function kc_ajax_error(xhr,status,error){var message="Request failed";if(error){message+=": "+error}else if(status){message+=": "+status}console.error(message,xhr);if(typeof show_msge==="function"){show_msge(message,5e3)}}var kc={defaults:[],options:{},init:function(){var opt=jQuery.merge(this.defaults,_kc);this.options=Object.fromEntries(opt);$("[data-event='remove_onload']").each(function(){let element=$(this);let msec=0;if(typeof element.data("seconds")!=="undefined"){msec=element.data("seconds")*1e3;window.setTimeout(function(){element.fadeOut("slow",function(){element.remove()})},msec)}else{element.fadeOut("slow",function(){element.remove()})}})},remove_spinner:function(target){$(target).find(".kc-spinner").remove()},set_spinner:function(target){let color="#fff";var dcolor=document.querySelector('meta[name="theme-color"]');if(dcolor!=null){color=dcolor.getAttribute("content")}$(target).html('<div class="kc-spinner"><div class="kc-ring"><div></div><div></div><div></div><div></div></div></div>');$(".kc-ring").find("div").css("border","8px solid "+color);$(".kc-ring").find("div").css("border-color",color+" transparent transparent transparent")},request:{load:function(id,url,callback,async){if(typeof async==="undefined"){var async=true}var _callback="";if(typeof callback!=="undefined"){_callback=callback}var ident="#"+id;$(ident).fadeOut("fast",function(){kc.set_spinner(ident);$(ident).fadeIn("fast",function(){$.ajax({url:kc_add_axcall(url),cache:false,async:async,success:function(html){$(ident).fadeOut("fast",function(){$(ident).html(html);$(ident).fadeIn();fwstart();if(_callback!=""){kc_run_callback(_callback)}})},error:kc_ajax_error})})})},json:function(url,callback,async,cache){if(typeof async==="undefined"){var async=true}if(typeof cache==="undefined"){var cache=true}var _callback="";if(typeof callback!=="undefined"){_callback=callback}var result=JSON.parse('{"status":"pending"}');$.ajax({url:kc_add_axcall(url),cache:cache,async:async,dataType:"json",success:function(data){if(_callback!=""){kc_run_callback(_callback+"("+JSON.stringify(JSON.stringify(data))+")")}else{result=data}},error:kc_ajax_error});return result},load_after:function(id,url,callback,async){if(typeof async==="undefined"){var async=true}var _callback="";if(typeof callback!=="undefined"){_callback=callback}var ident="#"+id;$(ident).fadeOut("fast",function(){kc.set_spinner(ident);$(ident).fadeIn("fast",function(){$.ajax({url:kc_add_axcall(url),cache:false,async:async,success:function(html){$(ident).fadeOut("fast",function(){kc.remove_spinner(ident);$(html).insertAfter(ident);fwstart();if(_callback!=""){kc_run_callback(_callback)}})},error:kc_ajax_error})})})}}};$(function(){kc.init()});const fingerprint={browser_features:[],get_hash:function(str){var hash=0,i=0,len=str.length;while(i<len){hash=(hash<<5)-hash+str.charCodeAt(i++)<<0}hash+=2147483647+1;return hash},get_info:function(){try{var browser=navigator;for(var key in browser){var value=browser[key];if(typeof value==="object")value=JSON.stringify(value);if(key!="doNotTrack"&&key!="serviceWorker"){this.browser_features.push(key+":"+value)}}return this.browser_features.join(",")}catch(e){return""}},get_fingerprint:function(){return this.get_hash(this.get_info())}};var http=null;$.extend({getUrlVars:function(iurl){var vars={},hash;if(typeof iurl!=="string"||iurl.indexOf("?")===-1){return vars}var hashes=iurl.substring(iurl.indexOf("?")+1).split("&");for(var i=0;i<hashes.length;i++){hash=hashes[i].split("=");if(hash[0]!==""){vars[decodeURIComponent(hash[0])]=decodeURIComponent(hash[1]||"")}}return vars}});function show_msge(msg,duration){$("#savedresult").remove();$("body").prepend('<div id="savedresult" class="alert"></div>');$("#savedresult").removeClass("alert-success").addClass("alert-danger");$("#savedresult").html(msg);show_saved_msg(duration)}function show_msg(msg,duration){$("#savedresult").remove();$("body").prepend('<div id="savedresult" class="alert"></div>');$("#savedresult").removeClass("alert-danger").addClass("alert-success");$("#savedresult").html(msg);show_saved_msg(duration)}function show_saved_msg(duration){if(duration==""||duration==0||duration==null)duration=3e3;$("#statusinfo").hide();var $result=$("#savedresult");var isError=$result.hasClass("alert-danger")||$result.hasClass("text-danger");$result.attr({role:isError?"alert":"status","aria-live":isError?"assertive":"polite"}).css({position:"fixed","z-index":"1066",top:"50%",left:"50%",width:"max-content","max-width":"calc(100vw - 2rem)",transform:"translate(-50%, -50%)",padding:"1rem 1.4rem",border:"1px solid "+(isError?"#991b1b":"#166534"),"border-radius":"6px",background:isError?"#b91c1c":"#16803a",color:"#ffffff","box-shadow":"0 14px 35
1px rgba(15, 23, 42, 0.24)","font-weight":"600","line-height":"1.45","text-align":"center"}).fadeIn();setTimeout(function(){$result.fadeOut()},duration)}function before_axform_submit(formData,jqForm,options){if(options.showspinner==true){kc.set_spinner(options.target)}var queryString=$.param(formData);return true}var axform_success=function ax_form_response(responseText,statusText,xhr,$form){fwstart()};function init_auto_ax_submit(){$(".axform").off("submit.keimeno");$(".axform").on("submit.keimeno",function(){var axform_options={type:"POST",forceSync:true,target:$(this).data("target"),showspinner:$(this).data("showspinner"),beforeSubmit:before_axform_submit,success:axform_success};$(this).ajaxSubmit(axform_options);if($(this).parent().hasClass("modal-content")){var modalid=$(this).parent().parent().parent().attr("id");$("#"+modalid).modal("hide")}return false})}function set_ajax_links(){$(".ajax-link").off("click.keimeno");$(".ajax-link").css("cursor","pointer");$(".ajax-link").on("click.keimeno",function(event){event.preventDefault();var target_container="wrapper";if($(this).data("target")!=""&&typeof $(this).data("target")!=="undefined"){target_container=$(this).data("target")}if(target_container==undefined)target_container="wrapper";simple_load(target_container,$(this).attr("href"),true)})}function jsonexec(url,showok){if(showok!=false)showok=true;$.getJSON(kc_add_axcall(url),function(data){if((data.msge||"")!=""){show_msge(data.msge,3e3)}else{if(showok==true){show_msg(data.msg||"",3e3);if((data.jsfunction||"")!=""){kc_run_callback(data.jsfunction+"()");fwstart()}$("input[type=file]").val("")}}}).fail(kc_ajax_error)}function simple_load(id,url_link,gif){$("#"+id).fadeOut("fast",function(){kc.set_spinner("#"+id);$("#"+id).fadeIn("fast",function(){$.ajax({url:kc_add_axcall(url_link),cache:false,success:function(html){$("#"+id).fadeOut("fast",function(){if(id!="")$("#"+id).html(html);fwstart()});$("#"+id).fadeIn()},error:kc_ajax_error})})})}function simple_append(id,url_link){$.ajax({url:kc_add_axcall(url_link),cache:false,success:function(html){if(id!="")$("#"+id).append(html);fwstart()},error:kc_ajax_error})}function execrequest(url_link){$.ajax({url:kc_add_axcall(url_link),cache:false,success:function(html){},error:kc_ajax_error})}function simple_load_sync(id,url_link){$.ajax({url:kc_add_axcall(url_link),cache:false,async:false,success:function(html){if(id!="")$("#"+id).html(html);fwstart()},error:kc_ajax_error})}function simple_load_nocache(id_target,url_link){$.ajax({url:kc_add_axcall(url_link),cache:false,success:function(html){if($("#"+id_target).length>0)$("#"+id_target).html(html)},error:kc_ajax_error})}function simple_get(id_target,php,query,gif){if(gif!=""&&gif!=null&&typeof gif!=="undefined"&&$("#"+id_target).length>0){$("#"+id_target).html('<img src="'+gif+'" border="0">')}var set_url=php+"?"+query;simple_load_nocache(id_target,set_url)}function simple_post(id_target,php,query,gif){if(gif!=""){$("#"+id_target).html('<img src="'+gif+'" border="0">')}var set_url=php+"?"+query;var url_data=$.getUrlVars(set_url);$.ajax({type:"POST",dataType:"html",data:url_data,url:php,cache:false,async:false,success:function(html){if(id_target!="")$("#"+id_target+"").html(html)},error:kc_ajax_error})}function checkKeyPress(evt,id_button){if(evt.which&&evt.which==13||evt.keyCode&&evt.keyCode==13){document.getElementById(id_button).click();return false}else{return true}}$.getDocHeight=function(){var D=document;return Math.max(Math.max(D.body.scrollHeight,D.documentElement.scrollHeight),Math.max(D.body.offsetHeight,D.documentElement.offsetHeight),Math.max(D.body.clientHeight,D.documentElement.clientHeight))};function dc_show(conid,fwidth){$(".global_black").remove();$("body").prepend('<div class="global_black"></div>');$(".global_black").css("height",$.getDocHeight());$(".global_black").css("z-index",999);$(".global_black").show();$(".global_black").click(function(){dc_remove(conid)});$("#"+conid).prepend('<div style="float:right;" class="dc-close-link"><a href="javascript:void(0)" title="close" onClick="dc_closeLink(this);"><img id="closeicon-divframe" src="/images/opt_close.png" border="0"></a></div>');$("#"+conid).width(fwidth);$("#"+conid).css("position","absolute");$("#"+conid).css("z-index",1e3);$("#"+conid).css("top",($(window).height()-$("#"+conid).outerHeight())/2+$(window).scrollTop()+"px");$("#"+conid).css("left",($(window).width()-$("#"+conid).outerWidth())/2+$(window).scrollLeft()+"px");if($("#"+conid).outerHeight()>$(window).height()){$("#"+conid).css("height",$(window).height()-300);$("#"+conid).css("top",($(window).height()-$("#"+conid).outerHeight())/2+$(window).scrollTop()+"px")}else{$("#"+conid).css("height","auto")}$("#"+conid).fadeIn();$("#"+conid).css("display","block")}function close_show_box(){$("#show_box").fadeOut();$("#ah_content_table").show();$(".global_black").remove();$("#adminheader").css("z-index","1")}function print_show_box(){$("#show_box_iframe").get(0).contentWindow.print()}function add_show_box(srclink,width,height,noprinter,title){width=width+"px";height=height+"px";add_show_box_iframe(srclink,title,width,height);return false}function add_show_box_tpl(srclink,title){$("#modal_frame").remove();$("body").prepend('<div class="modal fade" id="modal_frame" tabindex="-1" role="dialog" aria-labelledby="modal_frameLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><h4 class="modal-title" id="modal_frameLabel">'+title+'</h4></div><div class="modal-body" id="showboxcontent"></div></div></div></div>');$("#modal_frame").modal("show");simple_load("showboxcontent",srclink);return false}function add_show_box_iframe(srclink,title,width,height){if(title==""||title==null||!title)title=" ";$("#modal_frame").remove();$("body").prepend('<div class="modal fade" id="modal_frame" tabindex="-1" role="dialog" aria-labelledby="modal_frameLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="btn btn-default pull-right" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><button class="btn btn-default pull-right" type="button" onclick="print_show_box()"><i class="fa fa-print"></i></button><h4 class="modal-title" id="modal_frameLabel">'+title+'</h4></div><div class="modal-body" id="showboxcontent"><iframe id="show_box_iframe" class="embed-responsive-itemx" src="'+srclink+'"></iframe></div></div></div></div>');if(width==""||width==null||!width){width=$(window).width()*.7+"px"}if(height==""||height==null||!height){height="auto"}$(".modal .modal-dialog").css("width",width);$(".modal .modal-dialog").css("height","auto");$(".modal-content").css("height","auto");
1$("#show_box_iframe").css("height",height);$("#show_box_iframe").css("width","100%");$("#showboxcontent").css("height","100%");$("#modal_frame").modal("show");return false}function dc_remove(conid){$("#"+conid).fadeOut();$(".global_black").remove();$(".dc-close-link").remove()}function dc_closeLink(obj){var conid=obj.parentNode.parentNode.id;dc_remove(conid)}function dc_init(){$(".divframe").hide()}function changeClass(idElement,newClass){document.getElementById(idElement).setAttribute("class",newClass)}function disable_form(selector){$(selector+" input").prop("disabled",true);$(selector+" select").prop("disabled",true);$(selector+" textarea").prop("disabled",true);$(selector+' button[type="submit"]').prop("disabled",true);$(selector+' button[type="button"]').prop("disabled",true)}function enable_form(selector){$(selector+" input").prop("disabled",false);$(selector+" select").prop("disabled",false);$(selector+" textarea").prop("disabled",false);$(selector+' button[type="submit"]').prop("disabled",false);$(selector+' button[type="button"]').prop("disabled",false)}function enable_submitts(){$("button[type='submit']").prop("disabled",false);$("form button").each(function(btn){$(this).prop("disabled",false)})}function before_json_submit(formData,jqForm,options){var queryString=$.param(formData);const confirmAttr=jqForm.attr("data-confirm");if(confirmAttr==="true"){const confirmed=window.confirm("Fortfahren?");if(!confirmed){return false}}jqForm.find(":submit").each(function(){$(this).prop("disabled",true)});const autoSaveAttr=jqForm.attr("data-autosave");if(autoSaveAttr===undefined||autoSaveAttr==="false"){disable_form(".jsonform")}return true}function run_jsonform_callback($form,attributeName){if(!$form||typeof $form.attr!=="function"){return}var callback=$.trim($form.attr(attributeName)||"");if(callback!==""){kc_run_callback(callback)}}function show_json_answer(responseText,statusText,xhr,$form){try{$("#"+$form.attr("id")).find(":submit").prop("disabled",false);$form.find(":submit").prop("disabled",false);enable_form(".jsonform");let obj=null;try{if(typeof responseText==="object"){obj=responseText}else if(typeof responseText==="string"&&responseText.trim()!==""){obj=jQuery.parseJSON(responseText)}else{obj={}}}catch(e){console.error("JSON parse failed:",e,responseText);obj={msge:"Die Serverantwort konnte nicht verarbeitet werden."}}$("#savedresult").remove();$("body").prepend('<div id="savedresult"></div>');var msge=obj.msge||"";var msg=obj.msg||"";var formCallbackAttribute="data-callback-success";if(msge!=""){formCallbackAttribute="data-callback-fail";$("#savedresult").html(msge);$("#savedresult").removeClass("alert-success").removeClass("text-success").addClass("alert-danger").addClass("text-danger");show_saved_msg(6e3)}else{$("#savedresult").removeClass("alert-danger").removeClass("text-danger").addClass("alert-success").addClass("text-success");$("#savedresult").html(obj.msg);var timed=6e3;if(typeof $form.data("time")!="undefined"){timed=parseInt($form.data("time"));timed=timed*1e3}show_saved_msg(timed);$("input[type=file]").val("")}if((obj.jsfunction||"")!=""){kc_run_callback(obj.jsfunction+"("+(obj.jsparams||"")+")")}run_jsonform_callback($form,formCallbackAttribute)}catch(e){console.error("error jsonform",responseText);show_saved_msg(responseText,3e3);run_jsonform_callback($form,"data-callback-fail")}enable_submitts()}function show_jsonform_error(xhr,status,error,$form){var answer=xhr&&xhr.responseJSON;if(!answer&&xhr&&typeof xhr.responseText==="string"){try{answer=JSON.parse(xhr.responseText)}catch(ignored){}}if(answer&&typeof answer.msge==="string"&&answer.msge.trim()!==""){show_json_answer({msg:"",msge:answer.msge,status:false,jsfunction:"",jsparams:""},status,xhr,$form);return}$form.find(":submit").prop("disabled",false);enable_form(".jsonform");enable_submitts();run_jsonform_callback($form,"data-callback-fail");kc_ajax_error(xhr,status,error)}function init_autojson_submit(){$(document).off("submit.keimeno",".jsonform");$(document).on("submit.keimeno",".jsonform",function(event){event.preventDefault();var $form=$(this);var options={type:($form.attr("method")||"POST").toUpperCase(),url:$form.attr("action")||window.location.href,forceSync:true,beforeSubmit:before_json_submit,success:show_json_answer,error:function(xhr,status,error){show_jsonform_error(xhr,status,error,$form)}};if(typeof $.fn.ajaxSubmit==="function"){$form.ajaxSubmit(options);return false}var formElement=this;var formDataArray=$form.serializeArray();var formData=new FormData(formElement);if(before_json_submit(formDataArray,$form,options)===false){return false}$.ajax({url:options.url,type:options.type,data:formData,processData:false,contentType:false,success:function(responseText,statusText,xhr){show_json_answer(responseText,statusText,xhr,$form)},error:options.error});return false})}
1function set_ajaxdel_icon(){$(".deljson").off("click.keimeno");$(".deljson").on("click.keimeno",function(){var r=true;if($(this).data("confirm")=="1"){var r=confirm($(this).data("ctext"))}if(r==true){var url=$(this).data("phpfile")+"?page="+$(this).data("page")+"&cmd="+$(this).data("cmd")+"&ident="+$(this).data("ident")+"&"+$(this).data("toadd");var icon=$(this);$.getJSON(kc_add_axcall(url),function(data){if((data.msge||"")!=""){show_msge(data.msge)}else{icon.closest("tr").fadeTo(100,0,function(){$(this).remove()});if((data.jsfunction||"")!=""){kc_run_callback(data.jsfunction+"()")}}}).fail(kc_ajax_error)}return false})}function set_json_links(){$(".json-link").off("click.keimeno").css("cursor","pointer");$(".json-link").on("click.keimeno",function(event){event.preventDefault();const $link=$(this);const needsConfirm=$link.data("confirm");const customConfirmText=$link.data("confirmtext");if(needsConfirm===true||needsConfirm==="true"){let confirmText=customConfirmText;if(!confirmText){confirmText="Fortfahren?"}if(!confirm(confirmText)){return false}}jsonexec($link.attr("href"),true)})}function set_data_bgi(){$("[data-bgi]").each(function(){$(this).css("background-image","url("+$(this).data("bgi")+")")});$("[data-bgp]").each(function(){$(this).css("background-position","url("+$(this).data("bgp")+")")})}function fwstart(){init_autojson_submit();set_ajaxdel_icon();init_auto_ax_submit();set_ajax_links();set_json_links();set_data_bgi()}function load_json_form(url,formid){$("#"+formid).trigger("reset");$.getJSON(kc_add_axcall(url),function(data){$.each(data,function(key,val){if($(".js-"+key).length>0){$("#"+formid+" .js-"+key).val(val)}})}).fail(kc_ajax_error)}fwstart(); 2jQuery(function() { 3 cf.init({ 4 'thx_container': '.fmrcontactthx', 5 'form': '.fmrcontactform', 6 'error_class': 'formerror' 7 }); 8}); 9function reload_customer_files() { 10 simple_load('js-su-files', '/index.php?page=7&cmd=reload_customer_files&cont_matrix_id='
10+ $('#js-customer-dropzone').data('cont_matrix_id')); 11} 12if (typeof Dropzone != "undefined") { 13 $( document ).ready(function() { 14 reload_customer_files(); 15 var product_pic_drop = new Dropzone("#js-customer-dropzone", { 16 paramName: "datei", 17 clickable: true, 18 url:"/index.php?page=7&cmd=su_file_upload&cont_matrix_id=" + $('#js-customer-dropzone').data('cont_matrix_id'), 19 maxFilesize: 32 20 }); 21 product_pic_drop.on("success", function(file,responseText) { 22 product_pic_drop.removeFile(file); 23 var result = jQuery.parseJSON(responseText); 24 if (result.status=='failed') { 25 $('#dropzonefeedback').append('<p class="text-danger"><i class="fa fa-times"></i> '+result.filename+'</p>'); 26 show_msge(result.filename); 27 } else { 28 $('#dropzonefeedback').append('<p class="text-success"><i class="fa fa-check-circle-o"></i> '+result.filename+'</p>'); 29 } 30 }); 31 product_pic_drop.on("drop", function() { 32 $('#js-customer-dropzone').html(''); 33 $('#dropzonefeedback').html(''); 34 $('#dropzonefeedback').show(); 35 }); 36 product_pic_drop.on("queuecomplete", function() { 37 $('#js-customer-dropzone').html('Drag & Drop Dateien hier'); 38 reload_customer_files(); 39 }); 40 product_pic_drop.on("error", function(file, message) { 41 alert(message); 42 this.removeFile(file); 43 }); 44 }); 45} 46function in_array(needle, haystack) { 47 var length = haystack.length; 48 for(var i = 0; i < length; i++) { 49 if(haystack[i] == needle) return true; 50 } 51 return false; 52} 53 54 55 56function calc_target(stepid) { 57 var targets = $('#step-'+stepid).data('targets'); 58 59 var page = "0_0"; 60 var ctargets={}; 61 $.each(targets, function (key, arr) { 62 ctargets[key] = arr; 63 }); 64 65 66 $.each(ctargets, function (key, conditions) { 67 68 $( ".js-sel-change" ).each(function() { 69 var hash = $(this).children("option:selected").data('hash'); 70 var element = $(this); 71 console.log(hash); 72 $.each(conditions, function (ckey, cond) { 73 if (cond.hash==hash) { 74 console.log('FOUND: '+hash+' page '+ key); 75 ctargets[key] = conditions.filter(function(value, index, arr){ return value.hash != hash;}); 76 page = key; 77 } 78 }); 79 if (ctargets[key].length==0) { 80 page = key; 81 console.log(key+' in sel found'); 82 } 83 }); 84 85 86 $( ".js-fb-img-click" ).each(function() { 87 var hash = $(this).data('hash'); 88 var edt_val = $(this).val(); 89 var element = $(this); 90 91 if ($(this).data('checked')==1) { 92 $('#js-img-value-'+$(this).data('optid')).val($(this).data('label')); 93 } 94 95 96 $.each(conditions, function (ckey, cond) { 97 if (cond.hash==hash) { 98 if (element.data('checked')==1) { 99 ctargets[key] = conditions.filter(function(value, index, arr){ return value.hash != hash;}); 100 } 101 } 102 }); 103 if (ctargets[key].length==0) { 104 page = key; 105 console.log(key+' in img found'); 106 } 107 }); 108 109 110 $( ".js-edit-field" ).each(function() { 111 var hash = $(this).data('hash'); 112 var edt_val = $(this).val(); 113 114 $.each(conditions, function (ckey, cond) { 115 if (cond.hash==hash) { 116 117 if (cond.cond=='=' && cond.value==edt_val) { 118 ctargets[key] = conditions.filter(function(value, index, arr){ return value.hash != hash;}); 119 } else if (cond.cond=='>' && parseInt(edt_val)>cond.value) { 120 ctargets[key] = conditions.filter(function(value, index, arr){ return value.hash != hash;}); 121 } 122 else if (cond.cond=='<' && parseInt(edt_val)<cond.value) { 123 ctargets[key] = conditions.filter(function(value, index, arr){ return value.hash != hash;}); 124 } 125 else if (cond.cond=='<=' && parseInt(edt_val)<=cond.value) { 126 ctargets[key] = conditions.filter(function(value, index, arr){ return value.hash != hash;}); 127 } 128 else if (cond.cond=='>=' && parseInt(edt_val)>
128=cond.value) { 129 ctargets[key] = conditions.filter(function(value, index, arr){ return value.hash != hash;}); 130 } 131 } 132 }); 133 if (ctargets[key].length==0) { 134 page = key; 135 console.log(key+' in edt found'); 136 } 137 }); 138 }); 139 140 /* no extra conditions found */ 141 if (page=='0_0') { 142 $( '#step-' +stepid+' .checked' ).each(function() { 143 var next =parseInt( $( this ).data( "next" )); 144 if (next>0) { 145 page = "0_"+next; 146 } 147 }); 148 } 149 150 /* default next page defined by step*/ 151 if (page=='0_0') { 152 page ='0_' + $( '#step-' +stepid).data('next'); 153 } 154 155 var res = page.split("_"); 156 console.log(res[1]); 157 return res[1]; 158} 159 160function set_standard_rquireds(stepid) { 161 $('#step-'+ stepid).find('*[data-required="1"]').each(function( index ) { 162 if($(this).is(":visible")){ 163 $(this).prop('required', true); 164 $(this).attr('required',true); 165 } 166 }); 167 168 169} 170 171function set_visibility(element) { 172 var data = element.data('visible'); 173 var chk = element; 174 if (chk.prop('checked')==true && chk.data('optid')==155 && $('#opt-150').val()=='einfach' ) { 175 $('#js-pid-tk').val('2569'); 176 } 177 if (chk.prop('checked')==false && chk.data('optid')==155 && $('#opt-150').val()=='einfach') { 178 $('#js-pid-tk').val('2568'); 179 } 180 181 182 if (chk.prop('checked')==true && chk.data('optid')==155 && ( $('#opt-150').val()=='klapp_hoch' || $('#opt-150').val()=='klapp_quer') ) { 183 $('#js-pid-tk').val('2567'); 184 } 185 if (chk.prop('checked')==false && chk.data('optid')==155 && ( $('#opt-150').val()=='klapp_hoch' || $('#opt-150').val()=='klapp_quer') ) { 186 $('#js-pid-tk').val('2566'); 187 } 188 189 190 $.each(data, function (key, obj) { 191 if (chk.prop('checked')==true){ 192 $('#optid-'+ obj.id).show(); 193 $('#optid-'+ obj.id).data('isvisible', true); 194 $('#optid-'+ obj.id).find('*[data-required="1"]').each(function( index ) { 195 $(this).prop('required', true); 196 $(this).attr('required',true); 197 }); 198 } else { 199 $('#optid-'+ obj.id).hide(); 200 $('#optid-'+ obj.id).data('isvisible', false); 201 $('#optid-'+ obj.id).find('*[data-required="1"]').each(function( index ) { 202 $(this).prop('required', false); 203 $(this).removeAttr('required'); 204 }); 205 } 206 }); 207} 208 209function set_visibility_sel(element) { 210 var data = element.data('visible'); 211 $.each(data, function (key, obj) { 212 if (element.val()=='Ja'){ 213 $('#optid-'+ obj.id).show(); 214 $('#optid-'+ obj.id).data('isvisible', true); 215 $('#optid-'+ obj.id).find('*[data-required="1"]').each(function( index ) { 216 $(this).prop('required', true); 217 $(this).attr('required',true); 218 }); 219 } else { 220 $('#optid-'+ obj.id).hide(); 221 $('#optid-'+ obj.id).data('isvisible', false); 222 $('#optid-'+ obj.id).find('*[data-required="1"]').each(function( index ) { 223 $(this).prop('required', false); 224 $(this).removeAttr('required'); 225 }); 226 } 227 }); 228} 229 230var last_step=[]; 231 232$('.js-fb-img-click').css('cursor', 'pointer'); 233 234 235$('.js-optgroup').each(function( index ) { 236 $(this).find('.js-radio:first').attr('checked',true); 237}); 238 239$('.step').hide(); 240$('#formbuilder .active').show(); 241 242$( '.js-chk-click' ).each(function() { 243 set_visibility($(this)); 244}); 245 246 247$( ".js-chk-click" ).click(function() { 248 set_visibility($(this)); 249}); 250 251$( ".js-test-click" ).click(function() { 252 var thisstepid = $(this).closest('.step').data('stepid'); 253 calc_target(thisstepid); 254}); 255 256 257 258$( ".js-sel-change" ).change(function() { 259 set_visibility_sel($(this)); 260}); 261 262 263 264$( ".js-fb-nav-next" ).click(function() { 265 var thisstepid = $(this).closest('.step').data('stepid'); 266 var calc_step = calc_target(thisstepid); 267 var step_id = $(this).data('next'); 268 console.log('calc step id: ' + calc_step+ ' ' + $('#step-' + calc_step).data('stepname')); 269 if (calc_step>0) { 270 step_id=calc_step; 271 } 272 273 var valid=true; 274 $('#step-'+ $(this).data('stepid') ).find('*[data-required="1"]').each(function( index ) { 275 276 if ($(this).val()=="" && $(this).prop('required')==true) { 277 $(this).addClass('missing'); 278 var thisid = '#'+$(this).attr('id'); 279 if (valid==true) { 280 $("html, body").animate({ scrollTop: $(thisid).offset().top }, 1000); 281 alert('Bitte Pflichtfelder ausfüllen'); 282 } 283 valid=false; 284 285 } 286 }); 287 288 if (valid==true) { 289 $('.missing').removeClass('missing'); 290 $('.step').hide(); 291 292 console.log('gehe zu ' + step_id + ' ' + $('#step-' + step_id).data('stepname')); 293 $('#step-' + step_id).show(); 294 $('#step-' + step_id).find('.js-fb-nav-back:first').data('back', $(this).data('stepid') ); 295 $('#step-' + step_id).find('.js-fb-nav-back:first').attr('data-back', $(this).data('stepid') ); 296 set_standard_rquireds(step_id); 297 298 var anzahl_kinder = $('#opt-b1852682573e499c878f5f85d3a4e749').val(); 299 var i; 300 $('#step-20-dynamic').html(''); 301 for (i = 2; i <= anzahl_kinder; i++) { 302 $( "#optid-84" ).clone().attr('data-childid',i).data('data-childid',i).addClass('js-child-dynamic').appendTo( "#step-20-dynamic" ); 303 } 304 i=0; 305 $('#step-20-dynamic').find('div, input, select').each(function () { 306 if ( $(this).attr('id')!="undefined") { 307 i++; 308 $(this).attr('id', $(this).attr('id')+'-'+i); 309 } 310 }); 311 i=0; 312 $('#step-20-dynamic').find('select, input').each(function () { 313 i++; 314 var child_number = $(this).closest('.js-child-dynamic').data('childid'); 315 console.log('CID'+child_number); 316 var cname = $(this).attr('name'); 317 cname = cname.replace("FORM", "FORM[kind_"+child_number+"]"); 318 $(this).attr('name',cname); 319 }); 320 i=1; 321 $('#step-20-dynamic h4').each(function() { 322 i++; 323 $(this).html('Adresse '+i+'. Kind'); 324 }); 325 326 327 328 329 } 330}); 331 332$( ".js-fb-nav-back" ).click(function() { 333 $('.step').hide(); 334 $('#step-' + $(this).data('back') ).show(); 335}); 336 337$( ".js-fb-img-click" ).click(function() { 338 var optid = $(this).data('optid'); 339 $("#optid-"+optid+" .js-fb-img-click").removeClass('checked'); 340 $("#optid-"+optid+" .js-fb-img-click").attr("data-checked", "0"); 341 $("#optid-"+optid+" .js-fb-img-click").data("checked", "0"); 342 $(this).addClass('checked'); 343 $(this).attr('data-checked', 1); 344 $(this).data('checked', 1); 345 346 $('#js-img-value-'+$(this).data('optid')).val($(this).data('label')); 347}); 348 349 350 351 352 353 354 355const cf={options:{ff_disclthx:".fmrdisclaimthx",error_class:"formerror",thx_container:".fmrcontactthx",recap_container:".fmrrecap",form:".fmrcontactform",ff_discform:"#dsgvo-wider-form"},init:function(t){this.options=$.extend(this.options,t)},start:function(){document.cookie="contact=1",$(this.options.thx_container).hide(),$(this.options.ff_disclthx).hide(),cf.init_validation(),cf.drafts.init()},form_fail:function(t){$(this.options.form).find("input").removeClass(this.options.error_class).removeClass("is-invalid"),$(this.options.form).find("textarea").removeClass(this.options.error_class).removeClass("is-invalid"),$(this.options.form).find("select").removeClass(this.options.error_class).removeClass("is-invalid"),$(this.options.form).find("checkbox").removeClass(this.options.error_class).removeClass("is-invalid");var e,i=jQuery.parseJSON(t);for(e in console.log(t),i)$("#"+e).addClass(this.options.error_class),$("#"+e).addClass("is-invalid").removeClass("is-valid")},reset_contact_form:function(t){var i=this,e=$(this.options.form);if(null!=t)e=e.filter(function(){return String($(this).find('[name="cont_matrix_id"]').val())===String(t)});else if(1!==e.length)return;e.each(function(){cf.drafts.clear(this);
355var e=$();$(this).parents().each(function(){var t=$(this).find(i.options.thx_container);if(t.length)return 1===t.length&&(e=t),!1}),$(this).slideUp("slow",function(){e.attr("aria-hidden","false").slideDown("slow",function(){$("html, body").animate({scrollTop:e.offset().top-100},"slow")})})})},reset_disclaim_form:function(){var t=this;$(this.options.ff_discform).slideToggle("fast",function(){$(t.options.ff_disclthx).slideToggle()})},cb_allow:function(){var e=this;if("undefined"!=typeof _recap){let t=0;for(;t<_recap.length;)"2"==_recap_type&&console.log("Google reCaptcha 2 loaded for CMID "+_recap[t]),"3"==_recap_type&&console.log("Google reCaptcha 3 loaded for CMID "+_recap[t]),t++;$(this.options.form).fadeIn("fast",function(){$(e.options.recap_container).hide()})}},cb_disallow:function(){console.log("Google reCaptcha NOT loaded");var t=this;$(this.options.form).fadeOut("slow",function(){$(t.options.recap_container).slideToggle()})},drafts:function(){var t,a=new WeakMap,s="keimeno:contactform:v1:";function r(t){return Array.from(t.elements).filter(function(t){return/^(FORM|FORM_NOTEMPTY)\[/.test(t.name||"")&&/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)&&!/^(hidden|password|file|submit|reset|button|image)$/i.test(t.type)&&!$(t).is(':disabled, [readonly], .js-disclaimer-check, [data-contact-storage="off"]')&&!/^(off|one-time-code|current-password|new-password)$/i.test(t.autocomplete||"")})}function c(t){t=a.get(t);if(t){clearTimeout(t.timer),t.dirty=!1;try{window.localStorage.removeItem(t.key)}catch(t){}}}function l(t){var e=a.get(t);if(e&&e.dirty){clearTimeout(e.timer);try{window.localStorage.setItem(e.key,JSON.stringify({version:1,fields:r(t).map(function(t){var e=$(t).val();return{name:t.name,type:t.type,value:e,checked:/^(checkbox|radio)$/.test(t.type)?t.checked:null}})})),e.dirty=!1}catch(t){}}}function e(e){var i,t,n,o;a.has(e)||"off"===$(e).attr("data-contact-storage")||(i={key:(t=e,n=$(t),o=(o=n.attr("data-contact-storage-key")||n.find('[name="cont_matrix_id"]').val()||t.id)||"position-"+$(cf.options.form).index(t),s+JSON.stringify([location.pathname,n.find('[name="page"]').val()||"",String(o),t.id||""])),dirty:!1,timer:null},a.set(e,i),function(t,e){var i,s;try{i=JSON.parse(window.localStorage.getItem(e.key))}catch(t){return}i&&1===i.version&&Array.isArray(i.fields)&&(s=i.fields.slice(),r(t).forEach(function(e){var t,i,n,o=/^(checkbox|radio)$/.test(e.type),a=s.findIndex(function(t){return t&&t.name===e.name&&t.type===e.type&&(!o||t.value===e.value)});a<0||(a=s.splice(a,1)[0],o?e.checked===e.defaultChecked&&"boolean"==typeof a.checked&&(e.checked=a.checked):"SELECT"===e.tagName?((i=(t=Array.from(e.options)).filter(function(t){return t.defaultSelected})).length||e.multiple||!t.length||(i=[t[0]]),n=t.filter(function(t){return t.selected}),JSON.stringify(n.map(function(t){return t.value}))===JSON.stringify(i.map(function(t){return t.value}))&&(Array.isArray(a.value)?a.value:[a.value]).every(function(e){return"string"==typeof e&&t.some(function(t){return t.value===e})})&&$(e).val(a.value)):""===e.value&&"string"==typeof a.value&&(e.value=a.value))}))}(e,i),$(e).on("input.cfDraft change.cfDraft",function(t){r(e).indexOf(t.target)<0||(i.dirty=!0,clearTimeout(i.timer),i.timer=setTimeout(function(){l(e)},200))}).on("submit.cfDraft form-pre-serialize.cfDraft",function(){i.dirty=!0,l(e)}).on("reset.cfDraft",function(t){setTimeout(function(){t.isDefaultPrevented()||c(e)},0)}))}function i(t){$(t).find(cf.options.form).add($(t).filter(cf.options.form)).each(function(){e(this)})}return{clear:c,init:function(){i(document),!t&&document.documentElement&&($(window).off("pagehide.cfDraft").on("pagehide.cfDraft",function(){$(cf.options.form).each(function(){l(this)})}),(t=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){1===t.nodeType&&i(t)})})})).observe(document.documentElement,{childList:!0,subtree:!0}))}}}(),init_validation:function(){$("[data-event='check-email']").off("blur"),$("[data-event='check-email']").on("blur",function(t){var e=$(this).val();/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e)?$(this).addClass("is-valid").removeClass("is-invalid"):$(this).addClass("is-invalid").removeClass("is-valid")}),$("[data-event='check-empty']").off("blur"),$("[data-event='check-empty']").on("blur",function(t){""==$(this).val()?$(this).addClass("is-invalid").removeClass("is-valid"):$(this).addClass("is-valid").removeClass("is-invalid")}
355),$("[data-event='check-file']").off("change"),$("[data-event='check-file']").on("change",function(t){0==t.target.files.length?$(this).addClass("is-invalid").removeClass("is-valid"):$(this).addClass("is-valid").removeClass("is-invalid")}),$("[data-event='check-date']").off("blur"),$("[data-event='check-date']").on("blur",function(){var t,e,i=$(this).val().replace(/\s/g,"");/^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.test(i)?([i,t,e]=i.split("."),e=new Date(e+"-"+t+"-"+i),isNaN(e.getTime())?$(this).addClass("is-invalid"):$(this).addClass("is-valid").removeClass("is-invalid")):$(this).addClass("is-invalid").removeClass("is-valid")})}};cf.start(); 356 357var fbwp = { 358 init_fbwp_paging: function() { 359 $( ".js-fb-next" ).unbind('click'); 360 $( ".js-fb-next" ).click(function(event) { 361 event.preventDefault(); 362 kc.request.load_after($(this).data('target'), $(this).data('href'), 'fbwp.init_fbwp_paging()', false); 363 $('[data-target="'+$(this).data('target')+'"]').fadeOut( "fast", function() { 364 $('[data-target="'+$(this).data('target')+'"]').remove(); 365 }); 366 367 }); 368 } 369}; 370 371$(function() { 372 fbwp.init_fbwp_paging(); 373}); 374 375if (window.jQuery) { 376 var _jq = window.jQuery; 377} else if (window.$) { 378 var _jq = window.$; 379} else { 380 var _jq = {}; 381 console.error( 382 "jQuery not installed. Please install jQuery into your project to run KI ChatBot" 383 ); 384} 385 386var gptchat = { 387 defaults: [], 388 options: {}, 389 run: function () { 390 var opt = jQuery.merge(this.defaults, _kaiassi); 391 this.options = Object.fromEntries(opt); 392 this.init_chat_form(); 393 console.log("GBT Chat started"); 394 395 $("#chat-container .close-button").click(function () { 396 $("#chat-container").fadeOut("fast", function () { 397 $("#chat-icon").show(); 398 }); 399 }); 400 401 $("#chat-icon").click(function () { 402 $(this).fadeOut("fast", function () { 403 $("#chat-container").show(); 404 gptchat.load_messages(); 405 }); 406 }); 407 }, 408 load_messages: function () { 409 $.getJSON(gptchat.options.eurl + "cmd=load_messages&cont_matrix_id=" + gptchat.options.cont_matrix_id , function(data) { 410 console.log(data); 411 var items = []; 412 $.each(data.messages, function(key, val) { 413 items.push('<div class="message ' + val.role + '" id="msg-' + key + '">' + val.content[0].text.value + '</div>'); 414 }); 415 $('#js-thread-msgs').append(items.join("")); 416 gptchat.scroll_to_bottom(); 417 }); 418 }, 419 scroll_to_bottom: function () { 420 var $container = $("#js-thread-msgs"); 421 $container.animate( 422 { 423 scrollTop: $container.prop("scrollHeight"), 424 }, 425 500 426 ); 427 }, 428 add_user_msg: function (txt) { 429 $("#js-thread-msgs").append('<div class="message user">' + txt + "</div>"); 430 }, 431 add_assi_msg: function (txt) { 432 $("#js-thread-msgs").append('<div "message assistant">' + txt + "</div>"); 433 }, 434 remove_spinner: function () { 435 $(".kai-spinner").remove(); 436 }, 437 init_chat_form: function () { 438 $("#chat-container form:first") 439 .off("submit") 440 .on("submit", function (e) { 441 console.clear(); 442 console.log('call'); 443 e.preventDefault(); 444 var formData = $(this).serialize(); 445 gptchat.add_user_msg($(this).find("input:last").val()); 446 $(this) 447 .find(":submit") 448 .html(gptchat.options.spinner + " " + $(this).find(":submit").html()); 449 $(this).find(":submit").prop("disabled", true); 450 $(this).find('input[type="text"]:first').val(""); 451 $(this).find('input[type="text"]:first').prop("disabled", true); 452 var form = $(this); 453 gptchat.scroll_to_bottom(); 454 $.ajax({ 455 type: "POST", 456 url: gptchat.options.eurl, 457 data: formData, 458 success: function (data) { 459 console.log(data); 460 gptchat.add_assi_msg(data.response); 461 gptchat.remove_spinner(); 462 form.find(":submit").prop("disabled", false); 463 form.find('input[type="text"]').prop("disabled", false); 464 gptchat.scroll_to_bottom(); 465 }, 466 error: function (jqXHR, textStatus, errorThrown) { 467 var detailedErrorMessage = 468 "An error occurred. Status: " + 469 textStatus + 470 ". Error: " + 471 errorThrown; 472 console.log( 473 " HTTP Status: " + 474 jqXHR.status + 475 ". Response Text: " + 476 jqXHR.responseText 477 ); 478 gptchat.add_assi_msg(detailedErrorMessage); 479 gbtchat.remove_spinner(); 480 form.find(":submit").prop("disabled", false); 481 form.find('input[type="text"]').prop("disabled", false); 482 gptchat.scroll_to_bottom(); 483 }, 484 }); 485 }); 486 }, 487}; 488 489document.addEventListener("DOMContentLoaded", function () { 490 if (typeof _kaiassi !== 'undefined'){ 491 gptchat.run(); 492 } 493}); 494 495var map=null;var myleaflet={set_map_point_leaflet:function(row,hash,map,islast,map_options,markerClusters){var icon_url=typeof map_options.icon=="undefined"||map_options.icon==""?"/includes/modules/leaflet/images/marker_icon.svg":map_options.icon;var iconsize=[];iconsize.push(map_options.icon_width);iconsize.push(map_options.icon_height);var icon_size=iconsize||[30,43];let icon=L.icon({iconUrl:icon_url,iconSize:icon_size,iconAnchor:map_options.iconanchor||[icon_size[0]/2,icon_size[1]],popupAnchor:map_options.popupanchor||[0,-icon_size[1]]});if(typeof row.lon!="undefined"&&row.lon!=""&&row.lat!=""){let startPos=map_options.startpos||[row.lat,row.lon];let offset_popup=map_options.offset_popup||[0,icon_size[1]*1.2];let popupHtml=document.getElementById("leaflet-hover-"+hash)?.innerHTML||"";let marker=L.marker(startPos,{icon:icon}).bindPopup(popupHtml,{offset:offset_popup,className:"custom-popup",showpopup:row.showpopup,autoClose:!1,closeOnClick:!1});markerClusters.addLayer(marker)}else{console.error("Error data",row)} 496return markerClusters},hex_to_rgb:function(hex){var hex=hex.replace("#","");var bigint=parseInt(hex,16);var r=(bigint>>16)&255;var g=(bigint>>8)&255;var b=bigint&255;return r+","+g+","+b},start_leaflet_map:function(){document.querySelectorAll(".leaflet-hover").forEach(function(el){el.style.display="none"});if(typeof L!="undefined"&&typeof L.MarkerClusterGroup!="undefined"){console.log("start leaflet");document.querySelectorAll(".js-load-leaflet").forEach(function(el,index){var target=el.getAttribute("id");console.log("target "+target);var map_options=JSON.parse(el.dataset.opt);el.style.width=map_options.width;el.style.height=map_options.height;var first=map_options.addresses[0];if(!map_options.strokecolor)map_options.strokecolor="#3194d3";if(!map_options.strokewidth)map_options.strokewidth="1";if(!map_options.opacity)map_options.opacity="0.6";if(!map_options.bkgcolor)map_options.bkgcolor="#ffffff";if(map_options.css=="1"&&document.getElementById("leaflet_custom_css")===null){var head=document.getElementsByTagName("head")[0];var link=document.createElement("link");link.id="leaflet_custom_css";link.rel="stylesheet";link.type="text/css";link.href=map_options.csscache=="1"?"/includes/modules/leaflet/css/leaflet.css":"/includes/modules/leaflet/css/leaflet.css?_a="+Math.random();link.media="all";head.appendChild(link)} 497var bkg=myleaflet.hex_to_rgb(map_options.bkgcolor);map_options.autozoom=!1;
497if(map_options.zoom=="auto"){map_options.autozoom=!0;map_options.zoom=10} 498var startPos=[50.85,8.7];for(var key in map_options.addresses){var obj=map_options.addresses[key];startPos=[obj.lat,obj.lon]} 499var map=L.map(target,{center:startPos,zoom:map_options.zoom,zoomControl:!1,attributionControl:map_options.controls_position!="disabled",scrollWheelZoom:map_options.scrollWheelZoom!="0",boxZoom:!1,}).setView(startPos,map_options.zoom);if(map_options.controls_position!="disabled"){L.control.zoom({position:map_options.controls_position}).addTo(map)} 500if(map_options.strgscroll=="1"){el.addEventListener("wheel",function(event){event.stopPropagation();if(event.ctrlKey===!0){event.preventDefault();map.scrollWheelZoom.enable();el.classList.remove("map-scroll");setTimeout(function(){map.scrollWheelZoom.disable()},1000)}else{map.scrollWheelZoom.disable();el.classList.add("map-scroll")}});window.addEventListener("wheel",function(){el.classList.remove("map-scroll")})} 501if(map_options.titleurl!=""){L.tileLayer(map_options.titleurl,{attribution:"© "+map_options.attributions,}).addTo(map)}else{L.tileLayer("https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',}).addTo(map)} 502if(map_options.geojson.link!=""){var styleLines={color:map_options.geojson.linecolor,weight:map_options.geojson.weight,opacity:1,lineJoin:"round",};var district_boundary=new L.geoJson();district_boundary.addTo(map);fetch(map_options.geojson.link).then(response=>response.json()).then(data=>{data.features.forEach(function(data){district_boundary.addData(data)});district_boundary.setStyle(styleLines)}).catch(error=>{console.error("GeoJSON loading failed",error)})} 503var i=0;var size=Object.keys(map_options.addresses).length;var markerClusters=new L.MarkerClusterGroup({showCoverageOnHover:map_options.showCoverageOnHover=="1",animate:map_options.animate=="1",animateAddingMarkers:map_options.animateAddingMarkers=="1",spiderfyOnMaxZoom:map_options.spiderfyOnMaxZoom=="1",});var bounds=[];for(var key in map_options.addresses){i++;var obj=map_options.addresses[key];var islast=i==size;markerClusters=myleaflet.set_map_point_leaflet(obj,key,map,islast,map_options,markerClusters);if(islast==!0){map.addLayer(markerClusters);if(map_options.autozoom==!1){map.setView([obj.lat,obj.lon],map_options.zoom)}} 504bounds.push([obj.lat,obj.lon])} 505if(map_options.autozoom==!0){map.fitBounds(bounds)} 506markerClusters.getLayers().forEach((layer)=>{if(layer instanceof L.Marker&&layer._popup.options.showpopup==1){layer.openPopup()}})})}else{console.error("LeafLet not loaded")}},};document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".leaflet-hover").forEach(function(el){el.style.display="none"})}); 507const revent = { 508 successful: function() { 509 console.log("event successful"); 510 if (typeof _revent === "undefined" || typeof _revent !== "object") { 511 console.warn("_revent is not defined or not an object."); 512 return; 513 } 514 if (typeof _revent.callback === "function") { 515 try { 516 _revent.callback(); 517 } catch (err) { 518 console.error("Error in _revent.callback:", err); 519 } 520 } else { 521 console.log("No valid _revent.callback defined."); 522 } 523 524 if (_revent.id_form && $(_revent.id_form).length) { 525 $(_revent.id_form).slideToggle("slow", function() { 526 $(this).remove(); 527 528 if (_revent.id_thx && $(_revent.id_thx).length) { 529 $(_revent.id_thx).slideToggle(); 530 } else { 531 console.warn("No valid _revent.id_thx selector found."); 532 } 533 534 $(".js-mav-con").hide(); 535 536 const target = _revent.id_thx 537 ? document.querySelector(_revent.id_thx) 538 : null; 539 if (target) { 540 target.scrollIntoView({ behavior: "smooth", block: "start" }); 541 } 542 }); 543 } else {
544 console.warn("No valid _revent.id_form selector found."); 545 } 546 }, 547 548 init: function() { 549 if (typeof _revent !== "undefined" && _revent.id_thx && $(_revent.id_thx).length) { 550 $(_revent.id_thx).hide(); 551 } else { 552 console.warn("Cannot init: _revent.id_thx not defined or invalid selector."); 553 } 554 } 555}; 556 557revent.init();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.