Plugin Directory

Changeset 3445558


Ignore:
Timestamp:
01/23/2026 12:20:12 PM (2 months ago)
Author:
bookingor
Message:

version 2.0.4

Location:
bookingor/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • bookingor/trunk/README.txt

    r3445527 r3445558  
    55Tested up to: 6.9
    66Donate link: https://bookingor.com
    7 Stable tag: 2.0.3
     7Stable tag: 2.0.4
    88Requires PHP: 7.2
    99License: GPLv2 or later
     
    330330*  Fix Service View issue
    331331
     332= 2.0.2 =
     333*  Updated plugin files
     334
     335= 2.0.3 =
     336*  Updated plugin files
     337
     338= 2.0.4 =
     339*  Fix js files
     340
     341
    332342
    333343== Upgrade Notice ==
  • bookingor/trunk/app/Frontend/View/Templates/design-5.php

    r3444926 r3445558  
    160160            <?php is_plugin_active('bookingor-recurring-appointment/bookingor-recurring-appointment.php') ? require_once wp_normalize_path(WP_PLUGIN_DIR . '/bookingor-recurring-appointment/app/Frontend/View/Recurring/recurring.php') : ''; ?>
    161161            <?php include plugin_dir_path(__FILE__) . 'tabs/customer-book.php'; ?>
    162             <?php include plugin_dir_path(__FILE__) . 'tabs/customer-book.php'; ?>
    163162            <?php include plugin_dir_path(__FILE__) . 'tabs/customer-payment.php'; ?>
    164163            <?php include plugin_dir_path(__FILE__) . 'tabs/customer-thankyou.php'; ?>
  • bookingor/trunk/app/Frontend/assets/js/design-5/widget-validate.js

    r3444926 r3445558  
    1 jQuery(document).ready(function(){var t=jQuery.noConflict();function e(e){var o=e.value;o.trim().length<1||null===o||0===o.length?t(e).next().text("Must Select a Item"):t(e).next().empty()}t(".day-container").on("click",function(e){e.preventDefault(),t(".cs-cal-vali").remove()}),t(".t-bg").on("click",function(e){e.preventDefault(),t(this).parent().next().remove()}),t("select[name='select_location']").on("change",function(){e(this)}),t("select[name='select_category']").on("change",function(){e(this)}),t("select[name='select_service']").on("change",function(){e(this)}),t("select[name='select_employee']").on("change",function(){e(this)}),t(".js-close-popup").on("click",function(){t(this).parents(".is-active").removeClass("is-active"),t(".js-custom-popup").addClass("bookingor-d-none"),t("body").removeClass("js-bookingor-modal-open"),t("body").removeClass("flw-n")}),t(document).on("click","#chk-validation",function(e){if(""===t("select[name='select_employee']").val()||""===t("select[name='select_category']").val()||""===t("select[name='select_service']").val()||""===t("select[name='select_location']").val())return t("select[name='select_employee']").next(".cs-vali-staff").removeClass("bookingor-d-none"),t("select[name='select_category']").next(".cs-vali-category").removeClass("bookingor-d-none"),t("select[name='select_service']").next(".cs-vali-service").removeClass("bookingor-d-none"),t("select[name='select_location']").next(".cs-vali-location").removeClass("bookingor-d-none"),(0===t("#bookingor-all-time-show").find(".bookingor-active").length||0===t("#widget-calendar-final").find(".widget-cal-active").length)&&(t(".cs-vali-timing").removeClass("bookingor-d-none"),t(".cs-cal-vali").text("Must Select a Item"),!1);var o;if(""!==t("select[name='select_employee']").val()&&""!==t("select[name='select_category']").val()&&""!==t("select[name='select_service']").val()&&""!==t("select[name='select_location']").val()&&0!==t("#bookingor-all-time-show").find(".bookingor-active").length&&0!==t("#widget-calendar-final").find(".widget-cal-active").length)t(".cs-cal-vali").empty(),t("#bookingor-all-time-show").next().empty(),t("select[name='select_employee']").next(".cs-vali-staff").addClass("bookingor-d-none"),t("select[name='select_category']").next(".cs-vali-category").addClass("bookingor-d-none"),t("select[name='select_service']").next(".cs-vali-service").addClass("bookingor-d-none"),t("select[name='select_location']").next(".cs-vali-location").addClass("bookingor-d-none"),t("#bk_confrim_book-pop-1").modal("show"),t(".modal").addClass("show"),t(".js-custom-popup").removeClass("bookingor-d-none"),o=t(this).attr("data-target"),t("[data-popup="+o+"]").addClass("is-active");else{if(""===t("select[name='select_category']").val())return t("select[name='select_category']").next(".cs-vali-category").removeClass("bookingor-d-none"),!1;if(""===t("select[name='select_service']").val())return t("select[name='select_service']").next(".cs-vali-service").removeClass("bookingor-d-none"),!1;if(""===t("select[name='select_location']").val())return t("select[name='select_location']").next(".cs-vali-location").removeClass("bookingor-d-none"),!1;if(0!==t("#bookingor-all-time-show").find(".bookingor-active").length&&t("#bookingor-all-time-show").next().empty(),0===t("#bookingor-all-time-show").find(".bookingor-active").length)return t("#bookingor-all-time-show").next().text("Must Select a Item"),!1;if(0===t("#widget-calendar-final").find(".widget-cal-active").length)return t(".cs-cal-vali").text("Select a Date"),!1;0!==t("#widget-calendar-final").find(".widget-cal-active").length?t(".cs-cal-vali").remove():(t(".cs-cal-vali").empty(),t("#bk_confrim_book-pop-1").modal("show"),t(".modal").addClass("show"),t("body").addClass("js-bookingor-modal-open"),t(".js-custom-popup").removeClass("bookingor-d-none"),o=t(this).attr("data-target"),t("[data-popup="+o+"]").addClass("is-active"))}return!0})});
     1jQuery(document).ready(function(){var t=jQuery.noConflict();function e(e){var o=e.value;o.trim().length<1||null===o||0===o.length?t(e).next().text("Must Select a Item"):t(e).next().empty()}t(".day-container").on("click",function(e){e.preventDefault(),t(".cs-cal-vali").remove()}),t(".t-bg").on("click",function(e){e.preventDefault(),t(this).parent().next().remove()}),t("select[name='select_location']").on("change",function(){e(this)}),t("select[name='select_category']").on("change",function(){e(this)}),t("select[name='select_service']").on("change",function(){e(this)}),t("select[name='select_employee']").on("change",function(){e(this)}),t(".js-close-popup").on("click",function(){t(this).parents(".is-active").removeClass("is-active"),t(".js-custom-popup").addClass("bookingor-d-none"),t("body").removeClass("js-bookingor-modal-open"),t("body").removeClass("flw-n")}),t(document).on("click","#chk-validation",function(e){if(""===t("select[name='select_employee']").val()||""===t("select[name='select_category']").val()||""===t("select[name='select_service']").val()||""===t("select[name='select_location']").val())return t("select[name='select_employee']").next(".cs-vali-staff").removeClass("bookingor-d-none"),t("select[name='select_category']").next(".cs-vali-category").removeClass("bookingor-d-none"),t("select[name='select_service']").next(".cs-vali-service").removeClass("bookingor-d-none"),t("select[name='select_location']").next(".cs-vali-location").removeClass("bookingor-d-none"),(0===t("#bookingor-all-time-show").find(".bookingor-active").length||0===t("#widget-calendar-final").find(".widget-cal-active").length)&&(t(".cs-vali-timing").removeClass("bookingor-d-none"),t(".cs-cal-vali").text("Must Select a Item"),!1);var o;if(""!==t("select[name='select_employee']").val()&&""!==t("select[name='select_category']").val()&&""!==t("select[name='select_service']").val()&&""!==t("select[name='select_location']").val()&&0!==t("#bookingor-all-time-show").find(".bookingor-active").length&&0!==t("#widget-calendar-final").find(".widget-cal-active").length)t(".cs-cal-vali").empty(),t("#bookingor-all-time-show").next().empty(),t("select[name='select_employee']").next(".cs-vali-staff").addClass("bookingor-d-none"),t("select[name='select_category']").next(".cs-vali-category").addClass("bookingor-d-none"),t("select[name='select_service']").next(".cs-vali-service").addClass("bookingor-d-none"),t("select[name='select_location']").next(".cs-vali-location").addClass("bookingor-d-none"),t("#bk_confrim_book-pop-1").modal("show"),t(".modal").addClass("show"),t(".js-custom-popup").removeClass("bookingor-d-none"),o=t(this).attr("data-target"),t("[data-popup="+o+"]").addClass("is-active"),t("#customer-book").removeClass("bookingor-d-none");else{if(""===t("select[name='select_category']").val())return t("select[name='select_category']").next(".cs-vali-category").removeClass("bookingor-d-none"),!1;if(""===t("select[name='select_service']").val())return t("select[name='select_service']").next(".cs-vali-service").removeClass("bookingor-d-none"),!1;if(""===t("select[name='select_location']").val())return t("select[name='select_location']").next(".cs-vali-location").removeClass("bookingor-d-none"),!1;if(0!==t("#bookingor-all-time-show").find(".bookingor-active").length&&t("#bookingor-all-time-show").next().empty(),0===t("#bookingor-all-time-show").find(".bookingor-active").length)return t("#bookingor-all-time-show").next().text("Must Select a Item"),!1;if(0===t("#widget-calendar-final").find(".widget-cal-active").length)return t(".cs-cal-vali").text("Select a Date"),!1;0!==t("#widget-calendar-final").find(".widget-cal-active").length?t(".cs-cal-vali").remove():(t(".cs-cal-vali").empty(),t("#bk_confrim_book-pop-1").modal("show"),t(".modal").addClass("show"),t("body").addClass("js-bookingor-modal-open"),t(".js-custom-popup").removeClass("bookingor-d-none"),o=t(this).attr("data-target"),t("[data-popup="+o+"]").addClass("is-active"))}return!0})});
  • bookingor/trunk/app/Frontend/assets/js/design-ajax-widget.js

    r3444926 r3445558  
    1 jQuery(document).ready(function(g){g=jQuery.noConflict(),F();var m={},e=(g("#total-rec-cost").text("00.00"),g(".all-services-shw")),a=e.find("li"),t=g("#selectExtra-2 > ul").find("li"),l=(g("#the-location-search > ul").find("li"),g("#partial-pay").addClass("bookingor-d-none"),g("#bookingor-all-time-show").empty(),g("#customer-get-service-image"),g("#customer-sel-service")),_=(g("#customer-sel-icon"),g("#customer-service-price")),p=g("#customer-sel-employee"),u=(g("#customer-sel-location"),g("#service-discount-price"),g("#subtotal-cost")),v=g("#service-vat-cost"),f=g("#total-calc-cost"),b=g("#deposit-cost"),h=g("#due-remaining-cost"),y=g("#customer-sel-date"),k=g("#customer-sel-time");function x(e){return e.toFixed(m.price_decimals)}function F(){g.ajax({url:TCN_BIND_FRONT.GET_URL,type:"POST",data:{action:"bp_settings_get_data",nonce:TCN_BIND_FRONT.nonce},success:function(e){var o=JSON.parse(e);g.each(o,function(e,t){m.price_decimals=o.decimal_point,m.get_price_symbol=o.price_symbol,m.date_format=o.date_format,m.get_time_sheet=o.default_time_sheet,m.stripe_live_active=o.is_stripe_active,m.stripe_sandbox_active=o.is_stripe_sandbox_active,m.stripe_live_public_key=o.live.live_public_key,m.stripe_live_secret_key=o.live.live_secret_key,m.stripe_sandbox_public_key=o.sandbox.sandbox_public_key,m.stripe_sandbox_secret_key=o.sandbox.sandbox_secret_key,m.get_business_time=o.bookingor_business_timesheet,g(".full-head-1").css("--bookingor_color_border",o.boookingor_css.bookingor_color_border),g(".sidebar-1").css("--bookingor-sidebar-background",o.boookingor_css.sidebar_1),g(".bookingor, .full-service-2").css("--bookingor-border-active-color",o.boookingor_css.bookingor_color_border),g(".bookingor").css("--bookingor-full-day-selected",o.boookingor_css.full_day_selected),g(".bookingor").css("--bookingor-sidebar-text",o.boookingor_css.sidebar_text),g(".bookingor").css("--bookingor-sidebar-text-active",o.boookingor_css.sidebar_text_active),g(".bookingor").css("--bookingor-search-bars",o.boookingor_css.search_bars),g(".bookingor").css("--bookingor-cont-btn-bg",o.bookingor_cont_btn.bg),g(".bookingor").css("--bookingor-cont-btn-color",o.bookingor_cont_btn.clr),g(".bookingor").css("--bookingor-back-btn-bg",o.bookingor_btn_back.bg),g(".bookingor").css("--bookingor-back-btn-color",o.bookingor_btn_back.clr),g(".bookingor").css("--bookingor-background-border",o.boookingor_css.background_border_active),g(".bookingor").css("--bookingor-background-border-color",o.boookingor_css.background_border_color),g(".bookingor").css("--bookingor-background-radius",o.boookingor_css.background_border_radius),g(".bookingor").css("--bookingor-heading-font-family",o.boookingor_css.heading_font_family),g(".bookingor").css("--bookingor-all-font-family",o.boookingor_css.all_other_font_family),g(".bookingor").css("--bookingor-button-border-color",o.boookingor_css.button_border_color),g(".bookingor").css("--bookingor-button-border-radius",o.boookingor_css.button_border_radius),g(".bookingor").css("--bookingor-button-border",o.boookingor_css.button_border_active),"off"===o.is_stripe_sandbox_active&&g("#customer-pay-stripe").empty(),"on"!==o.active_category&&g("#back-category").remove(),"on"!==o.active_staff&&g("#bookingor-ser").addClass("bookingor-col-lg-12")})},complete:function(){g("#bookingor-widget-design-8").removeClass("bookingor-v-none"),g(".bookingor-loader-container").remove()}})}function r(){g.post(TCN_BIND_FRONT.GET_URL+"?action=bp_front_extra_data",{service_get_id:m.service_id,nonce:TCN_BIND_FRONT.nonce},function(e){var e=JSON.parse(e),o=[];g.each(e,function(e,t){o.push({extra_id:t.extra_id,extra_name:t.extra_name,extra_duration:t.extra_duration,extra_price:t.extra_price})}),m.extra_all=o}),"location-time-sheet"===m.get_time_sheet&&g(".bookingor-day-container").hasClass("widget-cal-active")&&s(),"staff-time-sheet"===m.get_time_sheet&&g(".bookingor-day-container").hasClass("widget-cal-active")&&o(),"business-time-sheet"===m.get_time_sheet&&g(".bookingor-day-container").hasClass("widget-cal-active")&&n()}e.find("li.active.active").find(".service-heading-1").text(),g("#customer-pay-stripe").on("click",function(){var e;"on"!==m.stripe_live_active&&"on"!==m.stripe_sandbox_active||(e="on"===m.stripe_sandbox_active?m.stripe_sandbox_public_key:"on"===m.stripe_live_active?m.stripe_sandbox_secret_key:m.stripe_live_secret_key,Stripe(e).elements().create("card").mount("#card-element"))}),document.createElement("select").id="people-with-you",m.selected_max_capacity="1",g(document).on("change","#front-get-category-for-services",function(){delete m.sum_total_cost,null!==m.extra_details?(delete m.extra_details,delete m.repeat_details,delete m.sum_repeat_price,delete m.service_recurring_payment,delete m.service_recurring_type,delete m.sum_total_cost,delete m.repeat_total_price,delete m.service_deposit,delete m.service_deposit_type):m.extra_all;var e=g(this).find(":selected").data("service-id");g.post(TCN_BIND_FRONT.GET_URL+"?action=bp_front_services_data",{service_get_id:e,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);g.each(e,function(e,t){if(m.get_service_id=t.service_id,m.service_id=t.service_id,m.category_id=t.category_get_id,m.category_get_id=t.category_get_id,m.service_duration=t.service_duration,m.service_price=t.service_cost,m.service_name=t.service_name,m.service_tax=t.service_tax,m.service_icon=t.service_icon,m.service_recurring_payment=t.recurring_payment,m.service_recurring_type=t.recurring_type,m.service_min_capacity=t.service_capacity_min,m.service_max_capacity=t.service_capacity_max,r(),1<m.service_max_capacity){g("#people-n-custom-duration").removeClass("bookingor-d-none"),g("#people-with-you").removeClass("bookingor-d-none");var o=g("#people-with-you");g("#people-with-you").empty();for(var a=t.service_capacity_max-1,i=1;i<=a;i++)o.append(g("<option></option>").val(i).html(i+" people"))}null!==m.service_deposit_type&&null!==t.service_deposit||g("#partial-pay").addClass("bookingor-d-none"),null!==t.service_deposit&&(g("#partial-pay").removeClass("bookingor-d-none"),m.service_deposit_type=t.service_deposit_type,m.service_deposit=t.service_deposit),1===t.service_capacity_max&&(g("#people-n-custom-duration").addClass("bookingor-d-none"),g("#people-with-you").addClass("bookingor-d-none"),g("#people-with-you").empty()),"day"!==m.service_recurring_type&&"monthly"!==m.service_recurring_type||g(".bookingor-recurring-weeks").addClass("bookingor-d-none")})}),"business-time-sheet"===m.get_time_sheet&&g(".bookingor-day-container").hasClass("widget-cal-active")&&(n(),g("#bookingor-all-time-show").empty())}),g("#people-with-you").on("change",function(e){e.preventDefault(),m.selected_max_capacity=g(this).val()}),g(document).on("click",".bookingor-full-services",function(){var e=g(this).find(":selected").data("get-location-id");""===e?g("#cs-selected-location").hide():g("#cs-selected-location").show(),g.post(TCN_BIND_FRONT.GET_URL+"?action=front_get_location",{location_id:e,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);g.each(e,function(e,t){m.location_get_id=t.location_id,m.location_country=t.location_country,m.location_city=t.location_city,m.location_address=t.location_address,g("#customer-sel-location").text(m.location_city)})})}),g(document).on("change","front-get-category-for-services",r);var i=[],e=(g("extra-quantity-input").on("change",function(){g(this).val()}),g(document).on("click","#main-back-main",function(){delete m.extra_details,i=[],m.repeat_details=[],t.removeClass("bookingor-active"),t.find(".extra-services").attr("checked",!1)}),g(document).on("click",".bookingor-full-extras",function(e){g("#customer-add-extra-details").empty();var o=g(this).attr("data-extra-id"),a=g(this).find(".extra-quantity-input").val();g(this).hasClass("bookingor-active")&&!0===g(this).find(".extra-services").is(":checked")?i.find(function(e){return e.extra_id===o})||(m.extra_all.forEach(function(e,t){e.extra_id===o&&i.push({extra_id:e.extra_id,extra_name:e.extra_name,extra_duration:e.extra_duration,extra_price:e.extra_price,extra_qty:a})}),g(this).find(".plus-counter").on("click",function(){var e=parseInt(g(this).prev().val())+1,t=i.findIndex(function(e){return e.extra_id===o});i[t].extra_qty=e}),g(this).find(".minus-counter").on("click",function(){var e=g(this).next(),e=parseInt(e.val())-1,t=(g(this).next().attr("value",e),i.findIndex(function(e){return e.extra_id===o}));-1!==t&&(i[t].extra_qty=e)})):i=i.filter(function(e){return e.extra_id!==o}),m.extra_details=i}),g(document).on("change","#front-select-staffs",function(e){var t=g(this).attr("data-staff-id"),o=g(this).val();g("#get-staff-id-only").attr("data-get-staff-id",t),m.get_staff_name=o,m.get_staff_id=t}),g(document).on("click",".shop-list-1",function(){var e=g(this).attr("data-staff-id");g.post(TCN_BIND_FRONT.GET_URL+"?action=bp_get_staff_email",{staff_id:e,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);m.get_staff_email=e[0].staff_email})}),g("#selectService-1").find(".active"),g(".bookingor-day-container").on("click",function(e){e.preventDefault(),g(".bookingor-day-container").removeClass("widget-cal-active"),g(this).addClass("widget-cal-active");e=g(".widget-cal-active").attr("data-date"),m.get_full_date=w(e),g("#get-day").attr("data-full-day",e),e=moment(e).day();m.get_day_selected=e,m.get_day=e,g("#get-day").val(e),"location-time-sheet"===m.get_time_sheet&&s(),"staff-time-sheet"===m.get_time_sheet&&o(),"business-time-sheet"===m.get_time_sheet&&n()}),"staff-time-sheet"===m.get_time_sheet&&g("#front-select-staffs").on("change",o),g(".bookingor-searchbar-2, .bookingor-searchbar-location").on("click",function(){g(this).next(".bookingor-front-search-show").removeClass("bookingor-d-none")}),g(document).on("click",function(e){e=e.target;g(e).is("#searchService-1")||g(e).parents().is("#searchService-1")||g("#searchService-1").next(".bookingor-front-search-show").addClass("bookingor-d-none"),g(e).is("#searchLocation")||g(e).parents().is("#searchLocation")||g("#searchLocation").next(".bookingor-front-search-show").addClass("bookingor-d-none")}),g(" #searchService-1, #searchLocation").on("keyup",function(t){t.preventDefault(),(""===g(this).val()||1<g(this).val().length)&&g(a).show(),g(this).empty()&&g(a).show();var o=g(this).val().toLowerCase();g(".search-show-all div ").filter(function(){g(this).toggle(-1<g(this).text().toLowerCase().indexOf(o));var e=t.which;40===e&&(t.preventDefault(),0===($currentLi=$currentLi.next()).length&&($currentLi=g(".cv_item").first().closest("li")),g(".cv_item").removeClass("active-link"),($link=$currentLi.find(".cv_item")).addClass("active-link")),13===e&&1<g("#searchService-1, #searchLocation").val().length&&(t.preventDefault(),g(".search-show-all").children(":visible").eq(0).trigger("click")),8===e&&g(a).show()})}),g("#searchService-1, #searchLocation").on("input",function(e){var t=g(this).val().toLowerCase(),o=g("<div id='no-results-message'></div>").text("Search another"),a=!1;g(".bookingor-search-all-service").each(function(){g(this).text().toLowerCase().includes(t)?(g(this).show(),a=!0):g(this).hide()}),a?g("#no-results-message").remove():g("body").append(o)}),new Date(Date.now()));function w(e){var e=new Date(e),t=""+(e.getMonth()+1),o=""+e.getDate();return[e.getFullYear(),t=t.length<2?"0"+t:t,o=o.length<2?"0"+o:o].join("-")}function o(){var e=g("#front-select-staffs").find(":selected").attr("data-staff-id"),t=(m.get_staff_id=e,g("#front-get-category-for-services").find(":selected").attr("data-service-id"),g("#front-select-staffs").find(":selected").attr("data-staff-id"),g("#front-select-staffs").find(":selected").text()),t=(m.get_staff_name=t,g("#selectListEmployee-1, #selectListEmployee-2, #selectListEmployee-3, #selectListEmployee-4, #selectListEmployee-5, #selectListEmployee-6").children().find(".active").attr("data-staff-id"),e=m.get_staff_id,m.get_service_id),o=m.get_full_date,a=m.get_day;g.ajax({type:"POST",url:TCN_BIND_FRONT.GET_URL+"?action=front_get_staff_time_sheet",data:{get_days:a,staff_id_only:e,service_id_only:t,get_date:o,nonce:TCN_BIND_FRONT.nonce},success:function(e){var a=JSON.parse(e),i=(m.business_time_sheet=a,[]);g("#rp-1-date").text(N(m.get_full_date,d)),g.each(a,function(e,t){var o;g("#bookingor-all-time-show").empty(),!1===a.success?g("#bookingor-time-show-five > ul").html('<div class="bookingor-f-14"><div class="t-bg">No Availability, Try another Date</div>'):(o=g("<li>").addClass("select-picktime-1 select_list no-shadow t-bg"),t=g("<div>").attr({"data-start-time":t[0],"data-end-time":t[1]}).text(t[0]+" - "+t[1]),o.append(t),i.push(o))}),g("#bookingor-all-time-show").append(i)}})}function s(){m.get_staff_id;var e=m.location_get_id,t=m.service_id,o=m.get_full_date,a=m.get_day;g.post(TCN_BIND_FRONT.GET_URL+"?action=front_get_location_times_sheet",{get_days:a,location_id_only:e,service_id_only:t,get_date:o,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);g.each(e,function(e,t){g("#bookingor-all-time-show").empty();var o=t.filter(function(e,t){return t%2==0});g("#rp-1-date").text(N(m.get_full_date,d));for(var a=t.filter(function(e,t){return t%2==1}),i=[],r=0;r<o.length;r++){for(;r<a.length;r++)i.push(o[r],a[r]),m.start_and_end_time=i,g("#selectPickTime-5").children().append('<li class="select-picktime-1 select_list no-shadow"><div data-start-time="'+o[r]+':00"  data-end-time="'+a[r]+'" class="t-bg">'+o[r]+" - "+a[r]+"</div></li>"),g("#get-start-time").val(o[r]),g("#get-before-buffer").val(),g("#get-after-buffer").val(),g(document).on("click",".select-picktime-1",function(){var e=g(this).index(),t=o[e],e=a[e];m.get_start_time=t,m.get_end_time=e});g(".t-bg ").on("click",function(){g(".t-bg ").removeClass("active-time-1"),g(this).addClass("active-time-1")})}})})}function n(){var e=g("#front-select-staffs").find(":selected").attr("staff-id"),e=(m.get_staff_id=e,g("#front-select-staffs").find(":selected").text()),e=(m.get_staff_name=e,m.get_service_id),t=m.get_full_date,o=m.get_day;g.ajax({type:"POST",url:TCN_BIND_FRONT.GET_URL+"?action=bookingor_front_business_weekly_time_sheet",data:{get_days:o,service_id_only:e,get_date:t,nonce:TCN_BIND_FRONT.nonce},success:function(e){var a=JSON.parse(e),i=(m.business_time_sheet=a,[]);g("#rp-1-date").text(N(m.get_full_date,d)),g.each(a,function(e,t){var o;g("#bookingor-all-time-show").empty(),!1===a.success?g("#bookingor-time-show-five > ul").html('<div class="bookingor-f-14"><div class="t-bg">No Availability, Try another Date</div>'):(o=g("<li>").addClass("select-picktime-1 select_list no-shadow t-bg"),t=g("<div>").attr({"data-start-time":t[0],"data-end-time":t[1]}).text(t[0]+" - "+t[1]),o.append(t),i.push(o))}),g("#bookingor-all-time-show").append(i)}})}function c(e,t){var o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),e=e.getFullYear();return"m-d-Y"===t?"".concat(o,"-").concat(a,"-").concat(e):"d-m-Y"===t?"".concat(a,"-").concat(o,"-").concat(e):"Invalid date format"}g("#get-date-full").val(w(e)),g("#front-select-staffs").on("change",function(e){e.preventDefault()}),g(a).on("click",function(e){var t=g(this).attr("data-get-duration");g("#get-full-service-duration").val(t)}),g(".bookingor-recurring-weeks").on("click",function(e){}),g("#calendar-full").on("click",function(e){"location-time-sheet"===m.get_time_sheet&&g("#calendar-full").on("click",s),"staff-time-sheet"===m.get_time_sheet&&g("#calendar-full").on("click",o),"business-time-sheet"===m.get_time_sheet&&g("#calendar-full").on("click",n)}),g(document).on("click",".select-picktime-1",function(){var e=g(this).children().text(),t=g(this).children().attr("data-start-time"),o=g(this).children().attr("data-end-time");m.get_start_time=t,m.get_end_time=o,m.get_time_all=e,g("#rp-1-time").text(m.get_time_all),g(".service-price-rec").text(m.service_price)});var d=g("#end-repeat-date").attr("data-date-format");function N(e,t){var o=new Date(e);switch(t){case"m-d-Y":return c(o,"m-d-Y");case"d-m-Y":return c(o,"d-m-Y");case"Y-m-d":return o.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"});case"m/d/Y":return o.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric"}).replace(/-/g,"/");case"d/m/Y":return o.toLocaleDateString("en-US",{day:"2-digit",month:"2-digit",year:"numeric"}).replace(/-/g,"/");case"Y/d/m":return o.toLocaleDateString("en-US",{year:"numeric",day:"2-digit",month:"2-digit"}).replace(/-/g,"/");case"M j, Y":return o.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});case"F j, Y":return o.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});default:return"Invalid date format"}}function C(){var e=m.get_full_date,t=parseInt(g("#repeat-occur").val(),10),o=g(".repeat-type").attr("data-repeat-type"),i=parseInt(g(".every-number").val(),10),a=g("#end-repeat-date").val(),r=JSON.parse(m.get_time_sheet?m.get_business_time:m.staff_sheet_weekly),s=new Date(e),n=[];if(0<t&&"week"===o){var c=[],d=new Date(e);g(".bookingor-recurring-day").each(function(){g(this).hasClass("bookingor-repeat-day-active")&&c.push(g(this).data("day"))});for(var l=0;l<t;l++){for(var _=0;_<c.length;_++)(()=>{var e=c[_],o=((e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)-d.getDay())<=0&&(e+=7),d.setDate(d.getDate()+e),d.toLocaleDateString("en-US",{weekday:"long"}).toLowerCase()),a=!1;g.each(r,function(e,t){if(t.hasOwnProperty(o)&&1===t[o])return!(a=!0)}),!a&&c.includes(o)&&n.push({date:w(d),dayOfWeek:o,start_time:m.get_start_time,end_time:m.get_end_time,repeatTime:m.get_time_all,repeat_cost:m.service_price})})();d.setDate(d.getDate()+7*i)}}if(0<t&&"day"===o)for(var p=0;p<t;p++)(()=>{s.setDate(s.getDate()+i);var o=s.toLocaleDateString("en-US",{weekday:"long"}).toLowerCase(),a=!1;g.each(r,function(e,t){if(t.hasOwnProperty(o)&&1===t[o])return!(a=!0)}),a||n.push({date:w(s),dayOfWeek:o,start_time:m.get_start_time,end_time:m.get_end_time,repeatTime:m.get_time_all,repeat_cost:m.service_price})})();if(a)for(;s<=new Date(a);)(()=>{s.setDate(s.getDate()+i);var o=s.toLocaleDateString("en-US",{weekday:"long"}).toLowerCase(),a=!1;g.each(r,function(e,t){if(t.hasOwnProperty(o)&&1===t[o])return!(a=!0)}),a||n.push({date:w(s),dayOfWeek:o,repeatTime:m.get_time_all,repeat_cost:m.service_price})})();(m.repeat_details=n).map(function(e){return e.repeat_cost});var o=n.reduce(function(e,t){return e+parseFloat(t.repeat_cost)},0),u=(m.sum_repeat_price=o,g("#total-rec-cost").text(x(parseFloat(o))),g.each(n,function(e,t){}),g(".all-repeats"));u.empty(),n.forEach(function(e,t){N(e.date,m.get_date_format);var o=e.dayOfWeek,t=1<=(t=t+1+1)&&t<=3?t+["th","st","nd","rd"][t]:t+"th";u.append('<div class="repeats-show bookingor-d-flex"><div> '.concat(t,": ").concat(N(e.date,m.get_date_format)," </div><div> ").concat(o," ").concat(m.get_time_all,' </div>\n          <div class="service-price">\n          <div class="cur-poz-strt-no-sp bookingor-d-flex">\n          <div class="cur-poz-strt-no-sp">').concat(m.get_price_symbol,'</div>\n          <div class="repeat-get-all-cost">').concat(m.service_price,"</div>\n          </div>\n          </div>"))}),(!e||isNaN(t)||t<=0)&&alert("Please enter valid values for Initial Date and Occurrence.")}void 0!==d&&(e=d.replace("Y","yyyy"),g("#end-repeat-date").datepicker({format:e})),g(".all-repeats").empty(),g(".bookingor-recurring-day").on("click",C),g("#end-repeat-date, #repeat-occur").on("change",C),g(document).on("click",".ready-b, #chk-validation, #extra-btn-cont, #repeat-b-cont",function(e){var n,t,o,a,i,r,s,c,d;e.preventDefault(),m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length&&g("#repeat-book").attr("data-repeat","1"),F.success=function(e){e.price_decimal},g("#customer-add-extra-details").empty(),g("#customer-get-service-image").empty(),void 0!==m&&(n=function(e){var t;null!==m.service_deposit&&(b.empty(),h.empty(),b.text(m.service_deposit),"percentage"===m.service_deposit_type?(t=(parseFloat(m.service_price)+parseFloat(e))*parseFloat(m.service_deposit)/100,b.text(t),t=parseFloat(m.service_price)-parseFloat(t)+parseFloat(m.service_tax),h.text(t.toFixed(2)),m.due_amount=parseFloat(t).toFixed(2)):"fixed-price"===m.service_deposit_type&&(b.text(m.customerDeposit_cost),t=parseFloat(m.service_price)+parseFloat(e)-parseFloat(m.service_deposit)+parseFloat(m.service_tax),h.text(t.toFixed(2)),m.due_amount=parseFloat(t).toFixed(2)))},e=function(){if(null!==m.service_tax)return v.empty(),v.text(x(parseFloat(m.service_tax))),x(parseFloat(m.service_tax))},a=function(){var s=0;return g("#customer-add-extra-details").empty(),g.each(m.extra_details,function(e,t){var o=t.extra_name,a=t.extra_price,i=t.extra_qty,r=m.extra_details.map(function(e){return parseFloat(e.extra_price*e.extra_qty)}).reduce(function(e,t){return e+t},0);t.extra_duration,g("#customer-add-extra-details").append('\n                  <div class="service-extra-price">\n                  <div class="csd" id="customer-sel-extra">'.concat(o,'</div>\n                  <div class="bookingor-d-flex">\n                      <div>(').concat(a," x").concat(i,')</div>\n                      <div class="">').concat(m.get_price_symbol,'</div>\n                      <div class="csd" id="customer-extra-price">').concat(x(a*i),"</div>\n                  </div>\n              </div>")),s=x(parseFloat(m.service_price)+parseFloat(r)),m.extra_total_price=parseFloat(r).toFixed(2),n(r)}),s},c=function(){var e=0;return g("#shw-selected-recurring").empty(),g("#shw-selected-recurring").append('\n                  <div class="c-h-e ckt-pt-1" id="cs-selected-recurring">                        \n                  <div id="customer-add-recurring-details">\n                  <div class="service-recurring-price">\n                  <div class="csd" id="customer-sel-recurring">Total Recurring Cost</div>\n                          <div class="bookingor-d-flex">\n                          <div class="">'.concat(m.get_price_symbol,'</div>\n                          <div class="csd" id="customer-recurring-price">').concat(x(parseFloat(m.sum_repeat_price)),"</div>\n                              </div>\n                              </div>\n                              </div>\n                              </div>")),"full-pay"===m.service_recurring_payment?(e=x(parseFloat(m.service_price)+parseFloat(m.sum_repeat_price)),m.repeat_total_price=parseFloat(m.sum_repeat_price).toFixed(2)):"on-book-pay"===m.service_recurring_payment&&(e=x(parseFloat(m.service_price)+parseFloat(m.sum_repeat_price)),m.repeat_total_price=parseFloat(m.sum_repeat_price).toFixed(2),f.empty(),g("#repeat-pay-each-book").text(m.service_price),u.text(e),f.text(e),null===m.service_deposit)&&(m.sum_total_cost=parseFloat(e).toFixed(2)),e},t=function(){var e=x(parseFloat(m.service_price)*m.selected_max_capacity);return _.text(x(parseFloat(m.service_price))+" X "+m.selected_max_capacity),e},l.text(m.service_name),g("#first-booking-cost").text(x(parseFloat(m.service_price))),_.text(x(parseFloat(m.service_price))),g(".extra-services").is(":checked"),g("#shw-selected-recurring").empty(),g("#customer-add-extra-details").empty(),g("#customer-add-extra-details").empty(),g("#customer-add-recurring-details").empty(),m.hasOwnProperty("extra_details")&&0<m.extra_details.length&&m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length?(v.empty(),f.empty(),a(),n(parseFloat(m.sum_repeat_price)+parseFloat(m.extra_total_price)),i=parseFloat(c()),i=(parseFloat(m.extra_total_price)+i).toFixed(2),u.text(i),f.text(i),f.text(i),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(n(parseFloat(m.sum_repeat_price)+parseFloat(m.extra_total_price)),i=parseFloat(c()),o=+parseFloat(e()),i=(parseFloat(m.extra_total_price)+i).toFixed(2),u.text(i),f.text(i+o))):m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length&&m.hasOwnProperty("selected_max_capacity")&&0<m.selected_max_capacity.length?(i=parseFloat(c()),o=t(),r=(parseFloat(o)+i-parseFloat(m.service_price)).toFixed(2),u.text(r),f.text(r),f.text(r),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(r=parseFloat(o)+i-parseFloat(m.service_price),o=+parseFloat(e()),f.text(x(parseFloat(r+o))),m.sum_total_cost=(r+o).toFixed(2))):m.hasOwnProperty("extra_details")&&0<m.extra_details.length?(u.text(a()),f.text(a()),m.sum_total_cost=parseFloat(a()).toFixed(2),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(i=parseFloat(a()),r=+parseFloat(e()),f.text(x(parseFloat(i+r))))):m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length&&"1"===g("#repeat-book").attr("data-repeat")?(c(),u.text(c()),f.text(c()),n(m.sum_repeat_price),m.sum_total_cost=parseFloat(c()).toFixed(2),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(o=parseFloat(c()),a=+parseFloat(e()),f.text(x(parseFloat(o+a))),m.sum_total_cost=(o+a).toFixed(2))):m.hasOwnProperty("selected_max_capacity")&&0<m.selected_max_capacity.length?(u.text(t()),f.text(t()),m.sum_total_cost=t(),null!==m.service_tax&&(i=parseFloat(t()),r=+parseFloat(e()),f.text(x(parseFloat(i+r))),m.sum_total_cost=(i+r).toFixed(2))):(g("#shw-selected-recurring").empty(),u.text(x(parseFloat(m.service_price))),v.text(x(parseFloat(m.service_tax))),f.text(x(parseFloat(s))),m.sum_total_cost=parseFloat(s).toFixed(2),null!==m.service_tax&&(v.empty(),v.text(x(parseFloat(m.service_tax))),s=parseFloat(m.service_price)+parseFloat(m.service_tax),f.text(x(parseFloat(s))),m.sum_total_cost=parseFloat(s).toFixed(2)),null!==m.service_deposit&&(b.empty(),h.empty(),b.text(m.service_deposit),"percentage"===m.service_deposit_type?(c=parseFloat(m.service_price)*parseFloat(m.service_deposit)/100,b.text(c),m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2),d=parseFloat(m.service_price)-parseFloat(c)+parseFloat(m.service_tax),h.text(d.toFixed(2))):"fixed-price"===m.service_deposit_type&&(b.text(m.customerDeposit_cost),d=parseFloat(m.service_price)-parseFloat(m.service_deposit)+parseFloat(m.service_tax),h.text(d.toFixed(2)),m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2))),m.service_deposit_type),p.text(m.get_staff_name),y.text(m.get_full_date),k.text(m.get_time_all))}),g(document).on("click","#skip-recurring",function(){delete m.repeat_details,delete m.sum_repeat_price,delete m.service_recurring_payment}),g("#customer-design-1-Confirm").on("click",function(e){return 0===g("input[type=radio][name=customer_pay]:checked").length?(g("#front-customer-pay").find(".cs-pay-valid").text("Please Select any Payment Method"),!1):(g(this).addClass("bookingor-d-none"),g("#tab3").removeClass("bookingor-d-none"),g("#front-customer-pay").find(".cs-pay-valid").empty(),g(".two-tbs").addClass("bookingor-d-none"),!0)}),g(document).ready(function(){}),new URLSearchParams(window.location.search).get("clientSecret"),g("input[type=radio][name=customer_pay]");var D=!1;g(document).on("click","#customer-design-finish",function(e){return 0===g("input[type=radio][name=customer_pay]:checked").length?(g(this).closest("form").find("#front-customer-pay").find(".cs-pay-valid").text("Please Select any Payment Method"),!1):(g(".js-close-popup").removeClass("bookingor-d-none"),g(".bookingor-progress-bar-move").width("95%"),D||(g("#bookingor-customer-payment-line").children().children().eq(0).append('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="completed-status"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M9 16.17L5.53 12.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L9 16.17z"></path></svg>'),D=!0),g(this).closest("form").find("#bookingor-customer-payment-line").children().children().eq(0).addClass("bookingor-status-active-line"),g(this).closest("form").find("#bookingor-customer-payment-line").children().children().eq(1).addClass("bookingor-active-h-line"),m.customer_pay=g("input[type=radio][name=customer_pay]:checked").val(),g(this).closest("form").find("#customer-payment").addClass("bookingor-d-none"),g(this).closest("form").find("#final-show").removeClass("bookingor-d-none"),g(this).closest("form").find("#front-customer-pay").find(".cs-pay-valid").empty(),!0)}),g("#bkinz-booking-design-2, #bkinz-booking-design-1, #bkinz-booking-design-3, #bkinz-booking-design-4, #bkinz-booking-design-5, #bkinz-booking-design-6,   #bookingor-widget-design-8").on("submit",function(e){e.preventDefault();e=Object.fromEntries(new FormData(e.target).entries());e.action="bp_confirm_booking",e.design_final_booking=m,e.nonce=TCN_BIND_FRONT.nonce,g.post({url:TCN_BIND_FRONT.GET_URL,data:e,cache:!1,success:function(e){},error:function(e,t,o){console.error(o)}})}),g("#bookingor-customer-add-google-calendar").on("click",function(){var e=m.get_start_time,t=m.get_start_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t=e.toISOString(),e=o.toISOString(),o={summary:m.service_name,location:m.location_name,description:m.service_description,start:t,end:e},t="https://www.google.com/calendar/render?action=TEMPLATE&dates="+encodeURIComponent(o.start)+"/"+encodeURIComponent(o.end)+"&text="+encodeURIComponent(o.summary)+"&details="+encodeURIComponent(o.description)+"&location="+encodeURIComponent(o.location);window.open(t,"_blank")}),g("#bookingor-customer-add-outlook-calendar").on("click",function(){var e=m.get_start_time,t=m.get_end_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t={subject:m.service_name,location:m.location_name,body:m.service_description,start:e.toISOString().replace(/[-:]|(\.\d{3})/g,""),end:o.toISOString().replace(/[-:]|(\.\d{3})/g,"")},a={subject:t.subject,location:t.location,body:t.body,startdt:t.start,enddt:t.end},e=Object.keys(a).map(function(e){return e+"="+encodeURIComponent(a[e])}).join("&");window.open("https://outlook.office.com/owa/?path=/calendar/action/compose&rru=addevent?"+e,"_blank")}),g("#bookingor-customer-add-yahoo-calendar").on("click",function(){var e=m.get_start_time,t=m.get_end_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t={title:m.service_name,desc:m.service_description,loc:m.location_name,st:e.toISOString().replace(/[-:]|(\.\d{3})/g,""),et:o.toISOString().replace(/[-:]|(\.\d{3})/g,"")},e="https://calendar.yahoo.com/?v=60&view=d&title="+encodeURIComponent(t.title)+"&desc="+encodeURIComponent(t.desc)+"&st="+encodeURIComponent(t.st)+"&et="+encodeURIComponent(t.et)+"&loc="+encodeURIComponent(t.loc);window.open(e,"_blank")}),g("#bookingor-customer-add-ical-calendar").on("click",function(){var e=m.get_start_time,t=m.get_end_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t=m.service_name,a=m.service_description,i=m.location_name,e=e.toISOString(),o=o.toISOString(),e="BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Our Company//NONSGML v1.0//EN\nBEGIN:VEVENT\nUID:"+Math.random().toString(36).substr(2,9)+"\nDTSTART:"+e+"\nDTEND:"+o+"\nSUMMARY:"+t+"\nDESCRIPTION:"+a+"\nLOCATION:"+i+"\nEND:VEVENT\nEND:VCALENDAR",o=new Blob([e],{type:"text/calendar"}),t=URL.createObjectURL(o);window.open(t,"_blank")}),g(document).on("click",".bookingor-woocommcerce",function(e){var t={action:"bookingor_wc_cart_page",product_id:m.wc_product_id,quantity:m.selected_max_capacity,design_final_booking:m,nonce:TCN_BIND_FRONT.nonce};g.post({url:TCN_BIND_FRONT.GET_URL,data:t,cache:!1,success:function(e){e=JSON.parse(e);window.location.replace(e.redirect_url)}})})});
     1jQuery(document).ready(function(g){g=jQuery.noConflict(),F();var m={},e=(g("#total-rec-cost").text("00.00"),g(".all-services-shw")),a=e.find("li"),t=g("#selectExtra-2 > ul").find("li"),l=(g("#the-location-search > ul").find("li"),g("#partial-pay").addClass("bookingor-d-none"),g("#bookingor-all-time-show").empty(),g("#customer-get-service-image"),g("#customer-sel-service")),_=(g("#customer-sel-icon"),g("#customer-service-price")),p=g("#customer-sel-employee"),u=(g("#customer-sel-location"),g("#service-discount-price"),g("#subtotal-cost")),v=g("#service-vat-cost"),f=g("#total-calc-cost"),h=g("#deposit-cost"),b=g("#due-remaining-cost"),y=g("#customer-sel-date"),k=g("#customer-sel-time");function x(e){return e.toFixed(m.price_decimals)}function F(){g.ajax({url:TCN_BIND_FRONT.GET_URL,type:"POST",data:{action:"bp_settings_get_data",nonce:TCN_BIND_FRONT.nonce},success:function(e){var o=JSON.parse(e);g.each(o,function(e,t){m.price_decimals=o.decimal_point,m.get_price_symbol=o.price_symbol,m.date_format=o.date_format,m.get_time_sheet=o.default_time_sheet,m.get_business_time=o.bookingor_business_timesheet,g(".full-head-1").css("--bookingor_color_border",o.boookingor_css.bookingor_color_border),g(".sidebar-1").css("--bookingor-sidebar-background",o.boookingor_css.sidebar_1),g(".bookingor, .full-service-2").css("--bookingor-border-active-color",o.boookingor_css.bookingor_color_border),g(".bookingor").css("--bookingor-full-day-selected",o.boookingor_css.full_day_selected),g(".bookingor").css("--bookingor-sidebar-text",o.boookingor_css.sidebar_text),g(".bookingor").css("--bookingor-sidebar-text-active",o.boookingor_css.sidebar_text_active),g(".bookingor").css("--bookingor-search-bars",o.boookingor_css.search_bars),g(".bookingor").css("--bookingor-cont-btn-bg",o.bookingor_cont_btn.bg),g(".bookingor").css("--bookingor-cont-btn-color",o.bookingor_cont_btn.clr),g(".bookingor").css("--bookingor-back-btn-bg",o.bookingor_btn_back.bg),g(".bookingor").css("--bookingor-back-btn-color",o.bookingor_btn_back.clr),g(".bookingor").css("--bookingor-background-border",o.boookingor_css.background_border_active),g(".bookingor").css("--bookingor-background-border-color",o.boookingor_css.background_border_color),g(".bookingor").css("--bookingor-background-radius",o.boookingor_css.background_border_radius),g(".bookingor").css("--bookingor-heading-font-family",o.boookingor_css.heading_font_family),g(".bookingor").css("--bookingor-all-font-family",o.boookingor_css.all_other_font_family),g(".bookingor").css("--bookingor-button-border-color",o.boookingor_css.button_border_color),g(".bookingor").css("--bookingor-button-border-radius",o.boookingor_css.button_border_radius),g(".bookingor").css("--bookingor-button-border",o.boookingor_css.button_border_active),"on"!==o.active_category&&g("#back-category").remove(),"on"!==o.active_staff&&g("#bookingor-ser").addClass("bookingor-col-lg-12")})},complete:function(){g("#bookingor-widget-design-8").removeClass("bookingor-v-none"),g(".bookingor-loader-container").remove()}})}e.find("li.active.active").find(".service-heading-1").text(),document.createElement("select").id="people-with-you",m.selected_max_capacity="1",g(document).on("change","#front-get-category-for-services",function(){delete m.sum_total_cost,null!==m.extra_details?(delete m.extra_details,delete m.repeat_details,delete m.sum_repeat_price,delete m.service_recurring_payment,delete m.service_recurring_type,delete m.sum_total_cost,delete m.repeat_total_price,delete m.service_deposit,delete m.service_deposit_type):m.extra_all;var e=g(this).find(":selected").data("service-id");g.post(TCN_BIND_FRONT.GET_URL+"?action=bp_front_services_data",{service_get_id:e,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);g.each(e,function(e,t){if(m.get_service_id=t.service_id,m.service_id=t.service_id,m.category_id=t.category_get_id,m.category_get_id=t.category_get_id,m.service_duration=t.service_duration,m.service_price=t.service_cost,m.service_name=t.service_name,m.service_tax=t.service_tax,m.service_icon=t.service_icon,1<m.service_max_capacity){g("#people-n-custom-duration").removeClass("bookingor-d-none"),g("#people-with-you").removeClass("bookingor-d-none");var o=g("#people-with-you");g("#people-with-you").empty();for(var a=t.service_capacity_max-1,i=1;i<=a;i++)o.append(g("<option></option>").val(i).html(i+" people"))}null!==m.service_deposit_type&&null!==t.service_deposit||g("#partial-pay").addClass("bookingor-d-none"),null!==t.service_deposit&&(g("#partial-pay").removeClass("bookingor-d-none"),m.service_deposit_type=t.service_deposit_type,m.service_deposit=t.service_deposit),1===t.service_capacity_max&&(g("#people-n-custom-duration").addClass("bookingor-d-none"),g("#people-with-you").addClass("bookingor-d-none"),g("#people-with-you").empty()),"day"!==m.service_recurring_type&&"monthly"!==m.service_recurring_type||g(".bookingor-recurring-weeks").addClass("bookingor-d-none")})}),"business-time-sheet"===m.get_time_sheet&&g(".bookingor-day-container").hasClass("widget-cal-active")&&(n(),g("#bookingor-all-time-show").empty())}),g("#people-with-you").on("change",function(e){e.preventDefault(),m.selected_max_capacity=g(this).val()}),g(document).on("click",".bookingor-full-services",function(){var e=g(this).find(":selected").data("get-location-id");""===e?g("#cs-selected-location").hide():g("#cs-selected-location").show(),g.post(TCN_BIND_FRONT.GET_URL+"?action=front_get_location",{location_id:e,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);g.each(e,function(e,t){m.location_get_id=t.location_id,m.location_country=t.location_country,m.location_city=t.location_city,m.location_address=t.location_address,g("#customer-sel-location").text(m.location_city)})})});var i=[],e=(g("extra-quantity-input").on("change",function(){g(this).val()}),g(document).on("click","#main-back-main",function(){delete m.extra_details,i=[],m.repeat_details=[],t.removeClass("bookingor-active"),t.find(".extra-services").attr("checked",!1)}),g(document).on("click",".bookingor-full-extras",function(e){g("#customer-add-extra-details").empty();var o=g(this).attr("data-extra-id"),a=g(this).find(".extra-quantity-input").val();g(this).hasClass("bookingor-active")&&!0===g(this).find(".extra-services").is(":checked")?i.find(function(e){return e.extra_id===o})||(m.extra_all.forEach(function(e,t){e.extra_id===o&&i.push({extra_id:e.extra_id,extra_name:e.extra_name,extra_duration:e.extra_duration,extra_price:e.extra_price,extra_qty:a})}),g(this).find(".plus-counter").on("click",function(){var e=parseInt(g(this).prev().val())+1,t=i.findIndex(function(e){return e.extra_id===o});i[t].extra_qty=e}),g(this).find(".minus-counter").on("click",function(){var e=g(this).next(),e=parseInt(e.val())-1,t=(g(this).next().attr("value",e),i.findIndex(function(e){return e.extra_id===o}));-1!==t&&(i[t].extra_qty=e)})):i=i.filter(function(e){return e.extra_id!==o}),m.extra_details=i}),g(document).on("change","#front-select-staffs",function(e){var t=g(this).attr("data-staff-id"),o=g(this).val();g("#get-staff-id-only").attr("data-get-staff-id",t),m.get_staff_name=o,m.get_staff_id=t}),g(document).on("click",".shop-list-1",function(){var e=g(this).attr("data-staff-id");g.post(TCN_BIND_FRONT.GET_URL+"?action=bp_get_staff_email",{staff_id:e,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);m.get_staff_email=e[0].staff_email})}),g("#selectService-1").find(".active"),g(".bookingor-day-container").on("click",function(e){e.preventDefault(),g(".bookingor-day-container").removeClass("widget-cal-active"),g(this).addClass("widget-cal-active");e=g(".widget-cal-active").attr("data-date"),m.get_full_date=w(e),g("#get-day").attr("data-full-day",e),e=moment(e).day();m.get_day_selected=e,m.get_day=e,g("#get-day").val(e),"location-time-sheet"===m.get_time_sheet&&r(),"staff-time-sheet"===m.get_time_sheet&&o(),"business-time-sheet"===m.get_time_sheet&&n()}),"staff-time-sheet"===m.get_time_sheet&&g("#front-select-staffs").on("change",o),g(".bookingor-searchbar-2, .bookingor-searchbar-location").on("click",function(){g(this).next(".bookingor-front-search-show").removeClass("bookingor-d-none")}),g(document).on("click",function(e){e=e.target;g(e).is("#searchService-1")||g(e).parents().is("#searchService-1")||g("#searchService-1").next(".bookingor-front-search-show").addClass("bookingor-d-none"),g(e).is("#searchLocation")||g(e).parents().is("#searchLocation")||g("#searchLocation").next(".bookingor-front-search-show").addClass("bookingor-d-none")}),g(" #searchService-1, #searchLocation").on("keyup",function(t){t.preventDefault(),(""===g(this).val()||1<g(this).val().length)&&g(a).show(),g(this).empty()&&g(a).show();var o=g(this).val().toLowerCase();g(".search-show-all div ").filter(function(){g(this).toggle(-1<g(this).text().toLowerCase().indexOf(o));var e=t.which;40===e&&(t.preventDefault(),0===($currentLi=$currentLi.next()).length&&($currentLi=g(".cv_item").first().closest("li")),g(".cv_item").removeClass("active-link"),($link=$currentLi.find(".cv_item")).addClass("active-link")),13===e&&1<g("#searchService-1, #searchLocation").val().length&&(t.preventDefault(),g(".search-show-all").children(":visible").eq(0).trigger("click")),8===e&&g(a).show()})}),g("#searchService-1, #searchLocation").on("input",function(e){var t=g(this).val().toLowerCase(),o=g("<div id='no-results-message'></div>").text("Search another"),a=!1;g(".bookingor-search-all-service").each(function(){g(this).text().toLowerCase().includes(t)?(g(this).show(),a=!0):g(this).hide()}),a?g("#no-results-message").remove():g("body").append(o)}),new Date(Date.now()));function w(e){var e=new Date(e),t=""+(e.getMonth()+1),o=""+e.getDate();return[e.getFullYear(),t=t.length<2?"0"+t:t,o=o.length<2?"0"+o:o].join("-")}function o(){var e=g("#front-select-staffs").find(":selected").attr("data-staff-id"),t=(m.get_staff_id=e,g("#front-get-category-for-services").find(":selected").attr("data-service-id"),g("#front-select-staffs").find(":selected").attr("data-staff-id"),g("#front-select-staffs").find(":selected").text()),t=(m.get_staff_name=t,g("#selectListEmployee-1, #selectListEmployee-2, #selectListEmployee-3, #selectListEmployee-4, #selectListEmployee-5, #selectListEmployee-6").children().find(".active").attr("data-staff-id"),e=m.get_staff_id,m.get_service_id),o=m.get_full_date,a=m.get_day;g.ajax({type:"POST",url:TCN_BIND_FRONT.GET_URL+"?action=front_get_staff_time_sheet",data:{get_days:a,staff_id_only:e,service_id_only:t,get_date:o,nonce:TCN_BIND_FRONT.nonce},success:function(e){var a=JSON.parse(e),i=(m.business_time_sheet=a,[]);g("#rp-1-date").text(N(m.get_full_date,c)),g.each(a,function(e,t){var o;g("#bookingor-all-time-show").empty(),!1===a.success?g("#bookingor-time-show-five > ul").html('<div class="bookingor-f-14"><div class="t-bg">No Availability, Try another Date</div>'):(o=g("<li>").addClass("select-picktime-1 select_list no-shadow t-bg"),t=g("<div>").attr({"data-start-time":t[0],"data-end-time":t[1]}).text(t[0]+" - "+t[1]),o.append(t),i.push(o))}),g("#bookingor-all-time-show").append(i)}})}function r(){m.get_staff_id;var e=m.location_get_id,t=m.service_id,o=m.get_full_date,a=m.get_day;g.post(TCN_BIND_FRONT.GET_URL+"?action=front_get_location_times_sheet",{get_days:a,location_id_only:e,service_id_only:t,get_date:o,nonce:TCN_BIND_FRONT.nonce},function(e){e=JSON.parse(e);g.each(e,function(e,t){g("#bookingor-all-time-show").empty();var o=t.filter(function(e,t){return t%2==0});g("#rp-1-date").text(N(m.get_full_date,c));for(var a=t.filter(function(e,t){return t%2==1}),i=[],r=0;r<o.length;r++){for(;r<a.length;r++)i.push(o[r],a[r]),m.start_and_end_time=i,g("#selectPickTime-5").children().append('<li class="select-picktime-1 select_list no-shadow"><div data-start-time="'+o[r]+':00"  data-end-time="'+a[r]+'" class="t-bg">'+o[r]+" - "+a[r]+"</div></li>"),g("#get-start-time").val(o[r]),g("#get-before-buffer").val(),g("#get-after-buffer").val(),g(document).on("click",".select-picktime-1",function(){var e=g(this).index(),t=o[e],e=a[e];m.get_start_time=t,m.get_end_time=e});g(".t-bg ").on("click",function(){g(".t-bg ").removeClass("active-time-1"),g(this).addClass("active-time-1")})}})})}function n(){var e=g("#front-select-staffs").find(":selected").attr("staff-id"),e=(m.get_staff_id=e,g("#front-select-staffs").find(":selected").text()),e=(m.get_staff_name=e,m.get_service_id),t=m.get_full_date,o=m.get_day;g.ajax({type:"POST",url:TCN_BIND_FRONT.GET_URL+"?action=bookingor_front_business_weekly_time_sheet",data:{get_days:o,service_id_only:e,get_date:t,nonce:TCN_BIND_FRONT.nonce},success:function(e){var a=JSON.parse(e),i=(m.business_time_sheet=a,[]);g("#rp-1-date").text(N(m.get_full_date,c)),g.each(a,function(e,t){var o;g("#bookingor-all-time-show").empty(),!1===a.success?g("#bookingor-time-show-five > ul").html('<div class="bookingor-f-14"><div class="t-bg">No Availability, Try another Date</div>'):(o=g("<li>").addClass("select-picktime-1 select_list no-shadow t-bg"),t=g("<div>").attr({"data-start-time":t[0],"data-end-time":t[1]}).text(t[0]+" - "+t[1]),o.append(t),i.push(o))}),g("#bookingor-all-time-show").append(i)}})}function s(e,t){var o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),e=e.getFullYear();return"m-d-Y"===t?"".concat(o,"-").concat(a,"-").concat(e):"d-m-Y"===t?"".concat(a,"-").concat(o,"-").concat(e):"Invalid date format"}g("#get-date-full").val(w(e)),g("#front-select-staffs").on("change",function(e){e.preventDefault()}),g(a).on("click",function(e){var t=g(this).attr("data-get-duration");g("#get-full-service-duration").val(t)}),g(".bookingor-recurring-weeks").on("click",function(e){}),g("#calendar-full").on("click",function(e){"location-time-sheet"===m.get_time_sheet&&g("#calendar-full").on("click",r),"staff-time-sheet"===m.get_time_sheet&&g("#calendar-full").on("click",o),"business-time-sheet"===m.get_time_sheet&&g("#calendar-full").on("click",n)}),g(document).on("click",".select-picktime-1",function(){var e=g(this).children().text(),t=g(this).children().attr("data-start-time"),o=g(this).children().attr("data-end-time");m.get_start_time=t,m.get_end_time=o,m.get_time_all=e,g("#rp-1-time").text(m.get_time_all),g(".service-price-rec").text(m.service_price)});var c=g("#end-repeat-date").attr("data-date-format");function N(e,t){var o=new Date(e);switch(t){case"m-d-Y":return s(o,"m-d-Y");case"d-m-Y":return s(o,"d-m-Y");case"Y-m-d":return o.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"});case"m/d/Y":return o.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric"}).replace(/-/g,"/");case"d/m/Y":return o.toLocaleDateString("en-US",{day:"2-digit",month:"2-digit",year:"numeric"}).replace(/-/g,"/");case"Y/d/m":return o.toLocaleDateString("en-US",{year:"numeric",day:"2-digit",month:"2-digit"}).replace(/-/g,"/");case"M j, Y":return o.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});case"F j, Y":return o.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});default:return"Invalid date format"}}function d(){var e=m.get_full_date,t=parseInt(g("#repeat-occur").val(),10),o=g(".repeat-type").attr("data-repeat-type"),i=parseInt(g(".every-number").val(),10),a=g("#end-repeat-date").val(),r=JSON.parse(m.get_time_sheet?m.get_business_time:m.staff_sheet_weekly),n=new Date(e),s=[];if(0<t&&"week"===o){var c=[],d=new Date(e);g(".bookingor-recurring-day").each(function(){g(this).hasClass("bookingor-repeat-day-active")&&c.push(g(this).data("day"))});for(var l=0;l<t;l++){for(var _=0;_<c.length;_++)(()=>{var e=c[_],o=((e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e)-d.getDay())<=0&&(e+=7),d.setDate(d.getDate()+e),d.toLocaleDateString("en-US",{weekday:"long"}).toLowerCase()),a=!1;g.each(r,function(e,t){if(t.hasOwnProperty(o)&&1===t[o])return!(a=!0)}),!a&&c.includes(o)&&s.push({date:w(d),dayOfWeek:o,start_time:m.get_start_time,end_time:m.get_end_time,repeatTime:m.get_time_all,repeat_cost:m.service_price})})();d.setDate(d.getDate()+7*i)}}if(0<t&&"day"===o)for(var p=0;p<t;p++)(()=>{n.setDate(n.getDate()+i);var o=n.toLocaleDateString("en-US",{weekday:"long"}).toLowerCase(),a=!1;g.each(r,function(e,t){if(t.hasOwnProperty(o)&&1===t[o])return!(a=!0)}),a||s.push({date:w(n),dayOfWeek:o,start_time:m.get_start_time,end_time:m.get_end_time,repeatTime:m.get_time_all,repeat_cost:m.service_price})})();if(a)for(;n<=new Date(a);)(()=>{n.setDate(n.getDate()+i);var o=n.toLocaleDateString("en-US",{weekday:"long"}).toLowerCase(),a=!1;g.each(r,function(e,t){if(t.hasOwnProperty(o)&&1===t[o])return!(a=!0)}),a||s.push({date:w(n),dayOfWeek:o,repeatTime:m.get_time_all,repeat_cost:m.service_price})})();(m.repeat_details=s).map(function(e){return e.repeat_cost});var o=s.reduce(function(e,t){return e+parseFloat(t.repeat_cost)},0),u=(m.sum_repeat_price=o,g("#total-rec-cost").text(x(parseFloat(o))),g.each(s,function(e,t){}),g(".all-repeats"));u.empty(),s.forEach(function(e,t){N(e.date,m.get_date_format);var o=e.dayOfWeek,t=1<=(t=t+1+1)&&t<=3?t+["th","st","nd","rd"][t]:t+"th";u.append('<div class="repeats-show bookingor-d-flex"><div> '.concat(t,": ").concat(N(e.date,m.get_date_format)," </div><div> ").concat(o," ").concat(m.get_time_all,' </div>\n          <div class="service-price">\n          <div class="cur-poz-strt-no-sp bookingor-d-flex">\n          <div class="cur-poz-strt-no-sp">').concat(m.get_price_symbol,'</div>\n          <div class="repeat-get-all-cost">').concat(m.service_price,"</div>\n          </div>\n          </div>"))}),(!e||isNaN(t)||t<=0)&&alert("Please enter valid values for Initial Date and Occurrence.")}void 0!==c&&(e=c.replace("Y","yyyy"),g("#end-repeat-date").datepicker({format:e})),g(".all-repeats").empty(),g(".bookingor-recurring-day").on("click",d),g("#end-repeat-date, #repeat-occur").on("change",d),g(document).on("click",".ready-b, #chk-validation, #extra-btn-cont, #repeat-b-cont",function(e){var s,t,o,a,i,r,n,c,d;e.preventDefault(),m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length&&g("#repeat-book").attr("data-repeat","1"),F.success=function(e){e.price_decimal},g("#customer-add-extra-details").empty(),g("#customer-get-service-image").empty(),void 0!==m&&(s=function(e){var t;null!==m.service_deposit&&(h.empty(),b.empty(),h.text(m.service_deposit),"percentage"===m.service_deposit_type?(t=(parseFloat(m.service_price)+parseFloat(e))*parseFloat(m.service_deposit)/100,h.text(t),t=parseFloat(m.service_price)-parseFloat(t)+parseFloat(m.service_tax),b.text(t.toFixed(2)),m.due_amount=parseFloat(t).toFixed(2)):"fixed-price"===m.service_deposit_type&&(h.text(m.customerDeposit_cost),t=parseFloat(m.service_price)+parseFloat(e)-parseFloat(m.service_deposit)+parseFloat(m.service_tax),b.text(t.toFixed(2)),m.due_amount=parseFloat(t).toFixed(2)))},e=function(){if(null!==m.service_tax)return v.empty(),v.text(x(parseFloat(m.service_tax))),x(parseFloat(m.service_tax))},a=function(){var n=0;return g("#customer-add-extra-details").empty(),g.each(m.extra_details,function(e,t){var o=t.extra_name,a=t.extra_price,i=t.extra_qty,r=m.extra_details.map(function(e){return parseFloat(e.extra_price*e.extra_qty)}).reduce(function(e,t){return e+t},0);t.extra_duration,g("#customer-add-extra-details").append('\n                  <div class="service-extra-price">\n                  <div class="csd" id="customer-sel-extra">'.concat(o,'</div>\n                  <div class="bookingor-d-flex">\n                      <div>(').concat(a," x").concat(i,')</div>\n                      <div class="">').concat(m.get_price_symbol,'</div>\n                      <div class="csd" id="customer-extra-price">').concat(x(a*i),"</div>\n                  </div>\n              </div>")),n=x(parseFloat(m.service_price)+parseFloat(r)),m.extra_total_price=parseFloat(r).toFixed(2),s(r)}),n},c=function(){var e=0;return g("#shw-selected-recurring").empty(),g("#shw-selected-recurring").append('\n                  <div class="c-h-e ckt-pt-1" id="cs-selected-recurring">                        \n                  <div id="customer-add-recurring-details">\n                  <div class="service-recurring-price">\n                  <div class="csd" id="customer-sel-recurring">Total Recurring Cost</div>\n                          <div class="bookingor-d-flex">\n                          <div class="">'.concat(m.get_price_symbol,'</div>\n                          <div class="csd" id="customer-recurring-price">').concat(x(parseFloat(m.sum_repeat_price)),"</div>\n                              </div>\n                              </div>\n                              </div>\n                              </div>")),"full-pay"===m.service_recurring_payment?(e=x(parseFloat(m.service_price)+parseFloat(m.sum_repeat_price)),m.repeat_total_price=parseFloat(m.sum_repeat_price).toFixed(2)):"on-book-pay"===m.service_recurring_payment&&(e=x(parseFloat(m.service_price)+parseFloat(m.sum_repeat_price)),m.repeat_total_price=parseFloat(m.sum_repeat_price).toFixed(2),f.empty(),g("#repeat-pay-each-book").text(m.service_price),u.text(e),f.text(e),null===m.service_deposit)&&(m.sum_total_cost=parseFloat(e).toFixed(2)),e},t=function(){var e=x(parseFloat(m.service_price)*m.selected_max_capacity);return _.text(x(parseFloat(m.service_price))+" X "+m.selected_max_capacity),e},l.text(m.service_name),g("#first-booking-cost").text(x(parseFloat(m.service_price))),_.text(x(parseFloat(m.service_price))),g(".extra-services").is(":checked"),g("#shw-selected-recurring").empty(),g("#customer-add-extra-details").empty(),g("#customer-add-extra-details").empty(),g("#customer-add-recurring-details").empty(),m.hasOwnProperty("extra_details")&&0<m.extra_details.length&&m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length?(v.empty(),f.empty(),a(),s(parseFloat(m.sum_repeat_price)+parseFloat(m.extra_total_price)),i=parseFloat(c()),i=(parseFloat(m.extra_total_price)+i).toFixed(2),u.text(i),f.text(i),f.text(i),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(s(parseFloat(m.sum_repeat_price)+parseFloat(m.extra_total_price)),i=parseFloat(c()),o=+parseFloat(e()),i=(parseFloat(m.extra_total_price)+i).toFixed(2),u.text(i),f.text(i+o))):m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length&&m.hasOwnProperty("selected_max_capacity")&&0<m.selected_max_capacity.length?(i=parseFloat(c()),o=t(),r=(parseFloat(o)+i-parseFloat(m.service_price)).toFixed(2),u.text(r),f.text(r),f.text(r),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(r=parseFloat(o)+i-parseFloat(m.service_price),o=+parseFloat(e()),f.text(x(parseFloat(r+o))),m.sum_total_cost=(r+o).toFixed(2))):m.hasOwnProperty("extra_details")&&0<m.extra_details.length?(u.text(a()),f.text(a()),m.sum_total_cost=parseFloat(a()).toFixed(2),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(i=parseFloat(a()),r=+parseFloat(e()),f.text(x(parseFloat(i+r))))):m.hasOwnProperty("repeat_details")&&0<m.repeat_details.length&&"1"===g("#repeat-book").attr("data-repeat")?(c(),u.text(c()),f.text(c()),s(m.sum_repeat_price),m.sum_total_cost=parseFloat(c()).toFixed(2),"percentage"!==m.service_deposit_type&&"fixed-price"!==m.service_deposit_type||(m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2)),null!==m.service_tax&&(o=parseFloat(c()),a=+parseFloat(e()),f.text(x(parseFloat(o+a))),m.sum_total_cost=(o+a).toFixed(2))):m.hasOwnProperty("selected_max_capacity")&&0<m.selected_max_capacity.length?(u.text(t()),f.text(t()),m.sum_total_cost=t(),null!==m.service_tax&&(i=parseFloat(t()),r=+parseFloat(e()),f.text(x(parseFloat(i+r))),m.sum_total_cost=(i+r).toFixed(2))):(g("#shw-selected-recurring").empty(),u.text(x(parseFloat(m.service_price))),v.text(x(parseFloat(m.service_tax))),f.text(x(parseFloat(n))),m.sum_total_cost=parseFloat(n).toFixed(2),null!==m.service_tax&&(v.empty(),v.text(x(parseFloat(m.service_tax))),n=parseFloat(m.service_price)+parseFloat(m.service_tax),f.text(x(parseFloat(n))),m.sum_total_cost=parseFloat(n).toFixed(2)),null!==m.service_deposit&&(h.empty(),b.empty(),h.text(m.service_deposit),"percentage"===m.service_deposit_type?(c=parseFloat(m.service_price)*parseFloat(m.service_deposit)/100,h.text(c),m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2),d=parseFloat(m.service_price)-parseFloat(c)+parseFloat(m.service_tax),b.text(d.toFixed(2))):"fixed-price"===m.service_deposit_type&&(h.text(m.customerDeposit_cost),d=parseFloat(m.service_price)-parseFloat(m.service_deposit)+parseFloat(m.service_tax),b.text(d.toFixed(2)),m.sum_total_cost=parseFloat(m.service_deposit).toFixed(2))),m.service_deposit_type),p.text(m.get_staff_name),y.text(m.get_full_date),k.text(m.get_time_all))}),g(document).on("click","#skip-recurring",function(){delete m.repeat_details,delete m.sum_repeat_price,delete m.service_recurring_payment}),g("#customer-design-1-Confirm").on("click",function(e){return 0===g("input[type=radio][name=customer_pay]:checked").length?(g("#front-customer-pay").find(".cs-pay-valid").text("Please Select any Payment Method"),!1):(g(this).addClass("bookingor-d-none"),g("#tab3").removeClass("bookingor-d-none"),g("#front-customer-pay").find(".cs-pay-valid").empty(),g(".two-tbs").addClass("bookingor-d-none"),!0)}),g(document).ready(function(){}),new URLSearchParams(window.location.search).get("clientSecret"),g("input[type=radio][name=customer_pay]");var D=!1;g(document).on("click","#customer-design-finish",function(e){return 0===g("input[type=radio][name=customer_pay]:checked").length?(g(this).closest("form").find("#front-customer-pay").find(".cs-pay-valid").text("Please Select any Payment Method"),!1):(g(".js-close-popup").removeClass("bookingor-d-none"),g(".bookingor-progress-bar-move").width("95%"),D||(g("#bookingor-customer-payment-line").children().children().eq(0).append('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="completed-status"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M9 16.17L5.53 12.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L9 16.17z"></path></svg>'),D=!0),g(this).closest("form").find("#bookingor-customer-payment-line").children().children().eq(0).addClass("bookingor-status-active-line"),g(this).closest("form").find("#bookingor-customer-payment-line").children().children().eq(1).addClass("bookingor-active-h-line"),m.customer_pay=g("input[type=radio][name=customer_pay]:checked").val(),g(this).closest("form").find("#customer-payment").addClass("bookingor-d-none"),g(this).closest("form").find("#final-show").removeClass("bookingor-d-none"),g(this).closest("form").find("#front-customer-pay").find(".cs-pay-valid").empty(),!0)}),g("#bkinz-booking-design-2, #bkinz-booking-design-1, #bkinz-booking-design-3, #bkinz-booking-design-4, #bkinz-booking-design-5, #bkinz-booking-design-6,   #bookingor-widget-design-8").on("submit",function(e){e.preventDefault();e=Object.fromEntries(new FormData(e.target).entries());e.action="bp_confirm_booking",e.design_final_booking=m,e.nonce=TCN_BIND_FRONT.nonce,g.post({url:TCN_BIND_FRONT.GET_URL,data:e,cache:!1,success:function(e){},error:function(e,t,o){console.error(o)}})}),g("#bookingor-customer-add-google-calendar").on("click",function(){var e=m.get_start_time,t=m.get_start_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t=e.toISOString(),e=o.toISOString(),o={summary:m.service_name,location:m.location_name,description:m.service_description,start:t,end:e},t="https://www.google.com/calendar/render?action=TEMPLATE&dates="+encodeURIComponent(o.start)+"/"+encodeURIComponent(o.end)+"&text="+encodeURIComponent(o.summary)+"&details="+encodeURIComponent(o.description)+"&location="+encodeURIComponent(o.location);window.open(t,"_blank")}),g("#bookingor-customer-add-outlook-calendar").on("click",function(){var e=m.get_start_time,t=m.get_end_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t={subject:m.service_name,location:m.location_name,body:m.service_description,start:e.toISOString().replace(/[-:]|(\.\d{3})/g,""),end:o.toISOString().replace(/[-:]|(\.\d{3})/g,"")},a={subject:t.subject,location:t.location,body:t.body,startdt:t.start,enddt:t.end},e=Object.keys(a).map(function(e){return e+"="+encodeURIComponent(a[e])}).join("&");window.open("https://outlook.office.com/owa/?path=/calendar/action/compose&rru=addevent?"+e,"_blank")}),g("#bookingor-customer-add-yahoo-calendar").on("click",function(){var e=m.get_start_time,t=m.get_end_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t={title:m.service_name,desc:m.service_description,loc:m.location_name,st:e.toISOString().replace(/[-:]|(\.\d{3})/g,""),et:o.toISOString().replace(/[-:]|(\.\d{3})/g,"")},e="https://calendar.yahoo.com/?v=60&view=d&title="+encodeURIComponent(t.title)+"&desc="+encodeURIComponent(t.desc)+"&st="+encodeURIComponent(t.st)+"&et="+encodeURIComponent(t.et)+"&loc="+encodeURIComponent(t.loc);window.open(e,"_blank")}),g("#bookingor-customer-add-ical-calendar").on("click",function(){var e=m.get_start_time,t=m.get_end_time,o=m.get_full_date,e=new Date(o+" "+e),o=new Date(o+" "+t),t=m.service_name,a=m.service_description,i=m.location_name,e=e.toISOString(),o=o.toISOString(),e="BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Our Company//NONSGML v1.0//EN\nBEGIN:VEVENT\nUID:"+Math.random().toString(36).substr(2,9)+"\nDTSTART:"+e+"\nDTEND:"+o+"\nSUMMARY:"+t+"\nDESCRIPTION:"+a+"\nLOCATION:"+i+"\nEND:VEVENT\nEND:VCALENDAR",o=new Blob([e],{type:"text/calendar"}),t=URL.createObjectURL(o);window.open(t,"_blank")}),g(document).on("click",".bookingor-woocommcerce",function(e){var t={action:"bookingor_wc_cart_page",product_id:m.wc_product_id,quantity:m.selected_max_capacity,design_final_booking:m,nonce:TCN_BIND_FRONT.nonce};g.post({url:TCN_BIND_FRONT.GET_URL,data:t,cache:!1,success:function(e){e=JSON.parse(e);window.location.replace(e.redirect_url)}})})});
  • bookingor/trunk/bookingor.php

    r3445527 r3445558  
    99 *
    1010 * @link              Bookingor
    11  * @since             2.0.3
     11 * @since             2.0.4
    1212 * @package           Bookingor
    1313 *
     
    1515 * Plugin Name:       Bookingor - Booking System for Appointment Calendar, Meeting Scheduler & WooCommerce Bookings
    1616 * Description:       Bookingor is an all-in-one appointment and booking management system. Streamline scheduling processes for any business or individuals. Bookingor helps you efficiently handle bookings, save time, and enhance the customer experience.
    17  * Version:           2.0.3
     17 * Version:           2.0.4
    1818 * License:           GPL-2.0+
    1919 * Tags:              booking, appointment, booking System, Schedule appointment, calendar, scheduling
     
    3737 * Currently plugin version.
    3838 */
    39 define('BOOKINGOR_VERSION', '2.0.3');
     39define('BOOKINGOR_VERSION', '2.0.4');
    4040
    4141/**
  • bookingor/trunk/includes/class-bookingor.php

    r3445527 r3445558  
    9696            $this->version = BOOKINGOR_VERSION;
    9797        } else {
    98             $this->version = '2.0.3';
     98            $this->version = '2.0.4';
    9999        }
    100100        $this->plugin_name = 'bookingor';
     
    287287
    288288        $plugin_public_settings = new SettingsControl();
    289         $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
    290         $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
     289        $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles', 1);
     290        $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts', 1);
    291291        // shortcodes
    292292        $this->loader->add_shortcode('BOOKINGOR_DESIGN_1', $plugin_public, 'bp_booking_design_one');
Note: See TracChangeset for help on using the changeset viewer.