(()=>{"use strict";var __webpack_require__={n:module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},d:(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},o:(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop)};const external_jQuery_namespaceObject=window.jQuery;__webpack_require__.n(external_jQuery_namespaceObject)()(document).ready((function($){var localTimezone=moment.tz.guess(),shouldDisplayNotices=!1;$(".booking-cancel").on("click","a.cancel",(function(){return window.confirm(wc_bookings_user_my_account_params.cancel_confirmation)}));var maybeConvertDateTime=function(index,element){var elementTimezone=$(element).data("timezone"),elementTime=$(element).text().trim();if("yes"!==$(element).data("allDay")&&elementTimezone!==localTimezone){if(!moment(elementTime,wc_bookings_user_my_account_params.datetime_format,!0).isValid())return $(element).text(elementTime+" "+elementTimezone),void(shouldDisplayNotices=!0);var formattedDate=moment.tz(elementTime,wc_bookings_user_my_account_params.datetime_format,elementTimezone).tz(localTimezone).format(wc_bookings_user_my_account_params.datetime_format);$(element).text(formattedDate)}};wc_bookings_user_my_account_params.timezone_conversion&&localTimezone&&($(".my_account_bookings").find("tbody .booking-start-date").each(maybeConvertDateTime),$(".my_account_bookings").find("tbody .booking-end-date").each(maybeConvertDateTime),$(".woocommerce-order-details").find(".wc-booking-summary-list .booking-start-date").each(maybeConvertDateTime),$(".woocommerce-order-details").find(".wc-booking-summary-list .booking-end-date").each(maybeConvertDateTime),shouldDisplayNotices&&$(".bookings-my-account-notice").text(wc_bookings_user_my_account_params.timezone_notice+" "+localTimezone+".").show())}))})();
//# sourceMappingURL=user-my-account.js.map