function deleteCustomPeriod(e){}$(document).ready((function(){let e=document.getElementById("online-hours-active");function t(e){let t=$(e).attr("name");$(e).is(":checked")?$("."+t+"-block").removeClass("hide"):$("."+t+"-block").addClass("hide")}e.addEventListener("change",(function(){$(e).is(":checked")?$("#online-hours-active-block").removeClass("hide"):$("#online-hours-active-block").addClass("hide")})),$(".depend-block-show-control").each((function(){$(this).is(":checked")?$(".depend-block-show-"+$(this).attr("name")).removeClass("hide"):$(".depend-block-show-"+$(this).attr("name")).addClass("hide"),$(this).change((function(){$(this).is(":checked")?$(".depend-block-show-"+$(this).attr("name")).removeClass("hide"):$(".depend-block-show-"+$(this).attr("name")).addClass("hide")}))})),$(e).is(":checked")?$("#online-hours-active-block").removeClass("hide"):$("#online-hours-active-block").addClass("hide"),$(".day-control-block").each((function(){t(this)})),$(".day-control-block").change((function(){t(this)})),$("#add-period-button").click((function(){depCustomPeriods.push({date_from:document.getElementById("custom_date_from").value,date_to:document.getElementById("custom_date_to").value,start_hour:document.getElementById("custom_start_hour").value,start_hour_min:document.getElementById("custom_start_hour_min").value,end_hour:document.getElementById("custom_end_hour").value,end_hour_min:document.getElementById("custom_end_hour_min").value}),d()})),ee.addListener("delete_custom_period",(function(e){depCustomPeriods.splice(e,1),d()}));var o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function n(e){return String(e).replace(/[&<>"'`=\/]/g,(function(e){return o[e]}))}function d(){let e=document.getElementById("custom-periods-list");e.innerHTML="";depCustomPeriods.forEach((t,o)=>{e.innerHTML+="<tr><td>"+n(t.date_from)+" - "+n(t.date_to)+"</td><td>"+n(t.start_hour)+":"+n(t.start_hour_min)+"</td><td>"+n(t.end_hour)+":"+n(t.end_hour_min)+'</td><td><button class="btn btn-danger" type="button" onclick="ee.emitEvent(\'delete_custom_period\',['+o+'])">'+e.getAttribute("remove-action")+'</button><input type="hidden" name="customPeriodDateFrom[]" value="'+n(t.date_from)+'"><input type="hidden" name="customPeriodDateTo[]" value="'+n(t.date_to)+'"><input type="hidden" name="customPeriodStartHour[]" value="'+n(t.start_hour)+'"><input type="hidden" name="customPeriodStartHourMin[]" value="'+n(t.start_hour_min)+'"><input type="hidden" name="customPeriodEndHour[]" value="'+n(t.end_hour)+'"><input type="hidden" name="customPeriodEndHourMin[]" value="'+n(t.end_hour_min)+'"><input type="hidden" name="customPeriodId[]" value=""></td></tr>'})}d()}));
//# sourceMappingURL=3f755b0f2476067b4e1f99e750215074.js.map
