jQuery(document).ready(function(a){function e(){const e=a("#billing_city").val(),t=a("#billing_state").val();e&&t&&a.post(dinaDeliveryAjax.ajax_url,{action:"check_delivery_table_visibility",city:e,state:t},function(e){e&&e.success&&e.data?(a("#dina-delivery-table-wrap").html(e.data).show(),a(".dina-delivery-tab-nav").each(function(){let e=a(this);e.hasClass("owl-loaded")||(e.owlCarousel({rtl:e.data("dir"),margin:5,navText:["",""],nav:e.data("itemnavs")||!1,loop:!1,dots:!1,autoplay:!1,slideBy:1,responsive:{0:{items:3,mouseDrag:!0,touchDrag:!0},600:{items:5},1000:{items:6,mouseDrag:!1,touchDrag:!1}}}),a(window).on("resize",function(){e.trigger("refresh.owl.carousel")}))})):a("#dina-delivery-table-wrap").hide().empty()})}a(document).on("click",".dina-delivery-tab-nav li",function(){const e=a(this).data("day");a(".dina-delivery-tab-nav li").removeClass("active"),a(this).addClass("active"),a(".dina-delivery-tab-content").hide(),a('.dina-delivery-tab-content[data-day="'+e+'"]').show()}),a(".dina-delivery-tab-nav").each(function(){let e=a(this);e.hasClass("owl-loaded")||(e.owlCarousel({rtl:e.data("dir"),margin:5,navText:["",""],nav:e.data("itemnavs")||!1,loop:!1,dots:!1,autoplay:!1,slideBy:1,responsive:{0:{items:3,mouseDrag:!0,touchDrag:!0},600:{items:5},1000:{items:6,mouseDrag:!1,touchDrag:!1}}}),a(window).on("resize",function(){e.trigger("refresh.owl.carousel")}))}),e(),a(document.body).on("updated_checkout",function(){e()})});