1if(typeof MpForms=='function'){MpForms.prototype.rangePickersDefinition=['rq1','rq2','qu1','myPicker'];MpForms.prototype.setSinglePickers=function(){$('.mpDatepickerSingle').each(function(indexInArray,valueOfElement){var theInput=$('input',this);let options={language:$('html').attr('lang').split('-')[0],format:'dd.mm.yyyy',todayHighlight:!0,startDate:dayjs().format('DD.MM.YYYY'),autoclose:!0};theInput.eq(0).datepicker(options)})};MpForms.prototype.setRangePickers=function(){for(var i=0;i<this.rangePickersDefinition.length;i++){let $picker=$('.mpDatepickerRange-'+this.rangePickersDefinition[i]);if($picker.length<1){return} 2var options={language:$('html').attr('lang').split('-')[0],format:'dd.mm.yyyy',todayHighlight:!0,startDate:dayjs().format('DD.MM.YYYY'),autoclose:!0};const MIN_DIFFERENCE=86_400_000;for(let j=0;j<$picker.length;j++){let $currentPicker=$($picker[j]);options.inputs=$('input',$currentPicker);if(j==1){let startDate=new Date(new Date().getTime()+MIN_DIFFERENCE);options.startDate=startDate.getDate()+"."+(startDate.getMonth()+1)+"."+startDate.getFullYear()} 3$currentPicker.datepicker(options)} 4$picker.find("input").change(function(e){let $currentPicker=$(e.currentTarget);let $otherPicker=$picker.first().find("input");let isCurrentPickerFirst=!1;if($otherPicker.is($currentPicker)){$otherPicker=$picker.last().find("input");isCurrentPickerFirst=!0} 5let currentDateParts=$currentPicker.val().split(".");let otherDateParts=$otherPicker.val().split(".");let currentDateMillis=Date.parse(currentDateParts[2]+"-"+currentDateParts[1]+"-"+currentDateParts[0]);let otherDateMillis=Date.parse(otherDateParts[2]+"-"+otherDateParts[1]+"-"+otherDateParts[0])||currentDateMillis;if((!isCurrentPickerFirst&¤tDateMillis-otherDateMillis<MIN_DIFFERENCE)||(isCurrentPickerFirst&&otherDateMillis-currentDateMillis<MIN_DIFFERENCE)){let otherDate=new Date(currentDateMillis+MIN_DIFFERENCE*(isCurrentPickerFirst?1:-1));$otherPicker.datepicker("setDate",otherDate)}});this.rangePickers[this.rangePickersDefinition[i]]=$picker}};MpForms.prototype.initSelect2=function(){$("select.select2").select2({minimumResultsForSearch:Infinity,minimumResultsForSearch:10,width:'element'});$("span.select2-container").each(function(index,el){var parent=$(this).parent();$(this).detach().prependTo(parent)});$('form.mpForm .select2-wrapper').each(function(index,element){let $formGroupSelect=$(element).closest('.form-group').eq(0);if($('select',$formGroupSelect).val()==''){$formGroupSelect.addClass('form-group-type-select--emptyValue')} 6$('select',$formGroupSelect).change(function(){if($(this).val()==''){$formGroupSelect.addClass('form-group-type-select--emptyValue')}else{$formGroupSelect.removeClass('form-group-type-select--emptyValue')}})})};MpForms.prototype.initTreatments=function(){if($('.mpForm-other-treatments').length>0){let treatments=[];if(localStorage.getItem('feldhof-treatments')){treatments=JSON.parse(localStorage.getItem('feldhof-treatments'))} 7let formid=$('.mpForm-other-treatments').attr('id');if(treatments.length>0){for(let i=0;i<treatments.length;i++){let itemCode=treatments[i].code;let itemName=treatments[i].name;let itemExtra=treatments[i].extra;let itemPrice=treatments[i].price;console.log(i);console.log(itemCode);console.log(itemName);console.log(itemExtra);console.log(itemPrice);let $itemBlueprint=$('.treatment-repeater-blueprint').html();$itemBlueprint=$itemBlueprint.replaceAll('***treatment-counter***',i);$itemBlueprint=$itemBlueprint.replaceAll('***treatment-form-id***',formid);$itemBlueprint=$itemBlueprint.replaceAll('***treatment-code***',itemCode);$itemBlueprint=$itemBlueprint.replaceAll('***treatment-name***',itemName);$itemBlueprint=$itemBlueprint.replaceAll('***treatment-extra***',itemExtra);$itemBlueprint=$itemBlueprint.replaceAll('***treatment-price***',itemPrice);$('.treatment-repeater').append($itemBlueprint)}} 8$('.items .btn--remove ').click(function(){if(localStorage.getItem('feldhof-treatments')){this.treatments=JSON.parse(localStorage.getItem('feldhof-treatments'))}else{this.treatments=[]} 9let code=parseInt($(this).attr('data-code'));let _=this;if(_.treatments.length>0){let indexOfTreatment;for(let i=0;i<_.treatments.length;i++){if(_.treatments[i].code===code){indexOfTreatment=i;break}} 10if(typeof indexOfTreatment!=='undefined'){_.treatments.splice(indexOfTreatment,1)}} 11localStorage.setItem('feldhof-treatments',JSON.stringify(this.treatments));$('.items[data-code="'+code+'"]').remove()});$('.treatment-repeater .items .mpDatepickerSingle input').prop('required',!0);$('.treatment-repeater-blueprint').remove();$('.treatment-repeater .select--numberOfPersons').on('input',function(){let number=parseInt($(this).val());let counter=$(this).attr('data-counter');if(0<number<11){$('.item-input-names[data-counter="'+counter+'"]').find('.form-group:not(.item-input-names-first)').removeClass('mpActive');$('.item-input-names[data-counter="'+counter+'"]').find('.form-group:not(.item-input-names-first)').val('');for(let i=1;i<=number;i++){$('.item-input-names[data-counter="'+counter+'"] .form-group[data-number="'+i+'"]').addClass('mpActive')}}})}};jQuery(document).ready(function($){window.mp_forms=new MpForms();window.mp_forms.initDatePickers();window.mp_forms.initSelect2();if($('.mpForm-other-treatments').length>0){window.mp_forms.initTreatments();window.mp_forms.setSinglePickers()}})}
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.